#!/bin/sh

# Scid (Shane's Chess Information Database)
#
# Copyright (C) 1999-2004  Shane Hudson. All rights reserved.
#
# This is freely redistributable software; see the file named "COPYING"
# or "copying.txt" that came with this program.
#
# To contact the author, email Shane at: sgh@users.sourceforge.net

#
# The following few comments are only for Unix versions of Scid:
#

# The "\" at the end of the comment line below is necessary! It means
#   that the "exec" line is a comment to Tcl/Tk, but not to /bin/sh.
# The next line restarts using tkscid: \
exec tkscid "$0" "$@"

# For the above to work, tkscid must be in a directory in your PATH.
# Alternatively, you can set the first line to start tkscid directly
# by specifying the full name of tkscid, eg:
# #!/home/myname/bin/tkscid

############################################################

set scidVersion "3.6"

# Determine operating system platform: unix or windows
#
set windowsOS 0
if {$tcl_platform(platform) == "windows"} { set windowsOS 1 }
set unixOS 0
if {$tcl_platform(platform) == "unix"} { set unixOS 1 }

# A lot of code assumes tcl_platform is either windows or unix, so
# lotsa stuff may break if this is not the case.
#
if {(! $windowsOS)  &&  (! $unixOS)} {
  # What to do here? Warn the user...?
}


# Check that on Unix, the version of tkscid matches the version of this
# script or on Windows, that the scid.exe and scid.gui versions are identical.
#
if {[string compare [sc_info version] $scidVersion]} {
  wm withdraw .
  if {$windowsOS} {
    set msg "This is Scid version [sc_info version], but the scid.gui data\n"
    append msg "file has the version number $scidVersion.\n"
  } else {
    set msg "This program,\n\"$argv0\",\nis version $scidVersion,\nbut the "
    append msg "tkscid program \nit uses is version [sc_info version].\n"
    append msg "Check that the path to tkscid is correct." 
  }
  tk_messageBox -type ok -icon error -title "Scid: Version Error" -message $msg
  exit 1
}

# Alter the version if any patches have been made to the Tcl code only:
set scidVersion "3.6.1"
set scidVersionDate "03 March 2004"

#############################################################
#
# NAMESPACES
#
# The main Tcl/Tk namespaces used in the Scid application are
# initialized here, so that default values can be set up and
# altered when the user options file is loaded.
#
foreach ns {
  ::splash
  ::utils
    ::utils::date ::utils::font ::utils::history ::utils::pane ::utils::string
    ::utils::sound ::utils::validate ::utils::win
  ::file
    ::file::finder ::file::maint ::maint
    ::bookmarks
  ::edit
  ::game
    ::gbrowser
  ::search
    ::search::filter ::search::board ::search::header ::seach::material
  ::windows
    ::windows::gamelist ::windows::stats ::tree ::windows::tree
    ::windows::switcher ::windows::eco ::crosstab ::pgn
  ::tools
    ::tools::analysis ::tools::email
    ::tools::graphs
      ::tools::graphs::filter ::tools::graphs::rating ::tools::graphs::score
    ::tb ::optable
  ::board ::move
} {
  namespace eval $ns {}
}


#############################################################
# Customisable variables:

# scidExeDir: contains the directory of the Scid executable program.
# Not used under Linux/Unix, but is used under Windows to determine the
# directory where the options file is stored.
set scidExeDir [file dirname [info nameofexecutable]]

# scidUserDir: location of user-specific Scid files.
# This is "~/.scid" on Unix, and the Scid exectuable dir on Windows.
if {$windowsOS} {
  set scidUserDir $scidExeDir
} else {
  set scidUserDir [file nativename "~/.scid"]
}

# scidConfigDir, scidDataDir, scidLogDir:
#   Location of Scid configuration, data and log files.
set scidConfigDir [file nativename [file join $scidUserDir "config"]]
set scidDataDir [file nativename [file join $scidUserDir "data"]]
set scidLogDir [file nativename [file join $scidUserDir "log"]]

# ecoFile: the ECO file for opening classification. Scid will try to load
# this first, and if that fails, it will try to load  "scid.eco" in the
# current directory.
if {$windowsOS} {
  set ecoFile [file join $scidDataDir "scid.eco"]
} else {
  set ecoFile "/usr/share/scid/scid.eco"
}
# Changed default location of ECO file to /usr/share/scid instead
# of /usr/local/share/scid. [PvR]

# boardSizes: a list of the available board sizes.
set boardSizes [list 25 30 35 40 45 50 55 60 65 70]
set boardSizesOLD [list 21 25 29 33 37 40 45 49 54 58 64 72]

# boardSize: Default board size. See the available board sizes above.
set boardSize 40

# boardStyle: Default board piece set. See bitmaps.tcl for styles.
set boardStyle Alpha

# language for help pages and messages:
set language E
set oldLang X

# Toolbar configuration:
foreach {tbicon status}  {
  new 1 open 1 save 1 close 1
  finder 1 bkm 1 gprev 1 gnext 1
  cut 0 copy 0 paste 0
  rfilter 1 bsearch 1 hsearch 1 msearch 1
  switcher 1 glist 1 pgn 1 tmt 1 maint 1 eco 1 tree 1 crosst 1 engine 1
} {
  set toolbar($tbicon) $status
}

# boardCoords: 1 to show board Coordinates, 0 to hide them.
set boardCoords 0

# boardSTM: 1 to show side-to-move icon, 0 to hide it.
set boardSTM 1

# Default values for fonts:
proc createFont {name} {
  set opts $::fontOptions($name)
  font create font_$name \
    -family [lindex $opts 0] -size [lindex $opts 1] \
    -weight [lindex $opts 2] -slant [lindex $opts 3]
}

proc configureFont {name} {
  set opts $::fontOptions($name)
  font configure font_$name \
    -family [lindex $opts 0] -size [lindex $opts 1] \
    -weight [lindex $opts 2] -slant [lindex $opts 3]
}

if {$windowsOS} {
  set fontOptions(Regular) [list Arial           10 normal roman]
  set fontOptions(Menu)    [list {MS Sans Serif}  9 normal roman]
  set fontOptions(Small)   [list Arial            9 normal roman]
  set fontOptions(Tiny)    [list Arial            8 normal roman]
  set fontOptions(Fixed)   [list Courier          9 normal roman]
} else {
  set fontOptions(Regular) [list helvetica 11 normal roman]
  set fontOptions(Menu)    [list helvetica 10 normal roman]
  set fontOptions(Small)   [list helvetica 10 normal roman]
  set fontOptions(Tiny)    [list helvetica  9 normal roman]
  set fontOptions(Fixed)   [list fixed     10 normal roman]
}

createFont Regular
createFont Menu
createFont Small
createFont Tiny
createFont Fixed

# Analysis command: to start chess analysis engine.
set analysisCommand ""
if {$windowsOS} {
  set analysisChoices {wcrafty.exe}
} else {
  set analysisChoices {crafty}
}

# Colors: dark and lite are square colors
#     whitecolor/blackcolor are piece colors
#     highcolor is the color when something is selected.
#     bestcolor is used to indicate a suggested move square.
set dark        "\#70a070"
set lite        "\#e0d070"
set whitecolor  "\#ffffff"
set blackcolor  "\#000000"
set whiteborder "\#000000"
set blackborder "\#ffffff"
set highcolor   "\#b0d0e0"
set bestcolor   "\#bebebe"
set buttoncolor "\#b0c0d0"
set borderwidth 1

# Defaults for the PGN window:
# if ::pgn::showColor is 1, the PGN text will be colorized.
set ::pgn::showColor 1
set ::pgn::indentVars 1
set ::pgn::indentComments 1
set ::pgn::symbolicNags 1
set ::pgn::moveNumberSpaces 0
set ::pgn::shortHeader 0
set ::pgn::boldMainLine 1
set ::pgn::columnFormat 0
set ::pgn::stripMarks 0
set pgnColor(Header) "\#00008b"
set pgnColor(Main) "\#000000"
set pgnColor(Var) "\#0000ee"
set pgnColor(Nag) "\#ee0000"
set pgnColor(Comment) "\#008b00"
set pgnColor(Current) lightSteelBlue
set pgnColor(NextMove) "\#fefe80"
set pgnColor(Background) "\#ffffff"


# Defaults for initial directories:
set initialDir(base) "."
set initialDir(book) "."
set initialDir(epd) "."
set initialDir(html) "."
set initialDir(tex)  "."
set initialDir(report) "."
set initialDir(tablebase1) ""
set initialDir(tablebase2) ""
set initialDir(tablebase3) ""
set initialDir(tablebase4) ""

# glistSize: Number of games displayed in the game list window
set glistSize 15

# glexport: Format for saving Game List to text file.
set glexportDefault "g6: w13 W4  b13 B4  r3:m2 y4 s11 o4"
set glexport $glexportDefault

# glistSelectPly: The number of moves to display in a game list entry
# when that entry is selected with button-2 to shoe the first moves
# of a game. E.g., a value of 4 might give: "1.e4 e5 2.Nf3 Nc6".
set glistSelectPly 80


# Default window locations:
foreach i {. .pgnWin .helpWin .crosstabWin .treeWin .commentWin .glist \
             .playerInfoWin .baseWin .treeBest .treeGraph .tourney .finder \
             .ecograph .statsWin .glistWin .maintWin .nedit} {
  set winX($i) -1
  set winY($i) -1
}

# Default PGN window size:
set winWidth(.pgnWin)  65
set winHeight(.pgnWin) 20

# Default help window size:
set winWidth(.helpWin)  50
set winHeight(.helpWin) 32

# Default stats window size:
set winWidth(.statsWin) 60
set winHeight(.statsWin) 13

# Default crosstable window size:
set winWidth(.crosstabWin)  65
set winHeight(.crosstabWin) 15

# Default tree window size:
set winWidth(.treeWin)  58
set winHeight(.treeWin) 20

# Default comment editor size:
set winWidth(.commentWin)  40
set winHeight(.commentWin)  6

# Default spellcheck results window size:
set winWidth(.spellcheckWin)  55
set winHeight(.spellcheckWin) 25

# Default player info window size:
set winWidth(.playerInfoWin)  45
set winHeight(.playerInfoWin) 20

# Default switcher window size:
set winWidth(.baseWin) 310
set winHeight(.baseWin) 110

# Default stats window lines:
array set ::windows::stats::display {
  r2600 1
  r2500 1
  r2400 1
  r2300 1
  r2200 0
  r2100 0
  r2000 0
  y1900 0
  y1950 0
  y1960 0
  y1970 0
  y1980 0
  y1990 0
  y1992 0
  y1994 0
  y1996 0
  y1998 1
  y2000 1
  y2001 1
  y2002 1
}

# Default PGN display options:
set pgnStyle(Tags) 1
set pgnStyle(Comments) 1
set pgnStyle(Vars) 1


# Default Tree sort method:
set tree(order) frequency

# Auto-save tree cache when closing tree window:
set tree(autoSave) 0

# Auto-save options when exiting:
set optionsAutoSave 1

#  Numeric locale: first char is decimal, second is thousands.
#  Example: ".," for "1,234.5" format; ",." for "1.234,5" format.
set locale(numeric) ".,"

# Ask before replacing existing moves: on by default
set askToReplaceMoves 1

# Show suggested moves: on by default
set suggestMoves 1

# Keyboard Move entry options:
set moveEntry(On) 1
set moveEntry(AutoExpand) 0
set moveEntry(Coord) 1

# Autoplay and animation delays in milliseconds:
set autoplayDelay 5000
set animateDelay 200

# Geometry of windows:
array set geometry {}

# startup:
#   Stores which windows should be opened on startup.
set startup(pgn) 0
set startup(switcher) 0
set startup(tip) 1
set startup(tree) 0
set startup(finder) 0
set startup(crosstable) 0
set startup(gamelist) 0
set startup(stats) 0

# glistFields: Layout of the GameList window fields.
#    element 0: code (e.g. g for gameNumber, w for White name)
#    element 1: initial width, in characters
#    element 2: justification (left or right)
#    element 3: color
#    element 4: true if a separator field should follow
#
#    Note that the "g" (game number) field MUST appear somewhere,
#    but the fields can be in any order.
#    See the comments at the start of the function "PrintGameInfo" in
#    src/index.cpp for a list of available field codes.
#
set glistFields {
  { g  7 right black      1 }
  { w 14 left  darkBlue   0 }
  { W  5 right darkGreen  1 }
  { b 14 left  darkBlue   0 }
  { B  5 right darkGreen  1 }
  { e 10 left  black      0 }
  { s 10 left  black      0 }
  { n  2 right black      1 }
  { d  7 left  darkRed    1 }
  { r  3 left  blue       0 }
  { m  3 right black      1 }
  { o  5 left  darkGreen  0 }
  { O  6 left  darkGreen  1 }
  { D  1 left  darkRed    0 }
  { U  2 left  blue       1 }
  { V  2 right blue       0 }
  { C  2 right blue       0 }
  { A  2 right blue       0 }
  { S  1 left  darkRed    0 }
}

set glistDefaultFields $glistFields
set glistAllFields $glistFields
lappend glistAllFields { c  3 left  black      0 }
lappend glistAllFields { E  7 left  darkRed    0 }
lappend glistAllFields { F  7 left  darkBlue   0 }

# myPlayerNames:
#   List of player name patterns for which the chessboard should be
#   flipped each time a game is loaded to show the board from that
#   players perspective.
#
set myPlayerNames {}


# Game information area options:
set gameInfo(photos) 1
set gameInfo(hideNextMove) 0
set gameInfo(showMaterial) 0
set gameInfo(showFEN) 0
set gameInfo(showMarks) 1
set gameInfo(wrap) 0
set gameInfo(fullComment) 0
set gameInfo(showTB) 0
if {[sc_info tb]} { set gameInfo(showTB) 2 }

# Twin deletion options:

array set twinSettings {
  players No
  colors  No
  event   No
  site    Yes
  round   Yes
  year    Yes
  month   Yes
  day     No
  result  No
  eco     No
  moves   Yes
  skipshort  Yes
  setfilter  Yes
  undelete   Yes
  comments   Yes
  variations Yes
  usefilter  No
  delete     Shorter
}
array set twinSettingsDefaults [array get twinSettings]

# Opening report options:
array set optable {
  Stats 1
  Oldest 5
  Newest 5
  Popular 1
  MostFrequent 6
  MostFrequentWhite 1
  MostFrequentBlack 1
  AvgPerf 1
  HighRating 8
  Results 1
  Shortest 5
  ShortestWhite 1
  ShortestBlack 1
  MoveOrders 8
  MovesFrom 1
  Themes 1
  Endgames 1
  MaxGames 500
  ExtraMoves 1
}
array set optableDefaults [array get optable]

# Player report options
array set preport {
  Stats 1
  Oldest 5
  Newest 5
  MostFrequentOpponents 6
  AvgPerf 1
  HighRating 8
  Results 1
  MostFrequentEcoCodes 6
  Themes 1
  Endgames 1
  MaxGames 500
  ExtraMoves 1
}
array set preportDefaults [array get preport]

# Export file options:
set exportFlags(comments) 1
set exportFlags(indentc) 0
set exportFlags(vars) 1
set exportFlags(indentv) 1
set exportFlags(column) 0
set exportFlags(append) 0
set exportFlags(symbols) 1
set exportFlags(htmldiag) 0
set exportFlags(stripMarks) 0
set exportFlags(convertNullMoves) 1
set default_exportStartFile(PGN) {}
set default_exportEndFile(PGN) {}

set default_exportStartFile(LaTeX) {\documentclass[10pt,twocolumn]{article}
% This is a LaTeX file generated by Scid.
% You must have the "chess12" package installed to typeset this file.

\usepackage{times}
\usepackage{a4wide}
\usepackage{chess}
\usepackage[T1]{fontenc}

\setlength{\columnsep}{7mm}
\setlength{\parindent}{0pt}

% Macros for variations and diagrams:
\newenvironment{variation}{\begin{quote}}{\end{quote}}
\newenvironment{diagram}{\begin{nochess}}{$$\showboard$$\end{nochess}}

\begin{document}
}
set default_exportEndFile(LaTeX) {\end{document}
}


set default_exportStartFile(HTML) {<html>
<head><title>Scid export</title></head>
<body bgcolor="#ffffff">
}
set default_exportEndFile(HTML) {</body>
</html>
}

foreach type {PGN HTML LaTeX} {
  set exportStartFile($type) $default_exportStartFile($type)
  set exportEndFile($type) $default_exportEndFile($type)
}


# ::windows::switcher::vertical
#
#   If 1, Switcher frames are arranged vertically.
#
set ::windows::switcher::vertical 0
set ::windows::switcher::icons 1

# autoRaise: defines whether the "raise" command should be used to raise
# certain windows (like progress bars) when they become obscured.
# Some Unix window managers (e.g. some versions of Enlightenment and sawfish,
# so I have heard) have a bug where the Tcl/Tk "raise" command times out
# and takes a few seconds. Setting autoRaise to 0 will help avoid this.

set autoRaise 1

proc raiseWin {w} {
  global autoRaise
  if {$autoRaise} { raise $w }
  return
}

# autoIconify:
#   Specified whether Scid should iconify all other Scid windows when
#   the main window is iconified. Most people like this behaviour but
#   some window managers send an "UnMap" event when the user switches
#   to another virtual window without iconifying the Scid window so
#   users of such managers will probably want to turn this off.

set autoIconify 1


# Email configuration:
set email(logfile) [file join $scidLogDir "scidmail.log"]
set email(oldlogfile) [file join $scidUserDir "scidmail.log"]
set email(smtp) 1
set email(smproc) "/usr/lib/sendmail"
set email(server) localhost
set email(from) ""
set email(bcc) ""


### Audio move announcement options:

set ::utils::sound::soundFolder [file nativename [file join $::scidExeDir sounds]]
set ::utils::sound::announceNew 0
set ::utils::sound::announceForward 0
set ::utils::sound::announceBack 0


# Spell-checking file: default is "spelling.ssp".
if {$windowsOS} {
  set spellCheckFile [file join $scidDataDir "spelling.ssp"]
} else {
  set spellCheckFile "/usr/local/share/scid/spelling.ssp"
}

# Engines list file: -- OLD NAMES, NO LONGER USED
#set engines(file) [file join $scidUserDir "engines.lis"]
#set engines(backup) [file join $scidUserDir "engines.bak"]

# Engines data:
set engines(list) {}
set engines(sort) Time

# Set up Scid icon in Windows:
if {$::windowsOS} {
  # Look in each of the following directories for a file named scid.ico:
  set iconFileDirs [list \
    $scidExeDir $scidUserDir $scidConfigDir [file join $scidExeDir "src"]]

  foreach iconFileDir $iconFileDirs {
    set scidIconFile [file join $iconFileDir "scid.ico"]
    if {[file readable $scidIconFile]} {
      catch {wm iconbitmap . -default $scidIconFile}
    }
  }
}

# Add empty updateStatusBar proc to avoid errors caused by early
# closing of the splash window:
#
proc updateStatusBar {} {}

# Start up splash screen:

set ::splash::autoclose 1

proc ::splash::make {} {
  wm withdraw .
  set w [toplevel .splash]
  wm withdraw $w
  wm protocol $w WM_DELETE_WINDOW [list wm withdraw $w]
  wm title $w "Welcome to Scid $::scidVersion"
  frame $w.f
  frame $w.b
  text $w.t -height 15 -width 60 -cursor top_left_arrow \
    -background white -font font_Regular -wrap word \
    -yscrollcommand [list $w.ybar set] -setgrid 1
  scrollbar $w.ybar -command [list $w.t yview]
  checkbutton $w.auto -text "Auto-close after startup" \
    -variable ::splash::autoclose -font font_Small -pady 5 -padx 5
  button $w.dismiss -text Close -width 8 -command [list wm withdraw $w] \
    -font font_Small
  pack $w.f -side top -expand yes -fill both
  pack $w.b -side top -fill x
  pack $w.auto -side left -in .splash.b -pady 2 -ipadx 10 -padx 10
  pack $w.dismiss -side right -in .splash.b -pady 2 -ipadx 10 -padx 10
  pack $w.ybar -in $w.f -side right -fill y
  pack $w.t -in $w.f -side left -fill both -expand yes

  # Centre the splash window:
  update idletasks
  set x [expr {[winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \
                 - [winfo vrootx .]}]
  set y [expr {[winfo screenheight $w]/2 - [winfo reqheight $w]/2 \
                 - [winfo vrooty .]}]
  wm geom $w +$x+$y
  wm deiconify $w

  bind $w <F1> {helpWindow Index}
  bind $w <Escape> {.splash.dismiss invoke}

  $w.t tag configure indent -lmargin2 20

  $w.t image create end -image splash
  $w.t insert end "Shane's Chess Information Database"
}


# Old Scid logo:
image create photo splash -format gif -data \
"R0lGODdhZgAmAMIAAP///6CBUNHBoQAAcAAAAFK4bgAAAAAAACwAAAAAZgAmAAAD/gi63P4w
ykkrDThjwTvXmueBmdiRmymggbqirqawMazSt23iuy7KAN7PNyKejB/ki1TDzJTCIjM37VWH
moFWiw08r1JQU0wlW83YrXrQ/ZrX8NQ5VKbPSzn4th2E6f9sd3JddoR4PYB8LIB/dYeGg2GF
knB8KokccWBHm0mdS2gCmo8KJn+Da1Cqn1Gjg6Uieo+prKoEt4+Sua4tHbAdp6hqq6Ent8eR
nKG8Hr+ZssJbRMG9JsfX1YZrosy+ALHQ2dxaNozSLtfITea0pN8ejOLKWex7Kum4NfXDhc7P
mJAaBdCDDp+8f2oKgOPnjkS9YsHGtcuADxmKSqAGbgvj/gbDvgG5JPITKU1DRWwgCGbEqKyj
x4/iqJEkZ/IkrpQbV+b05KWPw48L280kYfNmBpU61Sgqtw9eOIRsiBbFmZOqvZY+0dRzOmoM
xZM/q9JTyjHrpJk5ZToKYDMs2aRXebpMBjXtU0dFCVi9ujcQ1qBMRzXiOSnvLa4Mg9J0B3gK
tcEZHxk+BgyaYpD93lUuSSecRpVCJh+uS/MyGn8TU3hmFFljB9EENscxnVkxE2ovcX8OBHs0
Wi6kT2uuO5ZXbqACescm/bA24qYXPwJX/hw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QeKkQXB
8HrBkBDv6Qnt2Z7y2Z6vdyE60BJKgJ4Nsp/9ySMA2iB/VwqvlxBbcqAIuiVrUKAZ0AlR0CA7
IAwSOm36qXPoqZ9MMZ9r4AeHcAim4KGx4CnYOaIkmp3W8AmHoDYpqhIrqjaJIAxHYgo60Akl
WqPY+QHlcCWJcAgTOgYrGiPC0KGHsKOBgDAjGptOkgzgtaRM2qRNKl5ZEJtSagxVUAWwaaWv
+QHGoANO2qVOGgXFMKWxaaVYeqXGUAp84KQL4QfZEZHk2T86QZ6hYwp80SYkwjoMwTo2UQzp
5zuJ8KeACqh0aierhCMiQ9AiUDIih1odCnEin5AIdGoKifA0D8ElBLIhEYloS8MjPuIU22ky
6tUwQVIJ34Ah3SSpgXqZH6INMcKqTQMhnBk0+PE0JqIAKSKpAhE0GZAMUdCqCqJDXTMgDcIH
sAMvnAk1yBoM7KEWv9olFXN+Q0OdoJIB6WAoS1IhLUJBvTogUPGrS3MR5REuQIOs8LIw3Lk3
eoGp4WkYkYCVQ6MQF/MBwZAr3xkQADs=
}

::splash::make

proc ::splash::add {text} {
    if {! [winfo exists .splash]} {return}
    .splash.t configure -state normal
    .splash.t insert end "\n$text" indent
    .splash.t see end
    .splash.t configure -state disabled
    update
}

::splash::add "Copyright (C) 1999-2004 Shane Hudson  (sgh@users.sourceforge.net)"
::splash::add "This is Scid $::scidVersion, released $::scidVersionDate."
::splash::add "Website: scid.sourceforge.net\n"

# Remember old font settings before loading options file:
set fontOptions(oldRegular) $fontOptions(Regular)
set fontOptions(oldMenu) $fontOptions(Menu)
set fontOptions(oldSmall) $fontOptions(Small)
set fontOptions(oldTiny) $fontOptions(Tiny)
set fontOptions(oldFixed) $fontOptions(Fixed)

# New configuration file names:
set scidConfigFiles(options) "options.dat"
set scidConfigFiles(engines) "engines.dat"
set scidConfigFiles(engines.bak) "engines.dat"
set scidConfigFiles(recentfiles) "recent.dat"
set scidConfigFiles(history) "history.dat"
set scidConfigFiles(bookmarks) "bookmarks.dat"
set scidConfigFiles(reports) "reports.dat"

# scidConfigFile:
#   Returns the full path and name of a Scid configuration file,
#   given its configuration type.
#
proc scidConfigFile {type} {
  global scidConfigDir scidConfigFiles
  if {! [info exists scidConfigFiles($type)]} {
    return -code error "No such config file type: $type"
  }
  return [file nativename [file join $scidConfigDir $scidConfigFiles($type)]]
}


# Try to load saved options:
#if {$unixOS} {
#  set optionsFile [file join $scidUserDir "scidrc"]
#  set optionsFileBak [file join $scidUserDir "scidrc.bak"]
#} else {
#  set optionsFile [file join $scidExeDir "scid.opt"]
#  set optionsFileBak [file join $scidExeDir "scidopt.bak"]
#}

# Create user ".scid" directory in Unix if necessary:
# Since the options file used to be ".scid", rename it:
if {! [file isdirectory $scidUserDir]} {
  if {[file isfile $scidUserDir]} {
    catch {file rename -force $scidUserDir "$scidUserDir.old"}
  }
  if {[catch {file mkdir $scidUserDir} err]} {
    ::splash::add "Error creating ~/.scid directory: $err"
  } else {
    catch {file rename "$scidUserDir.old" $optionsFile}
  }
  # Rename old "~/.scid_sent_emails" if necessary:
  if {[file isfile [file nativename "~/.scid_sent_emails"]]} {
    catch {file rename [file nativename "~/.scid_sent_emails"] $email(logfile)}
  }
}

# Create the config, data and log directories if they do not exist:
proc makeScidDir {dir} {
  if {! [file isdirectory $dir]} {
    if {[catch {file mkdir $dir} err]} {
      ::splash::add "Error creating directory $dir: $err"
    } else {
      ::splash::add "Created directory: $dir"
    }
  }
}

makeScidDir $scidConfigDir
makeScidDir $scidDataDir
makeScidDir $scidLogDir

# Rename old email log file if necessary:
if {[file readable $email(oldlogfile)]  &&  ![file readable $email(logfile)]} {
  catch {file rename $email(oldlogfile) $email(logfile)}
}

# moveOldConfigFiles
#   Moves configuration files from the old (3.4 and earlier) names
#   to the new file names used since Scid 3.5.
#
proc moveOldConfigFiles {} {
  global scidUserDir scidConfigDir
  foreach {oldname newname} {
    scidrc options.dat
    scid.opt options.dat
    scid.bkm bookmarks.dat
    scid.rfl recentfiles.dat
    engines.lis engines.dat
  } {
    set oldpath [file nativename [file join $scidUserDir $oldname]]
    set newpath [file nativename [file join $scidConfigDir $newname]]
    if {[file readable $oldpath]  &&  ![file readable $newpath]} {
      if {[catch {file rename $oldpath $newpath} err]} {
        ::splash::add "Error moving $oldpath to $newpath: $err"
      } else {
        ::splash::add "Moved old config file $oldname to $newpath"
      }
    }
  }
}

moveOldConfigFiles

set optionsFile [scidConfigFile options]

if {[catch {source $optionsFile} ]} {
  #::splash::add "Unable to find the options file: [file tail $optionsFile]"
} else {
  ::splash::add "Your options file \"[file tail $optionsFile]\" was found and loaded."
}

# Now, if the options file was written by Scid 3.5 or older, it has a lot of
# yucky variable names in the global namespace. So convert them to the new
# namespace variables:
#
proc ConvertOldOptionVariables {} {

  set oldNewNames {
    autoCloseSplash ::splash::autoclose
    switcherVertical ::windows::switcher::vertical
    doColorPgn ::pgn::showColor
    pgnIndentVars ::pgn::indentVars
    pgnIndentComments ::pgn::indentComments
    pgnShortHeader ::pgn::shortHeader
    pgnMoveFont ::pgn::boldMainLine
    pgnMoveNumSpace ::pgn::moveNumberSpaces
    pgnStripMarks ::pgn::stripMarks
    pgnSymbolicNags ::pgn::symbolicNags
    pgnColumn ::pgn::columnFormat
  }

  foreach {old new} $oldNewNames {
    if {[info exists ::$old]} {
      set $new [set ::$old]
    }
  }
}

ConvertOldOptionVariables


# Reconfigure fonts if necessary:
foreach i {Regular Menu Small Tiny Fixed} {
  if {$fontOptions($i) == $fontOptions(old$i)} {
    # Old font format in options file, or no file. Extract new options:
    set fontOptions($i) {}
    lappend fontOptions($i) [font actual font_$i -family]
    lappend fontOptions($i) [font actual font_$i -size]
    lappend fontOptions($i) [font actual font_$i -weight]
    lappend fontOptions($i) [font actual font_$i -slant]
  } else {
    # New font format in options file:
    configureFont $i
  }
}

# Check board size is valid:
set newSize [lindex $boardSizes 0]
foreach sz $boardSizes {
  if {$boardSize >= $sz} { set newSize $sz }
}
set boardSize $newSize

# Check for old (single-directory) tablebase option:
if {[info exists initialDir(tablebase)]} {
  set initialDir(tablebase1) $initialDir(tablebase)
}

# font_Regular is the default font for widgets:
option add *Font font_Regular

# Use font_Menu for menu entries:
option add *Menu*Font font_Menu
# option add *Menubutton*Font font_Menu

if {$unixOS} {
  option add Scrollbar*borderWidth 1
}

# Set the radiobutton and checkbutton background color if desired.
# I find the maroon color on Unix ugly!
if {$unixOS} {
  option add *Radiobutton*selectColor $buttoncolor
  option add *Checkbutton*selectColor $buttoncolor
  option add *Menu*selectColor $buttoncolor
}

set fontsize [font configure font_Regular -size]
set font [font configure font_Regular -family]

font create font_Bold -family $font -size $fontsize -weight bold
font create font_BoldItalic -family $font -size $fontsize -weight bold \
  -slant italic
font create font_Italic -family $font -size $fontsize -slant italic
font create font_H1 -family $font -size [expr {$fontsize + 8} ] -weight bold
font create font_H2 -family $font -size [expr {$fontsize + 6} ] -weight bold
font create font_H3 -family $font -size [expr {$fontsize + 4} ] -weight bold
font create font_H4 -family $font -size [expr {$fontsize + 2} ] -weight bold
font create font_H5 -family $font -size [expr {$fontsize + 0} ] -weight bold

set fontsize [font configure font_Small -size]
set font [font configure font_Small -family]
font create font_SmallBold -family $font -size $fontsize -weight bold
font create font_SmallItalic -family $font -size $fontsize -slant italic

# Start in the clipbase, if no database is loaded at startup.
sc_base switch clipbase

###
### End of file: start.tcl
# bitmaps.tcl:
# Chess piece bitmaps used by Scid.

# The piece images used here were generated from freeware chess
# fonts available in TrueType format at the En Passant website
# "Chess Fonts" page, http://www.enpassant.dk/chess/fonteng.htm

# The authors of the original TrueType fonts are:
#   Alpha: Eric Bentzen.
#   Leipzig, Merida: Armando H. Marroquin.


set boardStyles {}


##########
# Size 20 is only used in Material search window, not for boards.
# It has two special extra images, wm20 and bm20, which contain a
# bishop and knight, for indicating a minor piece.
#

image create photo wm20 -data {
R0lGODlhFAAUAMIAAH9/f7+/vz8/PwAAAP///////////////yH5BAEKAAcALAAAAAAUABQA
AANweLp8cCG02cSwNB8RSACctgBAR3iDqJDd5wlidBLCHGb1CQzzx+yPDYAWyJ1gixpSwOLM
CClFESSRup7RImF42zxP0Vpg0EE6SGjSCqxTKYxHN4RJ6sYETHxVNa3vM2gDQyBoGkNbhIdq
FHRBZyAaCQA7}

image create photo bm20 -data {
R0lGODlhFAAUAMIAAH9/f7+/vwAAAD8/P////////////////yH5BAEKAAcALAAAAAAUABQA
AANneLp8cCG02YQYgupj+5CbEgyYAAQCuJHlNYZo1wHDo7VyOjSAebQxS69R25UCvVlmMXIp
TrmhSGgB4S5LzoVQegK+YJtWwLWEFjnzGVL7ftYQMoGQggerZ3CrLealoxomXxJIX1kNCQA7
}

image create photo p20 -data {
R0lGODlh8AAUAMIAAH9/fz8/P7+/vwAAAP///////////////yH5BAEKAAcALAAAAADwABQA
AAP+eLrc/jDKSau9OOvNu/8VAIBkJAhl2ohqe5xuCgTBGL/oQaMwJew30KwWhAkGA0Vv8gvk
LALRUxJ9BTSAk40qFXWzkKZWCmQit5Uo2GdDW4ZuiFQ9koZ33mxZAjhjBidJFDNIRBgBhRQD
Q4t9NH0NP3o1BEgEYjNTDix/SIITfQOIcROIooOFpouekV6PlQMEQ2qaK6QSsZUholGit5GA
BJeAuMIixgDCnwrJAbKLsMPNsiY0VxeeyxGhnoZm2cTb4OMrP88C0X3NVWF+2CLaELnCUTRm
6CfDtQuUwv7G1xb8iHUkmSV1lZy0GpErSZR9DbJVUOULCUQl3VRdPDL+rtsKRM8MxuqDjlcr
FBIflkomK+CdLP8I2Ivg5NIOmxIe5RnygOSzhDKlLGqg01LCGjMhUHQpj1AhmfEYmHIy8JSJ
jlZXAHIUDWRBojWcFnK1zZk/bw9oBLt09lcuMcpA7eS0CU8WVyIeMTBHD9ARdMjkjPt14BhF
QEkddDuhSm7MqIUrrgJ0ZhSDvJIr+7o14x9dB3z9zTtCE3A+nHxiUpNXsFKgXj+mHPN3pKa/
z5cH48LqJJwDVWoT8enYDis4W9k4cjzjliWk0p5ZBn5QcKdvOardXqqXN1nJVjFpxMTNgJw4
4zypj3V6kRlxecYl7g0+mZtewcLQ/vYMjTb+U6lh5fXfJtmVNcpOj/xnGzL/kHaeO/AZ1xtN
AaY3nHk9dZOHKnH0th43M1D4T2KXzebEbKKVFcoMhDEz1y8cvUjIPo3AU2MmNI0zYGEU2eiJ
a3JUqF9PFT6nnnd5GHMdRrScQMeSC3Q23oCdxXaEapAdMI+Sisy1I0YyQslMgOi48iU34AzY
yxlQJTfUA1hRoJMXYmJkHESOLIXIl1v+A5mAMgE2IkS9qLUGdDH9gIt0fprAaHQRxHeHeIfV
eEc2CuV0Z6TrNVYcVrdEodp0ZY36WVVsPrPYb/HxmVFykfrYyJfLddTeCx15MZ8ovJlEVHx1
zoNillrWICgh2zxpeluLfbZVnllK9pefNiiaSopPWLrVD0BZoqnbboOhBexxEQF7bXxuGfdg
rlTEJxt9YDh1n0Dj7rOmjhtVmmmG6E2ArlRpapGmYsDa6+2qlwYcxAWHyrHwwxAX1h47EVds
8cUYZ6xxBwkAADs=
}

image create photo e20 -height 20 -width 20
set x 0
foreach p {wp wn wb wr wq wk bp bn bb br bq bk} {
  image create photo ${p}20 -width 20 -height 20
  ${p}20 copy p20 -from $x 0 [expr $x + 19] 19
  incr x 20
}


####################
# Alpha:

lappend boardStyles Alpha

set pieceImageData(Alpha,25) {
R0lGODlhLAEZAMIAAL+/vz8/PwAAAH9/f////////////////yH5BAEKAAcALAAAAAAsARkA
AAP+eLrc/jDKSau9OOvNu/9gKI5kaZ5oqq4QAHSBELD0QFcuLN+rzUsC3yZAmP0WA6EiqQEM
gq+jI9gRWKVL5YGZcUI7SW038IQNjBYnUz14haOSM3crzzyt4kvYA4gJdGg4e2xuSXARd0KJ
dlZUQ2GBGGcABACOGH2TegMEf0kETAKgeQ1yinUafzpWkXqNeE0xAYcTd56NNrgUi0uwqWCc
BKNjwcJFrXGzlbMWn7igjcMUAcwKfcgVqhu2vhd9r6zYENwCtIjg6N0SMXCW4hPaGp/Ccziz
lsXHFtTGwtQV8/oJrBehHJpZ8cbJYIevnDt2AMGR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FKDB2Ua0HVx4HxzBVCvCXUsQORuolPi6oQi9F9fC6TqrIKyuMtxq
NGySEArBxKiuT0rAZtYQTNzETvzEUBzFUjzFVFzFVnzFWJzFWrzFXNzFXvzFYBzGYjzGZFzG
ZnzGaJzGarzGbNzGbvzGcBzHcjzHT5AAADs=
}


####################
# Leipzig:

lappend boardStyles Leipzig

set pieceImageData(Leipzig,25) {
R0lGODlhLAEZAMIAAH9/f7+/vz8/P////wAAAP///////////yH5BAEKAAcALAAAAAAsARkA
AAP+eLrc/jDKSau9OOvNu/8gBYQkFgBAoKDjcaZZW3LybD+verBKHt+ZgAAg0AErrGEtQhwq
hoKVwHlBRY+VAGFrxEoABGIYuW1tCasyRkC4er+AAaoD8xB9IitLrp9fBANuGkSENGdLGHV0
BCeMZG0oh2JjF2eLahsofBsBQoIaQkldTHEDpqeofhFaOqw9jlUsiBZgmEGeHkJtbKMQtWfA
wLMMri6wxbRQwxWWmUqUQYCmRZ++SrLYVEyBC2gr3BMyKUXiGc2DZ9omwLh5fNgpmxLn3gfn
TAuE2ss4cYoXQkzFYcPPQcA9Q3oZLAMvEqwIStK0iAhB15lGYFIAK5L+5SIodqHWleHycFWw
k1wmEJT4BJpBNhd/aUyn0EGRAUKioTKlhSOzAHKCypsQquEdCBSpZHxyhccCLQxrAYLJwqPK
dEFOkvNJAdiAdAV7JNx5gmsDTEopTUkjCGopXVDaAJWTUgKbuNXmvSBbV8KJQP4AqQoH9GbA
E9tagFnhh5I/BrVQhZIjjactpMHyRoAE8yIyk5Aohwn7BAXcF5rtOfa21J7iLZDDnK5MTXbr
ioFOAarpQNROnLDDDQyMk/QBaaWEpm4iRcXjQsfVlfkN5Xctv1+98m6QEWqwTvWYbBki2uW8
Mnd/MVm7w9HS1lNqbMnODvjG7Crn4kzNvXL+qlO3+VKKPwIZp8yBgz3QhgtE7CDHcTAsdlYY
PM01nkBzXWdXZrSgFIZnBf1CAH3mQYRhCgNOsGBP7Y3AS3sOzMeFdyDJGF5vyWFIw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
7uY+n/aDS/Zp6/aTOgv2XvhXjz+Gn/h9zUimdAdA7/jzMi+KP/lsjwZMAPhYT/lYIoOarfmG
fWiNf/jCAfm3J/meX/iYUPnPqPo50fqu//qwH/uyP/u0X/u2f/u4n/u6v/u83/u+//vAH/zC
P/zEX/zGf/y8nwAAOw==
}


####################
# Merida:

lappend boardStyles Merida

set pieceImageData(Merida,25) {
R0lGODlhLAEZAMIAAL+/v39/fz8/PwAAAP///////////////yH5BAEKAAcALAAAAAAsARkA
AAP+eLrc/jDKSau9OOvNu/9gKI5kaZ5oqmJAAGTCq8heS1etqwT8zt+P1kIwECx0mcHHBqMB
N8xLTsYL+JARoYJo3D0pyk5AMLZeikaAoNshsytls1sxKEvU4x3BXH9TWnVfcAOEZhaEaUUf
hGEWAYV0hJF1d4iTl1KPWEkEnY0VAwRqoWSbGAIEfhM8BIwBe4x7hgujAGqtW3kHpLZFgrSa
vxOMkmeIrqbGnxSPxM6uDgCEvcVck9TCB4DJh524Fy5rr1Vr2Q+aGKze6949DaE9jzSN0las
yxD4GM7phcjlGtCBe0Zw1iR7A+bRotRMnwOHjl6RkbKGHYBOeFigigH+rlSVjzwmNqjlY0Ej
d9I4TrDGoaHBSkUaxhAl0oK0aeBesWPnjsFNKoZOmvlJgWXAhLBeQpipc2cqpUFQdVL5h4zT
TmMEIdElkJI2qFoOzAzL7ZwzqA64EHE2s+aEm4zMzfAIkpxWKl26DgVraKyhsg3GsHMbIVSR
q57MVVy35oK4uo0jcNVR5aucl/V41AnlSZPmbA2JoWVQJxVBpAmLElQVYfFg1kfypkZXL1e0
OpoftWrlWd4wpxCB/VjXFCNsWlJ3T5VLB/gqhkI2HnCB0OAt4qXlDRZ2OviMhKE3I6L5llir
uGfqPnpeXawidAKRi2LVO7uLVNydr7y4kzP+Y2F+BTLfGfplsd4rShi2yx67mDKTRRvxt44a
EnSnGkHnFYKfBGslt9Zo75xWnhLN7CIJJDgxEMNa09wSA1yBHCeWhMatUpw3LeykSz7r+PcN
K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QyHUl1qqzQyY2S4fpxqIUtV98oV8WuwzM+K5f
+7RDmrPDtThX24bXqUzR9y9dO2GshbKremqWGqZqa61+y6ST6qgvybQ4WTfWmUvChBZFF0yA
kl/UZaOLtLZ4aqoxsVYww6rTWqxG95JfK2TjqrMMS7nyY555C7BMZ4MGy3Pbyl6aujweFLUt
txiAe6nSIoiv2qUkckAJaVcSS1ma6kvXmKKGm1Bj+aEx5KrSNJaSm2drS7v+Z6t/QHhn+6Au
uhND+wrQ5lUSxLLYe6zeOnzda5loC77CN3SyG1RW0rf+trtpT/ZXyHCTMWmewSu8FgmjXukp
H5qi63lObJix65t80iugnBiog+m8pFu5u2ZOkPejkWpJzNuCsqjAt5e+1dGskjqpb4o+Qkkf
CYVIfUisvIA4E1a/Y+aUEMGmU+SmDPG6J4pUX4vBcAV54MhONAgIBsx9CdxIpvu8B5jAPkQi
2eug/grDijPEAtOj4KoTiIJukInEmPO0V+vByyu2RbxN2Fu8xHpbGPW1olq9WFuLi7PEH8Fr
eLvDB5jDxOimanyxVQidU0u5qFOnjoCkhEiidEEfJdtjO0zBo2CufAZwzkS009qecxjHazvH
MiSZY3ILeVwhw1A8NtjHt9qCxr0hyApbsVAMMOjKspv8kVnwyXr6GlbcmdTqbaV8daQjH6IM
yovRygGDrnwAy5hDyoB8mbIcuWN7ynPQy74cBZ7syr88zMRcBcH8CLJczMq8zMzczM78zNAc
zdI8zdRczdZ8zdiczdq8zdzczd78zeAczuI8zuRczuZ8zuiczkSQAAA7}

set pieceImageData(Merida,70) {
R0lGODlhSANGAMIAAH9/fz8/PwAAAL+/v////////////////yH5BAEKAAcALAAAAABIA0YA
AAP+eLrc/jDKSau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRyyWw6
n9CodEqtWq/YrHbL7Xq/4LB4TIYMyugXYA1Io8/uOIrdlosBggBcu7azBgKBgntGgX4ceHpc
fYcpgIKBhEWGSQABgQF1NniYkgyAnkaXgpo0kKelB5ynAqmrrC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671mJI4kXeugcNGO/r+u7hAQahTkpDYqIeoJtaAuSBmy+rSqwBMq76At9/UtB/6sfAYy4
dHCkaOtAyVuB17q9iSqsJWxCiYqrO7q9fhvBLay/1ftXFWJSzOJmt+m52SpIi0sxZKcHIque
9EFabdcWWpuaPQW7rNrD1GTBYvur7mlS2nbDUUlqHeUOLgzBX/qWpuudFLyMShvBw6rCMCy6
Mpwr8wOCJ7uPGpllqoQyCxorucu7evm+mAQpY+ufR/xM2rq4pUuRvRtgy6qqcsyszInFdXzG
43vGUReeBTy5xymp+7uWLbb+wDkCkyKVHUlodnLLnKGLN4n5gFtWslB8ZaPKWDocujXVw5Bc
ppuYK3S6LLF8lNBnyGyJyJxbndN6Vtt5sLrso7ysyvMVvrQatfdLbP9ot2RhW+izvtB4zBZV
ZbJgu+OVVqD1C5L6sHmcr2lCkWYoyPQ5x59Tyz1sfyTMwUGcuUYszDNlxOk8l+tswJ3sktp7
zJN8OfGBEXR5i5v0oaTaRykLTfOMVKFLCtRMqjNMpsC6lSPcZK06uXn6zeRcditLLQJdzuZ8
kBhtrBtNAqMZwhCUvXp5tiBttQktwTWcuOQhM1e7cSXNrVWWRKH8TXvcslfGlmvMzoOsiotU
ol7xClE2KM73nKkYzX6WWdQ2XdSGWc5NzNTLhqgJXB2ekFum7KWPI9QuKGf4ua13DBliSNVQ
rckTdTNSzbXFS2AdvZpVmThTTUUhetVKbdQQitVR9NWz7J+4S75NzcRXlExlNBAzk0znHNfs
rCjvPJfDa9hlSjDyS8c97dTQ59cNKgEezNi5MNiEHbeHrSWte5Z0rcCNENqizb9rHdZ/HQyp
zE50Odqs3dq5EKKmPdkakdp2XI2ufdu4ndu6vdu83du+/dvAHdzCPdzEXdzGfdzIndzKvdzM
3dzO/dzQHd3SPd3UXd3Wfd3Ynd3avd3czdoJAAA7
}

######################################################################

# setPieceData:
#   Given a piece font name and size, resets the images for
#   pieces of that size.
#
proc setPieceData {font size} {
  image create photo e$size -height $size -width $size
  image create photo tempPieces$font$size -data $::pieceImageData($font,$size)
  set x 0
  foreach p {wp wn wb wr wq wk bp bn bb br bq bk} {
    image create photo $p$size -width $size -height $size
    $p$size copy tempPieces$font$size -from $x 0 [expr $x + $size - 1] [expr $size - 1]
    incr x $size
  }
  image delete tempPieces$font$size
}

# setPieceFont:
#   Given a piece font name, resets all piece images in all
#   available board sizes to that font.
#
proc setPieceFont {font} {
  #set start [clock clicks -milli]
  foreach size $::boardSizes { setPieceData $font $size }
  #set end [clock clicks -milli]
  #puts "Font: $font. Time: [expr $end - $start] ms."
}

# Ensure the board style is valid:
if {[lsearch -exact $boardStyles $boardStyle] == -1} {
  set boardStyle [lindex $boardStyles 0]
}

# Set up the board style:
setPieceFont $boardStyle
### lang.tcl: Support for multiple-language menus, buttons, etc.
### Part of Scid. Copyright 2001-2003 Shane Hudson.

array set langEncoding {}
set languages {}

if {[catch {encoding names}]} {
  set hasEncoding 0
} else {
  set hasEncoding 1
}

proc addLanguage {letter name underline {encodingSystem ""}} {
  global langEncoding languages
  .menu.options.language add radiobutton -label $name \
    -underline $underline -variable language -value $letter \
    -command setLanguage
  set ::langEncoding($letter) $encodingSystem
  lappend languages $letter
}

# menuText:
#    Assigns the menu name and help message for a menu entry and language.
#
proc menuText {lang tag label underline {helpMsg ""}} {
  global hasEncoding langEncoding
  if {$hasEncoding  &&  $langEncoding($lang) != ""  &&  $::tcl_version <= 8.3} {
    catch {set label [encoding convertfrom $langEncoding($lang) $label]}
    catch {set helpMsg [encoding convertfrom $langEncoding($lang) $helpMsg]}
  }
  set ::menuLabel($lang,$tag) $label
  set ::menuUnder($lang,$tag) $underline
  if {$helpMsg != ""} {
    set ::helpMessage($lang,$tag) $helpMsg
  }
}


# helpMsg:
#    Assigns the help message for a particular language for a button.
#
proc helpMsg {lang button message} {
  global hasEncoding langEncoding
  if {$hasEncoding  &&  $langEncoding($lang) != ""  &&  $::tcl_version <= 8.3} {
    catch {set message [encoding convertfrom $langEncoding($lang) $message]}
  }
  set ::helpMessage($lang,$button) $message
}

array set tr {}
array set translations {}

# translate:
#    Assigns a translation for future reference.
#
proc translate {lang tag label} {
  global menuLabel hasEncoding langEncoding
  regsub {\\n} $label "\n" label
  if {$hasEncoding  &&  $langEncoding($lang) != ""  &&  $::tcl_version <= 8.3} {
    catch {set label [encoding convertfrom $langEncoding($lang) $label]}
  }
  set ::translations($lang,$tag) $label
  set ::tr($tag) $label
  foreach extra {":" "..."} {
    set newtag "${tag}${extra}"
    set newlabel "${label}${extra}"
    set ::translations($lang,$newtag) $newlabel
    set ::tr($newtag) $newlabel
  }
}

# translateECO:
#    Given a pair list of ECO opening name phrase translations,
#    assigns the translations for future reference.
#
proc translateECO {lang pairList} {
  global hasEncoding langEncoding
  foreach {from to} $pairList {
    if {$hasEncoding  &&  $langEncoding($lang) != ""  &&  $::tcl_version <= 8.3} {
      catch {set to [encoding convertfrom $langEncoding($lang) $to]}
    }
    sc_eco translate $lang $from $to
  }
}

# tr:
#    Given a tag and language, returns the stored text for that tag.
#
proc tr {tag {lang ""}} {
  global menuLabel tr
  if {$lang == ""} {set lang $::language}
  if {$lang == "X"} {return $tag}
  # First, look for a menu label
  if {[info exists menuLabel($lang,$tag)]} {
    return $menuLabel($lang,$tag)
  }
  if {[info exists menuLabel(E,$tag)]} {
    return $menuLabel(E,$tag)
  }
  # Now look for a regular button/message translation
  if {[info exists tr($tag)]} {
    return $tr($tag)
  }
  # Finally, just give up and return the original tag
  return $tag
}

proc setLanguage {{lang ""}} {
  global menuLabel menuUnder oldLang hasEncoding langEncoding

  if {$lang == ""} {set lang $::language}

  if {[catch {setLanguage_$lang} err]} { puts "Error: $err" }
  # TODO: Check this:
  if {$hasEncoding  &&  $langEncoding($lang) != ""} {
      encoding system $langEncoding($lang)
  }


  # If using Tk, translate all menus:
  if {! [catch {winfo exists .}]} { setLanguageMenus $lang }

  foreach i [array names ::tr] {
    if {[info exists ::translations($lang,$i)]} {
      set ::tr($i) $::translations($lang,$i)
    } elseif {[info exists ::translations(E,$i)]} {
      set ::tr($i) $::translations(E,$i)
    }
  }
  set oldLang $lang
}


### End of file: lang.tcl



# thousands, percentFormat:
#   Functions to format integer numbers.
#   thousands inserts the thousands separator (usually "," or ".") for
#   every three digits before the decimal separator in the number.
#   percentFormat does the same as thousands, but also adds a percentage.
#   If "kilo" is true, numbers >= 100,000 are divided by 1000 and have
#   the unit "K" appended while values over 1 million appear as "1.00M"
#
proc ::utils::thousands {n {kilo 0}} {
  global locale
  set commaChar [string index $locale(numeric) 1]
  set unit ""
  if {$kilo} {
    if {$n >= 1000000} {
      set decimalChar [string index $locale(numeric) 0]
      set decimalPart [format "%02d" [expr {(int($n / 10000)) % 100}]]
      set n [expr {int($n) / 1000000}]
      set unit "${decimalChar}${decimalPart}M"
    } elseif {$n >= 100000} {
      set unit "K"
      set n [expr {int($n / 1000)} ]
    }
  }
  if {$commaChar == ""} { return "$n$unit" }
  while {[regsub {^([-+]?[0-9]+)([0-9][0-9][0-9])} $n "\\1$commaChar\\2" n]} {}
  return "$n$unit"
}

proc ::utils::percentFormat {num denom} {
  # Ensure denominator is not zero:
  if {$denom == 0} {set denom 1}
  return "[::utils::thousands $num] ([expr $num * 100 / $denom]%)"
}

namespace eval ::utils::date {}

# ::utils::date::today:
#   Returns todays date, in "yyyy.mm.dd" format.
#   The optional parameter "year", "month" or "day" can be used to
#   limit the returned value to just the year, month or day.
#
proc ::utils::date::today {{type all}} {
  set timeNow [clock seconds]
  set year [clock format $timeNow -format "%Y"]
  set month [clock format $timeNow -format "%m"]
  set day [clock format $timeNow -format "%d"]
  switch -- $type {
    "all"   { return [format "%s.%s.%s" $year $month $day] }
    "year"  { return $year }
    "month" { return $month }
    "day"   { return $day }
    default { error "Unrecognised parameter: $type" }
  }
}

image create photo ::utils::date::calendar -data {
R0lGODdhFgAUAMIAANnZ2VFR+wAAAP////oTQP//AAAAAAAAACwAAAAAFgAUAAADTwi63A4h
yklrVAFruDO0lCCO5NMIw4CqqWAya9ySdG3LbI7He+vrsxthSLiJfitCoUBAzpwDJRNqFBCL
RqpW1QN6q+DRdrfomsvh2mvtSAAAOw==
}

# ::utils::date::chooser
#
#   Produce a date-selection dialog box.
#   Originally based on code from Effective Tcl/Tk Programming by
#   Mark Harrison, but with lots of changes and improvements.
#
proc ::utils::date::chooser {{date "now"}} {
  set time [clock seconds]
  if {$date != "now"} {
    catch {set time [clock scan $date]}
  }
  set ::utils::date::_time $time
  set ::utils::date::_selected [clock format $time -format "%Y-%m-%d"]

  set win .dateChooser
  toplevel $win
  canvas $win.cal -width 300 -height 220
  pack [frame $win.b] -side bottom -fill x
  button $win.b.ok -text "OK" -command "destroy $win"
  button $win.b.cancel -text $::tr(Cancel) -command "
    set ::utils::date::_selected {}
    destroy $win"
  pack $win.b.cancel $win.b.ok -side right -padx 5 -pady 5
  pack $win.cal -side top -expand yes -fill both

  button $win.cal.prevY -image tb_start -command "::utils::date::_month $win -12"
  button $win.cal.prev -image tb_prev -command "::utils::date::_month $win -1"
  button $win.cal.next -image tb_next -command "::utils::date::_month $win +1"
  button $win.cal.nextY -image tb_end -command "::utils::date::_month $win +12"
  bind $win.cal <Configure> "::utils::date::_redraw $win"
  bind $win.cal <Double-Button-1> "destroy $win"
  bind $win <Escape> "$win.b.cancel invoke"
  bind $win <Return> "$win.b.ok invoke"
  bind $win <Prior> "$win.cal.prev invoke"
  bind $win <Next> "$win.cal.next invoke"
  bind $win <Shift-Prior> "$win.cal.prevY invoke"
  bind $win <Shift-Next> "$win.cal.nextY invoke"
  bind $win <Up> "::utils::date::_day $win -7"
  bind $win <Down> "::utils::date::_day $win +7"
  bind $win <Left> "::utils::date::_day $win -1"
  bind $win <Right> "::utils::date::_day $win +1"

  wm minsize $win 250 200
  wm title $win "Scid: Choose Date"
  focus $win
  grab $win
  tkwait window $win
  if {$::utils::date::_selected == ""} { return {} }
  set time [clock scan $::utils::date::_selected]
  return [list \
          [clock format $time -format "%Y"] \
          [clock format $time -format "%m"] \
          [clock format $time -format "%d"] \
         ]
}

proc ::utils::date::_day {win delta} {
  set unit "day"
  if {$delta < 0} {set unit "day ago"}
  set time [clock scan "[expr abs($delta)] $unit" -base $::utils::date::_time]
  set day [string trimleft [clock format $time -format "%d"] 0]
  set month [string trimleft [clock format $time -format "%m"] 0]
  set year [clock format $time -format "%Y"]
  ::utils::date::_select $win "$year-$month-$day"
}

proc ::utils::date::_month {win delta} {
  set dir [expr {($delta > 0) ? 1 : -1} ]
  set day [string trimleft [clock format $::utils::date::_time -format "%d"] 0]
  set month [string trimleft [clock format $::utils::date::_time -format "%m"] 0]
  set year [clock format $::utils::date::_time -format "%Y"]

  for {set i 0} {$i < abs($delta)} {incr i} {
    incr month $dir
    if {$month < 1} {
      set month 12
      incr year -1
    } elseif {$month > 12} {
      set month 1
      incr year 1
    }
  }
  if {[catch {::date::_select $win "$year-$month-$day"}]} {
    ::utils::date::_select $win "$year-$month-28"
  }
}

proc ::utils::date::_redraw {win} {
  $win.cal delete all
  set time $::utils::date::_time
  set wmax [winfo width $win.cal]
  set hmax [winfo height $win.cal]

  $win.cal create window 3 3 -anchor nw -window $win.cal.prevY
  $win.cal create window 40 3 -anchor nw -window $win.cal.prev
  $win.cal create window [expr {$wmax-43} ] 3 -anchor ne -window $win.cal.next
  $win.cal create window [expr {$wmax-3} ] 3 -anchor ne -window $win.cal.nextY
  set bottom [lindex [$win.cal bbox all] 3]

  set month [string trimleft [clock format $time -format "%m"] 0]
  set year [clock format $time -format "%Y"]
  $win.cal create text [expr {$wmax/2} ] $bottom -anchor s -font font_Bold \
    -text "[lindex $::tr(Months) [expr $month - 1]] $year"

  incr bottom 3
  $win.cal create line 0 $bottom $wmax $bottom -width 2
  incr bottom 25

  set current ""

  set layout [::utils::date::_layout $time]
  set weeks [expr {[lindex $layout end]+1} ]

  for {set day 0} {$day < 7} {incr day} {
    set x0 [expr {$day*($wmax-7)/7+3} ]
    set x1 [expr {($day+1)*($wmax-7)/7+3} ]
    $win.cal create text [expr {($x1+$x0)/2} ] $bottom -anchor s \
      -text [lindex $::tr(Days) $day] -font font_Small
  }
  incr bottom 3

  foreach {day date dcol wrow} $layout {
    set x0 [expr {$dcol*($wmax-7)/7+3} ]
    set y0 [expr {$wrow*($hmax-$bottom-4)/$weeks+$bottom} ]
    set x1 [expr {($dcol+1)*($wmax-7)/7+3} ]
    set y1 [expr {($wrow+1)*($hmax-$bottom-4)/$weeks+$bottom} ]

    if {$date == $::utils::date::_selected} {set current $date}

    $win.cal create rectangle $x0 $y0 $x1 $y1 -outline black -fill white

    $win.cal create text [expr {$x0+4} ] [expr {$y0+2} ] -anchor nw -text "$day" \
      -fill black -font font_Small -tags [list $date-text all-text]

    $win.cal create rectangle $x0 $y0 $x1 $y1 \
      -outline "" -fill "" -tags [list $date-sensor all-sensor]

    $win.cal bind $date-sensor <ButtonPress-1> "::utils::date::_select $win $date"
  }

  if {$current != ""} {
    $win.cal itemconfigure $current-sensor -outline red -width 3
    $win.cal raise $current-sensor
  } elseif {$::utils::date::_selected == ""} {
    set date [clock format $time -format "%Y-%m-%d"]
    ::utils::date::_select $win $date
  }
}

proc ::utils::date::_layout {time} {
  set month [string trimleft [clock format $time -format "%m"] 0]
  set year  [clock format $time -format "%Y"]

  foreach lastday {31 30 29 28} {
    if {[catch {clock scan "$year-$month-$lastday"}] == 0} { break }
  }
  set seconds [clock scan "$year-$month-1"]
  set firstday [clock format $seconds -format %w]
  set weeks [expr {ceil(double($lastday+$firstday)/7)} ]

  set rlist ""
  for {set day 1} {$day <= $lastday} {incr day} {
    set seconds [clock scan "$year-$month-$day"]
    set date [clock format $seconds -format "%Y-%m-%d"]
    set daycol [clock format $seconds -format %w]
    set weekrow [expr {($firstday+$day-1)/7} ]
    lappend rlist $day $date $daycol $weekrow
  }
  return $rlist
}

proc ::utils::date::_select {win date} {
  set time [clock scan $date]
  set date [clock format $time -format "%Y-%m-%d"]

  set currentMonth [clock format $::utils::date::_time -format "%m %Y"]
  set selectedMonth [clock format $time -format "%m %Y"]
  set ::utils::date::_time $time
  set ::utils::date::_selected $date

  if {$currentMonth == $selectedMonth} {
    $win.cal itemconfigure all-sensor -outline "" -width 1
    $win.cal itemconfigure $date-sensor -outline red -width 3
    $win.cal raise $date-sensor
  } else {
    ::utils::date::_redraw $win
  }
}
########################################
### utils/font.tcl: part of Scid.
#
# The following procs implement a font selection dialog. I found the code
# at codearchive.com (I dont think there was an author listed for it) and
# simplified it for use with Scid.

# FontDialog:
#   Creates a font dialog to select a font.
#   Returns 1 if user chose a font, 0 otherwise.
#
proc FontDialog {font_name {options ""} {fixedOnly 0}} {
  global fd_family fd_style fd_size fd_close
  global fd_strikeout fd_underline

  set fd_family {}; set fd_style {}; set fd_size {}
  set fd_close  -1

  set unsorted_fam [font families]
  set families [lsort $unsorted_fam]
  if {$fixedOnly} {
    set fams $families
    set families {}
    foreach f $fams {
      if {[font metrics [list $f] -fixed] == 1} { lappend families $f }
    }
  }

  # Get current font's family and so on.
  if {[llength $options] == 4} {
    # Use provided font settings:
    set family [lindex $options 0]
    set size [lindex $options 1]
    set weight [lindex $options 2]
    set slant [lindex $options 3]
  } else {
    # Get options using [font actual]:
    set family [font actual $font_name -family]
    set size   [font actual $font_name -size]
    set weight    [font actual $font_name -weight]
    set slant     [font actual $font_name -slant]
  }

  # Default style.
  set fd_style "Regular"
  if { $slant == "italic" } {
    if { $weight == "bold" } {
      set fd_style "Bold Italic"
    } else {
      set fd_style "Italic"
    }
  } else {
    if { $weight == "bold" } {
      set fd_style "Bold"
    }
  }

  set fd_family $family
  set fd_size   $size

  # Create font dialog.
  set dlg .fontdialog
  toplevel $dlg
  wm protocol $dlg WM_DELETE_WINDOW "set fd_close 0"
  wm title $dlg Font

  label $dlg.family_lbl -text "Font:" -anchor w
  entry $dlg.family_ent -textvariable fd_family -background white
  bind  $dlg.family_ent <Key-Return> "FontDialogRegen $font_name"
  grid config $dlg.family_lbl -column 0 -row 0 -sticky w
  grid config $dlg.family_ent -column 0 -row 1 -sticky snew

  label $dlg.style_lbl  -text "Font Style:" -anchor w
  entry $dlg.style_ent  -textvariable fd_style -width 11 -background white
  bind  $dlg.style_ent  <Key-Return>  "FontDialogRegen $font_name"
  grid config $dlg.style_lbl  -column 1 -row 0 -sticky w
  grid config $dlg.style_ent  -column 1 -row 1 -sticky snew

  label $dlg.size_lbl   -text "Size:" -anchor w
  entry $dlg.size_ent   -textvariable fd_size -width 4 -background white
  bind  $dlg.size_ent   <Key-Return> "FontDialogRegen $font_name"
  grid config $dlg.size_lbl   -column 2 -row 0 -sticky w
  grid config $dlg.size_ent   -column 2 -row 1 -sticky snew

  # Font family listbox.
  set fr $dlg.family_list
  frame $fr -bd 0
  listbox $fr.list -height 6 -selectmode single -width 30 \
    -background white -yscrollcommand "$fr.scroll set"
  scrollbar $fr.scroll -command "$fr.list yview"

  foreach f $families {
    $fr.list insert end $f
  }

  bind $fr.list <Double-Button-1> \
    "FontDialogFamily $fr.list $font_name $dlg.family_ent"

  pack $fr.scroll -side right -fill y
  pack $fr.list -side left
  grid config $fr -column 0 -row 2 -rowspan 16

  # Font style listbox.
  set fr $dlg.style_list
  frame $fr -bd 0
  listbox $fr.list -height 6 -selectmode single -width 11 \
    -background white -yscrollcommand "$fr.scroll set"
  scrollbar $fr.scroll -command "$fr.list yview"

  $fr.list insert end "Regular"
  $fr.list insert end "Bold"
  $fr.list insert end "Italic"
  $fr.list insert end "Bold Italic"

  bind $fr.list <Double-Button-1> \
    "FontDialogStyle $fr.list $font_name $dlg.style_ent"

  pack $fr.scroll -side right -fill y
  pack $fr.list -side left
  grid config $fr -column 1 -row 2 -rowspan 16

  # Font size listbox.
  set fr $dlg.size_list
  frame $fr -bd 0
  listbox $fr.list -height 6 -selectmode single -width 4 \
    -background white -yscrollcommand "$fr.scroll set"
  scrollbar $fr.scroll -command "$fr.list yview"

  for {set i 7} {$i <= 20} {incr i} {
    $fr.list insert end $i
  }

  bind $fr.list <Double-Button-1> \
    "FontDialogSize $fr.list $font_name $dlg.size_ent"

  pack $fr.scroll -side right -fill y
  pack $fr.list -side left
  grid config $fr -column 2 -row 2 -rowspan 16

  # OK/Cancel
  set fr $dlg.ok_cancel
  frame $fr -bd 0

  button $fr.ok -text "OK" -command "set fd_close 1"
  button $fr.cancel  -text "Cancel" -command "set fd_close 0"
  pack $fr.ok -side top -fill x
  pack $fr.cancel -side top -fill x -pady 2
  button $fr.help -text "Help" -command "helpWindow Options"
  pack $fr.help -side top -fill x -pady 10
  grid config $fr -column 4 -row 1 -rowspan 2 -sticky snew -padx 12

  # Sample text
  set fr $dlg.sample
  frame $fr -bd 3 -relief groove
  label $fr.l_sample -text "Sample" -anchor w

  label $fr.sample -font $font_name -bd 2 -relief sunken -text \
    "This is some sample text\nAaBbCcDdEeFfGgHhIiJjKkLlMm\n 0123456789. +=-"

  pack  $fr.l_sample -side top -fill x -pady 4
  pack  $fr.sample -side top -pady 4 -ipadx 10 -ipady 10

  grid config $fr -column 0 -columnspan 3 -row 20 \
    -rowspan 2 -sticky snew -pady 10 -padx 2

  # Make this a modal dialog.
  tkwait variable fd_close

  # Get rid of dialog and return value.
  destroy $dlg

  # Restore old font characteristics on a cancel:
  if { $fd_close == 0 } {
    font configure $font_name -family $family \
      -size $size -slant $slant -weight $weight
    return ""
  }

  return [list $fd_family $fd_size \
            [FontWeight $fd_style] [FontSlant $fd_style]]
}


proc FontDialogFamily { listname font_name entrywidget } {
  # Get selected text from list.
  catch {
    set item_num [$listname curselection]
    set item [$listname get $item_num]

    # Set selected list item into entry for font family.
    $entrywidget delete 0 end
    $entrywidget insert end $item

    # Use this family in the font and regenerate font.
    FontDialogRegen $font_name
  }
}


proc FontDialogStyle { listname font_name entrywidget } {
  # Get selected text from list.
  catch {
    set item_num [$listname curselection]
    set item [$listname get $item_num]

    # Set selected list item into entry for font family.
    $entrywidget delete 0 end
    $entrywidget insert end $item

    # Use this family in the font and regenerate font.
    FontDialogRegen $font_name
  }
}


proc FontDialogSize { listname font_name entrywidget } {
  # Get selected text from list.
  catch {
    set item_num [$listname curselection]
    set item [$listname get $item_num]

    # Set selected list item into entry for font family.
    $entrywidget delete 0 end
    $entrywidget insert end $item

    # Use this family in the font and regenerate font.
    FontDialogRegen $font_name
  }
}

proc FontWeight {style} {
  if { $style == "Bold Italic" || $style == "Bold" } {
    return "bold"
  }
  return "normal"
}

proc FontSlant {style} {
  if { $style == "Bold Italic" || $style == "Italic" } {
    return "italic"
  }
  return "roman"
}

# FontDialogRegen: Regenerates font from attributes.
proc FontDialogRegen { font_name } {
  global fd_family fd_style fd_size

  set weight "normal"
  if { $fd_style == "Bold Italic" || $fd_style == "Bold" } {
    set weight "bold"
  }

  set slant "roman"
  if { $fd_style == "Bold Italic" || $fd_style == "Italic" } {
    set slant "italic"
  }

  # Change font to have new characteristics.
  font configure $font_name -family $fd_family \
    -size $fd_size -slant $slant -weight $weight
}

## End of file: fontsel.tcl
# utils/graph.tcl: Graph plotting package for Scid.
#

namespace eval ::utils::graph {}

# Configuration options, specific to each graph:
#
#  -width:     width of graph in canvas units.
#  -height:    height of graph in canvas units.
#  -xtop:      x-coord of top-left graph corner in canvas.
#  -ytop:      y-coord of top-left graph corner in canvas.
#  -background: background color in graph.
#  -font:      font of axis text.
#  -textcolor: color of axis text.
#  -ticksize:  length of ticks on axes, in canvas units.
#  -tickcolor: color to draw x-axis and y-axis ticks.
#  -textgap:   distance from graph border to text, in canvas units.
#  -xtick:     distance between x-axis ticks, in graph units.
#  -ytick:     distance between y-axis ticks, in graph units.
#  -xlabels, -ylabels: lists of {value,label} pairs to print on each axis.
#              If a list has no pairs, values are printed at each tick.
#  -xmin, -xmax, -ymin, -ymax:  miminum/maximum graph units to plot.
#  -canvas:    canvas to plot the graph in.
#  -vline, -hline: list of vertical/horizontal lines to plot. Each
#              element is a list of four items: {color width type value}
#              where color is the line color, width is its width in
#              pixels, type is "each" or "at", and value is the value.
#  -brect: list of background rectangles. Each element is a list of 5 items:
#              the graph coordinates of a rectangle, and its color.
#
set ::utils::graph::_options(graph) {
  width height xtop ytop background font ticksize textgap xtick ytick
  xmin xmax ymin ymax canvas vline hline textcolor tickcolor
  xlabels ylabels brect
}
set ::utils::graph::_defaults(graph) \
  { -width 400 -height 300 -xtop 50 -ytop 30 -ticksize 5 -textgap 4 \
    -xtick 5 -ytick 5 -tickcolor black -font fixed -background white \
      -canvas {} -hline {} -vline {} -textcolor black \
      -xlabels {} -ylabels {} -brect {} }

# Data options, specific to each data set within a graph:
#
#   -points:  1 to display data points.
#   -lines:   1 to display data line.
#   -bars:    1 to display vertical bars.
#   -color:   color to display points, lines and bars in.
#   -outline: color for outline of bars or points. Not used for lines.
#   -radius:  radius of points in canvas units.
#   -linewidth: width of line in canvas units.
#   -barwidth:  width of bars -- in GRAPH units, NOT canvas units.
#   -key:     key name to print by line.
#   -coords:  actual data to plot; should be a list containing an
#             EVEN number of numeric values.
#
set ::utils::graph::_options(data) {
  points lines bars color outline radius linewidth barwidth coords key
}
set ::utils::graph::_defaults(data) \
  { -points 0 -lines 1 -bars 0 -color red -outline black -radius 2 \
    -linewidth 1 -barwidth 1.0 -key {} -coords {} }

set ::utils::graph::_graphs {}
array set ::utils::graph::_data {}


# create:
#    Create a new graph. Sets up the graph configuration and creates a
#    new proc (in the global namespace) with the same name as the graph.
#
proc ::utils::graph::create args {
  set graph [lindex $args 0]
  lappend ::utils::graph::_graphs $graph
  
  # Remove any existing data for this graph name:
  foreach key [array names ::utils::graph::_data] {
    if {[string match "$graph,*" $key]} { unset ::utils::graph::_data($key) }
  }
  set ::utils::graph::_data($graph,sets) {}

  set args [concat graph $graph $::utils::graph::_defaults(graph) [lrange $args 1 end]]
  set extraArgs [eval "::utils::graph::_configure $args"]
  if {$extraArgs != ""} {
    error "Unrecognised arguments: $extraArgs"
  }
  return $graph
}


# delete:
#    Removes all privately stored information about a graph.
#
proc ::utils::graph::delete {graph} {
  # Remove from the list of available graphs:
  set index [lindex $::utils::graph::_graphs $graph]
  if {$index < 0} { return }
  set ::utils::graph::_graphs [lreplace $::utils::graph::_graphs $index $index]
  # Remove all configuration data for the graph:
  foreach key [array names ::utils::graph::_data] {
    if {[string match "$graph,*" $key]} {
      unset ::utils::graph::_data($key)
    }
  }
}


# isgraph:
#    Returns true if the named graph exists.
#
proc ::utils::graph::isgraph {graph} {
  if {[lsearch $::utils::graph::_graphs $graph] >= 0} { return 1 }
  return 0
}


# data:
#    Adds a new data set to the graph, or modifies an existing one.
#
proc ::utils::graph::data args {
  variable _data
  variable _defaults
  set graph [lindex $args 0]
  set dataset [lindex $args 1]

  set args [concat data $graph,$dataset $_defaults(data) \
              [lrange $args 2 end]]

  set extraArgs [eval "::utils::graph::_configure $args"]
  if {$extraArgs != ""} {
    error "Unrecognised graph data options: $extraArgs"
  }

  set marklist $_data($graph,sets)
  if {[lsearch -exact $marklist $dataset] < 0} {
    lappend _data($graph,sets) $dataset
  }

  set datalength 0
  set ncoords [llength $_data($graph,$dataset,coords)]
  if {$ncoords % 2 != 0} {
    error "Error: coordinates list must have an even length"
  }

  # Redraw graph: do we want to do this here?
  #::utils::graph::redraw $graph
}


# cget:
#    Return a stored attribute of a graph.
#
proc ::utils::graph::cget {graph opt} {
  variable _data
  # Remove initial "-" if necessary:
  if {[string index $opt 0] == "-"} { set opt [string range $opt 1 end] }

  # If asking for axmin/axmax/aymin/aymax, set ranges first:
  if {[string match "a?m??" $opt]} { ::utils::graph::set_range $graph }

  if {! [info exists _data($graph,$opt)]} {
    error "No such graph option: $opt"
  }
  return $_data($graph,$opt)
}

# configure:
#    Modify stored attributes for a graph.
#
proc ::utils::graph::configure args {
  set newargs [concat "graph" [lindex $args 0] [lrange $args 1 end]]
  eval "::utils::graph::_configure $newargs"
}


# _configure:
#    Handle configuration of both the graph, and individual data sets.
#    The first arg (type) should be "graph" or "data". The second should
#    be a graph name for graph configuration, or a "graph,set" pair
#    for dataset configuration.
#
proc ::utils::graph::_configure args {
  variable _data
  set type [lindex $args 0]
  set dataset [lindex $args 1]
  set args [lrange $args 2 end]

  set optionList $::utils::graph::_options($type)
  set option {}

  if {[llength $args] % 2} { error "Error: odd-length options list: $args" }

  for {set i 0} {$i < [llength $args]} {incr i 2} {
    set option [lindex $args $i]
    if {[string index $option 0] != "-"} { return [lrange $args $i end] }
    set option [string range $option 1 end]
    if {[lsearch $optionList $option] >= 0} {
      set _data($dataset,$option) [lindex $args [expr {$i + 1}]]
    }
  }
}


# redraw:
#    Redraw the entire graph, axes and data.
#
proc ::utils::graph::redraw {graph} {
  if {! [::utils::graph::isgraph $graph]} { error "$graph: no such graph" }
  if {! [info exists ::utils::graph::_data($graph,canvas)]} { return }
  $::utils::graph::_data($graph,canvas) delete -withtag g$graph
  ::utils::graph::plot_axes $graph
  ::utils::graph::plot_data $graph
}

# plot_axes:
#    Replot the graph axes.
#
proc ::utils::graph::plot_axes {graph} {
  variable _data
  # Set ranges and scaling factors:
  ::utils::graph::set_range $graph
  ::utils::graph::rescale $graph

  set xmin $_data($graph,axmin)
  set xmax $_data($graph,axmax)
  set ymin $_data($graph,aymin)
  set ymax $_data($graph,aymax)

  set xminc [xmap $graph $xmin]
  set xmaxc [xmap $graph $xmax]
  set yminc [ymap $graph $ymin]
  set ymaxc [ymap $graph $ymax]

  set canvas $_data($graph,canvas)
  set tag g$graph

  # Extract the graph attributes we will need to use:
  foreach attr {ticksize font textcolor tickcolor textgap \
                  xtick ytick xlabels ylabels} {
    set $attr $_data($graph,$attr)
  }

  $canvas create rectangle $xminc $yminc $xmaxc $ymaxc -outline $tickcolor \
    -fill $_data($graph,background) -tag $tag

  set brect $_data($graph,brect)
  for {set i 0} {$i < [llength $brect]} {incr i} {
    set item [lindex $brect $i]
    set x1 [xmap $graph [lindex $item 0]]
    set y1 [ymap $graph [lindex $item 1]]
    set x2 [xmap $graph [lindex $item 2]]
    set y2 [ymap $graph [lindex $item 3]]
    if {$x1 < $xminc} { set x1 $xminc }
    if {$x1 > $xmaxc} { set x1 $xmaxc }
    if {$x2 < $xminc} { set x2 $xminc }
    if {$x2 > $xmaxc} { set x2 $xmaxc }
    if {$y1 > $yminc} { set y1 $yminc }
    if {$y1 < $ymaxc} { set y1 $ymaxc }
    if {$y2 > $yminc} { set y2 $yminc }
    if {$y2 < $ymaxc} { set y2 $ymaxc }
    $canvas create rectangle $x1 $y1 $x2 $y2 -fill [lindex $item 4] -width 0 \
      -tag $tag
  }

  # Plot vertical guide lines:
  foreach vline $_data($graph,vline) {
    set color [lindex $vline 0]
    set width [lindex $vline 1]
    set type [lindex $vline 2]
    set inc [lindex $vline 3]
    set xminvalue [xmap $graph $xmin]
    set xmaxvalue [xmap $graph $xmax]
    if {$type == "at"} {
      # Plot just one line:
      set xvalue [xmap $graph $inc]
      if {$xvalue != $xminvalue  &&  $xvalue != $xmaxvalue} {
        $canvas create line $xvalue $yminc $xvalue $ymaxc -width $width \
          -fill $color -tag $tag
      }
    } elseif {$inc > 0} {
      # Plot a line at each multiple of "inc" units:
      set x [expr {int($xmin/$inc) * $inc + $inc}]
      while {$x < $xmax} {
        set xvalue [xmap $graph $x]
        if {$xvalue != $xminvalue  &&  $xvalue != $xmaxvalue} {
          $canvas create line $xvalue $yminc $xvalue $ymaxc -width $width \
            -fill $color -tag $tag
        }
        set x [expr {$x + $inc}]
      }
    }
  }

  # Plot horizontal guide lines:
  foreach hline $_data($graph,hline) {
    set color [lindex $hline 0]
    set width [lindex $hline 1]
    set type [lindex $hline 2]
    set inc [lindex $hline 3]
    set yminvalue [ymap $graph $ymin]
    set ymaxvalue [ymap $graph $ymax]
    if {$type == "at"} {
      set yvalue [ymap $graph $inc]
      if {$yvalue != $yminvalue  &&  $yvalue != $ymaxvalue} {
        $canvas create line $xminc $yvalue $xmaxc $yvalue -width $width \
          -fill $color -tag $tag
      }
    } elseif {$inc > 0} {
      set y [expr {int($ymin/$inc) * $inc + $inc}]
      while {$y < $ymax} {
        set yvalue [ymap $graph $y]
        if {$yvalue != $yminvalue  &&  $yvalue != $ymaxvalue} {
          $canvas create line $xminc $yvalue $xmaxc $yvalue -width $width \
            -fill $color -tag $tag
        }
        set y [expr {$y + $inc}]
      }
    }
  }

  # Plot x ticks and y ticks:
  set nxlabels [llength $xlabels]
  set nylabels [llength $ylabels]

  if {$xtick > 0} {
    set x [expr {int($xmin/$xtick) * $xtick}]
    while {$x < $xmin} { set x [expr {$x + $xtick}] }
    while {$x <= $xmax} {
      set xc [xmap $graph $x]
      $canvas create line $xc $yminc $xc [expr {$yminc - $ticksize}] \
        -tag $tag -fill $tickcolor
      $canvas create line $xc $ymaxc $xc [expr {$ymaxc + $ticksize}] \
        -tag $tag -fill $tickcolor
      if {$nxlabels == 0} {
        $canvas create text $xc [expr {$yminc + $textgap}] -font $font \
          -text [::utils::graph::round $x] -anchor n -tag $tag -fill $textcolor
      }
      set x [expr {$x + $xtick}]
    }
  }
  for {set i 0} {$i < $nxlabels} {incr i} {
    set label [lindex $xlabels $i]
    set x [lindex $label 0]
    set text [lindex $label 1]
    set xc [xmap $graph $x]
    $canvas create text $xc [expr {$yminc + $textgap}] -font $font \
      -text $text -anchor n -tag $tag -fill $textcolor -justify center
  }

  if {$ytick > 0} {
    set y [expr {int($ymin/$ytick) * $ytick}]
    while {$y < $ymin} { set y [expr {$y + $ytick}] }
    while {$y <= $ymax} {
      set yc [ymap $graph $y]
      $canvas create line $xminc $yc [expr {$xminc + $ticksize}] $yc \
        -tag $tag -fill $tickcolor
      $canvas create line [expr {$xmaxc - $ticksize}] $yc $xmaxc $yc \
        -tag $tag -fill $tickcolor
      if {$nylabels == 0} {
        $canvas create text [expr {$xminc - $textgap}] $yc -font $font \
          -text [::utils::graph::round $y] -anchor e -tag $tag -fill $textcolor
      }
      set y [expr {$y + $ytick}]
    }
  }
  for {set i 0} {$i < $nylabels} {incr i} {
    set label [lindex $ylabels $i]
    set y [lindex $label 0]
    set text [lindex $label 1]
    set yc [ymap $graph $y]
    $canvas create text [expr {$xminc - $textgap}] $yc -font $font \
      -text $text -anchor e -tag $tag -fill $textcolor
  }
}

# plot_data:
#    Plot the lines/points/bars for each data set in the graph.
#
proc ::utils::graph::plot_data {graph} {
  variable _data
  set canvas $_data($graph,canvas)

  foreach dataset $_data($graph,sets) {
    set color $_data($graph,$dataset,color)
    set outline $_data($graph,$dataset,outline)
    set tag g$graph
    set coords [scale_data $graph $_data($graph,$dataset,coords)]
    set ncoords [expr {[llength $coords] - 1}]

    # Draw key:
    if {$_data($graph,$dataset,key) != ""} {
      set key $_data($graph,$dataset,key)
      if {$ncoords >= 1} {
        set dy 3
        set anchor nw
        set x [expr {[lindex $coords 0] + 3}]
        set y [lindex $coords 1]
        if {$ncoords >= 3} {
          set nexty [lindex $coords 3]
          if {$nexty > $y} { set dy -3; set anchor sw }
        }
        incr y $dy
        catch {$canvas create text $x $y -fill $color -tag $tag \
                 -text $_data($graph,$dataset,key) \
                 -font $_data($graph,font) -anchor $anchor}
      }
    }

    # Plot line:
    if {$_data($graph,$dataset,lines)} {
      # Catch errors drawing line in case the data set contains no data:
      catch {eval "$canvas create line $coords -fill $color \
                   -width $_data($graph,$dataset,linewidth) -tag $tag"}
    }

    # Plot points:
    if {$_data($graph,$dataset,points)} {
      for {set i 0} {$i < $ncoords} {incr i 2} {
        set x [lindex $coords $i]
        set y [lindex $coords [expr {$i + 1}]]
        set p $_data($graph,$dataset,radius)
        $canvas create oval [expr {$x-$p}] [expr {$y-$p}] \
          [expr {$x+$p}] [expr {$y+$p}] \
          -fill $color -outline $outline -width 1 -tag $tag
      }
    }

    # Plot bars:
    if {$_data($graph,$dataset,bars)} {
      set base [ymap $graph $_data($graph,aymin)]
      set hwidth [xmap $graph $_data($graph,$dataset,barwidth)]
      set hwidth [expr {$hwidth - [xmap $graph 0]}]
      set hwidth [expr {$hwidth / 2}]
      if {$hwidth < 1} { set hwidth 1 }

      for {set i 0} {$i < $ncoords} {incr i 2} {
        set x [lindex $coords $i]
        set y [lindex $coords [expr {$i + 1}]]
        $canvas create rectangle \
          [expr {$x-$hwidth}] $y [expr {$x+$hwidth}] $base \
          -fill $color -outline $outline -tag $tag
      }
    }
  }
}


# round
#
#    Returns a value n rounded to the nearest integer if it is
#    within 0.1 of n, or to one decimal place otherwise.
#    Used to print axis values to a sensible precision.
#
proc ::utils::graph::round {n} {
  set intn [expr {int($n)}]
  if {[expr {$n - $intn}] < 0.1  &&  [expr {$intn - $n}] < 0.1} {
    return [expr {round($n)}]
  }
  return [expr {double(round($n * 10.0)) / 10.0}]
}


# point_visible
#
#    Returns true if a point (in graph coordinates) is visible given
#    the current display boundaries.
#
proc ::utils::graph::point_visible {graph x y} {
  variable data
  set xmin $_data($graph,xtop)
  set ymin $_data($graph,ytop)
  set xmax [expr {$xmin + $_data($graph,width)}]
  set ymax [expr {$ymin + $_data($graph,height)}]

  if {$x >= $xmin && $x <= $xmax && $y >= $ymin && $y <= $ymax} { return 1 }
  return 0
}


# rescale:
#    Sets the scaling factors used for mapping graph to canvas coordinates.
#
proc ::utils::graph::rescale {graph} {
  variable _data
  set width $_data($graph,width)
  set height $_data($graph,height)
  set xdelta [expr {double($_data($graph,axmax) - $_data($graph,axmin))}]
  set ydelta [expr {double($_data($graph,aymax) - $_data($graph,aymin))}]
  # Ensure deltas are not zero or too close to it:
  if {$xdelta < 0.0001} { set xdelta 0.0001 }
  if {$ydelta < 0.0001} { set ydelta 0.0001 }

  set _data($graph,xfac) [expr {double($width)/$xdelta}]
  set _data($graph,yfac) [expr {double($height)/$ydelta}]
}


# xmap:
#    Map a graph X coordinate to its canvas unit equivalent.
#
proc ::utils::graph::xmap {graph x} {
  variable _data
  return [expr {int(($x - $_data($graph,axmin)) * \
            $_data($graph,xfac) + $_data($graph,xtop))}]
}

# ymap:
#    Map a graph Y coordinate to its canvas unit equivalent.
#
proc ::utils::graph::ymap {graph y} {
  variable _data
if {$y == ""} { error "y is empty" }
  return [expr {int(($_data($graph,aymax) - $y) * \
            $_data($graph,yfac) + $_data($graph,ytop))}]
}

# Xunmap:
#    Transform a canvas unit to its graph X coordinate equivalent.
#
proc ::utils::graph::xunmap {graph cx} {
  variable _data
  return [expr {$_data($graph,axmin) + \
            double($cx - $_data($graph,xtop)) / \
            double($_data($graph,xfac))}]
}

# Yunmap:
#    Transform a canvas unit to its graph Y coordinate equivalent.
#
proc ::utils::graph::yunmap {graph cy} {
  variable _data
  return [expr {$_data($graph,aymax) - \
            double($cy - $_data($graph,ytop)) / \
            double($_data($graph,yfac))}]
}

# scale_data:
#    Transforms an even-sized list of graph coordinates to canvas units.
#
proc ::utils::graph::scale_data {graph coords} {
  set result {}
  for {set i 0} {$i < [llength $coords] - 1} {incr i 2} {
    lappend result [xmap $graph [lindex $coords $i]]
    lappend result [ymap $graph [lindex $coords [expr {$i + 1}]]]
  }
  return $result
}

# set_range:
#    Sets any range boundaries that are not already set for a graph.
#
proc ::utils::graph::set_range {graph} {
  variable _data

  set xmin 1000000000; set xmax -100000000
  set ymin 1000000000; set ymax -100000000

  foreach dataset $_data($graph,sets) {
    set coords $_data($graph,$dataset,coords)
    for {set i 0} {$i < [llength $coords] - 1} {incr i 2} {
      set x [lindex $coords $i]
      set y [lindex $coords [expr {$i + 1}]]

      if {$x < $xmin} { set xmin $x }
      if {$x > $xmax} { set xmax $x }
      if {$y < $ymin} { set ymin $y }
      if {$y > $ymax} { set ymax $y }
    }
  }

  # Set sane values if no data coordinates exist at all:
  if {$xmax < $xmin} { set xmin 0; set xmax 1 }
  if {$ymax < $ymin} { set ymin 0; set ymax 1 }

  set xtick $_data($graph,xtick)
  set ytick $_data($graph,ytick)
  set _data($graph,axmin) [expr {floor($xmin/$xtick) * $xtick}]
  set _data($graph,axmax) [expr {floor($xmax/$xtick) * $xtick + $xtick}]
  set _data($graph,aymin) [expr {floor($ymin/$ytick) * $ytick}]
  set _data($graph,aymax) [expr {floor($ymax/$ytick) * $ytick + $ytick}]

  # Explicitly set boundaries override the detected ranges:
  foreach coord {xmin xmax ymin ymax} {
    if {[info exists _data($graph,$coord)]} {
      set _data($graph,a$coord) $_data($graph,$coord)
    }
  }
}

### history.tcl
### Text entry history functions for Scid.
### Copyright (C) 2004 Shane Hudson.

namespace eval ::utils::history {}


set ::utils::history::defaultListLength 10
array set ::utils::history::listLength {}
array set ::utils::history::comboboxWidget {}

if {! [info exists ::utils::history::listData]} {
  array set ::utils::history::listData {}
}

# Load any history lists that were saved in the last session:
catch {source [scidConfigFile history]}


proc ::utils::history::SetList {key list} {
  set ::utils::history::listData($key) $list
}


proc ::utils::history::GetList {key} {
  variable listData
  if {[info exists listData($key)]} {
    return $listData($key)
  }
  return {}
}


#  ::utils::history::AddEntry
#
#   Inserts an entry at the top of the list of the specified key and
#   ensures that only one copy of the entry exists in the list.
#   The list is then pruned to the limit size is necessary.
#
proc ::utils::history::AddEntry {key entry} {
  variable listData

  # We do not add the empty string to a history list:
  if {$entry == ""} { return }

  if {[info exists listData($key)]} {
    # Take out this entry if it exists, so it will not appear twice:
    set index [lsearch -exact $listData($key) $entry]
    if {$index == 0} {
      # The entry is already at the start of the list; nothing to do
      return
    } elseif {$index > 0} {
      set listData($key) [lreplace $listData($key) $index $index]
    }
    set listData($key) [linsert $listData($key) 0 $entry]
    ::utils::history::PruneList $key
  } else {
    set listData($key) [list $entry]
  }
  RefillCombobox $key
}


proc ::utils::history::SetLimit {key length} {
  set ::utils::history::listLength($key) $length
  ::utils::history::PruneList $key
}


proc ::utils::history::GetLimit {key} {
  variable listLength
  variable defaultListLength
  if {[info exists ::utils::history::listLength($key)]} {
    return $::utils::history::listLength($key)
  }
  return $defaultListLength
}


proc ::utils::history::PruneList {key {length -1}} {
  variable data
  if {! [info exists data($key)]} { return }
  if {$length < 0} {
    set length [::utils::history::GetLimit $key]
  }
  set data($key) [lrange $data($key) 0 [expr {$length - 1}]]
}



# ::utils::history::SetCombobox
#
#   Returns the combobox widget associated with this history key.
#
proc ::utils::history::GetCombobox {key} {
  variable comboboxWidget
  if {[info exists comboboxWidget($key)]} {
    return $comboboxWidget($key)
  }
  return ""
}


# ::utils::history::SetCombobox
#
#   Associates the specified widget (which must be a megawidget created
#   with ::combobox::combobox, see contrib/combobox.tcl) with the specifiec
#   history key. Whenever the list for this history key is modified, the
#   combobox widget will be updated.
#
proc ::utils::history::SetCombobox {key cbWidget} {
  set ::utils::history::comboboxWidget($key) $cbWidget
  RefillCombobox $key
}


# ::utils::history::SetCombobox
#
#   Refills the history list of the combobox associated with the specified
#   history key, if there is one.
#
proc ::utils::history::RefillCombobox {key} {
  variable comboboxWidget
  
  set cbWidget [GetCombobox $key]
  if {$cbWidget == ""} { return }

  # If the combobox widget is part of a dialog which is generated as needed,
  # it may not exist right now:
  if {! [winfo exists $cbWidget]} { return }

  $cbWidget list delete 0 end
  set entries [GetList $key]
  foreach entry $entries {
    $cbWidget list insert end $entry
  }
}


# ::utils::history::Save
#   Saves the combobox history file, reporting any error in a message box
#   if reportError is true.
#
proc ::utils::history::Save {{reportError 0}} {
  variable listData

  set f {}
  set filename [scidConfigFile history]

  if  {[catch {open $filename w} f]} {
    if {$reportError} {
      tk_messageBox -title "Scid" -type ok -icon warning \
        -message "Unable to write file: $filename\n$f"
    }
    return
  }

  puts $f "# Scid [sc_info version] combobox history lists"
  puts $f ""
  foreach i [lsort [array names listData]] {
    puts $f "set ::utils::history::listData($i) [list $listData($i)]"
  }
  close $f
}

# The following paned window code is loosely based on code from the book:
#
#  Effective Tcl/Tk Programming
#     Mark Harrison, DSC Communications Corp.
#     Michael McLennan, Bell Labs Innovations for Lucent Technologies
#     Addison-Wesley Professional Computing Series
#  Copyright (c) 1996-1997  Lucent Technologies Inc. and Mark Harrison
#
# Many modifications and improvements for use in Scid have been made,
# including namespacing the code.

namespace eval ::utils::pane {}

array set ::utils::pane::_data {}

# Create
#
#   Create a paned window.
#
proc ::utils::pane::Create {win pane1 pane2 width height {ratio 0.5} {orient vert}} {
  variable _data
  set _data($win,1) $pane1
  set _data($win,2) $pane2
  set _data($win,drag) 1
  set vertical 1
  if {[string index $orient 0] == "h"} { set vertical 0 }
  set _data($win,vertical) $vertical
  # Default minimum size of each frame is 10%:
  set _data($win,min) 0.1
  set _data($win,max) 0.9

  frame $win -width $width -height $height
  frame $win.$pane1
  frame $win.$pane2
  if {$vertical} {
    place $win.$pane1 -relx 0.5 -rely 0 -anchor n -relwidth 1.0 -relheight 0.5
    place $win.$pane2 -relx 0.5 -rely 1 -anchor s -relwidth 1.0 -relheight 0.5

    frame $win.pane_sash -height 2 -borderwidth 2 -relief groove \
      -cursor sb_v_double_arrow ;# -background black
    place $win.pane_sash -relx 0.5 -rely 0.5 -relwidth 1.0 -anchor c

    frame $win.pane_grip -width 20 -height 7 -borderwidth 1 -relief solid \
      -cursor sb_v_double_arrow -background gray
    place $win.pane_grip -relx 0.95 -rely 0.5 -anchor c
  } else {
    place $win.$pane1 -relx 0 -rely 0.5 -anchor w -relwidth 0.5 -relheight 1.0
    place $win.$pane2 -relx 1 -rely 0.5 -anchor e -relwidth 0.5 -relheight 1.0

    frame $win.pane_sash -width 1 -borderwidth 1 -relief flat \
      -cursor sb_h_double_arrow -background black
    place $win.pane_sash -relx 0.5 -rely 0.5 -relheight 1.0 -anchor c

    frame $win.pane_grip -height 20 -width 7 -borderwidth 1 -relief solid \
      -cursor sb_h_double_arrow -background gray
    place $win.pane_grip -relx 0.5 -rely 0.95 -anchor c
  }

  #bind $win.pane_grip <Enter>           "::utils::pane::Enter $win"
  #bind $win.pane_grip <Leave>           "::utils::pane::Leave $win"
  #bind $win.pane_sash <Enter>           "::utils::pane::Enter $win"
  #bind $win.pane_sash <Leave>           "::utils::pane::Leave $win"

  if {$vertical} { set c "%Y" } else { set c "%X" }
  bind $win.pane_grip <ButtonPress-1>   "::utils::pane::Grab $win"
  bind $win.pane_grip <B1-Motion>       "::utils::pane::Drag $win $c"
  bind $win.pane_grip <ButtonRelease-1> "::utils::pane::Drop $win $c"
  bind $win.pane_sash <ButtonPress-1>   "::utils::pane::Grab $win"
  bind $win.pane_sash <B1-Motion>       "::utils::pane::Drag $win $c"
  bind $win.pane_sash <ButtonRelease-1> "::utils::pane::Drop $win $c"

  ::utils::pane::Divide $win $ratio
  return $win
}

proc ::utils::pane::SetDrag {win bool} {
  set ::utils::pane::_data($win,drag) $bool
}

proc ::utils::pane::SetRange {win min max} {
  set ::utils::pane::_data($win,min) $min
  set ::utils::pane::_data($win,max) $max
}

proc ::utils::pane::Enter {win} {
  $win.pane_sash configure -background yellow
  $win.pane_grip configure -background yellow
}

proc ::utils::pane::Leave {win} {
  $win.pane_sash configure -background black
  $win.pane_grip configure -background black
}

proc ::utils::pane::Grab {win} {
  $win.pane_sash configure -background red
  $win.pane_grip configure -background red
}

proc ::utils::pane::Drag {win y} {
  variable _data
  set vertical $_data($win,vertical)
  if {$vertical} {
    set realY [expr {$y-[winfo rooty $win]}]
    set Ymax  [winfo height $win]
  } else {
    set realY [expr {$y-[winfo rootx $win]}]
    set Ymax  [winfo width $win]
  }
  set frac [expr {double($realY) / $Ymax}]
  if {$frac < $_data($win,min)} {set frac $_data($win,min)}
  if {$frac > $_data($win,max)} {set frac $_data($win,max)}

  if {$_data($win,drag)} {
    ::utils::pane::Divide $win $frac
  } else {
    if {$vertical} {
      place $win.pane_sash -rely $frac
      place $win.pane_grip -rely $frac
    } else {
      place $win.pane_sash -relx $frac
      place $win.pane_grip -relx $frac
    }
  }
  return $frac
}

proc ::utils::pane::Drop {win y} {
  set frac [::utils::pane::Drag $win $y]
  ::utils::pane::Divide $win $frac
  $win.pane_sash configure -background black
  $win.pane_grip configure -background gray
}

proc ::utils::pane::Divide {win frac} {
  if {$::utils::pane::_data($win,vertical)} {
    place $win.pane_sash -rely $frac
    place $win.pane_grip -rely $frac
    place $win.$::utils::pane::_data($win,1) -relheight $frac
    place $win.$::utils::pane::_data($win,2) -relheight [expr {1.0 - $frac}]
  } else {
    place $win.pane_sash -relx $frac
    place $win.pane_grip -relx $frac
    place $win.$::utils::pane::_data($win,1) -relwidth $frac
    place $win.$::utils::pane::_data($win,2) -relwidth [expr {1.0 - $frac}]
  }
}
### sound.tcl
### Functions for playing sound files to announce moves.
### Part of Scid. Copyright (C) Shane Hudson 2004.
###
### Uses the free Tcl/Tk sound package "Snack", which comes with
### most Tcl distributions. See http://www.speech.kth.se/snack/

namespace eval ::utils::sound {}

set ::utils::sound::hasSnackPackage 0
set ::utils::sound::isPlayingSound 0
set ::utils::sound::soundQueue {}
set ::utils::sound::soundFiles [list \
    King Queen Rook Bishop Knight CastleQ CastleK Back Mate Promote \
    a b c d e f g h x 1 2 3 4 5 6 7 8]

# soundMap
#
#   Maps characters in a move to sounds.
#   Before this map is used, "O-O-O" is converted to "q" and "O-O" to "k"
#   Also note that "U" (undo) is used for taking back a move.
#
array set ::utils::sound::soundMap {
    K King Q Queen R Rook B Bishop N Knight k CastleK q CastleQ
    x x U Back # Mate = Promote
    a a b b c c d d e e f f g g h h
    1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8
}


# ::utils::sound::Setup
#
#   Called once at startup to load the Snack package and set up sounds.
#
proc ::utils::sound::Setup {} {
  variable hasSnackPackage
  variable soundFiles
  variable soundFolder

  ::splash::add "Setting up audio move announcement..."
  if {[catch {package require snack 2.0}]} {
    set hasSnackPackage 0
    ::splash::add "    Move speech disabled - Snack sound package not found"
    return
  }

  ::splash::add "    Move speech enabled - Snack sound package found"
  set hasSnackPackage 1

  # Set up sounds. Each sound will be empty until a WAV file for it is found.
  foreach soundFile $soundFiles {
    ::snack::sound sound_$soundFile
  }

  set numSounds [::utils::sound::ReadFolder]
  set numSought [llength $soundFiles]
  ::splash::add "Searching sounds folder for move announcement sounds..."
  ::splash::add "   Found $numSounds of $numSought sound files in $soundFolder"
}


# ::utils::sound::ReadFolder
#
#   Reads sound files from the specified directory.
#   Returns the number of Scid sound files found in that directory.
#
proc ::utils::sound::ReadFolder {{newFolder ""}} {
  variable soundFiles
  variable soundFolder

  if {$newFolder != ""} { set soundFolder "" }

  set count 0
  foreach soundFile $soundFiles {
    set f [file join $soundFolder $soundFile.wav]
    if {[file readable $f]} {
      sound_$soundFile configure -file $f
      incr count
    }
  }
  return $count
}



proc ::utils::sound::AnnounceMove {move} {
  variable hasSnackPackage
  variable soundMap

  if {! $hasSnackPackage} { return }

  if {[string range $move 0 4] == "O-O-O"} { set move q }
  if {[string range $move 0 2] == "O-O"} { set move k }
  set parts [split $move ""]
  set soundList {}
  foreach part $parts {
    if {[info exists soundMap($part)]} {
      lappend soundList sound_$soundMap($part)
    }
  }
  if {[llength $soundList] > 0} {
    CancelSounds
    foreach s $soundList { PlaySound $s }
  }
}


proc ::utils::sound::AnnounceNewMove {move} {
  if {$::utils::sound::announceNew} { AnnounceMove $move }
}


proc ::utils::sound::AnnounceForward {move} {
  if {$::utils::sound::announceForward} { AnnounceMove $move }
}


proc ::utils::sound::AnnounceBack {} {
  if {$::utils::sound::announceBack} { AnnounceMove U }
}


proc ::utils::sound::SoundFinished {} {
  set ::utils::sound::isPlayingSound 0
  CheckSoundQueue
}


proc ::utils::sound::CancelSounds {} {
  if {! $::utils::sound::hasSnackPackage} { return }

  snack::audio stop
  set ::utils::sound::soundQueue {}
  set ::utils::sound::isPlayingSound 0
}


proc ::utils::sound::PlaySound {sound} {
  if {! $::utils::sound::hasSnackPackage} { return }
  lappend ::utils::sound::soundQueue $sound
  after idle ::utils::sound::CheckSoundQueue
}


# ::utils::sound::CheckSoundQueue
#
#   Starts playing the next available sound, if there is one waiting
#   and no sound is currently playing. Called whenever a sound is
#   added to the queue or a sound has finished playing.
#
proc ::utils::sound::CheckSoundQueue {} {
  variable soundQueue
  variable isPlayingSound

  if {$isPlayingSound} { return }
  if {[llength $soundQueue] == 0} { return }

  set next [lindex $soundQueue 0]
  set soundQueue [lrange $soundQueue 1 end]
  set isPlayingSound 1

  $next play -blocking 0 -command ::utils::sound::SoundFinished
}


# ::utils::sound::OptionsDialog
#
#   Dialog window for configuring move sounds.
#
#   TODO: language translations for this dialog.
#
proc ::utils::sound::OptionsDialog {} {
  set w .soundOptions

  foreach v {soundFolder announceNew announceForward announceBack} {
    set ::utils::sound::${v}_temp [set ::utils::sound::$v]
  }

  toplevel $w
  wm title $w "Scid: Sound Options"
  wm transient $w .


  label $w.status -text ""
  if {! $::utils::sound::hasSnackPackage} {
    $w.status configure -text "Scid could not find the Snack audio package at startup; Sound is disabled."
    pack $w.status -side bottom
  }
  pack [frame $w.b] -side bottom -fill x -pady 2
  pack [frame $w.f -relief groove -borderwidth 2] \
    -side top -fill x -padx 5 -pady 5 -ipadx 4 -ipady 4

  set f $w.f
  set r 0

  label $f.ftitle -text $::tr(SoundsFolder) -font font_Bold
  grid $f.ftitle -row $r -column 0 -columnspan 3 -pady 4
  incr r

  entry $f.folderEntry -width 40 -textvariable ::utils::sound::soundFolder_temp
  grid $f.folderEntry -row $r -column 0 -columnspan 2 -sticky we
  button $f.folderBrowse -text " $::tr(Browse)... " \
    -command ::utils::sound::OptionsDialogChooseFolder
  grid $f.folderBrowse -row $r -column 2
  incr r

  label $f.folderHelp -text $::tr(SoundsFolderHelp)
  grid $f.folderHelp -row $r -column 0 -columnspan 3
  incr r

  grid [frame $f.gap$r -height 5] -row $r -column -0; incr r

  label $f.title -text $::tr(SoundsAnnounceOptions) -font font_Bold
  grid $f.title -row $r -column 0 -columnspan 3 -pady 4
  incr r

  checkbutton $f.announceNew -text $::tr(SoundsAnnounceNew) \
    -variable ::utils::sound::announceNew_temp
  grid $f.announceNew -row $r -column 0 -columnspan 2 -sticky w
  incr r

  grid [frame $f.gap$r -height 5] -row $r -column -0; incr r

  checkbutton $f.announceForward -text $::tr(SoundsAnnounceForward) \
    -variable ::utils::sound::announceForward_temp
  grid $f.announceForward -row $r -column 0 -columnspan 2 -sticky w
  incr r

  grid [frame $f.gap$r -height 5] -row $r -column -0; incr r

  checkbutton $f.announceBack -text $::tr(SoundsAnnounceBack) \
    -variable ::utils::sound::announceBack_temp
  grid $f.announceBack -row $r -column 0 -columnspan 2 -sticky w
  incr r

  dialogbutton $w.b.ok -text OK -command ::utils::sound::OptionsDialogOK
  dialogbutton $w.b.cancel -text $::tr(Cancel) -command [list destroy $w]
  packbuttons right $w.b.cancel $w.b.ok
  bind $w <Return> [list $w.b.ok invoke]
  bind $w <Escape> [list $w.b.cancel invoke]
  ::utils::win::Centre $w
  wm resizable $w 0 0
  raiseWin $w
  grab $w
  focus $w.f.folderEntry
}

proc ::utils::sound::OptionsDialogChooseFolder {} {
  set newFolder [tk_chooseDirectory \
        -initialdir $::utils::sound::soundFolder_temp \
        -parent .soundOptions \
        -title "Scid: $::tr(SoundsFolder)"]
  if {$newFolder != ""} {
    set ::utils::sound::soundFolder_temp [file nativename $newFolder]
  }
}

proc ::utils::sound::OptionsDialogOK {} {
  variable soundFolder

  # Destroy the Sounds options dialog
  set w .soundOptions
  catch {grab release $w}
  destroy $w

  set isNewSoundFolder 0
  if {$soundFolder != $::utils::sound::soundFolder_temp} {
    set isNewSoundFolder 1
  }

  # Update the user-settable sound variables:
  foreach v {soundFolder announceNew announceForward announceBack} {
    set ::utils::sound::$v [set ::utils::sound::${v}_temp]
  }

  # If the user selected a different folder to look in, read it
  # and tell the user how many sound files were found there.

  if {$isNewSoundFolder  &&  $soundFolder != ""} {
    set numSoundFiles [::utils::sound::ReadFolder]
    tk_messageBox -title "Scid: Sound Files" -type ok -icon info \
      -message "Found $numSoundFiles of [llength $::utils::sound::soundFiles] sound files in $::utils::sound::soundFolder"
  }
}


# Read the sound files at startup:

::utils::sound::Setup

# ::utils::string::Surname
#
#   Returns the surname of a player name.
#
proc ::utils::string::Surname {name} {
  set idx [string first "," $name]
  if {$idx > 0} { set name [string range $name 0 [expr {$idx - 1} ]] }
  return $name
}


proc ::utils::string::CityName {siteName} {
  regsub { [A-Z][A-Z][A-Z]$} $siteName "" siteName
  return [string trim [::utils::string::Surname $siteName]]
}


# ::utils::string::Capital
#
#    Returns a string with the first character capitalised.
#
proc ::utils::string::Capital {str} {
  set s [string toupper [string index $str 0]]
  append s [string range $str 1 end]
  return $s
}

# PadLeft
#
#   Given a string and a length, pads the string with padChar to have
#   the required length.
#
proc ::utils::string::PadLeft {str length {padChar " "}} {
  set s $str
  for {set actual [string length $s]} {$actual < $length} {incr actual} {
    append s $padChar
  }
  return $s
}

# Pad
#
#   Same as PadLeft.
#
proc ::utils::string::Pad {str length {padChar " "}} {
  return [::utils::string::PadLeft $str $length $padChar]
}

# PadRight
#
#   Like PadLeft, but adds the padding characters to the start of the string.
#
proc ::utils::string::PadRight {str length {padChar " "}} {
  set s $str
  for {set actual [string length $s]} {$actual < $length} {incr actual} {
    set s "$padChar$s"
  }
  return $s
}

# PadCenter
#
#   Like PadLeft and PadRight, but centers the specified string.
#
proc ::utils::string::PadCenter {str length {padChar " "}} {
  set pre 1
  set s $str
  for {set actual [string length $s]} {$actual < $length} {incr actual} {
    if {$pre} {
      set s "$padChar$s"
      set pre 0
    } else {
      append s $padChar
      set pre 1
    }
  }
  return $s
}

###
#
# ToolTips
#

namespace eval ::utils::tooltip {}

set ::utils::tooltip::showToolTips 1
set ::utils::tooltip::time 0
set ::utils::tooltip::enteredWidget {}
set ::utils::tooltip::tooltipDelay 400

array set ::utils::tooltip::message {}

# Construct tooltip window:
#
toplevel .tooltip
label .tooltip.text -relief solid -borderwidth 1 -justify left \
  -background lightYellow -padx 3 -pady 1
pack .tooltip.text -side left
wm overrideredirect .tooltip 1
wm withdraw .tooltip


# ::utils::tooltip::Set
#
#   Set the tooltip message for <button> to be <msg>
#
proc ::utils::tooltip::Set {button msg} {
  variable message
  set msg [string trim $msg]
  if {$msg == ""} { return }
  regsub {\\n} $msg "\n" msg
  set message($button) $msg
  bind $button <Any-Enter> +[list ::utils::tooltip::Enter $button]
  bind $button <Any-Leave> +[list ::utils::tooltip::Leave $button]
}

# ::utils::tooltip::Enter
#
#   Handles the mouse entering a button which has a tooltip.
#
proc ::utils::tooltip::Enter {button} {
  variable showToolTips
  variable enteredWidget
  variable tooltipDelay

  if {! $showToolTips} { return }
  set enteredWidget $button
  after $tooltipDelay [list ::utils::tooltip::Check $button]
}


# ::utils::tooltip::Check
#
#   Called a set time after the mouse has entered a button with a
#   tooltip, to check if it is still there. If so, the tooltip
#   message is displayed.
#
proc ::utils::tooltip::Check {button} {
  variable enteredWidget

  if {$enteredWidget != $button} {
    # The mouse cursor has moved somewhere else; display no tooltip
    return
  }

  if {! [info exists ::utils::tooltip::message($button)]} { return }

  .tooltip.text configure -text [tr $::utils::tooltip::message($button)]
  set x [winfo pointerx .]
  set y [winfo pointery .]
  incr x 10
  incr y 4
  catch {wm transient .tooltip [winfo toplevel $button]}
  catch {wm geometry .tooltip +$x+$y}
  wm deiconify .tooltip
  raiseWin .tooltip
}


# ::utils::tooltip::Leave
#
#   Handles the mouse leaving a button which has a tooltip.
#
proc ::utils::tooltip::Leave {button} {
  variable showToolTips
  if {! $showToolTips} { return }
  wm withdraw .tooltip
  after cancel [list ::utils::tooltip::Check $button]
}



# ::utils::validate::Integer
#
#   Used to check the size of integers in entry boxes.
#
proc ::utils::validate::Integer {maxValue allowQuestionMarks name el op} {
  global $name ${name}_old
  if {[string comp {} $el]} {
    set old  ${name}_old\($el\)
    set name $name\($el\)
  } else {
    set old ${name}_old
  }

  if {$allowQuestionMarks > 0} {
    if {[regexp {^\?*$} [set $name]]} {
      # Accept this value:
      set $old [set $name]
      return
    }
  }

  # Only non-negative integers up to maxValue are allowed, unless the
  # value is negative:
  set allowNegatives 0
  if {$maxValue < 0} {
    set allowNegatives 1
    set maxValue [expr {0 - $maxValue}]
  }

  if {$allowNegatives} {
    if {![regexp {^[-+]?[0-9]*$} [set $name]]} {
      set $name [set $old]
      bell
      return
    }
  } else {
    if {![regexp {^[+]?[0-9]*$} [set $name]]} {
      set $name [set $old]
      bell
      return
    }
  }
  if {[set $name] > $maxValue} {
    set $name [set $old]
    bell
    return
  }
  #if {[expr {0 - [set $name]}] < [expr {0 - $maxValue}]} {
  #  set $name [set $old]
  #  bell
  #  return
  #}
  set $old [set $name]
}



# ::utils::validate::Date
#
#    Used to check the validity of a date string as it is entered.
#
proc ::utils::validate::Date {name el op} {
  global $name ${name}_old
  set old ${name}_old
  if {![sc_info validDate [set $name]]} {
    set $name [set $old]
    bell
    return
  }
  set $old [set $name]
}

# ::utils::validate::Result
#
#    Used to check the validity of a result entrybox value.
#    Result can be empty, "1", "0", "=", or "*".
#
proc ::utils::validate::Result {name el op} {
  global $name ${name}_old
  set old ${name}_old
  if {![regexp {^[1|0|=|\*]?$} [set $name]]} {
    set $name [set $old]
    bell
    return
  }
  set $old [set $name]
}

# ::utils::validate::Alpha
#
#    Used to check that an entrybox contains only letters.
#
proc ::utils::validate::Alpha {name el op} {
  global $name ${name}_old
  set old ${name}_old
  if {![regexp {^[A-Za-z]*$} [set $name]]} {
    set $name [set $old]
    bell
    return
  }
  set $old [set $name]

}

# ::utils::validate::Regexp
#
#    Used to check the validity of an entrybox given a regular expression.
#    Used to verify a file is "a-h", for example.
#
proc ::utils::validate::Regexp {expression name el op} {
  global $name ${name}_old
  set old ${name}_old
  if {![regexp $expression [set $name]]} {
    set $name [set $old]
    bell
    return
  }
  set $old [set $name]
}


# ::utils::win::Centre
#
#   Centres a window on the screen.
#
proc ::utils::win::Centre {w} {
  wm withdraw $w
  update idletasks
  set x [expr {[winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \
                 - [winfo vrootx .]}]
  set y [expr {[winfo screenheight $w]/2 - [winfo reqheight $w]/2 \
                 - [winfo vrooty .]}]
  wm geom $w +$x+$y
  wm deiconify $w
}
###
### misc.tcl: part of Scid.
### Copyright (C) 2001  Shane Hudson.
###
### Miscellaneous routines called by other Tcl functions



# bindFocusColors:
#   Configures a text or entry widget so it turns lightYellow when it
#   gets the focus, and turns white again when it loses focus.
#
# THIS IS CURRENTLY DISABLED since it works fine with regular entry widgets
# but causes problems with our combobox widgets, not sure why!
#
proc bindFocusColors {w {inColor lightYellow} {outColor white}} {
  $w configure -background $outColor
  #bind $w <FocusIn> "+$w configure -background $inColor"
  #bind $w <FocusOut> "+$w configure -background $outColor"
}


# bindMouseWheel:
#   Given a window and a text frame within that window, binds
#   the mouse wheel to scroll the text frame vertically.
#
proc bindMouseWheel {win text} {
  bind $win <MouseWheel> \
    "$text yview scroll \[expr -(%D / 120)\] units"
  if {! $::windowsOS} {
    bind $win <Button-4> [list $text yview scroll -1 units]
    bind $win <Button-5> [list $text yview scroll  1 units]
  }
}

# dialogbuttonframe:
#   Creates a frame that will be shown at the bottom of a
#   dialog window. It takes two parameters: the frame widget
#   name to create, and a list of button args. Each element
#   should contain a widget name, and button arguments.
#
proc dialogbuttonframe {frame buttonlist} {
  frame $frame
  set bnames {}
  set maxlength 0
  foreach buttonargs $buttonlist {
    set bname $frame.[lindex $buttonargs 0]
    set bargs [lrange $buttonargs 1 end]
    eval button $bname $bargs
    set bnames [linsert $bnames 0 $bname]
    set length [string length [$bname cget -text]]
    if {$length > $maxlength} { set length $maxlength}
  }
  if {$maxlength < 7} { set maxlength 7 }
  foreach b $bnames {
    $b configure -width $maxlength -padx 4
    pack $b -side right -padx 4 -pady 4
  }
}

# packbuttons
#   Packs a row of dialog buttons to the left/right of their frame
#   with a standard amount of padding.
#
proc packbuttons {side args} {
  eval pack $args -side $side -padx 5 -pady 3
}

# dialogbutton:
#   Creates a button that will be shown in a dialog box, so it
#   is given a minumin width.
#
proc dialogbutton {w args} {
  set retval [eval button $w $args]
  set length [string length [$w cget -text]]
  if {$length < 7} { set length 7 }
  $w configure -width $length -pady 1
  return retval
}

# autoscrollframe
#   Creates and returns a frame containing a widget which is gridded
#   with scrollbars that automatically hide themselves when they are
#   not needed.
#   The frame and widget may already exist; they are created if needed.
#   Usage:
#      autoscrolltext [-bars none|x|y|both] frame type w args
#
proc autoscrollframe {args} {
  global _autoscroll
  set bars both
  if {[lindex $args 0] == "-bars"} {
    set bars [lindex $args 1]
    if {$bars != "x" && $bars != "y" && $bars != "none" && $bars != "both"} {
      return -code error "Invalid parameter: -bars $bars"
    }
    set args [lrange $args 2 end]
  }
  if {[llength $args] < 3} {
    return -code error "Insufficient number of parameters"
  }
  set frame [lindex $args 0]
  set type [lindex $args 1]
  set w [lindex $args 2]
  set args [lrange $args 3 end]

  set retval $frame
  if {! [winfo exists $frame]} { frame $frame }
  $frame configure -relief sunken -borderwidth 2
  if {! [winfo exists $w]} {
    $type $w
  }
  if {[llength $args] > 0} {
    eval $w configure $args
  }
  $w configure -relief flat -borderwidth 0
  grid $w -in $frame -row 0 -column 0 -sticky news
  set setgrid 0
  catch {set setgrid [$w cget -setgrid]}

  if {$bars == "y"  ||  $bars == "both"} {
    scrollbar $frame.ybar -command [list $w yview] -takefocus 0 -borderwidth 0
    $w configure -yscrollcommand [list _autoscroll $frame.ybar]
    grid $frame.ybar -row 0 -column 1 -sticky ns
    set _autoscroll($frame.ybar) 1
    set _autoscroll(time:$frame.ybar) [clock clicks -milli]
    if {! $setgrid} {
      # bind $frame.ybar <Map> [list _autoscrollMap $frame]
    }
  }
  if {$bars == "x"  ||  $bars == "both"} {
    scrollbar $frame.xbar -command [list $w xview] -takefocus 0 \
      -borderwidth 0 -orient horizontal
    $w configure -xscrollcommand [list _autoscroll $frame.xbar]
    grid $frame.xbar -row 1 -column 0 -sticky we
    set _autoscroll($frame.xbar) 1
    set _autoscroll(time:$frame.xbar) [clock clicks -milli]
    if {! $setgrid} {
      # bind $frame.xbar <Map> [list _autoscrollMap $frame]
    }
  }
  grid rowconfigure $frame 0 -weight 1
  grid columnconfigure $frame 0 -weight 1
  grid rowconfigure $frame 1 -weight 0
  grid columnconfigure $frame 1 -weight 0
  return $retval
}

array set _autoscroll {}

# _autoscroll
#   This is the "set" command called for auto-scrollbars.
#   If the bar is shown but should not be, it is hidden.
#   If the bar is hidden but should be shown, it is redrawn.
#   Note that once a bar is shown, it will not be removed again for
#   at least a few milliseconds; this is to overcome problematic
#   interactions between the x and y scrollbars where hiding one
#   causes the other to be shown etc. This usually happens because
#   the stupid Tcl/Tk text widget doesn't handle scrollbars well.
#
proc _autoscroll {bar args} {
  #global _autoscroll
  #if {[llength $args] == 2} {
  #  set min [lindex $args 0]
  #  set max [lindex $args 1]
  #  if {$min > 0.0  ||  $max < 1.0} {
  #    if {! $_autoscroll($bar)} {
  #      grid configure $bar
  #      set _autoscroll($bar) 1
  #      set _autoscroll(time:$bar) [clock clicks -milli]
  #    }
  #  } else {
  #    if {[clock clicks -milli] > [expr {$_autoscroll(time:$bar) + 100}]} {
  #      grid remove $bar
  #      set _autoscroll($bar) 0
  #    }
  #  }
  ## update idletasks
  #}
  eval $bar set $args
}

proc _autoscrollMap {frame} {
  # wm geometry [winfo toplevel $frame] [wm geometry [winfo toplevel $frame]]
}


# busyCursor, unbusyCursor:
#   Sets all cursors to watch (indicating busy) or back to their normal
#   setting again.

array set scid_busycursor {}
set scid_busycursorState 0

proc doBusyCursor {w flag} {
  global scid_busycursor
  if {! [winfo exists $w]} { return }
  # The comment editor window "flashes" when its cursor is changed,
  # no idea why but skip over it:
  if {$w == ".commentWin"} { return }
  if {$w == ".menu"} { return }

  if {$flag} {
    set scid_busycursor($w) [$w cget -cursor]
    catch {$w configure -cursor watch}
  } else {
    catch {$w configure -cursor $scid_busycursor($w)} err
  }
  foreach i [winfo children $w] { doBusyCursor $i $flag }
}

proc busyCursor {w {flag 1}} {
  global scid_busycursor scid_busycursorState
  if {$scid_busycursorState == $flag} { return }
  set scid_busycursorState $flag
  doBusyCursor $w $flag
}

proc unbusyCursor {w} {busyCursor $w 0}


# addHorizontalRule, addVerticalRule
#   Add a horizontal/vertical rule frame to a window.
#   The optional parameters [x/y]padding and sunken allow the spacing and
#   appearance of the rule to be specified.
#
set horizRuleCounter 0
set vertRuleCounter 0

proc addHorizontalRule {w {ypadding 5} {relief sunken} {height 2} } {
  global horizRuleCounter
  set f [ frame $w.line$horizRuleCounter -height $height -borderwidth 2 \
            -relief $relief -background white ]
  pack $f -fill x -pady $ypadding
  incr horizRuleCounter
  return $f
}

proc addVerticalRule {w {xpadding 5} {relief sunken}} {
  global vertRuleCounter
  set f [ frame $w.line$vertRuleCounter -width 2 -borderwidth 2 \
            -relief $relief -background white ]
  pack $f -fill y -padx $xpadding -side left
  incr vertRuleCounter
  return $f
}


# progressWindow:
#   Creates a window with a label, progress bar, and (if specified),
#   a cancel button and cancellation command.
#
proc progressWindow {args} {
  set w .progressWin
  if {[winfo exists $w]} { return }
  toplevel $w
  wm withdraw $w
  wm resizable $w 0 0
  if {[llength $args] == 2} {
    set title [lindex $args 0]
    set text [lindex $args 1]
    set b 0
  } elseif {[llength $args] == 4} {
    set title [lindex $args 0]
    set text [lindex $args 1]
    set button [lindex $args 2]
    set command [lindex $args 3]
    set b 1
  } else { return }
  wm title $w $title
  label $w.t -text $text
  pack $w.t -side top
  canvas $w.c -width 400 -height 20 -bg white -relief solid -border 1
  $w.c create rectangle 0 0 0 0 -fill blue -outline blue -tags bar
  $w.c create text 395 10 -anchor e -font font_Regular -tags time \
    -fill black -text "0:00 / 0:00"
  pack $w.c -side top -pady 10
  if {$b} {
    pack [frame $w.b] -side bottom -fill x
    button $w.b.cancel -text $button -command $command
    pack $w.b.cancel -side right -padx 5 -pady 2
  }
  # Set up geometry for middle of screen:
  set x [winfo screenwidth $w]
  set x [expr {$x - 400} ]
  set x [expr {$x / 2} ]
  set y [winfo screenheight $w]
  set y [expr {$y - 20} ]
  set y [expr {$y / 2} ]
  wm geometry $w +$x+$y
  sc_progressBar $w.c bar 401 21 time
  update idletasks
  wm deiconify $w
  raiseWin $w
  if {$b} {
    grab $w.b.cancel
  } else {
    grab $w
  }
  bind $w <Visibility> "raiseWin $w"
  set ::progressWin_time [clock seconds]
}

proc leftJustifyProgressWindow {} {
  set w .progressWin
  if {! [winfo exists $w]} { return }
  pack configure $w.t -fill x
  $w.t configure -width 1 -anchor w
}

proc changeProgressWindow {newtext} {
  set w .progressWin
  if {[winfo exists $w]} {
    $w.t configure -text $newtext
    update idletasks
  }
}

proc resetProgressWindow {} {
  set w .progressWin
  set ::progressWin_time [clock seconds]
  if {[winfo exists $w]} {
    $w.c coords bar 0 0 0 0
    $w.c itemconfigure time -text "0:00 / 0:00"
    update idletasks
  }
}

proc updateProgressWindow {done total} {
  set w .progressWin
  if {! [winfo exists $w]} { return }
  set elapsed [expr {[clock seconds] - $::progressWin_time}]
  set width 401
  if {$total > 0} {
    set width [expr {int(double($width) * double($done) / double($total))}]
  }
  $w.c coords bar 0 0 $width 21
  set estimated $elapsed
  if {$done != 0} {
    set estimated [expr {int(double($elapsed) * double($total) / double($done))}]
  }
  set t [format "%d:%02d / %d:%02d" \
           [expr {$elapsed / 60}] [expr {$elapsed % 60}] \
           [expr {$estimated / 60}] [expr {$estimated % 60}]]
  $w.c itemconfigure time -text $t
  update
}

proc closeProgressWindow {} {
  set w .progressWin
  if {! [winfo exists $w]} {
    # puts stderr "Hmm, no progress window -- bug?"
    return
  }
  grab release $w
  destroy $w
}

###################
# htext.tcl: Online help/hypertext display module for Scid
#
# The htext module implements html-like display in a text widget.
# It is used in Scid for the help and crosstable windows, and for
# the game information area.

namespace eval ::htext {}

set helpWin(Stack) {}
set helpWin(yStack) {}
set helpWin(Indent) 0

# help_PushStack and help_PopStack:
#   Implements the stack of help windows for the "Back" button.
#
proc help_PushStack {name {heading ""}} {
  global helpWin
  lappend helpWin(Stack) $name
  if {[llength $helpWin(Stack)] > 10} {
    set helpWin(Stack) [lrange $helpWin(Stack) 1 end]
  }
  if {[winfo exists .helpWin]} {
    set helpWin(yStack) [linsert $helpWin(yStack) 0 \
                           [lindex [.helpWin.text yview] 0]]
    if {[llength $helpWin(yStack)] > 10} {
      set helpWin(yStack) [lrange $helpWin(yStack) 0 9]
    }
  }
}

set ::htext::headingColor "\#990000"
array set ::htext:updates {}

proc help_PopStack {} {
  global helpWin helpText
  set len [llength $helpWin(Stack)]
  if {$len < 1} { return }
  incr len -2
  set name [lindex $helpWin(Stack) $len]
  set helpWin(Stack) [lrange $helpWin(Stack) 0 $len]

  set ylen [llength $helpWin(yStack)]
  set yview 0.0
  if {$ylen >= 1} {
    set yview [lindex $helpWin(yStack) 0]
    set helpWin(yStack) [lrange $helpWin(yStack) 1 end]
  }
  updateHelpWindow $name
  .helpWin.text yview moveto $yview
}

proc helpWindow {name {heading ""}} {
  help_PushStack $name
  updateHelpWindow $name $heading
}

proc updateHelpWindow {name {heading ""}} {
  global helpWin helpText helpTitle windowsOS language
  set w .helpWin

  set slist [split $name " "]
  if {[llength $slist] > 1} {
    set name [lindex $slist 0]
    set heading [lindex $slist 1]
  }

  if {[info exists helpText($language,$name)] && [info exists helpTitle($language,$name)]} {
    set title $helpTitle($language,$name)
    set helptext $helpText($language,$name)
  } elseif {[info exists helpText($name)] && [info exists helpTitle($name)]} {
    set title $helpTitle($name)
    set helptext $helpText($name)
  } else {
    return
  }

  if {![winfo exists $w]} {
    toplevel $w
    wm geometry $w -10+0
    wm minsize $w 40 5
    text $w.text -setgrid yes -wrap word -width $::winWidth($w) \
      -height $::winHeight($w) -relief sunken -border 2 \
      -yscroll "$w.scroll set"
    scrollbar $w.scroll -relief sunken -command "$w.text yview"

    frame $w.b -relief raised -border 2
    pack $w.b -side bottom -fill x
    button $w.b.contents -textvar ::tr(Contents) -command { helpWindow Contents }
    button $w.b.index -textvar ::tr(Index) -command { helpWindow Index }
    button $w.b.back -textvar ::tr(Back) -command { help_PopStack }
    button $w.b.close -textvar ::tr(Close) -command {
      set ::helpWin(Stack) {}
      set ::helpWin(yStack) {}
      destroy .helpWin
    }

    pack $w.b.contents $w.b.index $w.b.back -side left -padx 5 -pady 2
    pack $w.b.close -side right -padx 5 -pady 2
    pack $w.scroll -side right -fill y -padx 2 -pady 2
    pack $w.text -fill both -expand 1 -padx 5

    $w.text configure -font font_Regular -foreground black -background white
    ::htext::init $w.text
    bind $w <Configure> "recordWinSize $w"
  }

  $w.text configure -cursor top_left_arrow
  $w.text configure -state normal
  $w.text delete 0.0 end

  $w.b.index configure -state normal
  if {$name == "Index"} { $w.b.index configure -state disabled }
  $w.b.contents configure -state normal
  if {$name == "Contents"} { $w.b.contents configure -state disabled }
  $w.b.back configure -state disabled
  if {[llength $helpWin(Stack)] >= 2} {
    $w.b.back configure -state normal
  }

  wm title $w "Scid Help: $title"
  wm iconname $w "Scid help"

  $w.text delete 0.0 end
  bind $w <Up> "$w.text yview scroll -1 units"
  bind $w <Down> "$w.text yview scroll 1 units"
  bind $w <Prior> "$w.text yview scroll -1 pages"
  bind $w <Next> "$w.text yview scroll 1 pages"
  bind $w <Key-Home> "$w.text yview moveto 0"
  bind $w <Key-End> "$w.text yview moveto 0.99"
  bind $w <Escape> "$w.b.close invoke"
  bind $w <Key-b> "$w.b.back invoke"
  bind $w <Left> "$w.b.back invoke"
  bind $w <Key-i> "$w.b.index invoke"

  ::htext::display $w.text $helptext $heading 0
  focus $w
}

proc ::htext::updateRate {w rate} {
    set ::htext::updates($w) $rate
}

proc ::htext::init {w} {
  set cyan "\#007000"
  set maroon "\#990000"
  set green "darkgreen"

  set ::htext::updates($w) 100
  $w tag configure black -foreground black
  $w tag configure white -foreground white
  $w tag configure red -foreground red
  $w tag configure blue -foreground blue
  $w tag configure darkblue -foreground darkBlue
  $w tag configure green -foreground $green
  $w tag configure cyan -foreground $cyan
  $w tag configure yellow -foreground yellow
  $w tag configure maroon -foreground $maroon
  $w tag configure gray -foreground gray20

  $w tag configure bgBlack -background black
  $w tag configure bgWhite -background white
  $w tag configure bgRed -background red
  $w tag configure bgBlue -background blue
  $w tag configure bgLightBlue -background lightBlue
  $w tag configure bgGreen -background $green
  $w tag configure bgCyan -background $cyan
  $w tag configure bgYellow -background yellow

  $w tag configure tab -lmargin2 50
  $w tag configure li -lmargin2 50
  $w tag configure center -justify center

  if {[$w cget -font] == "font_Small"} {
    $w tag configure b -font font_SmallBold
    $w tag configure i -font font_SmallItalic
  } else {
    $w tag configure b -font font_Bold
    $w tag configure i -font font_Italic
  }
  $w tag configure bi -font font_BoldItalic
  $w tag configure tt -font font_Fixed
  $w tag configure u -underline 1
  $w tag configure h1 -font font_H1 -foreground $::htext::headingColor \
    -justify center
  $w tag configure h2 -font font_H2 -foreground $::htext::headingColor
  $w tag configure h3 -font font_H3 -foreground $::htext::headingColor
  $w tag configure h4 -font font_H4 -foreground $::htext::headingColor
  $w tag configure h5 -font font_H5 -foreground $::htext::headingColor
  $w tag configure footer -font font_Small -justify center

  $w tag configure term -font font_BoldItalic -foreground $::htext::headingColor
  $w tag configure menu -font font_Bold -foreground $cyan

  # PGN-window-specific tags:
  $w tag configure tag -foreground $::pgnColor(Header)
  if { $::::pgn::boldMainLine } {
     $w tag configure nag -foreground $::pgnColor(Nag) -font font_Regular
     $w tag configure var -foreground $::pgnColor(Var) -font font_Regular
  } else {
     $w tag configure nag -foreground $::pgnColor(Nag) 
     $w tag configure var -foreground $::pgnColor(Var) 
  }
  $w tag configure ip1 -lmargin1 25 -lmargin2 25
  $w tag configure ip2 -lmargin1 50 -lmargin2 50
}

proc ::htext::isStartTag {tagName} {
  return [expr {![strIsPrefix "/" $tagName]} ]
}

proc ::htext::isEndTag {tagName} {
  return [strIsPrefix "/" $tagName]
}

proc ::htext::isLinkTag {tagName} {
  return [strIsPrefix "a " $tagName]
}

proc ::htext::extractLinkName {tagName} {
  if {[::htext::isLinkTag $tagName]} {
    return [lindex [split [string range $tagName 2 end] " "] 0]
  }
  return ""
}

proc ::htext::extractSectionName {tagName} {
  if {[::htext::isLinkTag $tagName]} {
    return [lindex [split [string range $tagName 2 end] " "] 1]
  }
  return ""
}

set ::htext::interrupt 0

proc ::htext::display {w helptext {section ""} {fixed 1}} {
  global helpWin
  # set start [clock clicks -milli]
  set helpWin(Indent) 0
  set ::htext::interrupt 0
  $w mark set insert 0.0
  $w configure -state normal
  set linkName ""

  set count 0
  set str $helptext
  if {$fixed} {
    regsub -all "\n\n" $str "<p>" str
    regsub -all "\n" $str " " str
  } else {
    regsub -all "\[ \n\]+" $str " " str
    regsub -all ">\[ \n\]+" $str "> " str
    regsub -all "\[ \n\]+<" $str " <" str
  }
  set tagType ""
  set seePoint ""

  if {! [info exists ::htext::updates($w)]} {
    set ::htext::updates($w) 100
  }

  # Loop through the text finding the next formatting tag:

  while {1} {
    set startPos [string first "<" $str]
    if {$startPos < 0} { break }
    set endPos [string first ">" $str]
    if {$endPos < 1} { break }

    set tagName [string range $str [expr {$startPos + 1}] [expr {$endPos - 1}]]

    # Check if it is a starting tag (no "/" at the start):

    if {![strIsPrefix "/" $tagName]} {

      # Check if it is a link tag:
      if {[strIsPrefix "a " $tagName]} {
        set linkName [::htext::extractLinkName $tagName]
        set sectionName [::htext::extractSectionName $tagName]
        set linkTag "link ${linkName} ${sectionName}"
        set tagName "a"
        $w tag configure "$linkTag" -foreground blue -underline 1
        $w tag bind "$linkTag" <ButtonRelease-1> \
          "helpWindow $linkName $sectionName"
        $w tag bind $linkTag <Any-Enter> \
          "$w tag configure \"$linkTag\" -background yellow
           $w configure -cursor hand2"
        $w tag bind $linkTag <Any-Leave> \
          "$w tag configure \"$linkTag\" -background {}
           $w configure -cursor {}"
      } elseif {[strIsPrefix "url " $tagName]} {
        # Check if it is a URL tag:
        set urlName [string range $tagName 4 end]
        set urlTag "url $urlName"
        set tagName "url"
        $w tag configure "$urlTag" -foreground red -underline 1
        $w tag bind "$urlTag" <ButtonRelease-1> "openURL {$urlName}"
        $w tag bind $urlTag <Any-Enter> \
          "$w tag configure \"$urlTag\" -background yellow
           $w configure -cursor hand2"
        $w tag bind $urlTag <Any-Leave> \
          "$w tag configure \"$urlTag\" -background {}
           $w configure -cursor {}"
      } elseif {[strIsPrefix "run " $tagName]} {
        # Check if it is a Tcl command tag:
        set runName [string range $tagName 4 end]
        set runTag "run $runName"
        set tagName "run"
        $w tag bind "$runTag" <ButtonRelease-1> "catch {$runName}"
        $w tag bind $runTag <Any-Enter> \
          "$w tag configure \"$runTag\" -foreground yellow
           $w tag configure \"$runTag\" -background darkBlue
           $w configure -cursor hand2"
        $w tag bind $runTag <Any-Leave> \
          "$w tag configure \"$runTag\" -foreground {}
           $w tag configure \"$runTag\" -background {}
           $w configure -cursor {}"
      } elseif {[strIsPrefix "go " $tagName]} {
        # Check if it is a goto tag:
        set goName [string range $tagName 3 end]
        set goTag "go $goName"
        set tagName "go"
        $w tag bind "$goTag" <ButtonRelease-1> \
          "catch {$w see \[lindex \[$w tag nextrange $goName 1.0\] 0\]}"
        $w tag bind $goTag <Any-Enter> \
          "$w tag configure \"$goTag\" -foreground yellow
           $w tag configure \"$goTag\" -background maroon
           $w configure -cursor hand2"
        $w tag bind $goTag <Any-Leave> \
          "$w tag configure \"$goTag\" -foreground {}
           $w tag configure \"$goTag\" -background {}
           $w configure -cursor {}"
      } elseif {[strIsPrefix "pi " $tagName]} {
        # Check if it is a player info tag:
        set playerTag $tagName
        set playerName [string range $playerTag 3 end]
        set tagName "pi"
        $w tag configure "$playerTag" -foreground darkBlue
        $w tag bind "$playerTag" <ButtonRelease-1> "playerInfo \"$playerName\""
        $w tag bind $playerTag <Any-Enter> \
          "$w tag configure \"$playerTag\" -foreground yellow
           $w tag configure \"$playerTag\" -background darkBlue
           $w configure -cursor hand2"
        $w tag bind $playerTag <Any-Leave> \
          "$w tag configure \"$playerTag\" -foreground darkBlue
           $w tag configure \"$playerTag\" -background {}
           $w configure -cursor {}"
      } elseif {[strIsPrefix "g_" $tagName]} {
        # Check if it is a game-load tag:
        set gameTag $tagName
        set tagName "g"
        set gnum [string range $gameTag 2 end]
        set glCommand "::game::LoadMenu $w [sc_base current] $gnum %X %Y"
        $w tag bind $gameTag <ButtonPress-1> $glCommand
        $w tag bind $gameTag <ButtonPress-3> \
          "::gbrowser::new [sc_base current] $gnum"
        $w tag bind $gameTag <Any-Enter> \
          "$w tag configure $gameTag -foreground yellow
           $w tag configure $gameTag -background darkBlue
           $w configure -cursor hand2"
        $w tag bind $gameTag <Any-Leave> \
          "$w tag configure $gameTag -foreground {}
           $w tag configure $gameTag -background {}
           $w configure -cursor {}"
      } elseif {[strIsPrefix "m_" $tagName]} {
        # Check if it is a move tag:
        set moveTag $tagName
        set tagName "m"
        $w tag bind $moveTag <ButtonRelease-1> \
          "sc_move pgn [string range $moveTag 2 end]; updateBoard"
        $w tag bind $moveTag <Any-Enter> \
          "$w tag configure $moveTag -underline 1
           $w configure -cursor hand2"
        $w tag bind $moveTag <Any-Leave> \
          "$w tag configure $moveTag -underline 0
           $w configure -cursor {}"
      } elseif {[strIsPrefix "c_" $tagName]} {
        # Check if it is a comment tag:
        set commentTag $tagName
        set tagName "c"
        if { $::::pgn::boldMainLine } {
          $w tag configure $commentTag -foreground $::pgnColor(Comment) \
            -font font_Regular
        } else {
           $w tag configure $commentTag -foreground $::pgnColor(Comment) 
        }
        $w tag bind $commentTag <ButtonRelease-1> \
          "sc_move pgn [string range $commentTag 2 end]; updateBoard; ::commenteditor::Open"
        $w tag bind $commentTag <Any-Enter> \
          "$w tag configure $commentTag -underline 1
           $w configure -cursor hand2"
        $w tag bind $commentTag <Any-Leave> \
          "$w tag configure $commentTag -underline 0
           $w configure -cursor {}"
      }

      if {$tagName == "h1"} {$w insert end "\n"}

    }

    # Now insert the text up to the formatting tag:
    $w insert end [string range $str 0 [expr {$startPos - 1}]]

    # Check if it is a name tag matching the section we want:
    if {$section != ""  &&  [strIsPrefix "name " $tagName]} {
      set sect [string range $tagName 5 end]
      if {$section == $sect} { set seePoint [$w index insert] }
    }

    if {[string index $tagName 0] == "/"} {
      # Get rid of initial "/" character:
      set tagName [string range $tagName 1 end]
      switch -- $tagName {
        h1 - h2 - h3 - h4 - h5  {$w insert end "\n"}
      }
      if {$tagName == "p"} {$w insert end "\n"}
      #if {$tagName == "h1"} {$w insert end "\n"}
      if {$tagName == "menu"} {$w insert end "\]"}
      if {$tagName == "ul"} {
        incr helpWin(Indent) -4
        $w insert end "\n"
      }
      if {[info exists startIndex($tagName)]} {
        switch -- $tagName {
          a {$w tag add $linkTag $startIndex($tagName) [$w index insert]}
          g  {$w tag add $gameTag $startIndex($tagName) [$w index insert]}
          c  {$w tag add $commentTag $startIndex($tagName) [$w index insert]}
          m  {$w tag add $moveTag $startIndex($tagName) [$w index insert]}
          pi {$w tag add $playerTag $startIndex($tagName) [$w index insert]}
          url {$w tag add $urlTag $startIndex($tagName) [$w index insert]}
          run {$w tag add $runTag $startIndex($tagName) [$w index insert]}
          go {$w tag add $goTag $startIndex($tagName) [$w index insert]}
          default {$w tag add $tagName $startIndex($tagName) [$w index insert]}
        }
        unset startIndex($tagName)
      }
    } else {
      switch -- $tagName {
        ul {incr helpWin(Indent) 4}
        li {
          $w insert end "\n"
          for {set space 0} {$space < $helpWin(Indent)} {incr space} {
            $w insert end " "
          }
        }
        p  {$w insert end "\n"}
        br {$w insert end "\n"}
        q  {$w insert end "\""}
        lt {$w insert end "<"}
        gt {$w insert end ">"}
        h2 - h3 - h4 - h5  {$w insert end "\n"}
      }
      #Set the start index for this type of tag:
      set startIndex($tagName) [$w index insert]
      if {$tagName == "menu"} {$w insert end "\["}
    }

    # Check if it is an image or button tag:
    if {[strIsPrefix "img " $tagName]} {
      set imgName [string range $tagName 4 end]
      set winName $w.$imgName
      while {[winfo exists $winName]} { append winName a }
      label $winName -image $imgName -relief flat -borderwidth 0 -background white
      $w window create end -window $winName
    }
    if {[strIsPrefix "button " $tagName]} {
      set imgName [string range $tagName 7 end]
      set winName $w.$imgName
      while {[winfo exists $winName]} { append winName a }
      button $winName -image $imgName
      $w window create end -window $winName
    }
    if {[strIsPrefix "window " $tagName]} {
      set winName [string range $tagName 7 end]
      $w window create end -window $winName
    }

    # Now eliminate the processed text from the string:
    set str [string range $str [expr {$endPos + 1}] end]
    incr count
    if {$count == $::htext::updates($w)} { update idletasks; set count 1 }
    if {$::htext::interrupt} {
      $w configure -state disabled
      return
    }
  }

  # Now add any remaining text:
  if {! $::htext::interrupt} { $w insert end $str }

  if {$seePoint != ""} { $w yview $seePoint }
  $w configure -state disabled
  # set elapsed [expr {[clock clicks -milli] - $start}]
}


# openURL:
#    Sends a command to the user's web browser to view a webpage given
#    its URL.
#
proc openURL {url} {
  global windowsOS
  busyCursor .
  if {$windowsOS} {
    # On Windows, use the "start" command:
    if {[string match $::tcl_platform(os) "Windows NT"]} {
      catch {exec $::env(COMSPEC) /c start $url &}
    } else {
      catch {exec start $url &}
    }
    unbusyCursor .
    return
  }

  # On Unix systems, there is no standard for invoking favorite
  # web browser, so just try starting Mozilla or Netscape.

  # First, check if Mozilla seems to be available:
  if {[file executable /usr/bin/mozilla]  ||
      [file executable /usr/local/bin/mozilla]} {
    # First, try -remote mode:
    if {[catch {exec /bin/sh -c "mozilla -remote 'openURL($url)'"}]} {
      # Now try a new Mozilla process:
      catch {exec /bin/sh -c "mozilla '$url'" &}
    }
  } else {
    # OK, no Mozilla (poor user) so try Netscape (yuck):
    # First, try -remote mode to avoid starting a new netscape process:
    if {[catch {exec /bin/sh -c "netscape -raise -remote 'openURL($url)'"}]} {
      # Now just try starting a new netscape process:
      catch {exec /bin/sh -c "netscape '$url'" &}
    }
  }
  unbusyCursor .
}
######################################################################
#
# The following code is a freely redistributable Tcl combobox
# implementation written by Bryan Oakley.
#
# No modifications for Scid have yet been made except for comments
# whitespace and indentation.
#
######################################################################

# Copyright (c) 1998-2003, Bryan Oakley
# All Rights Reservered
#
# Bryan Oakley
# oakley@bardo.clearlight.com
#
# combobox v2.3 August 16, 2003
#
# a combobox / dropdown listbox (pick your favorite name) widget
# written in pure tcl
#
# this code is freely distributable without restriction, but is
# provided as-is with no warranty expressed or implied.
#
# thanks to the following people who provided beta test support or
# patches to the code (in no particular order):
#
# Scott Beasley     Alexandre Ferrieux      Todd Helfter
# Matt Gushee       Laurent Duperval        John Jackson
# Fred Rapp         Christopher Nelson
# Eric Galluzzo     Jean-Francois Moine            Oliver Bienert
#
# A special thanks to Martin M. Hunt who provided several good ideas,
# and always with a patch to implement them. Jean-Francois Moine,
# Todd Helfter and John Jackson were also kind enough to send in some
# code patches.
#
# ... and many others over the years.

package require Tk 8.0
package provide combobox 2.3

namespace eval ::combobox {

  # this is the public interface
  namespace export combobox

  # these contain references to available options
  variable widgetOptions

  # these contain references to available commands and subcommands
  variable widgetCommands
  variable scanCommands
  variable listCommands
}

# ::combobox::combobox --
#
#   This is the command that gets exported. It creates a new
#   combobox widget.
#
# Arguments:
#
#   w        path of new widget to create
#   args     additional option/value pairs (eg: -background white, etc.)
#
# Results:
#
#   It creates the widget and sets up all of the default bindings
#
# Returns:
#
#   The name of the newly create widget
#
proc ::combobox::combobox {w args} {
  variable widgetOptions
  variable widgetCommands
  variable scanCommands
  variable listCommands

  # perform a one time initialization
  if {![info exists widgetOptions]} {
    Init
  }

  # build it...
  eval Build $w $args

  # set some bindings...
  SetBindings $w

  # and we are done!
  return $w
}


# ::combobox::Init --
#
#     Initialize the namespace variables. This should only be called
#     once, immediately prior to creating the first instance of the
#     widget
#
# Arguments:
#
#    none
#
# Results:
#
#     All state variables are set to their default values; all of
#     the option database entries will exist.
#
# Returns:
#
#     empty string

proc ::combobox::Init {} {
  variable widgetOptions
  variable widgetCommands
  variable scanCommands
  variable listCommands
  variable defaultEntryCursor

  array set widgetOptions [list \
    -background          {background          Background} \
    -bd                  -borderwidth \
    -bg                  -background \
    -borderwidth         {borderWidth         BorderWidth} \
    -buttonbackground    {buttonBackground    Background} \
    -command             {command             Command} \
    -commandstate        {commandState        State} \
    -cursor              {cursor              Cursor} \
    -disabledbackground  {disabledBackground  DisabledBackground} \
    -disabledforeground  {disabledForeground  DisabledForeground} \
    -dropdownwidth       {dropdownWidth       DropdownWidth} \
    -editable            {editable            Editable} \
    -elementborderwidth  {elementBorderWidth  BorderWidth} \
    -fg                  -foreground \
    -font                {font                Font} \
    -foreground          {foreground          Foreground} \
    -height              {height              Height} \
    -highlightbackground {highlightBackground HighlightBackground} \
    -highlightcolor      {highlightColor      HighlightColor} \
    -highlightthickness  {highlightThickness  HighlightThickness} \
    -image               {image               Image} \
    -justify             {justify             Justify} \
    -listvar             {listVariable        Variable} \
    -maxheight           {maxHeight           Height} \
    -opencommand         {opencommand         Command} \
    -relief              {relief              Relief} \
    -selectbackground    {selectBackground    Foreground} \
    -selectborderwidth   {selectBorderWidth   BorderWidth} \
    -selectforeground    {selectForeground    Background} \
    -state               {state               State} \
    -takefocus           {takeFocus           TakeFocus} \
    -textvariable        {textVariable        Variable} \
    -value               {value               Value} \
    -width               {width               Width} \
    -xscrollcommand      {xScrollCommand      ScrollCommand} \
  ]


  set widgetCommands [list \
    bbox      cget     configure    curselection \
    delete    get      icursor      index        \
    insert    list     scan         selection    \
    xview     select   toggle       open         \
    close    subwidget  \
  ]

  set listCommands [list delete get index insert size]

  set scanCommands [list mark dragto]

  # why check for the Tk package? This lets us be sourced into
  # an interpreter that doesn't have Tk loaded, such as the slave
  # interpreter used by pkg_mkIndex. In theory it should have no
  # side effects when run
  if {[lsearch -exact [package names] "Tk"] != -1} {

    ##################################################################
    #- this initializes the option database. Kinda gross, but it works
    #- (I think).
    ##################################################################

    # the image used for the button...
    if {$::tcl_platform(platform) == "windows"} {
      image create bitmap ::combobox::bimage -data {
        #define down_arrow_width 12
        #define down_arrow_height 12
        static char down_arrow_bits[] = {
          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
          0xfc,0xf1,0xf8,0xf0,0x70,0xf0,0x20,0xf0,
          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00;
        }
      }
    } else {
      image create bitmap ::combobox::bimage -data  {
        #define down_arrow_width 15
        #define down_arrow_height 15
        static char down_arrow_bits[] = {
          0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,
          0x00,0x80,0xf8,0x8f,0xf0,0x87,0xe0,0x83,
          0xc0,0x81,0x80,0x80,0x00,0x80,0x00,0x80,
          0x00,0x80,0x00,0x80,0x00,0x80
        }
      }
    }

    # compute a widget name we can use to create a temporary widget
    set tmpWidget ".__tmp__"
    set count 0
    while {[winfo exists $tmpWidget] == 1} {
      set tmpWidget ".__tmp__$count"
      incr count
    }

    # get the scrollbar width. Because we try to be clever and draw our
    # own button instead of using a tk widget, we need to know what size
    # button to create. This little hack tells us the width of a scroll
    # bar.
    #
    # NB: we need to be sure and pick a window that doesn't already
    # exist...
    scrollbar $tmpWidget
    set sb_width [winfo reqwidth $tmpWidget]
    set bbg [$tmpWidget cget -background]
    destroy $tmpWidget

    # steal options from the entry widget
    # we want darn near all options, so we'll go ahead and do
    # them all. No harm done in adding the one or two that we
    # don't use.
    entry $tmpWidget
    foreach foo [$tmpWidget configure] {
      # the cursor option is special, so we'll save it in
      # a special way
      if {[lindex $foo 0] == "-cursor"} {
        set defaultEntryCursor [lindex $foo 4]
      }
      if {[llength $foo] == 5} {
        set option [lindex $foo 1]
        set value [lindex $foo 4]
        option add *Combobox.$option $value widgetDefault

        # these options also apply to the dropdown listbox
        if {[string compare $option "foreground"] == 0 \
              || [string compare $option "background"] == 0 \
              || [string compare $option "font"] == 0} {
          option add *Combobox*ComboboxListbox.$option $value \
              widgetDefault
        }
      }
    }
    destroy $tmpWidget

    # these are unique to us...
    option add *Combobox.elementBorderWidth  1      widgetDefault
    option add *Combobox.buttonBackground    $bbg   widgetDefault
    option add *Combobox.dropdownWidth       {}     widgetDefault
    option add *Combobox.openCommand         {}     widgetDefault
    option add *Combobox.cursor              {}     widgetDefault
    option add *Combobox.commandState        normal widgetDefault
    option add *Combobox.editable            1      widgetDefault
    option add *Combobox.maxHeight           10     widgetDefault
    option add *Combobox.height              0
  }

  # set class bindings
  SetClassBindings
}

# ::combobox::SetClassBindings --
#
#    Sets up the default bindings for the widget class
#
#    this proc exists since it's The Right Thing To Do, but
#    I haven't had the time to figure out how to do all the
#    binding stuff on a class level. The main problem is that
#    the entry widget must have focus for the insertion cursor
#    to be visible. So, I either have to have the entry widget
#    have the Combobox bindtag, or do some fancy juggling of
#    events or some such. What a pain.
#
# Arguments:
#
#    none
#
# Returns:
#
#    empty string

proc ::combobox::SetClassBindings {} {

  # make sure we clean up after ourselves...
  bind Combobox <Destroy> [list ::combobox::DestroyHandler %W]

  # this will (hopefully) close (and lose the grab on) the
  # listbox if the user clicks anywhere outside of it. Note
  # that on Windows, you can click on some other app and
  # the listbox will still be there, because tcl won't see
  # that button click
  set this {[::combobox::convert %W -W]}
  bind Combobox <Any-ButtonPress>   "$this close"
  bind Combobox <Any-ButtonRelease> "$this close"

  # this helps (but doesn't fully solve) focus issues. The general
  # idea is, whenever the frame gets focus it gets passed on to
  # the entry widget
  bind Combobox <FocusIn> {+::combobox::tkTabToWindow \
                             [::combobox::convert %W -W].entry}

  # this closes the listbox if we get hidden
  bind Combobox <Unmap> {[::combobox::convert %W -W] close}

  return ""
}

# ::combobox::SetBindings --
#
#    here's where we do most of the binding foo. I think there's probably
#    a few bindings I ought to add that I just haven't thought
#    about...
#
#    I'm not convinced these are the proper bindings. Ideally all
#    bindings should be on "Combobox", but because of my juggling of
#    bindtags I'm not convinced thats what I want to do. But, it all
#    seems to work, its just not as robust as it could be.
#
# Arguments:
#
#    w    widget pathname
#
# Returns:
#
#    empty string

proc ::combobox::SetBindings {w} {
  upvar ::combobox::${w}::widgets  widgets
  upvar ::combobox::${w}::options  options

  # juggle the bindtags. The basic idea here is to associate the
  # widget name with the entry widget, so if a user does a bind
  # on the combobox it will get handled properly since it is
  # the entry widget that has keyboard focus.
  bindtags $widgets(entry) \
      [concat $widgets(this) [bindtags $widgets(entry)]]

  bindtags $widgets(button) \
      [concat $widgets(this) [bindtags $widgets(button)]]

  # override the default bindings for tab and shift-tab. The
  # focus procs take a widget as their only parameter and we
  # want to make sure the right window gets used (for shift-
  # tab we want it to appear as if the event was generated
  # on the frame rather than the entry.
  bind $widgets(entry) <Tab> \
      "::combobox::tkTabToWindow \[tk_focusNext $widgets(entry)\]; break"
  bind $widgets(entry) <Shift-Tab> \
      "::combobox::tkTabToWindow \[tk_focusPrev $widgets(this)\]; break"

  # this makes our "button" (which is actually a label)
  # do the right thing
  bind $widgets(button) <ButtonPress-1> [list $widgets(this) toggle]

  # this lets the autoscan of the listbox work, even if they
  # move the cursor over the entry widget.
  bind $widgets(entry) <B1-Enter> "break"

  bind $widgets(listbox) <ButtonRelease-1> \
      "::combobox::Select [list $widgets(this)] \[$widgets(listbox) nearest %y\]; break"

  bind $widgets(vsb) <ButtonPress-1>   {continue}
  bind $widgets(vsb) <ButtonRelease-1> {continue}

  bind $widgets(listbox) <Any-Motion> {
    %W selection clear 0 end
    %W activate @%x,%y
    %W selection anchor @%x,%y
    %W selection set @%x,%y @%x,%y
    # need to do a yview if the cursor goes off the top
    # or bottom of the window... (or do we?)
  }

  # these events need to be passed from the entry widget
  # to the listbox, or otherwise need some sort of special
  # handling.
  foreach event [list <Up> <Down> <Tab> <Return> <Escape> \
                    <Next> <Prior> <Double-1> <1> <Any-KeyPress> \
                    <FocusIn> <FocusOut>] {
    bind $widgets(entry) $event \
      [list ::combobox::HandleEvent $widgets(this) $event]
  }

  # like the other events, <MouseWheel> needs to be passed from
  # the entry widget to the listbox. However, in this case we
  # need to add an additional parameter
  catch {
      bind $widgets(entry) <MouseWheel> \
        [list ::combobox::HandleEvent $widgets(this) <MouseWheel> %D]
  }
}

# ::combobox::Build --
#
#    This does all of the work necessary to create the basic
#    combobox.
#
# Arguments:
#
#    w        widget name
#    args     additional option/value pairs
#
# Results:
#
#    Creates a new widget with the given name. Also creates a new
#    namespace patterened after the widget name, as a child namespace
#    to ::combobox
#
# Returns:
#
#    the name of the widget

proc ::combobox::Build {w args } {
  variable widgetOptions

  if {[winfo exists $w]} {
    error "window name \"$w\" already exists"
  }

  # create the namespace for this instance, and define a few
  # variables
  namespace eval ::combobox::$w {

    variable ignoreTrace 0
    variable oldFocus    {}
    variable oldGrab     {}
    variable oldValue    {}
    variable options
    variable this
    variable widgets

    set widgets(foo) foo  ;# coerce into an array
    set options(foo) foo  ;# coerce into an array

    unset widgets(foo)
    unset options(foo)
  }

  # import the widgets and options arrays into this proc so
  # we don't have to use fully qualified names, which is a
  # pain.
  upvar ::combobox::${w}::widgets widgets
  upvar ::combobox::${w}::options options

  # this is our widget -- a frame of class Combobox. Naturally,
  # it will contain other widgets. We create it here because
  # we need it in order to set some default options.
  set widgets(this)   [frame  $w -class Combobox -takefocus 0]
  set widgets(entry)  [entry  $w.entry -takefocus 1]
  set widgets(button) [label  $w.button -takefocus 0]

  # this defines all of the default options. We get the
  # values from the option database. Note that if an array
  # value is a list of length one it is an alias to another
  # option, so we just ignore it
  foreach name [array names widgetOptions] {
    if {[llength $widgetOptions($name)] == 1} {
      continue
    }

    set optName  [lindex $widgetOptions($name) 0]
    set optClass [lindex $widgetOptions($name) 1]

    set value [option get $w $optName $optClass]
    set options($name) $value
  }

  # a couple options aren't available in earlier versions of
  # tcl, so we'll set them to sane values. For that matter, if
  # they exist but are empty, set them to sane values.
  if {[string length $options(-disabledforeground)] == 0} {
    set options(-disabledforeground) $options(-foreground)
  }
  if {[string length $options(-disabledbackground)] == 0} {
    set options(-disabledbackground) $options(-background)
  }

  # if -value is set to null, we'll remove it from our
  # local array. The assumption is, if the user sets it from
  # the option database, they will set it to something other
  # than null (since it's impossible to determine the difference
  # between a null value and no value at all).
  if {[info exists options(-value)] \
        && [string length $options(-value)] == 0} {
    unset options(-value)
  }

  # we will later rename the frame's widget proc to be our
  # own custom widget proc. We need to keep track of this
  # new name, so we'll define and store it here...
  set widgets(frame) ::combobox::${w}::$w

  # gotta do this sooner or later. Might as well do it now
  pack $widgets(button) -side right -fill y    -expand no
  pack $widgets(entry)  -side left  -fill both -expand yes

  # I should probably do this in a catch, but for now it's
  # good enough... What it does, obviously, is put all of
  # the option/values pairs into an array. Make them easier
  # to handle later on...
  array set options $args

  # now, the dropdown list... the same renaming nonsense
  # must go on here as well...
  set widgets(dropdown)   [toplevel  $w.top]
  set widgets(listbox) [listbox   $w.top.list]
  set widgets(vsb)     [scrollbar $w.top.vsb]

  pack $widgets(listbox) -side left -fill both -expand y

  # fine tune the widgets based on the options (and a few
  # arbitrary values...)

  # NB: we are going to use the frame to handle the relief
  # of the widget as a whole, so the entry widget will be
  # flat. This makes the button which drops down the list
  # to appear "inside" the entry widget.

  $widgets(vsb) configure \
    -borderwidth 1 \
    -command "$widgets(listbox) yview" \
    -highlightthickness 0

  $widgets(button) configure \
    -background $options(-buttonbackground) \
    -highlightthickness 0 \
    -borderwidth $options(-elementborderwidth) \
    -relief raised \
    -width [expr {[winfo reqwidth $widgets(vsb)] - 2}]

  $widgets(entry) configure \
    -borderwidth 0 \
    -relief flat \
    -highlightthickness 0

  $widgets(dropdown) configure \
    -borderwidth $options(-elementborderwidth) \
    -relief sunken

  $widgets(listbox) configure \
    -selectmode browse \
    -background [$widgets(entry) cget -bg] \
    -yscrollcommand "$widgets(vsb) set" \
    -exportselection false \
    -borderwidth 0


#  trace variable ::combobox::${w}::entryTextVariable w \
#    [list ::combobox::EntryTrace $w]

  # do some window management foo on the dropdown window
  wm overrideredirect $widgets(dropdown) 1
  wm transient        $widgets(dropdown) [winfo toplevel $w]
  wm group            $widgets(dropdown) [winfo parent $w]
  wm resizable        $widgets(dropdown) 0 0
  wm withdraw         $widgets(dropdown)

  # this moves the original frame widget proc into our
  # namespace and gives it a handy name
  rename ::$w $widgets(frame)

  # now, create our widget proc. Obviously (?) it goes in
  # the global namespace. All combobox widgets will actually
  # share the same widget proc to cut down on the amount of
  # bloat.
  proc ::$w {command args} \
    "eval ::combobox::WidgetProc $w \$command \$args"


  # ok, the thing exists... let's do a bit more configuration.
  if {[catch "::combobox::Configure [list $widgets(this)] [array get options]" error]} {
    catch {destroy $w}
    error "internal error: $error"
  }

  return ""

}

# ::combobox::HandleEvent --
#
#    this proc handles events from the entry widget that we want
#    handled specially (typically, to allow navigation of the list
#    even though the focus is in the entry widget)
#
# Arguments:
#
#    w       widget pathname
#    event   a string representing the event (not necessarily an
#            actual event)
#    args    additional arguments required by particular events

proc ::combobox::HandleEvent {w event args} {
  upvar ::combobox::${w}::widgets  widgets
  upvar ::combobox::${w}::options  options
  upvar ::combobox::${w}::oldValue oldValue

  # for all of these events, if we have a special action we'll
  # do that and do a "return -code break" to keep additional
  # bindings from firing. Otherwise we'll let the event fall
  # on through.
  switch $event {

    "<MouseWheel>" {
      if {[winfo ismapped $widgets(dropdown)]} {
        set D [lindex $args 0]
        # the '120' number in the following expression has
        # it's genesis in the tk bind manpage, which suggests
        # that the smallest value of %D for mousewheel events
        # will be 120. The intent is to scroll one line at a time.
        $widgets(listbox) yview scroll [expr {-($D/120)}] units
      }
    }

    "<Any-KeyPress>" {
      # if the widget is editable, clear the selection.
      # this makes it more obvious what will happen if the
      # user presses <Return> (and helps our code know what
      # to do if the user presses return)
      if {$options(-editable)} {
        $widgets(listbox) see 0
        $widgets(listbox) selection clear 0 end
        $widgets(listbox) selection anchor 0
        $widgets(listbox) activate 0
      }
    }

    "<FocusIn>" {
      set oldValue [$widgets(entry) get]
    }

    "<FocusOut>" {
      if {![winfo ismapped $widgets(dropdown)]} {
        # did the value change?
        set newValue [$widgets(entry) get]
        if {$oldValue != $newValue} {
          CallCommand $widgets(this) $newValue
        }
      }
    }

    "<1>" {
      set editable [::combobox::GetBoolean $options(-editable)]
      if {!$editable} {
        if {[winfo ismapped $widgets(dropdown)]} {
          $widgets(this) close
          return -code break;
        } else {
          if {$options(-state) != "disabled"} {
            $widgets(this) open
            return -code break;
          }
        }
      }
    }

    "<Double-1>" {
      if {$options(-state) != "disabled"} {
        $widgets(this) toggle
        return -code break;
      }
    }

    "<Tab>" {
      if {[winfo ismapped $widgets(dropdown)]} {
        ::combobox::Find $widgets(this) 0
        return -code break;
      } else {
        ::combobox::SetValue $widgets(this) [$widgets(this) get]
      }
    }

    "<Escape>" {
#      $widgets(entry) delete 0 end
#      $widgets(entry) insert 0 $oldValue
      if {[winfo ismapped $widgets(dropdown)]} {
        $widgets(this) close
        return -code break;
      }
    }

    "<Return>" {
      # did the value change?
      set newValue [$widgets(entry) get]
      if {$oldValue != $newValue} {
        CallCommand $widgets(this) $newValue
      }

      if {[winfo ismapped $widgets(dropdown)]} {
        ::combobox::Select $widgets(this) [$widgets(listbox) curselection]
        return -code break;
      }
    }

    "<Next>" {
      $widgets(listbox) yview scroll 1 pages
      set index [$widgets(listbox) index @0,0]
      $widgets(listbox) see $index
      $widgets(listbox) activate $index
      $widgets(listbox) selection clear 0 end
      $widgets(listbox) selection anchor $index
      $widgets(listbox) selection set $index
    }

    "<Prior>" {
      $widgets(listbox) yview scroll -1 pages
      set index [$widgets(listbox) index @0,0]
      $widgets(listbox) activate $index
      $widgets(listbox) see $index
      $widgets(listbox) selection clear 0 end
      $widgets(listbox) selection anchor $index
      $widgets(listbox) selection set $index
    }

    "<Down>" {
      if {[winfo ismapped $widgets(dropdown)]} {
        ::combobox::tkListboxUpDown $widgets(listbox) 1
        return -code break;
      } else {
        if {$options(-state) != "disabled"} {
          $widgets(this) open
          return -code break;
        }
      }
    }

    "<Up>" {
      if {[winfo ismapped $widgets(dropdown)]} {
        ::combobox::tkListboxUpDown $widgets(listbox) -1
        return -code break;
      } else {
        if {$options(-state) != "disabled"} {
          $widgets(this) open
          return -code break;
        }
      }
    }
  }

  return ""
}

# ::combobox::DestroyHandler {w} --
#
#    Cleans up after a combobox widget is destroyed
#
# Arguments:
#
#    w    widget pathname
#
# Results:
#
#    The namespace that was created for the widget is deleted,
#    and the widget proc is removed.

proc ::combobox::DestroyHandler {w} {

  catch {
    # if the widget actually being destroyed is of class Combobox,
    # remove the namespace and associated proc.
    if {[string compare [winfo class $w] "Combobox"] == 0} {
      # delete the namespace and the proc which represents
      # our widget
      namespace delete ::combobox::$w
      rename $w {}
    }
  }
  return ""
}

# ::combobox::Find
#
#    finds something in the listbox that matches the pattern in the
#    entry widget and selects it
#
#    N.B. I'm not convinced this is working the way it ought to. It
#    works, but is the behavior what is expected? I've also got a gut
#    feeling that there's a better way to do this, but I'm too lazy to
#    figure it out...
#
# Arguments:
#
#    w      widget pathname
#    exact  boolean; if true an exact match is desired
#
# Returns:
#
#    Empty string

proc ::combobox::Find {w {exact 0}} {
  upvar ::combobox::${w}::widgets widgets
  upvar ::combobox::${w}::options options

  ## *sigh* this logic is rather gross and convoluted. Surely
  ## there is a more simple, straight-forward way to implement
  ## all this. As the saying goes, I lack the time to make it
  ## shorter...

  # use what is already in the entry widget as a pattern
  set pattern [$widgets(entry) get]

  if {[string length $pattern] == 0} {
    # clear the current selection
    $widgets(listbox) see 0
    $widgets(listbox) selection clear 0 end
    $widgets(listbox) selection anchor 0
    $widgets(listbox) activate 0
    return
  }

  # we're going to be searching this list...
  set list [$widgets(listbox) get 0 end]

  # if we are doing an exact match, try to find,
  # well, an exact match
  set exactMatch -1
  if {$exact} {
    set exactMatch [lsearch -exact $list $pattern]
  }

  # search for it. We'll try to be clever and not only
  # search for a match for what they typed, but a match for
  # something close to what they typed. We'll keep removing one
  # character at a time from the pattern until we find a match
  # of some sort.
  set index -1
  while {$index == -1 && [string length $pattern]} {
    set index [lsearch -glob $list "$pattern*"]
    if {$index == -1} {
      regsub {.$} $pattern {} pattern
    }
  }

  # this is the item that most closely matches...
  set thisItem [lindex $list $index]

  # did we find a match? If so, do some additional munging...
  if {$index != -1} {

    # we need to find the part of the first item that is
    # unique WRT the second... I know there's probably a
    # simpler way to do this...

    set nextIndex [expr {$index + 1}]
    set nextItem [lindex $list $nextIndex]

    # we don't really need to do much if the next
    # item doesn't match our pattern...
    if {[string match $pattern* $nextItem]} {
      # ok, the next item matches our pattern, too
      # now the trick is to find the first character
      # where they *don't* match...
      set marker [string length $pattern]
      while {$marker <= [string length $pattern]} {
        set a [string index $thisItem $marker]
        set b [string index $nextItem $marker]
        if {[string compare $a $b] == 0} {
          append pattern $a
          incr marker
        } else {
          break
        }
      }
    } else {
      set marker [string length $pattern]
    }

  } else {
    set marker end
    set index 0
  }

  # ok, we know the pattern and what part is unique;
  # update the entry widget and listbox appropriately
  if {$exact && $exactMatch == -1} {
    # this means we didn't find an exact match
    $widgets(listbox) selection clear 0 end
    $widgets(listbox) see $index

  } elseif {!$exact}  {
    # this means we found something, but it isn't an exact
    # match. If we find something that *is* an exact match we
    # don't need to do the following, since it would merely
    # be replacing the data in the entry widget with itself
    set oldstate [$widgets(entry) cget -state]
    $widgets(entry) configure -state normal
    $widgets(entry) delete 0 end
    $widgets(entry) insert end $thisItem
    $widgets(entry) selection clear
    $widgets(entry) selection range $marker end
    $widgets(listbox) activate $index
    $widgets(listbox) selection clear 0 end
    $widgets(listbox) selection anchor $index
    $widgets(listbox) selection set $index
    $widgets(listbox) see $index
    $widgets(entry) configure -state $oldstate
  }
}

# ::combobox::Select --
#
#    selects an item from the list and sets the value of the combobox
#    to that value
#
# Arguments:
#
#    w      widget pathname
#    index  listbox index of item to be selected
#
# Returns:
#
#    empty string

proc ::combobox::Select {w index} {
  upvar ::combobox::${w}::widgets widgets
  upvar ::combobox::${w}::options options

  # the catch is because I'm sloppy -- presumably, the only time
  # an error will be caught is if there is no selection.
  if {![catch {set data [$widgets(listbox) get [lindex $index 0]]}]} {
    ::combobox::SetValue $widgets(this) $data

    $widgets(listbox) selection clear 0 end
    $widgets(listbox) selection anchor $index
    $widgets(listbox) selection set $index
  }

  $widgets(entry) selection range 0 end
  $widgets(entry) icursor end
  $widgets(this) close

  return ""
}

# ::combobox::HandleScrollbar --
#
#    causes the scrollbar of the dropdown list to appear or disappear
#    based on the contents of the dropdown listbox
#
# Arguments:
#
#    w       widget pathname
#    action  the action to perform on the scrollbar
#
# Returns:
#
#    an empty string

proc ::combobox::HandleScrollbar {w {action "unknown"}} {
  upvar ::combobox::${w}::widgets widgets
  upvar ::combobox::${w}::options options

  if {$options(-height) == 0} {
    set hlimit $options(-maxheight)
  } else {
    set hlimit $options(-height)
  }

  switch $action {
    "grow" {
      if {$hlimit > 0 && [$widgets(listbox) size] > $hlimit} {
        pack forget $widgets(listbox)
        pack $widgets(vsb) -side right -fill y -expand n
        pack $widgets(listbox) -side left -fill both -expand y
      }
    }

    "shrink" {
      if {$hlimit > 0 && [$widgets(listbox) size] <= $hlimit} {
        pack forget $widgets(vsb)
      }
    }

    "crop" {
      # this means the window was cropped and we definitely
      # need a scrollbar no matter what the user wants
      pack forget $widgets(listbox)
      pack $widgets(vsb) -side right -fill y -expand n
      pack $widgets(listbox) -side left -fill both -expand y
    }

    default {
      if {$hlimit > 0 && [$widgets(listbox) size] > $hlimit} {
        pack forget $widgets(listbox)
        pack $widgets(vsb) -side right -fill y -expand n
        pack $widgets(listbox) -side left -fill both -expand y
      } else {
        pack forget $widgets(vsb)
      }
    }
  }

  return ""
}

# ::combobox::ComputeGeometry --
#
#    computes the geometry of the dropdown list based on the size of the
#    combobox...
#
# Arguments:
#
#    w     widget pathname
#
# Returns:
#
#    the desired geometry of the listbox

proc ::combobox::ComputeGeometry {w} {
  upvar ::combobox::${w}::widgets widgets
  upvar ::combobox::${w}::options options

  if {$options(-height) == 0 && $options(-maxheight) != "0"} {
    # if this is the case, count the items and see if
    # it exceeds our maxheight. If so, set the listbox
    # size to maxheight...
    set nitems [$widgets(listbox) size]
    if {$nitems > $options(-maxheight)} {
      # tweak the height of the listbox
      $widgets(listbox) configure -height $options(-maxheight)
    } else {
      # un-tweak the height of the listbox
      $widgets(listbox) configure -height 0
    }
    # update idletasks
  }

  # compute height and width of the dropdown list
  set bd [$widgets(dropdown) cget -borderwidth]
  set height [expr {[winfo reqheight $widgets(dropdown)] + $bd + $bd}]
  if {[string length $options(-dropdownwidth)] == 0 ||
    $options(-dropdownwidth) == 0} {
    set width [winfo width $widgets(this)]
  } else {
    set m [font measure [$widgets(listbox) cget -font] "m"]
    set width [expr {$options(-dropdownwidth) * $m}]
  }

  # figure out where to place it on the screen, trying to take into
  # account we may be running under some virtual window manager
  set screenWidth  [winfo screenwidth $widgets(this)]
  set screenHeight [winfo screenheight $widgets(this)]
  set rootx        [winfo rootx $widgets(this)]
  set rooty        [winfo rooty $widgets(this)]
  set vrootx       [winfo vrootx $widgets(this)]
  set vrooty       [winfo vrooty $widgets(this)]

  # the x coordinate is simply the rootx of our widget, adjusted for
  # the virtual window. We won't worry about whether the window will
  # be offscreen to the left or right -- we want the illusion that it
  # is part of the entry widget, so if part of the entry widget is off-
  # screen, so will the list. If you want to change the behavior,
  # simply change the if statement... (and be sure to update this
  # comment!)
  set x  [expr {$rootx + $vrootx}]
  if {0} {
    set rightEdge [expr {$x + $width}]
    if {$rightEdge > $screenWidth} {
      set x [expr {$screenWidth - $width}]
    }
    if {$x < 0} {set x 0}
  }

  # the y coordinate is the rooty plus vrooty offset plus
  # the height of the static part of the widget plus 1 for a
  # tiny bit of visual separation...
  set y [expr {$rooty + $vrooty + [winfo reqheight $widgets(this)] + 1}]
  set bottomEdge [expr {$y + $height}]

  if {$bottomEdge >= $screenHeight} {
    # ok. Fine. Pop it up above the entry widget isntead of
    # below.
    set y [expr {($rooty - $height - 1) + $vrooty}]

    if {$y < 0} {
      # this means it extends beyond our screen. How annoying.
      # Now we'll try to be real clever and either pop it up or
      # down, depending on which way gives us the biggest list.
      # then, we'll trim the list to fit and force the use of
      # a scrollbar

      # (sadly, for windows users this measurement doesn't
      # take into consideration the height of the taskbar,
      # but don't blame me -- there isn't any way to detect
      # it or figure out its dimensions. The same probably
      # applies to any window manager with some magic windows
      # glued to the top or bottom of the screen)

      if {$rooty > [expr {$screenHeight / 2}]} {
        # we are in the lower half of the screen --
        # pop it up. Y is zero; that parts easy. The height
        # is simply the y coordinate of our widget, minus
        # a pixel for some visual separation. The y coordinate
        # will be the topof the screen.
        set y 1
        set height [expr {$rooty - 1 - $y}]

      } else {
        # we are in the upper half of the screen --
        # pop it down
        set y [expr {$rooty + $vrooty + \
                [winfo reqheight $widgets(this)] + 1}]
        set height [expr {$screenHeight - $y}]
      }

      # force a scrollbar
      HandleScrollbar $widgets(this) crop
    }
  }

  if {$y < 0} {
    # hmmm. Bummer.
    set y 0
    set height $screenheight
  }

  set geometry [format "=%dx%d+%d+%d" $width $height $x $y]

  return $geometry
}

# ::combobox::DoInternalWidgetCommand --
#
#    perform an internal widget command, then mung any error results
#    to look like it came from our megawidget. A lot of work just to
#    give the illusion that our megawidget is an atomic widget
#
# Arguments:
#
#    w           widget pathname
#    subwidget   pathname of the subwidget
#    command     subwidget command to be executed
#    args        arguments to the command
#
# Returns:
#
#    The result of the subwidget command, or an error

proc ::combobox::DoInternalWidgetCommand {w subwidget command args} {
  upvar ::combobox::${w}::widgets widgets
  upvar ::combobox::${w}::options options

  set subcommand $command
  set command [concat $widgets($subwidget) $command $args]
  if {[catch $command result]} {
    # replace the subwidget name with the megawidget name
    regsub $widgets($subwidget) $result $widgets(this) result

    # replace specific instances of the subwidget command
    # with our megawidget command
    switch $subwidget,$subcommand {
      listbox,index  {regsub "index"  $result "list index"  result}
      listbox,insert {regsub "insert" $result "list insert" result}
      listbox,delete {regsub "delete" $result "list delete" result}
      listbox,get    {regsub "get"    $result "list get"    result}
      listbox,size   {regsub "size"   $result "list size"   result}
    }
    error $result

  } else {
    return $result
  }
}


# ::combobox::WidgetProc --
#
#    This gets uses as the widgetproc for an combobox widget.
#    Notice where the widget is created and you'll see that the
#    actual widget proc merely evals this proc with all of the
#    arguments intact.
#
#    Note that some widget commands are defined "inline" (ie:
#    within this proc), and some do most of their work in
#    separate procs. This is merely because sometimes it was
#    easier to do it one way or the other.
#
# Arguments:
#
#    w         widget pathname
#    command   widget subcommand
#    args      additional arguments; varies with the subcommand
#
# Results:
#
#    Performs the requested widget command

proc ::combobox::WidgetProc {w command args} {
  upvar ::combobox::${w}::widgets widgets
  upvar ::combobox::${w}::options options
  upvar ::combobox::${w}::oldFocus oldFocus
  upvar ::combobox::${w}::oldFocus oldGrab

  set command [::combobox::Canonize $w command $command]

  # this is just shorthand notation...
  set doWidgetCommand \
        [list ::combobox::DoInternalWidgetCommand $widgets(this)]

  if {$command == "list"} {
    # ok, the next argument is a list command; we'll
    # rip it from args and append it to command to
    # create a unique internal command
    #
    # NB: because of the sloppy way we are doing this,
    # we'll also let the user enter our secret command
    # directly (eg: listinsert, listdelete), but we
    # won't document that fact
    set command "list-[lindex $args 0]"
    set args [lrange $args 1 end]
  }

  set result ""

  # many of these commands are just synonyms for specific
  # commands in one of the subwidgets. We'll get them out
  # of the way first, then do the custom commands.
  switch $command {
    bbox -
    delete -
    get -
    icursor -
    index -
    insert -
    scan -
    selection -
    xview {
      set result [eval $doWidgetCommand entry $command $args]
    }
    list-get {set result [eval $doWidgetCommand listbox get $args]}
    list-index {set result [eval $doWidgetCommand listbox index $args]}
    list-size {set result [eval $doWidgetCommand listbox size $args]}

    select {
      if {[llength $args] == 1} {
        set index [lindex $args 0]
        set result [Select $widgets(this) $index]
      } else {
        error "usage: $w select index"
      }
    }

    subwidget {
      set knownWidgets [list button entry listbox dropdown vsb]
      if {[llength $args] == 0} {
        return $knownWidgets
      }

      set name [lindex $args 0]
      if {[lsearch $knownWidgets $name] != -1} {
        set result $widgets($name)
      } else {
        error "unknown subwidget $name"
      }
    }

    curselection {
      set result [eval $doWidgetCommand listbox curselection]
    }

    list-insert {
      eval $doWidgetCommand listbox insert $args
      set result [HandleScrollbar $w "grow"]
    }

    list-delete {
      eval $doWidgetCommand listbox delete $args
      set result [HandleScrollbar $w "shrink"]
    }

    toggle {
      # ignore this command if the widget is disabled...
      if {$options(-state) == "disabled"} return

      # pops down the list if it is not, hides it
      # if it is...
      if {[winfo ismapped $widgets(dropdown)]} {
        set result [$widgets(this) close]
      } else {
        set result [$widgets(this) open]
      }
    }

    open {
      # if this is an editable combobox, the focus should
      # be set to the entry widget
      if {$options(-editable)} {
        focus $widgets(entry)
        $widgets(entry) select range 0 end
        $widgets(entry) icursor end
      }

      # if we are disabled, we won't allow this to happen
      if {$options(-state) == "disabled"} {
        return 0
      }

      # if there is a -opencommand, execute it now
      if {[string length $options(-opencommand)] > 0} {
        # hmmm... should I do a catch, or just let the normal
        # error handling handle any errors? For now, the latter...
        uplevel \#0 $options(-opencommand)
      }

      # compute the geometry of the window to pop up, and set
      # it, and force the window manager to take notice
      # (even if it is not presently visible).
      #
      # this isn't strictly necessary if the window is already
      # mapped, but we'll go ahead and set the geometry here
      # since its harmless and *may* actually reset the geometry
      # to something better in some weird case.
      set geometry [::combobox::ComputeGeometry $widgets(this)]
      wm geometry $widgets(dropdown) $geometry
      #update idletasks

      # if we are already open, there's nothing else to do
      if {[winfo ismapped $widgets(dropdown)]} {
        return 0
      }

      # save the widget that currently has the focus; we'll restore
      # the focus there when we're done
      set oldFocus [focus]

      # ok, tweak the visual appearance of things and
      # make the list pop up
      $widgets(button) configure -relief sunken
      wm deiconify $widgets(dropdown)
      update idletasks
      raise $widgets(dropdown)

      # force focus to the entry widget so we can handle keypress
      # events for traversal
      focus -force $widgets(entry)

      # select something by default, but only if its an
      # exact match...
      ::combobox::Find $widgets(this) 1

      # save the current grab state for the display containing this
      # widget. We'll restore it when we close the dropdown list
      set status "none"
      set grab [grab current $widgets(this)]
      if {$grab != ""} {set status [grab status $grab]}
      set oldGrab [list $grab $status]
      unset grab status

      # *gasp* do a global grab!!! Mom always told me not to
      # do things like this, but sometimes a man's gotta do
      # what a man's gotta do.
      grab -global $widgets(this)

      # fake the listbox into thinking it has focus. This is
      # necessary to get scanning initialized properly in the
      # listbox.
      event generate $widgets(listbox) <B1-Enter>

      return 1
    }

    close {
      # if we are already closed, don't do anything...
      if {![winfo ismapped $widgets(dropdown)]} {
        return 0
      }

      # restore the focus and grab, but ignore any errors...
      # we're going to be paranoid and release the grab before
      # trying to set any other grab because we really really
      # really want to make sure the grab is released.
      catch {focus $oldFocus} result
      catch {grab release $widgets(this)}
      catch {
        set status [lindex $oldGrab 1]
        if {$status == "global"} {
          grab -global [lindex $oldGrab 0]
        } elseif {$status == "local"} {
          grab [lindex $oldGrab 0]
        }
        unset status
      }

      # hides the listbox
      $widgets(button) configure -relief raised
      wm withdraw $widgets(dropdown)

      # select the data in the entry widget. Not sure
      # why, other than observation seems to suggest that's
      # what windows widgets do.
      set editable [::combobox::GetBoolean $options(-editable)]
      if {$editable} {
        $widgets(entry) selection range 0 end
        $widgets(button) configure -relief raised
      }


      # magic tcl stuff (see tk.tcl in the distribution
      # lib directory)
      ::combobox::tkCancelRepeat

      return 1
    }

    cget {
      if {[llength $args] != 1} {
        error "wrong # args: should be $w cget option"
      }
      set opt [::combobox::Canonize $w option [lindex $args 0]]

      if {$opt == "-value"} {
        set result [$widgets(entry) get]
      } else {
        set result $options($opt)
      }
    }

    configure {
      set result [eval ::combobox::Configure {$w} $args]
    }

    default {
      error "bad option \"$command\""
    }
  }

  return $result
}

# ::combobox::Configure --
#
#    Implements the "configure" widget subcommand
#
# Arguments:
#
#    w      widget pathname
#    args   zero or more option/value pairs (or a single option)
#
# Results:
#
#    Performs typcial "configure" type requests on the widget

proc ::combobox::Configure {w args} {
  variable widgetOptions
  variable defaultEntryCursor

  upvar ::combobox::${w}::widgets widgets
  upvar ::combobox::${w}::options options

  if {[llength $args] == 0} {
    # hmmm. User must be wanting all configuration information
    # note that if the value of an array element is of length
    # one it is an alias, which needs to be handled slightly
    # differently
    set results {}
    foreach opt [lsort [array names widgetOptions]] {
      if {[llength $widgetOptions($opt)] == 1} {
        set alias $widgetOptions($opt)
        set optName $widgetOptions($alias)
        lappend results [list $opt $optName]
      } else {
        set optName  [lindex $widgetOptions($opt) 0]
        set optClass [lindex $widgetOptions($opt) 1]
        set default [option get $w $optName $optClass]
        if {[info exists options($opt)]} {
          lappend results [list $opt $optName $optClass \
                             $default $options($opt)]
        } else {
            lappend results [list $opt $optName $optClass \
                              $default ""]
        }
      }
    }

    return $results
  }

  # one argument means we are looking for configuration
  # information on a single option
  if {[llength $args] == 1} {
    set opt [::combobox::Canonize $w option [lindex $args 0]]
    set optName  [lindex $widgetOptions($opt) 0]
    set optClass [lindex $widgetOptions($opt) 1]
    set default [option get $w $optName $optClass]
    set results [list $opt $optName $optClass $default $options($opt)]
    return $results
  }

  # if we have an odd number of values, bail.
  if {[expr {[llength $args]%2}] == 1} {
    # hmmm. An odd number of elements in args
    error "value for \"[lindex $args end]\" missing"
  }

  # Great. An even number of options. Let's make sure they
  # are all valid before we do anything. Note that Canonize
  # will generate an error if it finds a bogus option; otherwise
  # it returns the canonical option name
  foreach {name value} $args {
    set name [::combobox::Canonize $w option $name]
    set opts($name) $value
  }

  # process all of the configuration options
  # some (actually, most) options require us to
  # do something, like change the attributes of
  # a widget or two. Here's where we do that...
  #
  # note that the handling of disabledforeground and
  # disabledbackground is a little wonky. First, we have
  # to deal with backwards compatibility (ie: tk 8.3 and below
  # didn't have such options for the entry widget), and
  # we have to deal with the fact we might want to disable
  # the entry widget but use the normal foreground/background
  # for when the combobox is not disabled, but not editable either.

  set updateVisual 0
  foreach option [array names opts] {
    set newValue $opts($option)
    if {[info exists options($option)]} {
      set oldValue $options($option)
    }

    switch -- $option {

      -buttonbackground {
        $widgets(button) configure -background $newValue
      }

      -background {
        set updateVisual 1
        set options($option) $newValue
      }

      -borderwidth {
        $widgets(frame) configure -borderwidth $newValue
        set options($option) $newValue
      }

      -command {
        # nothing else to do...
        set options($option) $newValue
      }

      -commandstate {
        # do some value checking...
        if {$newValue != "normal" && $newValue != "disabled"} {
          set options($option) $oldValue
          set message "bad state value \"$newValue\";"
          append message " must be normal or disabled"
          error $message
        }
        set options($option) $newValue
      }

      -cursor {
        # This is disabled since it does not work well with our busy cursor routine.
        #$widgets(frame) configure -cursor $newValue
        #$widgets(entry) configure -cursor $newValue
        #$widgets(listbox) configure -cursor $newValue
        set options($option) $newValue
      }

      -disabledforeground {
        set updateVisual 1
        set options($option) $newValue
      }

      -disabledbackground {
        set updateVisual 1
        set options($option) $newValue
      }

      -dropdownwidth {
        set options($option) $newValue
      }

      -editable {
        set updateVisual 1
        if {$newValue} {
          # it's editable...
          $widgets(entry) configure \
            -state normal \
            -cursor $defaultEntryCursor
        } else {
          $widgets(entry) configure \
            -state disabled \
            -cursor $options(-cursor)
        }
        set options($option) $newValue
      }

      -elementborderwidth {
        $widgets(button) configure -borderwidth $newValue
        $widgets(vsb) configure -borderwidth $newValue
        $widgets(dropdown) configure -borderwidth $newValue
        set options($option) $newValue
      }

      -font {
        $widgets(entry) configure -font $newValue
        $widgets(listbox) configure -font $newValue
        set options($option) $newValue
      }

      -foreground {
        set updateVisual 1
        set options($option) $newValue
      }

      -height {
        $widgets(listbox) configure -height $newValue
        HandleScrollbar $w
        set options($option) $newValue
      }

      -highlightbackground {
        $widgets(frame) configure -highlightbackground $newValue
        set options($option) $newValue
      }

      -highlightcolor {
        $widgets(frame) configure -highlightcolor $newValue
        set options($option) $newValue
      }

      -highlightthickness {
        $widgets(frame) configure -highlightthickness $newValue
        set options($option) $newValue
      }

      -image {
        if {[string length $newValue] > 0} {
          puts "old button width: [$widgets(button) cget -width]"
          $widgets(button) configure \
            -image $newValue \
            -width [expr {[image width $newValue] + 2}]
          puts "new button width: [$widgets(button) cget -width]"

        } else {
          $widgets(button) configure -image ::combobox::bimage
        }
        set options($option) $newValue
      }

      -justify {
        $widgets(entry) configure -justify $newValue
      }

      -listvar {
        if {[catch {$widgets(listbox) cget -listvar}]} {
          return -code error \
            "-listvar not supported with this version of tk"
        }
        $widgets(listbox) configure -listvar $newValue
        set options($option) $newValue
      }

      -maxheight {
        # ComputeGeometry may dork with the actual height
        # of the listbox, so let's undork it
        $widgets(listbox) configure -height $options(-height)
        HandleScrollbar $w
        set options($option) $newValue
      }

      -opencommand {
        # nothing else to do...
        set options($option) $newValue
      }

      -relief {
        $widgets(frame) configure -relief $newValue
        set options($option) $newValue
      }

      -selectbackground {
        $widgets(entry) configure -selectbackground $newValue
        $widgets(listbox) configure -selectbackground $newValue
        set options($option) $newValue
      }

      -selectborderwidth {
        $widgets(entry) configure -selectborderwidth $newValue
        $widgets(listbox) configure -selectborderwidth $newValue
        set options($option) $newValue
      }

      -selectforeground {
        $widgets(entry) configure -selectforeground $newValue
        $widgets(listbox) configure -selectforeground $newValue
        set options($option) $newValue
      }

      -state {
        if {$newValue == "normal"} {
          set updateVisual 1
          # it's enabled

          set editable [::combobox::GetBoolean $options(-editable)]
          if {$editable} {
            $widgets(entry) configure -state normal
            $widgets(entry) configure -takefocus 1
          }

          # note that $widgets(button) is actually a label,
          # not a button. And being able to disable labels
          # wasn't possible until tk 8.3. (makes me wonder
          # why I chose to use a label, but that answer is
          # lost to antiquity)
          if {[info patchlevel] >= 8.3} {
            $widgets(button) configure -state normal
          }

        } elseif {$newValue == "disabled"}  {
          set updateVisual 1
          # it's disabled
          $widgets(entry) configure -state disabled
          $widgets(entry) configure -takefocus 0
          # note that $widgets(button) is actually a label,
          # not a button. And being able to disable labels
          # wasn't possible until tk 8.3. (makes me wonder
          # why I chose to use a label, but that answer is
          # lost to antiquity)
          if {$::tcl_version >= 8.3} {
            $widgets(button) configure -state disabled
          }

        } else {
          set options($option) $oldValue
          set message "bad state value \"$newValue\";"
          append message " must be normal or disabled"
          error $message
        }

        set options($option) $newValue
      }

      -takefocus {
        $widgets(entry) configure -takefocus $newValue
        set options($option) $newValue
      }

      -textvariable {
        $widgets(entry) configure -textvariable $newValue
        set options($option) $newValue
      }

      -value {
        ::combobox::SetValue $widgets(this) $newValue
        set options($option) $newValue
      }

      -width {
        $widgets(entry) configure -width $newValue
        $widgets(listbox) configure -width $newValue
        set options($option) $newValue
      }

      -xscrollcommand {
        $widgets(entry) configure -xscrollcommand $newValue
        set options($option) $newValue
      }
    }

    if {$updateVisual} {UpdateVisualAttributes $w}
  }
}

# ::combobox::UpdateVisualAttributes --
#
# sets the visual attributes (foreground, background mostly)
# based on the current state of the widget (normal/disabled,
# editable/non-editable)
#
# why a proc for such a simple thing? Well, in addition to the
# various states of the widget, we also have to consider the
# version of tk being used -- versions from 8.4 and beyond have
# the notion of disabled foreground/background options for various
# widgets. All of the permutations can get nasty, so we encapsulate
# it all in one spot.
#
# note also that we don't handle all visual attributes here; just
# the ones that depend on the state of the widget. The rest are
# handled on a case by case basis
#
# Arguments:
#    w                widget pathname
#
# Returns:
#    empty string

proc ::combobox::UpdateVisualAttributes {w} {
  upvar ::combobox::${w}::widgets     widgets
  upvar ::combobox::${w}::options     options

  if {$options(-state) == "normal"} {
    set foreground $options(-foreground)
    set background $options(-background)
  } elseif {$options(-state) == "disabled"} {
    set foreground $options(-disabledforeground)
    set background $options(-disabledbackground)
  }

  $widgets(entry)   configure -foreground $foreground -background $background
  $widgets(listbox) configure -foreground $foreground -background $background
  $widgets(button)  configure -foreground $foreground
  $widgets(vsb)     configure -background $background -troughcolor $background
  $widgets(frame)   configure -background $background

  # we need to set the disabled colors in case our widget is disabled.
  # We could actually check for disabled-ness, but we also need to
  # check whether we're enabled but not editable, in which case the
  # entry widget is disabled but we still want the enabled colors. It's
  # easier just to set everything and be done with it.

  if {$::tcl_version >= 8.4} {
    $widgets(entry) configure \
      -disabledforeground $foreground \
      -disabledbackground $background
    $widgets(button)  configure -disabledforeground $foreground
    $widgets(listbox) configure -disabledforeground $foreground
  }
}

# ::combobox::SetValue --
#
#    sets the value of the combobox and calls the -command,
#    if defined
#
# Arguments:
#
#    w          widget pathname
#    newValue   the new value of the combobox
#
# Returns
#
#    Empty string

proc ::combobox::SetValue {w newValue} {
  upvar ::combobox::${w}::widgets     widgets
  upvar ::combobox::${w}::options     options
  upvar ::combobox::${w}::ignoreTrace ignoreTrace
  upvar ::combobox::${w}::oldValue    oldValue

  if {[info exists options(-textvariable)] \
        && [string length $options(-textvariable)] > 0} {
    set variable ::$options(-textvariable)
    set $variable $newValue
  } else {
    set oldstate [$widgets(entry) cget -state]
    $widgets(entry) configure -state normal
    $widgets(entry) delete 0 end
    $widgets(entry) insert 0 $newValue
    $widgets(entry) configure -state $oldstate
  }

  # set our internal textvariable; this will cause any public
  # textvariable (ie: defined by the user) to be updated as
  # well
#  set ::combobox::${w}::entryTextVariable $newValue

  # redefine our concept of the "old value". Do it before running
  # any associated command so we can be sure it happens even
  # if the command somehow fails.
  set oldValue $newValue


  # call the associated command. The proc will handle whether or
  # not to actually call it, and with what args
  CallCommand $w $newValue

  return ""
}

# ::combobox::CallCommand --
#
#   calls the associated command, if any, appending the new
#   value to the command to be called.
#
# Arguments:
#
#    w         widget pathname
#    newValue  the new value of the combobox
#
# Returns
#
#    empty string

proc ::combobox::CallCommand {w newValue} {
  upvar ::combobox::${w}::widgets widgets
  upvar ::combobox::${w}::options options

  # call the associated command, if defined and -commandstate is
  # set to "normal"
  if {$options(-commandstate) == "normal" && \
        [string length $options(-command)] > 0} {
    set args [list $widgets(this) $newValue]
    uplevel \#0 $options(-command) $args
  }
}


# ::combobox::GetBoolean --
#
#     returns the value of a (presumably) boolean string (ie: it should
#     do the right thing if the string is "yes", "no", "true", 1, etc
#
# Arguments:
#
#     value       value to be converted
#     errorValue  a default value to be returned in case of an error
#
# Returns:
#
#     a 1 or zero, or the value of errorValue if the string isn't
#     a proper boolean value

proc ::combobox::GetBoolean {value {errorValue 1}} {
  if {[catch {expr {([string trim $value])?1:0}} res]} {
    return $errorValue
  } else {
    return $res
  }
}

# ::combobox::convert --
#
#     public routine to convert %x, %y and %W binding substitutions.
#     Given an x, y and or %W value relative to a given widget, this
#     routine will convert the values to be relative to the combobox
#     widget. For example, it could be used in a binding like this:
#
#     bind .combobox <blah> {doSomething [::combobox::convert %W -x %x]}
#
#     Note that this procedure is *not* exported, but is intended for
#     public use. It is not exported because the name could easily
#     clash with existing commands.
#
# Arguments:
#
#     w     a widget path; typically the actual result of a %W
#           substitution in a binding. It should be either a
#           combobox widget or one of its subwidgets
#
#     args  should one or more of the following arguments or
#           pairs of arguments:
#
#           -x <x>      will convert the value <x>; typically <x> will
#                       be the result of a %x substitution
#           -y <y>      will convert the value <y>; typically <y> will
#                       be the result of a %y substitution
#           -W (or -w)  will return the name of the combobox widget
#                       which is the parent of $w
#
# Returns:
#
#     a list of the requested values. For example, a single -w will
#     result in a list of one items, the name of the combobox widget.
#     Supplying "-x 10 -y 20 -W" (in any order) will return a list of
#     three values: the converted x and y values, and the name of
#     the combobox widget.

proc ::combobox::convert {w args} {
  set result {}
  if {![winfo exists $w]} {
    error "window \"$w\" doesn't exist"
  }

  while {[llength $args] > 0} {
    set option [lindex $args 0]
    set args [lrange $args 1 end]

    switch -exact -- $option {
      -x {
        set value [lindex $args 0]
        set args [lrange $args 1 end]
        set win $w
        while {[winfo class $win] != "Combobox"} {
          incr value [winfo x $win]
          set win [winfo parent $win]
          if {$win == "."} break
        }
        lappend result $value
      }

      -y {
        set value [lindex $args 0]
        set args [lrange $args 1 end]
        set win $w
        while {[winfo class $win] != "Combobox"} {
          incr value [winfo y $win]
          set win [winfo parent $win]
          if {$win == "."} break
        }
        lappend result $value
      }

      -w -
      -W {
        set win $w
        while {[winfo class $win] != "Combobox"} {
          set win [winfo parent $win]
          if {$win == "."} break;
        }
        lappend result $win
      }
    }
  }

  return $result
}

# ::combobox::Canonize --
#
#    takes a (possibly abbreviated) option or command name and either
#    returns the canonical name or an error
#
# Arguments:
#
#    w        widget pathname
#    object   type of object to canonize; must be one of "command",
#             "option", "scan command" or "list command"
#    opt      the option (or command) to be canonized
#
# Returns:
#
#    Returns either the canonical form of an option or command,
#    or raises an error if the option or command is unknown or
#    ambiguous.

proc ::combobox::Canonize {w object opt} {
  variable widgetOptions
  variable columnOptions
  variable widgetCommands
  variable listCommands
  variable scanCommands

  switch $object {
    command {
      if {[lsearch -exact $widgetCommands $opt] >= 0} {
        return $opt
      }

      # command names aren't stored in an array, and there
      # isn't a way to get all the matches in a list, so
      # we'll stuff the commands in a temporary array so
      # we can use [array names]
      set list $widgetCommands
      foreach element $list {
        set tmp($element) ""
      }
      set matches [array names tmp ${opt}*]
    }

    {list command} {
      if {[lsearch -exact $listCommands $opt] >= 0} {
        return $opt
      }

      set list $listCommands
      foreach element $list {
        set tmp($element) ""
      }
      set matches [array names tmp ${opt}*]
    }

    {scan command} {
      if {[lsearch -exact $scanCommands $opt] >= 0} {
        return $opt
      }

      set list $scanCommands
      foreach element $list {
        set tmp($element) ""
      }
      set matches [array names tmp ${opt}*]
    }

    option {
      if {[info exists widgetOptions($opt)] \
            && [llength $widgetOptions($opt)] == 2} {
        return $opt
      }
      set list [array names widgetOptions]
      set matches [array names widgetOptions ${opt}*]
    }

  }

  if {[llength $matches] == 0} {
    set choices [HumanizeList $list]
    error "unknown $object \"$opt\"; must be one of $choices"

  } elseif {[llength $matches] == 1} {
    set opt [lindex $matches 0]

    # deal with option aliases
    switch $object {
      option {
        set opt [lindex $matches 0]
        if {[llength $widgetOptions($opt)] == 1} {
          set opt $widgetOptions($opt)
        }
      }
    }

    return $opt

  } else {
    set choices [HumanizeList $list]
    error "ambiguous $object \"$opt\"; must be one of $choices"
  }
}

# ::combobox::HumanizeList --
#
#    Returns a human-readable form of a list by separating items
#    by columns, but separating the last two elements with "or"
#    (eg: foo, bar or baz)
#
# Arguments:
#
#    list    a valid tcl list
#
# Results:
#
#    A string which as all of the elements joined with ", " or
#    the word " or "

proc ::combobox::HumanizeList {list} {

  if {[llength $list] == 1} {
    return [lindex $list 0]
  } else {
    set list [lsort $list]
    set secondToLast [expr {[llength $list] -2}]
    set most [lrange $list 0 $secondToLast]
    set last [lindex $list end]

    return "[join $most {, }] or $last"
  }
}

# This is some backwards-compatibility code to handle TIP 44
# (http://purl.org/tcl/tip/44.html). For all private tk commands
# used by this widget, we'll make duplicates of the procs in the
# combobox namespace.
#
# I'm not entirely convinced this is the right thing to do. I probably
# shouldn't even be using the private commands. Then again, maybe the
# private commands really should be public. Oh well; it works so it
# must be OK...
#
foreach command {TabToWindow CancelRepeat ListboxUpDown} {
  if {[llength [info commands ::combobox::tk$command]] == 1} break;

  set tmp [info commands tk$command]
  set proc ::combobox::tk$command
  if {[llength [info commands tk$command]] == 1} {
    set command [namespace which [lindex $tmp 0]]
    proc $proc {args} "uplevel $command \$args"
  } else {
    if {[llength [info commands ::tk::$command]] == 1} {
      proc $proc {args} "uplevel ::tk::$command \$args"
    }
  }
}

# end of combobox.tcl


# ::file::Exit
#
#    Prompt for confirmation then exit.
#
proc ::file::Exit {}  {
  # Check for altered game in all bases except the clipbase:
  set unsavedCount 0
  set savedBase [sc_base current]
  set msg ""
  set nbases [sc_base count total]
  for {set i 1} {$i < [sc_base count total]} {incr i} {
    sc_base switch $i
    if {[sc_base inUse] && [sc_game altered] && ![sc_base isReadOnly]} {
      if {$unsavedCount == 0} {
        append msg $::tr(ExitUnsaved)
        append msg "\n\n"
      }
      incr unsavedCount
      set fname [file tail [sc_base filename]]
      set g [sc_game number]
      append msg "   Base $i: $fname "
      append msg "($::tr(game) $g)"
      append msg "\n"
    }
  }
  # Switch back to original database:
  sc_base switch $savedBase

  if {$msg != ""} {
    append msg "\n"
  }
  append msg $::tr(ExitDialog)

  # Only ask before exiting if there are unsaved changes:
  if {$unsavedCount > 0} {
    set answer [tk_messageBox -title "Scid: [tr FileExit]" \
                  -message $msg -type yesno -icon question]
    if {$answer != "yes"} { return }
  }
  if {$::optionsAutoSave} { .menu.options invoke [tr OptionsSave] }
  ::recentFiles::save
  ::utils::history::Save
  destroy .
}

proc ::file::ExitFast {} {
  if {$::optionsAutoSave} { .menu.options invoke [tr OptionsSave] }
  ::recentFiles::save
  destroy .
}

# ::file::New
#
#   Opens file-save dialog and creates a new database.
#
proc ::file::New {} {
  if {[sc_base count free] == 0} {
    tk_messageBox -title "Scid" -type ok -icon info \
      -message "Too many databases open; close one first"
    return
  }
  set ftype {
    { "Scid databases, EPD files" {".si3" ".epd"} }
    { "Scid databases" {".si3"} }
    { "EPD files" {".epd"} }
  }
  set fName [tk_getSaveFile -initialdir $::initialDir(base) -filetypes $ftype -title "Create a Scid database"]
  if {$fName == ""} {
    # do nothing
  } elseif {[file extension $fName] == ".epd"} {
    newEpdWin create $fName
    return
  } else {
    set fName [file rootname $fName]
    if {[catch {sc_base create $fName} result]} {
      tk_messageBox -icon warning -type ok -parent . \
        -title "Scid: Unable to create base" -message $result
    }
  }
  ::windows::gamelist::Refresh
  ::tree::refresh
  updateMenuStates
  updateTitle
  updateStatusBar
}

# ::file::Open
#
#    Opens file-open dialog and opens the selected Scid database.
#
proc ::file::Open {{fName ""}} {
  global glstart
  if {[sc_base count free] == 0} {
    tk_messageBox -type ok -icon info -title "Scid" \
      -message "Too many databases are open; close one first"
    return
  }

  if {[sc_info gzip]} {
    set ftype {
      { "All Scid files" {".si3" ".si" ".pgn" ".pgn.gz" ".epd" ".epd.gz" ".sor"} }
      { "Scid databases, PGN files" {".si3" ".si" ".pgn" ".PGN" ".pgn.gz"} }
      { "Scid databases" {".si3" ".si"} }
      { "PGN files" {".pgn" ".PGN" ".pgn.gz"} }
      { "EPD files" {".epd" ".EPD" ".epd.gz"} }
      { "Repertoire files" {".sor"} }
    }
  } else {
    set ftype {
      { "All Scid files" {".si3" ".si" ".pgn" ".epd" ".sor"} }
      { "Scid databases, PGN files" {".si3" ".si" ".pgn" ".PGN"} }
      { "Scid databases" {".si3" ".si"} }
      { "PGN files" {".pgn" ".PGN"} }
      { "EPD files" {".epd" ".EPD"} }
      { "Repertoire files" {".sor"} }
    }
  }
  if {$fName == ""} {
    set fName [tk_getOpenFile -initialdir $::initialDir(base) -filetypes $ftype -title "Open a Scid file"]
    if {$fName == ""} { return }
  }

  if {[file extension $fName] == ""} {
    set fName "$fName.si3"
  }

  if {[file extension $fName] == ".sor"} {
    if {[catch {::rep::OpenWithFile $fName} err]} {
      tk_messageBox -parent . -type ok -icon info -title "Scid" \
        -message "Unable to open \"$fName\": $err"
    }
    return
  }

  if {[file extension $fName] == ".si"} {
    ::file::Upgrade [file rootname $fName]
    return
  }

  set err 0
  busyCursor .
  if {[file extension $fName] == ".si3"} {
    set fName [file rootname $fName]
    if {[catch {openBase $fName} result]} {
      set err 1
      tk_messageBox -icon warning -type ok -parent . \
        -title "Scid: Error opening file" -message $result
    } else {
      set ::initialDir(base) [file dirname $fName]
      ::recentFiles::add "$fName.si3"
    }
  } elseif {[string match "*.epd" [string tolower $fName]]} {
    # EPD file:
    newEpdWin open $fName
  } else {
    # PGN file:
    set result "This file is not readable."
    if {(![file readable $fName])  || \
          [catch {sc_base create $fName true} result]} {
      set err 1
      tk_messageBox -icon warning -type ok -parent . \
        -title "Scid: Error opening file" -message $result
    } else {
      doPgnFileImport $fName "Opening [file tail $fName] read-only...\n"
      sc_base type [sc_base current] 3
      ::recentFiles::add $fName
    }
  }

  if {$err == 0} {
    catch {sc_game load auto}
    flipBoardForPlayerNames $::myPlayerNames
  }
  unbusyCursor .
  set glstart 1
  ::windows::gamelist::Refresh
  ::tree::refresh
  ::windows::stats::Refresh
  updateMenuStates
  updateBoard -pgn
  updateTitle
  updateStatusBar
}

# ::file::Upgrade
#
#   Upgrades an old (version 2) Scid database to version 3.
#
proc ::file::Upgrade {name} {
  if {[file readable "$name.si3"]} {
    set msg [string trim $::tr(ConfirmOpenNew)]
    set res [tk_messageBox -title "Scid" -type yesno -icon info -message $msg]
    if {$res == "no"} { return }
    ::file::Open "$name.si3"
    return
  }

  set msg [string trim $::tr(ConfirmUpgrade)]
  set res [tk_messageBox -title "Scid" -type yesno -icon info -message $msg]
  if {$res == "no"} { return }
  progressWindow "Scid" "$::tr(Upgrading): [file tail $name]..."\
    $::tr(Cancel) "sc_progressBar"
  busyCursor .
  update
  set err [catch {sc_base upgrade $name} res]
  unbusyCursor .
  closeProgressWindow
  if {$err} {
    tk_messageBox -title "Scid" -type ok -icon warning \
      -message "Unable to upgrade the database:\n$res"
    return
  }
  ::file::Open "$name.si3"
}

# openBase:
#    Opens a Scid database, showing a progress bar in a separate window
#    if the database is around 1 Mb or larger in size.
#
proc openBase {name} {
  set bsize 0
  set gfile "[file rootname $name].sg3"
  if {! [catch {file size $gfile} err]} { set bsize $err }
  set showProgress 0
  if {$bsize > 1000000} { set showProgress 1 }
  if {$showProgress} {
    progressWindow "Scid" "$::tr(OpeningTheDatabase): [file tail $name]..."
  }
  set err [catch {sc_base open $name} result]
  if {$showProgress} { closeProgressWindow }
  if {$err} { return -code error $result }
  return $result
}


# ::file::Close:
#   Closes the active base.
#
proc ::file::Close {{base -1}} {
  # Remember the current base:
  set current [sc_base current]
  if {$base < 0} { set base $current] }

  # Switch to the base which will be closed, and check for changes:
  sc_base switch $base
  if {[sc_base inUse]} {
    if {![::game::ConfirmDiscard]} {
      sc_base switch $current
      return
    }
    sc_base close
    # Now switch back to the original base
    sc_base switch $current

    ::windows::gamelist::Refresh
    # Close Tree and Email windows whenever a base is closed/switched:
    #if {[winfo exists .treeWin]} { destroy .treeWin }
    if {[winfo exists .emailWin]} { destroy .emailWin }
    ::pgn::Refresh
    updateBoard
  }
  updateMenuStates
  updateStatusBar
  updateTitle
}


proc ::file::SwitchToBase {b} {
  sc_base switch $b
  # Close email window when a base is switched:
  if {[winfo exists .emailWin]} { destroy .emailWin }
  updateBoard -pgn
  updateTitle
  updateMenuStates
  updateStatusBar
  ::windows::gamelist::Refresh
}

####################
# File finder window

set ::file::finder::data(dir) [pwd]
set ::file::finder::data(sort) name
set ::file::finder::data(recurse) 0
set ::file::finder::data(stop) 0
set ::file::finder::data(Scid) 1
set ::file::finder::data(PGN) 1
set ::file::finder::data(Rep) 1
set ::file::finder::data(EPD) 1
set ::file::finder::data(Old) 1

image create photo ::file::finder::updir -data {
  R0lGODdhGQAUAKEAANnZ2QAAAPD/gAAngSwAAAAAGQAUAAACToSPqcvtEGJ8LIh7A00WY71B
  0kiWnIemHmh06pshrjAM8CpjdX3HR7fboXifnM6WIvpaHmUTuYQ8g1Tcb0gVWpk9FUvaTX1F
  pfIohE4zCgA7
}

proc ::file::finder::Open {} {
  set w .finder
  if {[winfo exists $w]} { return }

  toplevel $w
  wm title $w "Scid: $::tr(FileFinder)"
  bind $w <F1> {helpWindow Finder}
  setWinLocation $w
  bind $w <Configure> "recordWinSize $w"

  frame $w.menu -relief raised -borderwidth 2
  pack $w.menu -side top -fill x
  $w configure -menu $w.menu
  menubutton $w.menu.file -text FinderFile -menu $w.menu.file.m
  menu $w.menu.file.m
  $w.menu.file.m add checkbutton -label FinderFileSubdirs \
    -variable ::file::finder::data(recurse) -onvalue 1 -offvalue 0 \
    -command ::file::finder::Refresh
  $w.menu.file.m add separator
  $w.menu.file.m add command -label FinderFileClose -command "destroy $w"
  menubutton $w.menu.sort -text FinderSort -menu $w.menu.sort.m
  menu $w.menu.sort.m
  foreach {name value} {Type type Size size Mod mod Filename name Path path} {
    $w.menu.sort.m add radiobutton -label FinderSort$name \
      -variable ::file::finder::data(sort) -value $value \
      -command {::file::finder::Refresh -fast}
  }
  menubutton $w.menu.types -text FinderTypes -menu $w.menu.types.m
  menu $w.menu.types.m
  foreach type {Scid Old PGN Rep EPD} {
    $w.menu.types.m add checkbutton -label FinderTypes$type \
      -variable ::file::finder::data($type) -onvalue 1 -offvalue 0 \
      -command ::file::finder::Refresh
  }
  menubutton $w.menu.help -text FinderHelp -menu $w.menu.help.m
  menu $w.menu.help.m
  $w.menu.help.m add command -label FinderHelpFinder \
    -accelerator F1 -command {helpWindow Finder}
  $w.menu.help.m add command -label FinderHelpIndex -command {helpWindow Index}
  pack $w.menu.file $w.menu.sort $w.menu.types $w.menu.help -side left

  pack [frame $w.d] -side top -fill x
  label $w.d.label -text "$::tr(FinderDir):" -font font_Small
  set ::file::finder::data(menu) [tk_optionMenu $w.d.mb ::file::finder::data(dir) ""]
  $w.d.mb configure -font font_Small -width 1 -anchor e
  $::file::finder::data(menu) configure -font font_Small
  button $w.d.up -image ::file::finder::updir -command {::file::finder::Refresh ..}
  pack $w.d.label -side left -padx 5
  pack $w.d.up -side right -padx 5
  pack $w.d.mb -side left -fill x -expand yes

  frame $w.t
  frame $w.b
  text $w.t.text -width 65 -height 25 -font font_Small -wrap none \
    -fg black -bg white -yscrollcommand "$w.t.ybar set" -setgrid 1 \
    -cursor top_left_arrow
  scrollbar $w.t.ybar -command "$w.t.text yview" -width 12
  $w.t.text tag configure Dir -foreground brown
  $w.t.text tag configure Vol -foreground gray25
  $w.t.text tag configure PGN -foreground blue
  $w.t.text tag configure Scid -foreground red
  $w.t.text tag configure Old -foreground black
  $w.t.text tag configure Rep -foreground darkGreen
  $w.t.text tag configure EPD -foreground orange
  $w.t.text tag configure bold -font font_SmallBold
  $w.t.text tag configure center -justify center
  set xwidth [font measure [$w.t.text cget -font] "x"]
  set tablist {}
  foreach {tab justify} {15 r 30 r 32 l 50 l} {
    set tabwidth [expr {$xwidth * $tab} ]
    lappend tablist $tabwidth $justify
  }
  $w.t.text configure -tabs $tablist
  bindMouseWheel $w $w.t.text

  checkbutton $w.b.sub -text [tr FinderFileSubdirs] \
    -variable ::file::finder::data(recurse) -onvalue 1 -offvalue 0 \
    -command ::file::finder::Refresh
  dialogbutton $w.b.stop -textvar ::tr(Stop) -command {set finder(stop) 1 }
  dialogbutton $w.b.help -textvar ::tr(Help) -command {helpWindow Finder}
  dialogbutton $w.b.close -textvar ::tr(Close) -command "destroy $w"
  bind $w <Escape> "$w.b.stop invoke"

  pack $w.b -side bottom -fill x
  packbuttons right $w.b.close $w.b.help $w.b.stop
  packbuttons left $w.b.sub
  pack $w.t -side top -fill both -expand yes
  pack $w.t.ybar -side right -fill y
  pack $w.t.text -side left -fill both -expand yes
  ::file::finder::ConfigMenus
  ::file::finder::Refresh
}

proc ::file::finder::Refresh {{newdir ""}} {
  variable data
  set w .finder
  if {! [winfo exists $w]} { return }
  set t $w.t.text

  # When parameter is "-fast", just re-sort the existing data:
  set fastmode 0
  if {$newdir == "-fast"} {
    set fastmode 1
    set newdir ""
  }
  if {$newdir == ".."} { set newdir [file dirname $data(dir)] }
  if {$newdir != ""} { set data(dir) $newdir }

  busyCursor .
  set data(stop) 0
  $w.b.close configure -state disabled
  $w.b.help configure -state disabled
  $w.b.sub configure -state disabled
  $w.b.stop configure -state normal
  catch {grab $w.b.stop}
  $t configure -state normal
  update

  if {$fastmode} {
    set flist $data(flist)
  } else {
    set flist [::file::finder::GetFiles $data(dir)]
    set data(flist) $flist
  }

  switch $data(sort) {
    "none" {}
    "type" { set flist [lsort -decreasing -index 1 $flist] }
    "size" { set flist [lsort -integer -decreasing -index 0 $flist] }
    "name" { set flist [lsort -dict -index 2 $flist] }
    "path" { set flist [lsort -dict -index 3 $flist] }
    "mod"  { set flist [lsort -integer -decreasing -index 4 $flist] }
  }

  set hc yellow
  $t delete 1.0 end
  set dcount 0
  $t insert end "$::tr(FinderDirs)\n" {center bold}
  set dlist {}

  # Insert drive letters, on Windows:
  if {$::windowsOS} {
    foreach drive [lsort -dictionary [file volume]] {
      $t insert end " $drive " [list Vol v$drive]
      $t insert end "    "
      $t tag bind v$drive <1> [list ::file::finder::Refresh $drive]
      $t tag bind v$drive <Any-Enter> \
        "$t tag configure [list v$drive] -background $hc"
      $t tag bind v$drive <Any-Leave> \
        "$t tag configure [list v$drive] -background {}"
    }
    $t insert end "\n"
  }

  # Insert parent directory entry:
  lappend dlist ..

  # Generate other directory entries:
  set dirlist [lsort -dictionary [glob -nocomplain [file join $data(dir) *]]]
  foreach dir $dirlist {
    if {[file isdir $dir]} {
      lappend dlist $dir
    }
  }
  foreach dir $dlist {
    if {$dcount != 0} {
      set sep "\n"
      if {$dcount % 2 != 0} { set sep "\t\t\t" }
      $t insert end $sep
    }
    incr dcount
    if {$dir == ".."} {
      set d ..
      $t insert end " .. ($::tr(FinderUpDir)) " [list Dir d..]
    } else {
      set d [file tail $dir]
      $t insert end " $d " [list Dir d$d]
    }
    $t tag bind d$d <1> [list ::file::finder::Refresh $dir]
    $t tag bind d$d <Any-Enter> \
      "$t tag configure [list d$d] -background $hc"
    $t tag bind d$d <Any-Leave> \
      "$t tag configure [list d$d] -background {}"
  }

  # Add File section headings:
  $t insert end "\n\n"
  if {[llength $flist] != 0} {
    foreach i {Type Size Mod Name Path} v {type size mod name path} {
      $t tag configure s$i -font font_SmallBold
      $t tag bind s$i <1> "set data(sort) $v; ::file::finder::Refresh -fast"
      $t tag bind s$i <Any-Enter> "$t tag config s$i -foreground red"
      $t tag bind s$i <Any-Leave> "$t tag config s$i -foreground {}"
    }
    $t insert end "$::tr(FinderFiles)\n" {center bold}
    $t insert end " "
    $t insert end "[tr FinderSortType]" sType
    $t insert end "\t"
    $t insert end "[tr FinderSortSize]" sSize
    $t insert end "\t"
    $t insert end "[tr FinderSortMod]" sMod
    $t insert end "\t"
    $t insert end "[tr FinderSortName]" sName
    $t insert end "\t"
    $t insert end "[tr FinderSortPath]" sPath
    $t insert end "\n"
  }

  # Add each file:
  foreach i $flist {
    set size [lindex $i 0]
    set type [lindex $i 1]
    set fname [lindex $i 2]
    set path [lindex $i 3]
    set mtime [lindex $i 4]
    set est [lindex $i 5]
    $t insert end "\n "
    $t insert end $type [list $type f$path]
    set esize ""
    if {$est} { set esize "~" }
    append esize [::utils::thousands $size]
    $t insert end "\t$esize" f$path
    $t insert end "\t[clock format $mtime -format {%b %d %Y}]" f$path
    $t insert end "\t$fname\t" f$path
    set dir [file dirname $path]
    set tail [file tail $path]
    set fullpath $data(dir)/$dir/$tail
    $t tag bind f$path <ButtonPress-1> "::file::Open [list $fullpath]"
    $t tag bind f$path <Any-Enter> \
      "$t tag configure [list f$path] -background $hc"
    $t tag bind f$path <Any-Leave> \
      "$t tag configure [list f$path] -background {}"
    if {$dir == "."} {
      set fullpath "$data(dir)/$tail"
    } else {
      $t tag configure p$path -foreground darkblue
      $t insert end "$dir/" [list p$path f$path]
    }
    $t tag configure t$path -foreground blue
    $t insert end $tail [list t$path f$path]
  }
  $t configure -state disabled

  # Update directory menubutton:
  $data(menu) delete 0 end
  set mlist {}
  set d {}
  foreach subdir [file split $data(dir)] {
    set d [file join $d $subdir]
    lappend mlist $d
  }
  foreach m $mlist {
    $data(menu) add command -label $m -command "::file::finder::Refresh [list $m]"
  }

  catch {grab release $w.b.stop}
  $w.b.stop configure -state disabled
  $w.b.help configure -state normal
  $w.b.close configure -state normal
  $w.b.sub configure -state normal
  unbusyCursor .
}

proc ::file::finder::ConfigMenus {{lang ""}} {
  if {! [winfo exists .finder]} { return }
  if {$lang == ""} { set lang $::language }
  set m .finder.menu
  foreach menu {file sort types help} tag {File Sort Types Help} {
    configMenuName $m.$menu Finder$tag $lang
  }
  foreach idx {0 2} tag {Subdirs Close} {
    configMenuText $m.file.m $idx FinderFile$tag $lang
  }
  foreach idx {0 1 2 3 4} tag {Type Size Mod Name Path} {
    configMenuText $m.sort.m $idx FinderSort$tag $lang
  }
  foreach idx {0 1 2 3 4} tag {Scid Old PGN Rep EPD} {
    configMenuText $m.types.m $idx FinderTypes$tag $lang
  }
  foreach idx {0 1} tag {Finder Index} {
    configMenuText $m.help.m $idx FinderHelp$tag $lang
  }
}

proc ::file::finder::GetFiles {dir {len -1}} {
  variable data
  set dlist {}
  set flist {}
  if {$len < 0} {
    set len [expr {[string length $dir] + 1} ]
  }

  foreach f [glob -nocomplain [file join $dir *]] {
    if {[file isdir $f]} {
      lappend dlist $f
    } elseif {[file isfile $f]} {
      set ext [string tolower [file extension $f]]
      if {[catch {set mtime [file mtime $f]}]} { set mtime 0 }
      set showFile 0
      set rootname [file rootname $f]
      set type PGN
      if {$ext == ".si3"} {
        set showFile 1
        set type Scid
      } elseif {$ext == ".si"} {
        set showFile 1
        set type Old
      } elseif {$ext == ".sor"} {
        set showFile 1
        set type Rep
      } elseif {$ext == ".epd"} {
        set type EPD
        set showFile 1
      } elseif {$ext == ".pgn"} {
        set showFile 1
      } elseif {$ext == ".gz"} {
        set rootname [file rootname $rootname]
        if {[regexp {\.epd\.gz} $f]} { set showFile 1; set type EPD }
        if {[regexp {\.pgn\.gz} $f]} { set showFile 1 }
      }
      if {$showFile  &&  [info exists data($type)]  &&  $data($type)} {
        set path [string range $f $len end]
        set est 0
        if {[catch {set size [sc_info fsize $f]}]} {
          # Could not determine file size, probably a PGN or EPD file
          # that the user does not have permission to read.
          set est 1
          set size 0
        }
        if {$size < 0} {
          set est 1
          set size [expr {0 - $size}]
        }
        if {[file dirname $path] == "."} { set path "./$path" }
        lappend flist [list $size $type [file tail $rootname] $path $mtime $est]
      }
    }
    update
    if {$data(stop)} { break }
  }
  if {$data(recurse)} {
    foreach f $dlist {
      foreach i [::file::finder::GetFiles $f $len] {
        lappend flist $i
        update
        if {$data(stop)} { break }
      }
    }
  }
  return $flist
}

# bookmark.tcl:
# Bookmarks list and Recently-used files list in Scid.

set bookmarks(data) {}
set bookmarks(subMenus) 0

# Read the bookmarks file if it exists:
catch {source [scidConfigFile bookmarks]}


namespace eval ::bookmarks {}

# ::bookmarks::PostMenu:
#   Posts the bookmarks toolbar menu.
#
proc ::bookmarks::PostMenu {} {
  .tb.bkm.menu post [winfo pointerx .] [winfo pointery .]
  if {[::bookmarks::CanAdd]} {
    .tb.bkm.menu activate 0
  } else {
    .tb.bkm.menu activate 2
  }
}

# ::bookmarks::Refresh:
#   Updates all bookmarks submenus.
#
proc ::bookmarks::Refresh {} {
  foreach menu {.menu.file.bookmarks .tb.bkm.menu} {
    ::bookmarks::RefreshMenu $menu
  }
}

proc ::bookmarks::RefreshMenu {menu} {
  global bookmarks helpMessage

  ::bookmarks::DeleteChildren $menu
  $menu delete 0 end
  # $menu configure -disabledforeground [$menu cget -foreground]
  set numBookmarkEntries [llength $bookmarks(data)]
  $menu add command -label FileBookmarksAdd -command ::bookmarks::AddCurrent
  set helpMessage($menu,0) FileBookmarksAdd
  $menu add cascade -label FileBookmarksFile -menu $menu.file
  menu $menu.file
  set helpMessage($menu,1) FileBookmarksFile
  if {! [::bookmarks::CanAdd]} {
    $menu entryconfigure 0 -state disabled
    $menu entryconfigure 1 -state disabled
  }
  $menu add command -label FileBookmarksEdit -command ::bookmarks::Edit
  set helpMessage($menu,2) FileBookmarksEdit
  if {$bookmarks(subMenus)} {
    set display List
    set newval 0
  } else {
    set display Sub
    set newval 1
  }
  $menu add command -label FileBookmarks$display \
    -command "set bookmarks(subMenus) $newval; ::bookmarks::Refresh"
  set helpMessage($menu,3) FileBookmarks$display
  foreach tag [list Add File Edit $display] {
    configMenuText $menu FileBookmarks$tag FileBookmarks$tag $::language
  }
  if {$numBookmarkEntries == 0} { return }
  $menu add separator

  # Add each bookmark entry:
  set current $menu
  set inSubMenu 0
  set nfolders 0
  foreach entry $bookmarks(data) {
    if {$entry == ""} { continue }
    set isfolder [::bookmarks::isfolder $entry]

    if {$isfolder} {
      incr nfolders
      $menu.file add command -label [::bookmarks::Text $entry] \
        -command "::bookmarks::AddCurrent $nfolders"
    }

    if {! $bookmarks(subMenus)} {
      if {$isfolder} {
        $current add command -label [::bookmarks::IndexText $entry]
      } elseif {!$isfolder} {
        $current add command -label [::bookmarks::IndexText $entry] \
          -command [list ::bookmarks::Go $entry]
      }
      continue
    }

    # Move out of submenu where necessary:
    if {$isfolder  &&  $inSubMenu} {
      set current [winfo parent $current]
    }

    if {$isfolder} {
      # Menu (folder) entry:
      set current [::bookmarks::NewSubMenu $current $entry]
      set inSubMenu 1
    } else {
      # Bookmark entry:
      $current add command -label [::bookmarks::Text $entry] \
        -command [list ::bookmarks::Go $entry]
    }
  }
}

# ::bookmarks::CanAdd:
#   Returns 1 if the current game can be added as a bookmark.
#   It must be in an open database, not a PGN file, and not game number 0.
#
proc ::bookmarks::CanAdd {} {
  if {! [sc_base inUse]} { return 0 }
  if {[sc_game number] == 0} { return 0 }
  if {[sc_base current] == [sc_info clipbase]} { return 0 }
  if {[file pathtype [sc_base filename]] != "absolute"} { return 0 }
  foreach suffix {.pgn .PGN .pgn.gz} {
    if {[string match "*$suffix" [sc_base filename]]} { return 0 }
  }
  return 1
}

# ::bookmarks::AddCurrent:
#   Adds the current game to the bookmarks list.
#
proc ::bookmarks::AddCurrent {{folder 0}} {
  global bookmarks
  if {! [sc_base inUse]} {
    return
  }
  set text [::bookmarks::New game]
  set len [llength $bookmarks(data)]
  set fcount 0
  for {set i 0} {$i < $len} {incr i} {
    if {[::bookmarks::isfolder [lindex $bookmarks(data) $i]]} {
      if {$fcount == $folder} { break }
      incr fcount
    }
  }
  set bookmarks(data) [linsert $bookmarks(data) $i $text]
  ::bookmarks::Save
  ::bookmarks::Refresh
}

# ::bookmarks::New:
#   Returns a bookmarks list entry for the current game or a new folder.
#
proc ::bookmarks::New {type} {
  if {$type == "folder"} { return [list "f" ""] }
  set text "[file tail [sc_base filename]]: [sc_game info result], "
  append text "[::utils::string::Surname [sc_game info white]] - "
  append text "[::utils::string::Surname [sc_game info black]], "
  append text "[::utils::string::CityName [sc_game info site]] "
  set round [sc_game info round]
  if {$round != ""  &&  $round != "?"} { append text "($round) " }
  append text "[sc_game info year]"
  set list [list "g" $text]
  sc_game pgn
  lappend list [sc_base filename] [sc_game number] [sc_pos pgnOffset]
  lappend list [sc_game info white] [sc_game info black]
  lappend list [sc_game info year] [sc_game info site]
  lappend list [sc_game info round] [sc_game info result]
  return $list
}

# ::bookmarks::Go
#
#   Jumps to a selected bookmark.
#
proc ::bookmarks::Go {entry} {
  if {[::bookmarks::isfolder $entry]} { return }
  set fname [lindex $entry 2]
  set gnum [lindex $entry 3]
  set ply [lindex $entry 4]
  set slot [sc_base slot $fname]
  if {$slot != 0} {
    sc_base switch $slot
  } else {
    busyCursor .
    if {[catch {openBase [file rootname $fname]} result]} {
      unbusyCursor .
      tk_messageBox -icon warning -type ok -parent . \
        -title "Scid" -message "Unable to load the database:\n$fname\n\n$result"
      return
    }
    unbusyCursor .
    set ::glist 1
    ::recentFiles::add "[file rootname $fname].si3"
  }
  # Find and load the best database game matching the bookmark:
  set white [lindex $entry 5]
  set black [lindex $entry 6]
  set year  [lindex $entry 7]
  set site  [lindex $entry 8]
  set round [lindex $entry 9]
  set result [lindex $entry 10]

  set best [sc_game find $gnum $white $black $site $round $year $result]
  if {[catch {::game::Load $best}]} {
    tk_messageBox -icon warning -type ok -parent . \
      -title "Scid" -message "Unable to load game number: $best"
  } else {
    sc_move pgn $ply
    flipBoardForPlayerNames $::myPlayerNames
  }
  ::windows::gamelist::Refresh
  ::tree::refresh
  ::windows::stats::Refresh
  updateMenuStates
  updateBoard -pgn
  updateTitle
  updateStatusBar
}

# ::bookmarks::DeleteChildren
#
#   Deletes all submenus of a bookmark menu.
#
proc ::bookmarks::DeleteChildren {w} {
  foreach child [winfo children $w] {
    ::bookmarks::DeleteChildren $child
    destroy $child
  }
}

# ::bookmarks::NewSubMenu
#
#   Creates a new bookmark submenu.
#
proc ::bookmarks::NewSubMenu {w entry} {
  set i 1
  while {[winfo exists $w.m$i]} { incr i }
  $w add cascade -label [::bookmarks::Text $entry] -menu $w.m$i
  menu $w.m$i -tearoff 0
  return $w.m$i
}

# Globals used for bookmark editing:
#
set bookmarks(edit) ""
set bookmarks(ismenu) 0

# Button images for bookmark editing:

image create photo bookmark_up -data {
R0lGODdhGAAYAMIAALu7uwAAAMzM/5mZ/2ZmzP///zMzZgAAACwAAAAAGAAYAAADRgi63P4w
ykmrvTirEPQKwtBpYChmpUmMVVAI5kCsbfGqMy25dpzPLAfvNij+gBCDUokjLJUUQ9OAkRpn
1Mvz6el6v+AwOAEAOw==
}

image create photo bookmark_down -data {
R0lGODdhGAAYAMIAALu7uzMzZv///8zM/5mZ/2ZmzAAAAAAAACwAAAAAGAAYAAADSQi63P4w
ykmrvRiHzbcWw0AQRfCFY0l1ATiSLGQINCiSRZ4b0UyjOB1PMgvddIXhxABEKinM1C5jkD4v
1WSGYbhuv+CweExeJAAAOw==
}

# ::bookmarks::Edit
#
#   Creates the bookmark editing window.
#
proc ::bookmarks::Edit {} {
  global bookmarks
  set w .bmedit
  if {[winfo exists $w]} { return }
  set bookmarks(old) $bookmarks(data)
  toplevel $w
  wm title $w "Scid: [tr FileBookmarksEdit]"
  wm transient $w .
  bind $w <F1> {helpWindow Bookmarks}
  entry $w.e -width 40 -foreground black -background white \
    -textvariable bookmarks(edit) -font font_Small -exportselection 0
  bind $w.e <FocusIn>  {.bmedit.e configure -background lightYellow}
  bind $w.e <FocusOut> {.bmedit.e configure -background white}

  trace variable bookmarks(edit) w ::bookmarks::EditRefresh
  pack $w.e -side top -fill x
  pack [frame $w.b2] -side bottom -fill x
  pack [frame $w.b1] -side bottom -fill x
  pack [frame $w.f] -side top -fill both -expand 1
  listbox $w.f.list -width 50 -height 10 -yscrollcommand "$w.f.ybar set" \
    -fg black -bg white -exportselection 0 -font font_Small -setgrid 1
  scrollbar $w.f.ybar -takefocus 0 -command "$w.f.list yview"
  bind $w.f.list <<ListboxSelect>>  ::bookmarks::EditSelect
  pack $w.f.ybar -side right -fill y
  pack $w.f.list -side left -fill x -expand 1
  foreach entry $bookmarks(data) {
    $w.f.list insert end [::bookmarks::IndexText $entry]
  }
  dialogbutton $w.b1.newFolder -text "New submenu" \
    -command {::bookmarks::EditNew folder}
  dialogbutton $w.b1.newGame -text [tr FileBookmarksAdd] \
    -command {::bookmarks::EditNew game}
  if {! [::bookmarks::CanAdd]} { $w.b1.newGame configure -state disabled }
  dialogbutton $w.b1.delete -text $::tr(Delete)  -command ::bookmarks::EditDelete
  button $w.b2.up -image bookmark_up -command {::bookmarks::EditMove up}
  button $w.b2.down -image bookmark_down -command {::bookmarks::EditMove down}
  foreach i [list $w.b2.up $w.b2.down] {
    $i configure -padx 0 -pady 0 -borderwidth 1
  }
  dialogbutton $w.b2.ok -text "OK" -command ::bookmarks::EditDone
  dialogbutton $w.b2.cancel -text "Cancel" -command {
    set bookmarks(data) $bookmarks(old)
    catch {grab release .bmedit}
    destroy .bmedit
  }
  pack $w.b1.newFolder $w.b1.newGame $w.b1.delete -side left -padx 2 -pady 2
  pack $w.b2.up $w.b2.down -side left -padx 2 -pady 2
  pack $w.b2.cancel $w.b2.ok -side right -padx 2 -pady 2
  set bookmarks(edit) ""

  wm withdraw $w
  update idletasks
  set x [expr {[winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \
                 - [winfo vrootx .]}]
  set y [expr {[winfo screenheight $w]/2 - [winfo reqheight $w]/2 \
                 - [winfo vrooty .]}]
  wm geom $w +$x+$y
  wm deiconify $w
  update
  catch {grab .bmedit}
}

# ::bookmarks::EditDone
#
#    Updates the bookmarks and closes the bookmark editing window.
#
proc ::bookmarks::EditDone {} {
  catch {grab release .bmedit}
  destroy .bmedit
  ::bookmarks::Save
  ::bookmarks::Refresh
}

# ::bookmarks::EditRefresh
#
#   Updates the bookmarks whenever the contents of the bookmark
#   editing entry box are changed.
#
proc ::bookmarks::EditRefresh {args} {
  global bookmarks
  set list .bmedit.f.list
  set sel [lindex [$list curselection] 0]
  if {$sel == ""} { return }
  set text $bookmarks(edit)
  set e [lindex $bookmarks(data) $sel]
  set e [::bookmarks::SetText $e $text]
  set text [::bookmarks::IndexText $e]
  set bookmarks(data) [lreplace $bookmarks(data) $sel $sel $e]
  $list insert $sel $text
  $list delete [expr {$sel + 1} ]
  $list selection clear 0 end
  $list selection set $sel
}

# ::bookmarks::EditSelect
#
#   Sets the bookmark editing entry box when a bookmark is selected.
#
proc ::bookmarks::EditSelect {{sel ""}} {
  global bookmarks
  set list .bmedit.f.list
  set sel [lindex [$list curselection] 0]
  if {$sel == ""} {
    .bmedit.e delete 0 end
    return
  }
  if {$sel >= [llength $bookmarks(data)]} {
    $list selection clear 0 end
    set bookmarks(edit) ""
    return
  }
  set e [lindex $bookmarks(data) $sel]
  set bookmarks(ismenu) [::bookmarks::isfolder $e]
  set bookmarks(edit) [::bookmarks::Text $e]
}

# ::bookmarks::isfolder:
#   Returns 1 if this bookmark entry is a folder (submenu).
#
proc ::bookmarks::isfolder {entry} {
  if {[lindex $entry 0] == "f"} { return 1 }
  return 0
}

# ::bookmarks::Text:
#   Returns the entry text of a bookmark.
#
proc ::bookmarks::Text {entry} {
  return [lindex $entry 1]
}

proc ::bookmarks::IndexText {entry} {
  set text ""
  if {[lindex $entry 0] == "f"} {
    append text "\[[lindex $entry 1]\]"
  } else {
    append text "    [lindex $entry 1]"
  }
  return $text
}

proc ::bookmarks::SetText {entry text} {
  return [lreplace $entry 1 1 $text]
}

# ::bookmarks::EditMove
#
#   Moves the selected bookmark "up" or "down" one place.
#
proc ::bookmarks::EditMove {{dir "up"}} {
  global bookmarks
  set w .bmedit
  set list $w.f.list
  set sel [lindex [$list curselection] 0]
  if {$sel == ""} { return }
  set e [lindex $bookmarks(data) $sel]
  set text [::bookmarks::IndexText $e]
  set newsel $sel
  if {$dir == "up"} {
    incr newsel -1
    if {$newsel < 0} { return }
  } else {
    incr newsel
    if {$newsel >= [$list index end]} { return }
  }
  set bookmarks(data) [lreplace $bookmarks(data) $sel $sel]
  set bookmarks(data) [linsert $bookmarks(data) $newsel $e]
  $list selection clear 0 end
  $list delete $sel
  $list insert $newsel $text
  $list selection set $newsel
}

# ::bookmarks::EditDelete
#
#   Deletes the selected bookmark.
#
proc ::bookmarks::EditDelete {} {
  global bookmarks
  set w .bmedit
  set list $w.f.list
  set sel [lindex [$list curselection] 0]
  if {$sel == ""} { return }
  set bookmarks(data) [lreplace $bookmarks(data) $sel $sel]
  $list selection clear 0 end
  $list delete $sel
  set bookmarks(edit) ""
}

# ::bookmarks::EditNew
#
#   Inserts a new entry ("folder" for a submenu or "game" for the
#   current game) after the selected bookmark.
#
proc ::bookmarks::EditNew {{type "folder"}} {
  global bookmarks
  set w .bmedit
  set list $w.f.list
  set folder 0
  if {[string index $type 0] == "f"} {
    set folder 1
    set entry [::bookmarks::New folder]
  } else {
    set entry [::bookmarks::New game]
  }
  set sel [lindex [$list curselection] 0]
  if {$sel == ""} {
    lappend bookmarks(data) $entry
    set sel [$list index end]
    $list insert end [::bookmarks::IndexText $entry]
    $list selection clear 0 end
    $list selection set $sel
    $list see $sel
    ::bookmarks::EditSelect
    return
  }
  incr sel
  set bookmarks(data) [linsert $bookmarks(data) $sel $entry]
  $list insert $sel [::bookmarks::IndexText $entry]
  $list selection clear 0 end
  $list selection set $sel
  $list see $sel
  ::bookmarks::EditSelect
}

# ::bookmarks::Save
#
#   Saves the bookmarks file, reporting any error in a message box if
#   reportError is true.
#
proc ::bookmarks::Save {{reportError 0}} {
  global bookmarks
  set f {}
  set filename [scidConfigFile bookmarks]
  if  {[catch {open $filename w} f]} {
    if {$reportError} {
      tk_messageBox -title "Scid" -type ok -icon warning \
        -message "Unable to write bookmarks file: $filename\n$f"
    }
    return
  }
  puts $f "# Scid [sc_info version] bookmarks file\n"
  foreach i {subMenus data} {
    puts $f "set bookmarks($i) [list [set bookmarks($i)]]"
    puts $f ""
  }
  close $f
}


# End of file: bookmark.tcl

####################
# Recent files list:

set recentFiles(limit) 10   ;# Maximum number of recent files to remember.
set recentFiles(menu)   5   ;# Maximum number of files to show in File menu.
set recentFiles(extra)  5   ;# Maximum number of files to show in extra menu.
set recentFiles(data)  {}   ;# List of recently used files.

catch {source [scidConfigFile recentfiles]}

namespace eval ::recentFiles {}

# ::recentFiles::save
#   Saves the recent-file-list file, reporting any error in a message box
#   if reportError is true.
#
proc ::recentFiles::save {{reportError 0}} {
  global recentFiles
  set f {}
  set filename [scidConfigFile recentfiles]
  if  {[catch {open $filename w} f]} {
    if {$reportError} {
      tk_messageBox -title "Scid" -type ok -icon warning \
        -message "Unable to write file: $filename\n$f"
    }
    return
  }
  puts $f "# Scid [sc_info version] recent files list"
  puts $f ""
  foreach i {limit menu extra data} {
    puts $f "set recentFiles($i) [list [set recentFiles($i)]]"
    puts $f ""
  }
  close $f
}

# ::recentFiles::add
#   Adds a file to the recent files list, or moves it to the front
#   if that file is already in the list.
#
proc ::recentFiles::add {fname} {
  global recentFiles
  set rlist $recentFiles(data)

  # Remove file ot be added from its current place in the
  # list, if it is there:
  while {1} {
    set idx [lsearch -exact $rlist $fname]
    if {$idx < 0} { break }
    set rlist [lreplace $rlist $idx $idx]
  }

  # Insert the current file at the start of the list:
  set rlist [linsert $rlist 0 $fname]

  # Trim the list if necessary:
  if {[llength $rlist] < $recentFiles(limit)} {
    set rlist [lrange $rlist 0 [expr {$recentFiles(limit) - 1} ]]
  }

  set recentFiles(data) $rlist
  # ::recentFiles::save
}

# ::recentFiles::load
#   Loads the selected recent file, or swtches to its database slot
#   if it is already open.
#
proc ::recentFiles::load {fname} {
  set rname $fname
  if {[file extension $rname] == ".si3"} {
    set rname [file rootname $rname]
  }
  for {set i 1} {$i <= [sc_base count total]} {incr i} {
    if {$rname == [sc_base filename $i]} {
      sc_base switch $i
      ::recentFiles::add $fname
      ::windows::gamelist::Refresh
      ::tree::refresh
      ::windows::stats::Refresh
      updateMenuStates
      updateBoard -pgn
      updateTitle
      updateStatusBar
      return
    }
  }
  ::file::Open $fname
}

# ::recentFiles::show
#   Adds the recent files to the end of the specified menu.
#   Returns the number of menu entries added.
#
proc ::recentFiles::show {menu} {
  global recentFiles
  set idx [$menu index end]
  incr idx
  set rlist $recentFiles(data)
  set nfiles [llength $rlist]
  set nExtraFiles [expr {$nfiles - $recentFiles(menu)} ]
  if {$nfiles > $recentFiles(menu)} { set nfiles $recentFiles(menu) }
  if {$nExtraFiles > $recentFiles(extra)} {
    set nExtraFiles $recentFiles(extra)
  }
  if {$nExtraFiles < 0} { set nExtraFiles 0 }

  # Add menu commands for the most recent files:

  for {set i 0} {$i < $nfiles} {incr i} {
    set fname [lindex $rlist $i]
    set mname [::recentFiles::menuname $fname]
    set text [file tail $fname]
    set num [expr {$i + 1} ]
    set underline -1
    if {$num <= 9} { set underline 0 }
    if {$num == 10} { set underline 1 }
    $menu add command -label "$num: $mname" -underline $underline \
      -command [list ::recentFiles::load $fname]
    set ::helpMessage($menu,$idx) "  [file nativename $fname]"
    incr idx
  }

  # If no extra submenu of recent files is needed, return now:
  if {$nExtraFiles <= 0} { return $nfiles }

  # Now add the extra submenu of files:
  catch {destroy $menu.recentFiles}
  menu $menu.recentFiles
  $menu add cascade -label "..." -underline 0 -menu $menu.recentFiles
  set i $nfiles
  for {set extra 0} {$extra < $nExtraFiles} {incr extra} {
    set fname [lindex $rlist $i]
    incr i
    set mname [::recentFiles::menuname $fname]
    set text [file tail $fname]
    set num [expr {$extra + 1} ]
    set underline -1
    if {$num <= 9} { set underline 0 }
    if {$num == 10} { set underline 1 }
    $menu.recentFiles add command -label "$num: $mname" -underline $underline \
      -command [list ::recentFiles::load $fname]
    set ::helpMessage($menu.recentFiles,$extra) "  $fname"
  }
  return [expr {$nfiles + 1} ]
}

# ::recentFiles::menuname
#   Given a full-path filename, returns a possibly shortened
#   version suitable for displaying in a menu, such as
#   "..../my/files/abc.pgn" instead of "/long/path/to/my/files/abc.pgn"
#
proc ::recentFiles::menuname {fname} {
  set mname $fname
  set mname [file nativename $mname]
  if {[file extension $mname] == [sc_info suffix index]} {
    set mname [file rootname $mname]
  }
  if {[string length $mname] < 25} { return $mname }

  # Generate a menu name " ..../path/filename" for the file:
  set dir [file dirname $fname]
  while {1} {
    set tail [file join [file tail $dir] $mname]
    set dir [file dirname $dir]
    if {[string length $tail] > 20} { break }
    set mname $tail
  }
  set mname [file join .... $mname]
  set mname [file nativename $mname]
  return $mname
}

# ::recentFiles::configure
#   Produces a dialog box for configuring the number of recent files
#   to display in the File menu and in a submenu.
#
proc ::recentFiles::configure {} {
  global recentFiles
  set recentFiles(temp_menu) $recentFiles(menu)
  set recentFiles(temp_extra) $recentFiles(extra)
  set w .recentFilesDlg
  toplevel $w
  wm title $w "Scid: [tr OptionsRecent]"
  label $w.lmenu -text $::tr(RecentFilesMenu)
  scale $w.menu -variable recentFiles(temp_menu) -from 0 -to 10 -length 250 \
    -orient horizontal -showvalue 0 -tickinterval 1 -font font_Small
  frame $w.sep -height 4
  label $w.lextra -text $::tr(RecentFilesExtra)
  scale $w.extra -variable recentFiles(temp_extra) -from 0 -to 10 -length 250 \
    -orient horizontal -showvalue 0 -tickinterval 1 -font font_Small
  pack $w.lmenu $w.menu $w.sep $w.lextra $w.extra -side top -padx 10
  addHorizontalRule $w
  pack [frame $w.b] -side bottom
  button $w.b.ok -text "OK" -command {
    set recentFiles(menu) $recentFiles(temp_menu)
    set recentFiles(extra) $recentFiles(temp_extra)
    catch {grab release .recentFilesDlg}
    destroy .recentFilesDlg
    ::recentFiles::save
    updateMenuStates
  }
  button $w.b.cancel -text $::tr(Cancel) \
    -command "catch {grab release $w}; destroy $w"
  pack $w.b.cancel $w.b.ok -side right -padx 5 -pady 5
  catch {grab $w}
}

# epd.tcl: EPD editing windows for Scid.
# Copyright (C) 2000  Shane Hudson

set maxEpd [sc_info limit epd]

proc storeEpdText {id} {
  sc_epd set $id [.epd$id.text get 1.0 "end-1c"]
}

proc storeEpdTexts {} {
  global maxEpd
  for {set i 1} {$i <= $maxEpd} {incr i} {
    if {[winfo exists .epd$i]} { storeEpdText $i }
  }
}

proc updateEpdWin {id} {
  set w .epd$id
  $w.text delete 1.0 end
  $w.text insert end [sc_epd get $id]

  # Update the EPD window status bar:
  set str "  --  "
  if {[sc_epd readonly $id]} {
    set str "  %%  "
  } elseif {[sc_epd altered $id]} {
    set str "  XX  "
  }
  append str "[file tail [sc_epd name $id]]  [sc_epd size $id] positions"
  set moves [lsort -ascii [sc_epd moves $id]]
  set len [llength $moves]
  if {$len} {
    append str "  \[[llength $moves]: [join $moves " "]\]"
  } else {
    append str {  [No moves from this position]}
  }
  $w.status configure -text $str
  unset str
}

proc updateEpdWins {} {
  global maxEpd
  for {set i 1} {$i <= $maxEpd} {incr i} {
    if {[winfo exists .epd$i]} { updateEpdWin $i }
  }
}

proc closeEpdWin {id} {
  catch {sc_epd close $id}
}

proc confirmCloseEpd {id} {
  if {! [winfo exists .epd$id]} { return }
  storeEpdText $id
  if {[sc_epd altered $id]  &&  ! [sc_epd readonly $id]} {
    set result [tk_dialog .dialog "Save changes?" \
      "This file has been altered; do you want to save it?" \
      "" 0 "Save changes" "Close without saving" "Cancel"]
    if {$result == 2} { return }
    if {$result == 0} { sc_epd write $id }
  }
  sc_epd close $id
  focus .
  destroy .epd$id
  return
}

proc saveEpdWin {id} {
  set w .epd$id
  busyCursor . 1
  set temp_oldcursor [$w.text cget -cursor]
  $w.text configure -cursor watch
  update idletasks
  storeEpdText $id
  sc_epd write $id
  updateEpdWin $id
  $w.text configure -cursor $temp_oldcursor
  busyCursor . 0
}

proc epd_MoveToDeepestMatch {id} {
  if {! [winfo exists .epd$id]} { return }
  sc_move ply [sc_epd deepest $id]
  updateBoard
  return
}

proc newEpdWin {cmd {fname ""}} {
  global maxEpd
  set showErrors 1
  if {$cmd == "openSilent"} { set showErrors 0 }
  if {$fname == ""} { set showErrors 1 }
  if {[sc_epd available] < 1} {
    if {$showErrors} {
      tk_messageBox -type ok -icon info -title "Too many EPD files open" \
        -message "You already have $maxEpd EPD files open; close one first."
    }
    return 0
  }
  set new_types { {"EPD files" {".epd"} } }
  set open_types $new_types
  if {[sc_info gzip]} {
    set open_types { {"EPD files" {".epd" ".epd.gz"} } }
  }
  if {$fname == ""} {
    if {$cmd == "create"} {
      set fname [tk_getSaveFile -initialdir $::initialDir(epd) -filetypes $new_types -title "Create an EPD file"]
    } elseif {$cmd == "open"} {
      set fname [tk_getOpenFile -initialdir $::initialDir(epd) -filetypes $open_types -title "Open an EPD file"]
    } else { return 0 }
  }
  if {$fname == ""} { return 0 }

  busyCursor . 1
  if {[catch {sc_epd $cmd $fname} result]} {
    if {$showErrors} {
      busyCursor . 0
      tk_messageBox -type ok -icon error -title "Scid: EPD file error" \
        -message $result
    }
    return 0
  }
  busyCursor . 0
  set id $result
  set w .epd$id
  toplevel $w
  wm title $w "Scid EPD: [file tail $fname]"
  wm minsize $w 40 1
  bind $w <Destroy> "closeEpdWin $id"
  bind $w <F1> { helpWindow EPD }

  frame $w.grid
  text $w.text -background white -font font_Regular -width 60 -height 7 \
    -wrap none -setgrid 1 -yscrollcommand "$w.ybar set" \
    -xscrollcommand "$w.xbar set"
  scrollbar $w.ybar -takefocus 0 -command "$w.text yview"
  scrollbar $w.xbar -orient horizontal -takefocus 0 -command "$w.text xview"
  label $w.status -width 1 -anchor w -font font_Small -relief sunken

  frame $w.menu -borderwidth 3 -relief raised
  pack $w.menu  -side top -fill x
  menubutton $w.menu.file -text File -menu $w.menu.file.m -underline 0
  menubutton $w.menu.edit -text Edit -menu $w.menu.edit.m -underline 0
  menubutton $w.menu.tools -text Tools -menu $w.menu.tools.m -underline 0
  menubutton $w.menu.help -text Help -menu $w.menu.help.m -underline 0

  foreach i {file edit tools help} {
    menu $w.menu.$i.m -tearoff 0
    pack $w.menu.$i -side left
  }

  set m $w.menu.file.m
  $m add command -label "New" -acc "Ctrl+N" -underline 0 \
    -command {newEpdWin create}
  bind $w <Control-n> {newEpdWin create}
  $m add command -label "Open" -acc "Ctrl+O" -underline 0 \
    -command {newEpdWin open}
  bind $w <Control-o> {newEpdWin open}
  $m add command -label "Save" -acc "Ctrl+S" -underline 0 \
    -command "saveEpdWin $id"
  if {[sc_epd readonly $id]} {
    $m entryconfig "Save" -state disabled
  } else {
    bind $w <Control-s> "saveEpdWin $id; break"
  }
  $m add command -label "Close" -acc "Ctrl+Q" -underline 0 \
    -command "confirmCloseEpd $id"
  bind $w <Control-q> "confirmCloseEpd $id"

  set m $w.menu.edit.m
  $m add command -label "Cut" -acc "Ctrl+X" -underline 2 -command "tk_textCut $w.text"
  bind $w <Control-x> "tk_textCut $w.text; break"
  $m add command -label "Copy" -acc "Ctrl+C" -underline 0 -command "tk_textCopy $w.text"
  bind $w <Control-c> "tk_textCopy $w.text; break"
  $m add command -label "Paste" -acc "Ctrl+V" -underline 0 -command "tk_textPaste $w.text"
  bind $w <Control-v> "tk_textPaste $w.text; break"
  $m add command -label "Select All" -acc "Ctrl+A" -underline 7 \
    -command "$w.text tag add sel 1.0 end"
  bind $w <Control-a> "$w.text tag add sel 1.0 end; break"
  $m add separator
  $m add command -label "Revert" -acc "Ctrl+R" -underline 0 \
    -command "updateEpdWin $id"
  bind $w <Control-r> "updateEpdWin $id; break"
  $m add command -label "Sort lines" -accel "Ctrl+Shift+S" \
    -underline 0 -command "epd_sortLines $w.text"
  bind $w <Control-S> "epd_sortLines $w.text; break"

  set m $w.menu.tools.m
  $m add command -label "Find Deepest game position" \
    -underline 5 -command "epd_MoveToDeepestMatch $id"
  $m add separator
  $m add command -label "Next position in file" \
    -accelerator "Ctrl+DownArrow" -underline 0 \
    -command "sc_epd next $id; updateBoard -pgn"
  bind $w <Control-Down> "sc_epd next $id; updateBoard -pgn; break"
  $m add command -label "Previous position in file" \
    -accelerator "Ctrl+UpArrow" -underline 0 \
    -command "sc_epd prev $id; updateBoard -pgn"
  bind $w <Control-Up> "sc_epd prev $id; updateBoard -pgn; break"
  $m add separator
  $m add command -label "Paste analysis" -accelerator "Ctrl+Shift+A" \
    -underline 6 -command "epd_pasteAnalysis $w.text"
  bind $w <Control-A> "epd_pasteAnalysis $w.text; break"
  $m add separator
  $m add command -label "Strip out EPD field" -underline 0 \
    -command "epd_chooseStripField $id"

  $w.menu.help.m add command -label "EPD files help" -underline 0 \
    -acc "F1" -command "helpWindow EPD"
  $w.menu.help.m add command -label "General index" -underline 0 \
    -command "helpWindow Index"

  pack $w.status -side bottom -fill x
  pack $w.grid -fill both -expand yes
  grid $w.text -in $w.grid -row 0 -column 0 -sticky news
  grid $w.ybar -in $w.grid -row 0 -column 1 -sticky news
  grid $w.xbar -in $w.grid -row 1 -column 0 -sticky news

  grid rowconfig $w.grid 0 -weight 1 -minsize 0
  grid columnconfig $w.grid 0 -weight 1 -minsize 0

  # Right-mouse button cut/copy/paste menu:
  menu $w.text.edit -tearoff 0
  $w.text.edit add command -label "Cut"  -command "tk_textCut $w.text"
  $w.text.edit add command -label "Copy" -command "tk_textCopy $w.text"
  $w.text.edit add command -label "Paste" -command "tk_textPaste $w.text"
  bind $w.text <ButtonPress-3> "tk_popup $w.text.edit %X %Y"

  updateEpdWin $id
  return 1
}


proc epd_sortLines {textwidget} {
  if {! [winfo exists $textwidget]} { return }
  set text [$textwidget get 1.0 "end-1c"]
  set fieldlist [split $text "\n"]
  set sortedlist [lsort $fieldlist]
  while {[lindex $sortedlist 0] == ""} {
    set sortedlist [lrange $sortedlist 1 end]
  }
  set newtext [join $sortedlist "\n"]
  append newtext "\n"
  if {! [string compare $text $newtext]} { return }
  $textwidget delete 1.0 end
  $textwidget insert end "$newtext"
}

# epd_pasteAnalysis:
#    Pastes current chess engine analysis into this EPD file position.
proc epd_pasteAnalysis {textwidget} {
  global analysis
  if {! [winfo exists $textwidget]} { return }
  if {! [winfo exists .analysisWin1]} { return }
  $textwidget insert insert "acd $analysis(depth1)\n"
  $textwidget insert insert "acn $analysis(nodes1)\n"
  set ce [expr {int($analysis(score1) * 100)} ]
  if {[sc_pos side] == "black"} { set ce [expr {0 - $ce} ] }
  $textwidget insert insert "ce $ce\n"
  $textwidget insert insert "pv $analysis(moves1)\n"
}


set epd_stripField ""

proc epd_chooseStripField {id} {
  global epd_stripField
  if {! [winfo exists .epd$id]} { return }
  set w [toplevel .epdStrip]
  wm title $w "Scid: Strip EPD field"
  wm resizable $w false false
  label $w.label -text "Enter the name of the EPD field you want\n\
removed from all positions in this file:"
  entry $w.e -width 10 -background white -textvariable epd_stripField
  pack $w.label $w.e -side top -pady 5 -padx 5
  addHorizontalRule $w
  set b [frame $w.buttons]
  pack $b -side bottom -pady 5
  button $b.ok -text "Strip EPD field" \
    -command "epd_stripEpdField $id \$epd_stripField"
  button $b.cancel -text "Cancel" -command "focus .epd$id; destroy $w"
  pack $b.ok $b.cancel -side left -padx 5
  bind $w <Return> "$b.ok invoke"
  bind $w <Escape> "$b.cancel invoke"
  focus .epdStrip.e
  grab .epdStrip
}

proc epd_stripEpdField {id field} {
  if {! [winfo exists .epdStrip]} { return }
  if {! [string compare $field ""]} { beep; return }
  set result [sc_epd strip $id $field]
  updateEpdWin $id
  tk_messageBox -type ok -icon info -title "Scid: EPD field stripped" \
    -message "Scid found and stripped an EPD field named \"$field\" from\
$result positions."
  focus .epd$id
  destroy .epdStrip
}
### spellchk.tcl
### Part of Scid.
### Copyright (C) 2000-2003 Shane Hudson.

set spellcheckType Player
set spell_maxCorrections 2000
set spellcheckSurnames 0
set spellcheckAmbiguous 1

# readSpellCheckFile:
#    Presents a File Open dialog box for a Scid spellcheck file,
#    then tries to read the file. If the parameter "message" is true
#    (which is the default), a message box indicating the results
#    is displayed.
#
proc readSpellCheckFile {{message 1}} {
  global spellCheckFile
  set ftype { { "Scid Spellcheck files" {".ssp" ".ssp.gz"} } }
  set fullname [tk_getOpenFile -initialdir [pwd] -filetypes $ftype -title "Open Spellcheck file"]
  if {![string compare $fullname ""]} { return 0 }

  if {[catch {sc_name read $fullname} result]} {
      if {$message} {
        tk_messageBox -title "ERROR: Unable to read file" -type ok \
          -icon error -message "Scid could not correctly read the spellcheck file you selected:\n\n$result"
      }
    return 0
  }
  set spellCheckFile $fullname
  if {$message} {
    tk_messageBox -title "Spellcheck file loaded." -type ok -icon info \
      -message "Spellcheck file [file tail $fullname] loaded:\n[lindex $result 0] players, [lindex $result 1] events, [lindex $result 2] sites, [lindex $result 3] rounds.\n\nTo have this file automatically loaded every time you start Scid, select the \"Save Options\" from the Options menu before exiting."
  }
  return 1
}

proc updateSpellCheckWin {type} {
  global spellcheckType spell_maxCorrections spellcheckSurnames
  global spellcheckAmbiguous
  busyCursor .
  .spellcheckWin.text.text delete 1.0 end
  #.spellcheckWin.text.text insert end "Finding player corrections..."
  update idletasks
  catch {sc_name spellcheck -max $spell_maxCorrections \
           -surnames $spellcheckSurnames \
           -ambiguous $spellcheckAmbiguous $type} result
  .spellcheckWin.text.text delete 1.0 end
  .spellcheckWin.text.text insert end $result
  unbusyCursor .
}

proc openSpellCheckWin {type {parent .}} {
  global spellcheckType spell_maxCorrections spellcheckSurnames
  global spellcheckAmbiguous
  set w .spellcheckWin
  if {[winfo exists $w]} {
    tk_messageBox -type ok -icon info -title "Scid: Spellcheck error" \
      -parent $parent \
      -message "The spellcheck window is already open; close it first."
    return
  }
  if {[lindex [sc_name read] 0] == 0} {
    # No spellcheck file loaded, so try to open one:
    if {![readSpellCheckFile]} {
      return
    }
  }
  busyCursor .
  if {[catch {sc_name spellcheck -max $spell_maxCorrections \
                -surnames $spellcheckSurnames \
                -ambiguous $spellcheckAmbiguous $type} result]} {
    unbusyCursor .
    tk_messageBox -type ok -icon info -title "Scid: Spellcheck results" \
      -parent $parent -message $result
    return
  }
  unbusyCursor .
  set spellcheckType $type

  toplevel $w
  wm title $w "Scid: Spellcheck Results"
  wm minsize $w 50 10

  bind $w <F1> { helpWindow Maintenance }
  bind $w <Configure> "recordWinSize $w"

  set f [frame $w.buttons]
  pack $f -side bottom -ipady 1 -fill x

  checkbutton $f.ambig -variable spellcheckAmbiguous -relief raised \
    -text "Ambiguous" -command "updateSpellCheckWin $type"
  pack $f.ambig -side left -padx 2 -ipady 2 -ipadx 3
  if {$type == "Player"} {
    checkbutton $f.surnames -variable spellcheckSurnames -relief raised \
      -text "Surnames" -command "updateSpellCheckWin Player"
    pack $f.surnames -side left -padx 2 -ipady 2 -ipadx 3
  }

  button $f.ok -text "Make Corrections" -underline 0 -command {
    busyCursor .
    set spelltext ""
    catch {set spelltext [.spellcheckWin.text.text get 1.0 end-1c]}
    .spellcheckWin.text.text delete 1.0 end
    .spellcheckWin.text.text insert end \
      "Scid is making the spelling corrections.\nPlease wait..."
    update idletasks
    set spell_result ""
    set result [catch {sc_name correct $spellcheckType $spelltext} spell_result]
    set messageIcon info
    if {$result} { set messageIcon error }
    tk_messageBox -type ok -parent .spellcheckWin -icon $messageIcon \
      -title "Scid: Spellcheck results" -message $spell_result
    unbusyCursor .
    focus .
    destroy .spellcheckWin
    sc_game tags reload
    updateBoard -pgn
    ::windows::gamelist::Refresh
  }
  bind $w <Alt-m> "$f.ok invoke; break"

  button $f.cancel -text "Cancel" -underline 0 -command {
    focus .
    destroy .spellcheckWin
  }
  bind $w <Alt-c> "$f.cancel invoke; break"

  pack $f.cancel $f.ok -side right -padx 5

  set f [frame $w.text]
  pack $w.text -expand yes -fill both
  scrollbar $f.ybar -command "$f.text yview"
  scrollbar $f.xbar -orient horizontal -command "$f.text xview"
  text $f.text -yscrollcommand "$f.ybar set" -xscrollcommand "$f.xbar set" \
    -setgrid 1 -width $::winWidth($w) -height $::winHeight($w) \
    -background white -wrap none
  $f.text configure -tabs \
    [font measure font_Regular  "xxxxxxxxxxxxxxxxxxxxxxxxx"]

  grid $f.text -row 0 -column 0 -sticky news
  grid $f.ybar -row 0 -column 1 -sticky news
  grid $f.xbar -row 1 -column 0 -sticky news

  grid rowconfig $w.text 0 -weight 1 -minsize 0
  grid columnconfig $w.text 0 -weight 1 -minsize 0

  $f.text insert end $result
  focus $f.text
}


# maint.tcl:   Maintenance-related functions
# Part of Scid.
# Copyright (C) 2000-2004 Shane Hudson.

namespace eval ::maint {}

### TODO: Move procedures and variables into the maint namespace.
### TODO: Make sub-namespaces (sort, compact, cleaner, etc)


# ::maint::SetGameFlags
#
#   Updates a flag for the current game, all filtered games, or all games.
#   <type> should be "current", "filter" or "all".
#   <flag> should be "delete", "user", "endgame", etc.
#   <value> should be 0 or 1
#
proc ::maint::SetGameFlags {flag type value} {
  if {$flag == "mark"} { set flag $::maintFlag }
  switch -- $type {
    "current" {
      busyCursor .
      catch {sc_game flag $flag [sc_game number] $value}
      unbusyCursor .
    }
    "filter" -
    "all" {
      busyCursor .
      catch {sc_game flag $flag $type $value}
      unbusyCursor .
    }
    default { return }
  }
  updateBoard
  ::windows::gamelist::Refresh
  ::maint::Refresh
  ::windows::stats::Refresh
}

set maintFlag W
set maintFlaglist {W B M E N P T Q K ! ? U}
array set maintFlags {
  W WhiteOpFlag
  B BlackOpFlag
  M MiddlegameFlag
  E EndgameFlag
  N NoveltyFlag
  P PawnFlag
  T TacticsFlag
  Q QsideFlag
  K KsideFlag
  ! BrilliancyFlag
  ? BlunderFlag
  U UserFlag
}


set maintWin 0

# ::maint::OpenClose
#
#   Creates the database maintenance window.
#
proc ::maint::OpenClose {} {
  global maintWin maintFlag maintFlags maintFlaglist
  set w .maintWin
  if {[winfo exists $w]} {
    destroy $w
    set maintWin 0
    return
  }
  set maintWin 1
  set font font_Small
  set bold font_SmallBold
  toplevel $w
  wm title $w "Scid: [tr FileMaint]"
  wm resizable $w 0 0
  bind $w <F1> {helpWindow Maintenance}
  bind $w <Escape> "destroy $w; break"
  bind $w <Destroy> {set maintWin 0}
  foreach f {title delete mark spell db buttons} {
    frame $w.$f
  }
  foreach f {title delete mark spell db} {
    pack $w.$f -side top -fill x
    addHorizontalRule $w
  }
  pack $w.buttons -side top -fill x

  label $w.title.name -textvar ::tr(DatabaseName) -font font_Bold
  label $w.title.games -textvar ::tr(NumOfGames) -font font_SmallBold
  label $w.title.icon -textvar ::tr(TypeIcon)
  label $w.title.delete -textvar ::tr(NumDeletedGames) -font $font
  label $w.title.mark -font $font
  label $w.title.filter -textvar ::tr(NumFilterGames) -font $font
  label $w.title.dates -textvar ::tr(YearRange) -font $font
  label $w.title.ratings -textvar ::tr(RatingRange) -font $font
  button $w.title.vicon -command {changeBaseType [sc_base current]}
  frame $w.title.desc
  label $w.title.desc.lab -text $::tr(Description:) -font font_SmallBold
  label $w.title.desc.text -width 1 -font $font -relief sunken -anchor w
  button $w.title.desc.edit -text "[tr Edit]..." -font $font \
    -command ::maint::ChangeBaseDescription
  pack $w.title.desc.lab -side left
  pack $w.title.desc.edit -side right -padx 2
  pack $w.title.desc.text -side left -fill x -expand yes

  foreach name {name games delete mark filter dates ratings} {
    label $w.title.v$name -text "0" -font $font
  }

  set row 0
  set col 0
  foreach name {name icon games filter delete mark dates ratings} {
    grid $w.title.$name -row $row -column $col -sticky w
    incr col
    grid $w.title.v$name -row $row -column $col -sticky e
    incr col
    if {$col == 2} { incr col }
    if {$col >= 5} { set col 0; incr row }
  }
  grid [label $w.title.space -text "   "] -row 0 -column 2
  $w.title.vname configure -font font_Bold
  $w.title.vgames configure -font font_SmallBold
  grid $w.title.desc -row $row -column 0 -columnspan 5 -sticky we

  foreach grid {title delete mark spell db} cols {5 3 3 4 3} {
    for {set i 0} {$i < $cols} {incr i} {
      grid columnconfigure $w.$grid $i -weight 1
    }
  }

  label $w.delete.title -textvar ::tr(DeleteFlag) -font $bold
  menubutton $w.mark.title -menu $w.mark.title.m \
    -indicatoron 1 -relief raised -font $bold
  menu $w.mark.title.m -font $font
  foreach i $maintFlaglist  {
    $w.mark.title.m add command -label "$::tr($maintFlags($i)) ($i)" \
      -command "set maintFlag $i; ::maint::Refresh"
  }
  foreach flag {delete mark} on {Delete Mark} off {Undelete Unmark} {
    foreach b {Current Filter All} {
      button $w.$flag.on$b -textvar "::tr($on$b)" -font $font \
        -command "::maint::SetGameFlags $flag [string tolower $b] 1"
      button $w.$flag.off$b -textvar "::tr($off$b)" -font $font \
        -command "::maint::SetGameFlags $flag [string tolower $b] 0"
    }

    grid $w.$flag.title -columnspan 3 -row 0 -column 0 -sticky n
    grid $w.$flag.onCurrent -row 1 -column 0 -sticky we
    grid $w.$flag.offCurrent -row 2 -column 0 -sticky we
    grid $w.$flag.onFilter -row 1 -column 1 -sticky we
    grid $w.$flag.offFilter -row 2 -column 1 -sticky we
    grid $w.$flag.onAll -row 1 -column 2 -sticky we
    grid $w.$flag.offAll -row 2 -column 2 -sticky we
  }

  label $w.spell.title -textvar ::tr(Spellchecking) -font $bold
  grid $w.spell.title -columnspan 4 -row 0 -column 0 -sticky n
  button $w.spell.player -textvar ::tr(Players...) -font $font \
    -command "openSpellCheckWin Player $w"
  button $w.spell.event -textvar ::tr(Events...) -font $font \
    -command "openSpellCheckWin Event $w"
  button $w.spell.site -textvar ::tr(Sites...) -font $font \
    -command "openSpellCheckWin Site $w"
  button $w.spell.round -textvar ::tr(Rounds...) -font $font \
    -command "openSpellCheckWin Round $w"
  grid $w.spell.player -row 1 -column 0 -sticky we
  grid $w.spell.event -row 1 -column 1 -sticky we
  grid $w.spell.site -row 1 -column 2 -sticky we
  grid $w.spell.round -row 1 -column 3 -sticky we

  bind $w <Alt-p> "$w.spell.player invoke"
  bind $w <Alt-e> "$w.spell.event invoke"
  bind $w <Alt-s> "$w.spell.site invoke"
  bind $w <Alt-r> "$w.spell.round invoke"

  label $w.db.title -textvar ::tr(DatabaseOps) -font $bold
  grid $w.db.title -columnspan 3 -row 0 -column 0 -sticky n

  button $w.db.eco -textvar ::tr(ReclassifyGames...) -command classifyAllGames
  button $w.db.compact -textvar ::tr(CompactDatabase...) -command makeCompactWin
  button $w.db.sort -textvar ::tr(SortDatabase...) -command makeSortWin
  button $w.db.elo -textvar ::tr(AddEloRatings...) -command allocateRatings
  button $w.db.dups -textvar ::tr(DeleteTwins...) -command "markTwins $w"
  button $w.db.cleaner -textvar ::tr(Cleaner...) -command cleanerWin
  button $w.db.autoload -textvar ::tr(AutoloadGame...) -command ::maint::SetAutoloadGame
  button $w.db.strip -textvar ::tr(StripTags...) -command stripTags

  foreach i {eco compact sort elo dups cleaner autoload strip} {
    $w.db.$i configure -font $font
  }
  bind $w <Alt-d> "$w.db.dups invoke"

  grid $w.db.eco -row 1 -column 0 -sticky we
  grid $w.db.compact -row 1 -column 1 -sticky we
  grid $w.db.sort -row 1 -column 2 -sticky we
  grid $w.db.elo -row 2 -column 0 -sticky we
  grid $w.db.dups -row 2 -column 1 -sticky we
  grid $w.db.cleaner -row 2 -column 2 -sticky we
  grid $w.db.autoload -row 3 -column 0 -sticky we
  grid $w.db.strip -row 3 -column 1 -sticky we

  dialogbutton $w.buttons.help -textvar ::tr(Help) -command {helpWindow Maintenance}
  dialogbutton $w.buttons.close -textvar ::tr(Close) -command "destroy $w"
  packbuttons right $w.buttons.close $w.buttons.help
  bind $w <Alt-h> "$w.buttons.help invoke"
  bind $w <Alt-c> "destroy $w; break"
  standardShortcuts $w
  ::maint::Refresh
}

proc ::maint::ChangeBaseDescription {} {
  set w .bdesc
  if {[winfo exists $w]} { return }
  toplevel $w
  wm title $w "Scid: $::tr(Description): [file tail [sc_base filename]]"
  set font font_Small
  entry $w.entry -width 50 -relief sunken -background white
  $w.entry insert end [sc_base description]
  pack $w.entry -side top -pady 4
  frame $w.b
  button $w.b.ok -text OK -command {
    catch {sc_base description [.bdesc.entry get]}
    grab release .bdesc
    destroy .bdesc
    ::maint::Refresh
  }
  button $w.b.cancel -text $::tr(Cancel) -command "grab release $w; destroy $w"
  pack $w.b -side bottom -fill x
  pack $w.b.cancel $w.b.ok -side right -padx 2 -pady 2
  wm resizable $w 0 0
  catch {grab $w}
}


proc ::maint::Refresh {} {
  global maintFlag maintFlags
  updateSortWin
  updateClassifyWin

  set w .maintWin
  if {![winfo exists $w]} { return }
  set ng [sc_base numGames]
  set deleted [sc_base stats flag:D]
  set marked [sc_base stats "flag:$maintFlag"]
  set flags [sc_base stats flags]
  set dates [sc_base stats date]
  set ratings [sc_base stats ratings]
  $w.title.vgames configure -text [::utils::thousands $ng]
  $w.title.vicon configure -image dbt[sc_base type [sc_base current]]
  $w.title.vname configure -text [file tail [sc_base filename]]
  $w.title.vdelete configure -text [::utils::percentFormat $deleted $ng]
  $w.title.vmark configure -text [::utils::percentFormat $marked $ng]
  $w.title.vfilter configure -text [::utils::percentFormat [sc_filter count] $ng]
  $w.title.vdates configure \
    -text "[lindex $dates 0]-[lindex $dates 1] ([lindex $dates 2])"
  $w.title.vratings configure \
    -text "[lindex $ratings 0]-[lindex $ratings 1] ([lindex $ratings 2])"

  set flagname "$::tr(Flag): $::tr($maintFlags($maintFlag)) ($maintFlag)"
  $w.mark.title configure -text $flagname
  $w.title.mark configure -text $flagname
  $w.title.desc.text configure -text [sc_base description]

  # Disable buttons if current base is closed or read-only:
  set state disabled
  if {[sc_base inUse]  &&  ![sc_base isReadOnly]} {
    set state normal
  }
  foreach spell {player event site round} {
    $w.spell.$spell configure -state $state
  }
  foreach button {onCurrent offCurrent onAll offAll onFilter offFilter} {
    $w.delete.$button configure -state $state
    $w.mark.$button configure -state $state
  }
  $w.db.dups configure -state $state
  $w.title.vicon configure -state $state
  $w.title.desc.edit configure -state $state
  $w.db.elo configure -state $state
  $w.db.autoload configure -state $state

  set state disabled
  if {[sc_base inUse]} { set state normal }
  $w.db.eco configure -state $state
  $w.db.sort configure -state $state
  $w.db.strip configure -state $state

  set state disabled
  if {[baseIsCompactable]} {
    set state normal
  }
  $w.db.compact configure -state $state
  $w.db.cleaner configure -state $state
}


set autoloadGame 0
trace variable autoloadGame w {::utils::validate::Integer 9999999 0}

# ::maint::SetAutoloadGame
#
#   Creates a dialog for setting the autoload game number of the
#   current database.
#
proc ::maint::SetAutoloadGame {} {
  global autoloadGame
  set w .autoload
  if {[winfo exists $w]} { return }
  toplevel $w
  wm title $w "Scid"
  set autoloadGame [sc_base autoload]

  pack [frame $w.f] -side top
  label $w.f.label -text $::tr(AutoloadGame:)
  entry $w.f.entry -textvar autoloadGame -justify right -width 10 \
    -foreground black -background white
  pack $w.f.label $w.f.entry -side left

  pack [frame $w.set] -side top -fill x
  button $w.set.none -text $::tr(None) -command {set autoloadGame 0}
  button $w.set.first -text $::tr(First) -command {set autoloadGame 1}
  button $w.set.current -text $::tr(Current) \
    -command {set autoloadGame [sc_game number]}
  button $w.set.last -text $::tr(Last) -command {set autoloadGame 9999999}
  foreach i {none first current last} {$w.set.$i configure -font font_Small}
  pack $w.set.none $w.set.first $w.set.current $w.set.last \
    -side left -padx 1 -pady 2

  addHorizontalRule $w

  pack [frame $w.b] -side top -fill x
  button $w.b.ok -text OK -command \
    "sc_base autoload \$autoloadGame; catch {grab release $w}; destroy $w"
  button $w.b.cancel -text $::tr(Cancel) -command \
    "catch {grab release $w}; destroy $w"
  pack $w.b.cancel $w.b.ok -side right -padx 2

  bind $w.f.entry <Return> "$w.b.ok invoke"
  bind $w.f.entry <Escape> "$w.b.cancel invoke"
  wm resizable $w 0 0
  ::utils::win::Centre $w
  focus $w.f.entry
  grab $w
}

# markTwins:
#   Finds twin games and marks them for deletion.
#   Takes parent window as parameter since it can be the main window,
#   or the maintenance window.
#
proc markTwins {{parent .}} {
  global twinSettings
  if {! [sc_base inUse]} { return }
  if {[sc_base numGames] == 0} {
    tk_messageBox -type ok -icon info -title "Scid: No games" \
      -message "There are no games in this database to delete."
    return
  }

  set w .twinSettings
  if {! [winfo exists $w]} {
    toplevel $w
    wm resizable $w 0 0
    wm title $w "Scid: $::tr(DeleteTwins)"
    set small font_Small
    label $w.note -text $::tr(TwinsNote) -justify left \
      -wraplength 500 -font $small
    pack $w.note -side top -anchor w -ipady 0 -pady 0
    addHorizontalRule $w
    label $w.tc -text $::tr(TwinsCriteria) -font font_Bold
    pack $w.tc -side top

    frame $w.g
    pack $w.g -side top
    set row 0
    set col 0
    foreach name {Colors Event Site Round Year Month Day Result ECO Moves} {
      set n [string tolower $name]
      checkbutton $w.g.b$n -text $::tr(Twins$name) \
        -variable twinSettings($n) -onvalue Yes -offvalue No
      #label $w.g.l$n -text $::tr(Twins$name) -font $small
      #radiobutton $w.g.yes$n -variable twinSettings($n) -value Yes \
      #  -text $::tr(Yes) -font $small
      #radiobutton $w.g.no$n -variable twinSettings($n) -value No \
      #  -text $::tr(No) -font $small
      grid $w.g.b$n -row $row -column $col -sticky w
      incr col
      #grid $w.g.l$n -row $row -column $col -sticky w
      #incr col
      #grid $w.g.yes$n -row $row -column $col -sticky w
      #incr col
      #grid $w.g.no$n -row $row -column $col -sticky w
      #incr col
      if {$col >= 4} {
        incr row; set col 0
      } else {
        grid [label $w.g.space$n -text "   "] -row $row -column $col
        incr col
      }
    }
    frame $w.players
    label $w.players.label -text $::tr(TwinsPlayers) -font $small
    radiobutton $w.players.yes -variable twinSettings(players) -value Yes \
      -text $::tr(TwinsPlayersExact) -font $small
    radiobutton $w.players.no -variable twinSettings(players) -value No \
      -text $::tr(TwinsPlayersPrefix) -font $small
    
    pack $w.players -side top
    pack $w.players.label $w.players.yes $w.players.no -side left
  }


  addHorizontalRule $w
  label $w.twhich -text $::tr(TwinsWhich:) -font font_Bold
  pack $w.twhich -side top
  pack [frame $w.g2] -side top -fill x
  radiobutton $w.g2.exall -text $::tr(SelectAllGames) -font $small \
    -variable twinSettings(usefilter) -value No
  label $w.g2.space -text "    " -font $small
  radiobutton $w.g2.exfil -text $::tr(SelectFilterGames) -font $small \
    -variable twinSettings(usefilter) -value Yes
  grid $w.g2.exall -row 0 -column 0 -sticky e
  grid $w.g2.space -row 0 -column 1
  grid $w.g2.exfil -row 0 -column 2 -sticky w
  grid columnconfigure $w.g2 0 -weight 1
  grid columnconfigure $w.g2 2 -weight 1

  addHorizontalRule $w
  label $w.twhen -text $::tr(TwinsWhen:) -font font_Bold
  pack $w.twhen -side top
  pack [frame $w.g3] -side top
  set row 0
  set col 0
  foreach n {skipshort undelete setfilter comments variations} \
       name {SkipShort Undelete SetFilter Comments Vars} {
    #label $w.g3.l$n -text "" -font $small
    #radiobutton $w.g3.yes$n -variable twinSettings($n) -value Yes \
    #  -text $::tr(Yes) -font $small
    #radiobutton $w.g3.no$n -variable twinSettings($n) -value No \
    #    -text $::tr(No) -font $small
    checkbutton $w.g3.b$n -text $::tr(Twins$name) -variable twinSettings($n) \
      -onvalue Yes -offvalue No
    grid $w.g3.b$n -row $row -column $col -sticky w
    #grid $w.g3.yes$n -row $row -column 1 -sticky w
    #grid $w.g3.no$n -row $row -column 2 -sticky w
    incr col
    if {$col >= 2} {
      incr row; set col 0
    } else {
      grid [label $w.g3.space$n -text "   "] -row $row -column $col
      incr col
    }
  }
  #$w.g3.lskipshort configure -text $::tr(TwinsSkipShort)
  #$w.g3.lundelete configure -text $::tr(TwinsUndelete)
  #$w.g3.lsetfilter configure -text $::tr(TwinsSetFilter)
  #$w.g3.lcomments configure -text $::tr(TwinsComments)
  #$w.g3.lvariations configure -text $::tr(TwinsVars)
  label $w.g3.ldelete -text $::tr(TwinsDeleteWhich) -font font_Bold
  grid $w.g3.ldelete -row $row -column 0 -sticky we -columnspan 3
  incr row
  frame $w.g3.vdelete
  foreach v {Shorter Older Newer} {
    radiobutton $w.g3.vdelete.v$v -text $::tr(TwinsDelete$v) \
      -variable twinSettings(delete) -value $v -font $small
    pack $w.g3.vdelete.v$v -side left -padx 5
  }
  grid $w.g3.vdelete -row $row -column 0 -columnspan 3

  #foreach g {g2 g3} {
  #  grid columnconfigure $w.$g 0 -weight 1
  #}

  addHorizontalRule $w
  frame $w.b
  dialogbutton $w.b.defaults -textvar ::tr(Defaults) -command {
    array set twinSettings [array get twinSettingsDefaults]
  }
  dialogbutton $w.b.help -text $::tr(Help) -font $small \
    -command "helpWindow Maintenance Twins; focus $w"
  dialogbutton $w.b.go -text $::tr(TwinsDelete) -font $small -command {
    if {[twinCriteriaOK .twinSettings]} {
      grab release .twinSettings
      sc_progressBar .twinSettings.progress bar 301 21 time
      set result [doMarkDups .twinSettings]
      focus .
      destroy .twinSettings
      if {$result > 0} { updateTwinChecker }
    }
  }

  dialogbutton $w.b.cancel -text $::tr(Cancel) -font $small \
    -command "grab release $w; focus .; destroy $w"

  canvas $w.progress -width 300 -height 20 -bg white -relief solid -border 1
  $w.progress create rectangle 0 0 0 0 -fill blue -outline blue -tags bar
  $w.progress create text 295 10 -anchor e -font font_Regular -tags time \
    -fill black -text "0:00 / 0:00"

  pack $w.progress -side bottom -padx 2 -pady 2
  pack $w.b -side bottom -fill x
  packbuttons right  $w.b.cancel $w.b.go
  packbuttons left $w.b.defaults $w.b.help
  bind $w <F1> "$w.b.help invoke"
  bind $w <Escape> "$w.b.cancel invoke"
  bind $w <Return> "$w.b.go invoke"
  grab $w
  update idletasks
  $w.note configure -wraplength [winfo width $w]
  return
}

# twinCriteriaOK:
#   Check that the user specified at least three of the the same site,
#   same round, and same year settings, since otherwise it is quite
#   likely that actual games with simlar moves will be marked as twins:
#
proc twinCriteriaOK {{parent .}} {
  global twinSettings

  set msg "Your settings for finding twin games are potentially likely to "
  append msg "cause non-twin games with similar moves to be marked as twins."
  append msg "\n\n"

  # First, check that if same moves is off, then the same colors, event,
  # site, round, year and month flags should all be set:
  if {$twinSettings(moves) == "No"} {
    if {$twinSettings(colors) == "No"  ||  $twinSettings(event) == "No"  || \
        $twinSettings(site) == "No"  ||  $twinSettings(year) == "No"  || \
        $twinSettings(month) == "No"} {
      append msg "It is recommended that if you select \"No\" for \"same moves\","
      append msg "you should select \"Yes\" for the colors, event, site, round,"
      append msg "year and month settings."
      append msg "\n\n"
      append msg "Do you want to continue and delete twins anyway?"
      set result [tk_messageBox -type yesno -parent $parent -icon warning \
                    -title "Scid: Confirm twin settings" \
                    -message $msg]
      if {$result == "no"} { return 0 } else { return 1 }
    }
  }

  # Now check that at least two of site, round, and year are set:
  set count 0
  if {$twinSettings(site) == "Yes"} { incr count }
  if {$twinSettings(round) == "Yes"} { incr count }
  if {$twinSettings(year) == "Yes"} { incr count }
  if {$count < 2} {
    append msg "It is recommended that you specify \"Yes\" for at least two "
    append msg "of the \"same site\", \"same round\" and \"same year\" "
    append msg "settings."
    append msg "\n\n"
    append msg "Do you want to continue and delete twins anyway?"
    set result [tk_messageBox -type yesno -parent $parent -icon warning \
                  -title "Scid: Confirm twin settings" \
                  -message $msg]
    if {$result == "no"} { return 0 } else { return 1 }
  }
  return 1
}


proc doMarkDups {{parent .}} {
  global twinSettings

  busyCursor .
  if {$twinSettings(undelete) == "Yes"} {
    catch {sc_game flag delete all 0}
  }
  if {[catch {sc_base duplicates -colors $twinSettings(colors) \
                -event $twinSettings(event) -site $twinSettings(site) \
                -round $twinSettings(round) -year $twinSettings(year) \
                -month $twinSettings(month) -day $twinSettings(day) \
                -result $twinSettings(result) -eco $twinSettings(eco) \
                -moves $twinSettings(moves) -players $twinSettings(players) \
                -skipshort $twinSettings(skipshort) \
                -setfilter $twinSettings(setfilter) \
                -usefilter $twinSettings(usefilter) \
                -comments $twinSettings(comments) \
                -variations $twinSettings(variations) \
                -delete $twinSettings(delete)} result]} {
    unbusyCursor .
    tk_messageBox -type ok -parent $parent -icon info \
      -title "Scid" -message $result
    set result 0
  } else {
    unbusyCursor .
    set message "Scid found $result twin games"
    if {$result > 0} {append message " and set their delete flags"}
    append message "."
    tk_messageBox -type ok -parent $parent -icon info -title "Scid: Result" \
      -message $message
  }
  ::maint::Refresh
  return $result
}


set classifyOption(AllGames) all
set classifyOption(ExtendedCodes) 1

# ClassifyAllGames:
#   Reclassifies all games (recomputes the ECO code of each game).
#   User can choose to reclassify all games, or only those games that
#   currently have no ECO code assigned.
#
proc classifyAllGames {} {
  makeClassifyWin
}

proc makeClassifyWin {} {
  global classifyOption
  set w .classify
  if {[winfo exists $w]} {
    raiseWin $w
    return
  }
  toplevel $w
  wm title $w "Scid: [tr FileMaintClass]"
  label $w.label -font font_Bold -textvar ::tr(ClassifyWhich)
  frame $w.g
  radiobutton $w.g.all -textvar ::tr(ClassifyAll) \
    -variable classifyOption(AllGames) -value all
  radiobutton $w.g.filter -textvar ::tr(SelectFilterGames) \
    -variable classifyOption(AllGames) -value filter
  set year [::utils::date::today year]
  set month [::utils::date::today month]
  set day [::utils::date::today day]
  radiobutton $w.g.year -textvar ::tr(ClassifyYear) \
    -variable classifyOption(AllGames) \
    -value "date:[expr $year - 1].$month.$day"
  if {$month == "01"} {
    incr year -1
    set month 12
  } else {
    scan $month "%02u" month
    incr month -1
    set month [format "%02u" $month]
  }
  radiobutton $w.g.month -textvar ::tr(ClassifyMonth) \
    -variable classifyOption(AllGames) \
    -value "date:$year.$month.$day"
  radiobutton $w.g.new -textvar ::tr(ClassifyNew) \
    -variable classifyOption(AllGames) -value nocode
  set row 0
  foreach f {all filter year month new} {
    grid $w.g.$f -row $row -column 0 -sticky w
    incr row
  }
  label $w.codes -font font_Bold -textvar ::tr(ClassifyCodes:)
  radiobutton $w.extended -textvar ::tr(ClassifyBasic) \
    -variable classifyOption(ExtendedCodes) -value 0
  radiobutton $w.basic -textvar ::tr(ClassifyExtended) \
    -variable classifyOption(ExtendedCodes) -value 1

  frame $w.b
  button $w.b.go -textvar ::tr(Classify) -command {
    busyCursor .
    .classify.b.cancel configure -command "sc_progressBar"
    .classify.b.cancel configure -textvar ::tr(Stop)
    sc_progressBar .classify.progress bar 301 21 time
    grab .classify.b.cancel
    if {[catch  {sc_eco base $classifyOption(AllGames) $classifyOption(ExtendedCodes)} result]} {
      grab release .classify.b.cancel
      unbusyCursor .
      tk_messageBox -parent .classify -type ok -icon info -title "Scid" -message $result
    } else {
      grab release .classify.b.cancel
      unbusyCursor .
    }
    .classify.b.cancel configure -command {focus .; destroy .classify}
    .classify.b.cancel configure -textvar ::tr(Close)
    ::windows::gamelist::Refresh
  }
  button $w.b.cancel -textvar ::tr(Close) -command "focus .; destroy $w"
  canvas $w.progress -width 300 -height 20 -bg white -relief solid -border 1
  $w.progress create rectangle 0 0 0 0 -fill blue -outline blue -tags bar
  $w.progress create text 295 10 -anchor e -font font_Regular -tags time \
    -fill black -text "0:00 / 0:00"

  pack $w.label $w.g -side top -pady 5
  addHorizontalRule $w
  pack $w.codes $w.extended $w.basic -side top -pady 5
  addHorizontalRule $w
  pack $w.b -side top -pady 5 -fill x
  pack $w.progress -side bottom -padx 2 -pady 2
  pack $w.b.cancel $w.b.go -side right -pady 10 -padx 10
  wm resizable $w 0 0
  bind $w <F1> {helpWindow ECO}
  bind $w <Escape> "$w.b.cancel invoke"
  updateClassifyWin
}

proc updateClassifyWin {} {
  set w .classify
  if {! [winfo exists $w]} { return }
  set state disabled
  if {[sc_base inUse]} { set state normal }
  $w.b.go configure -state $state
}

# Twin checker window:
# Shows PGN of current game, and its twin.

set twincheck(left) 0
set twincheck(right) 0

proc updateTwinChecker {} {
  global twincheck
  set w .twinchecker
  if {![winfo exists $w]} {
    toplevel $w
    pack [frame $w.b] -side bottom -fill x
    pack [frame $w.f] -side top -fill both -expand yes
    frame $w.f.left
    pack $w.f.left -side left -fill y -expand yes
    frame $w.f.split -width 2 -borderwidth 2 -relief sunken
    pack $w.f.split -side left -fill y -padx 5
    frame $w.f.right
    pack $w.f.right -side left -fill y -expand yes
    foreach i {left right} {
      set f $w.f.$i
      pack [frame $f.title] -side top -fill x
      label $f.title.label -font font_Bold -text "Game 0: "
      checkbutton $f.title.d -text "Deleted" -pady 5 \
        -variable twincheck($i) -font font_Small
      label $f.title.note -font font_Small
      pack $f.title.label $f.title.d $f.title.note -side left
      label $f.tmt -font font_Small -text "" -anchor w -width 1 -relief sunken
      pack $f.tmt -side bottom -fill x
      autoscrollframe $f.t text $f.t.text \
        -height 16 -width 40 -background white \
        -takefocus 0 -wrap word
      $f.t.text tag configure h -background lightSteelBlue
      pack $f.t -side top -fill both -expand yes
    }
    $w.f.left.title.note configure -text {("1" to flip; "u" undeletes both)}
    $w.f.right.title.note configure -text {("2" to flip; "u" undeletes both)}
    button $w.b.prev -text "Previous pair" -underline 0 \
      -command {::game::LoadNextPrev previous}
    button $w.b.next -text "Next pair" -underline 0 \
      -command {::game::LoadNextPrev next}
    button $w.b.share -text "Share tags..." -underline 0
    button $w.b.delete -text "Delete twin games..." -underline 0 \
      -command "markTwins $w"
    button $w.b.help -text "Help" -command {helpWindow Maintenance Twins}
    button $w.b.close -text "Close" -command "focus .; destroy $w"
    pack $w.b.close $w.b.help $w.b.delete -side right -padx 5 -pady 2
    pack $w.b.prev $w.b.next $w.b.share -side left -padx 5 -pady 2
    bind $w <F1> "$w.b.help invoke"
    bind $w <Escape> "focus .; destroy $w"
    bind $w <Alt-p> {::game::LoadNextPrev previous}
    bind $w <KeyPress-p> {::game::LoadNextPrev previous}
    bind $w <Alt-n> {::game::LoadNextPrev next}
    bind $w <KeyPress-n> {::game::LoadNextPrev next}
    bind $w <Alt-d> "markTwins $w"
    bind $w <KeyPress-d> "markTwins $w"
    bind $w <KeyPress-1> "$w.f.left.title.d invoke"
    bind $w <KeyPress-2> "$w.f.right.title.d invoke"
    bind $w <KeyPress-s> "$w.b.share invoke"
    bind $w <KeyPress-u> {
      if {$twincheck(left)} {.twinchecker.f.left.title.d invoke}
      if {$twincheck(right)} {.twinchecker.f.right.title.d invoke}
    }
    bind $w <Alt-u> {
      if {$twincheck(left)} {.twinchecker.f.left.title.d invoke}
      if {$twincheck(right)} {.twinchecker.f.right.title.d invoke}
    }
    wm resizable $w 0 1
    wm title $w "Scid: Twin game checker"
  }

  set gn [sc_game number]
  set dup 0
  if {$gn > 0} {
    set dup [sc_game info duplicate]
  }
  set twincheck(left) 0
  set twincheck(right) 0

  $w.f.left.title.label configure -text "Game $gn:  "

  if {$gn > 0} {
    set twincheck(left) [sc_game flag delete $gn]
    $w.f.left.title.d configure -command "sc_game flag delete $gn invert; updateBoard"
    $w.f.left.title.d configure -state normal
    set tmt [sc_game crosstable count +deleted]
    $w.f.left.tmt configure -text "Games in tournament: $tmt"
  } else {
    $w.f.left.title.d configure -state disabled
    $w.f.left.tmt configure -text ""
  }
  if {$dup > 0} {
    set twincheck(right) [sc_game flag delete $dup]
    $w.f.right.title.label configure -text "Game $dup:  "
    $w.f.right.title.d configure -command "sc_game flag delete $dup invert; updateBoard"
    $w.f.right.title.d configure -state normal
    set tmt [sc_game crosstable count -game $dup +deleted]
    $w.f.right.tmt configure -text "Games in tournament: $tmt"
  } else {
    $w.f.right.title.label configure -text "No twin  "
    $w.f.right.title.d configure -state disabled
    $w.f.right.tmt configure -text ""
  }

  $w.b.share configure -state disabled -command {}
  if {$gn > 0  &&  $dup > 0} {
    if {[llength [sc_game tags share check $gn $dup]] > 0} {
      $w.b.share configure -state normal -command "shareTwinTags $gn $dup $w"
    }
  }
  set t $w.f.left.t.text
  $t configure -state normal
  $t delete 1.0 end
  $t insert end [sc_game pgn]

  set t $w.f.right.t.text
  $t configure -state normal
  $t delete 1.0 end
  if {$dup > 0} {
    $t insert end [sc_game pgn -gameNumber $dup]
  } else {
    $t insert end "No twin was detected for this game.\n\n"
    $t insert end "To show twins using this window, you must first "
    $t insert end "use the \"Delete twin games...\" function."
  }

  # Now color the differences if appropriate:
  if {$dup > 0} {
    set rlen [$w.f.right.t.text index end-1c]
    set llen [$w.f.right.t.text index end-1c]

    for {set i 0} {$i < $rlen} {incr i} {
      set line [$w.f.right.t.text get $i.0 "$i.0 lineend"]
      set length [string length $line]
      set max 0
      for {set j 0} {$j < $llen} {incr j} {
        set otherLine [$w.f.left.t.text get $j.0 "$j.0 lineend"]
        set plen [strPrefixLen $line $otherLine]
        if {$plen > $max} { set max $plen }
      }
      if {$max < $length} {
        if {![string compare [string index $line 0] "\["]} { set max 0 }
        $w.f.right.t.text tag add h $i.$max "$i.0 lineend"
      }
    }

    for {set i 0} {$i < $llen} {incr i} {
      set line [$w.f.left.t.text get $i.0 "$i.0 lineend"]
      set length [string length $line]
      set max 0
      for {set j 0} {$j < $rlen} {incr j} {
        set otherLine [$w.f.right.t.text get $j.0 "$j.0 lineend"]
        set plen [strPrefixLen $line $otherLine]
        if {$plen > $max} { set max $plen }
      }
      if {$max < $length} {
        if {![string compare [string index $line 0] "\["]} { set max 0 }
        $w.f.left.t.text tag add h $i.$max "$i.0 lineend"
      }
    }
  }

  if {[sc_base inUse]} {
    $w.b.delete configure -state normal
  } else {
    $w.b.delete configure -state disabled
  }

  foreach side {left right} {
    $w.f.$side.t.text configure -state disabled
  }

}

# shareTwinTags:
#   Updates the tags of two twin games by sharing information,
#   filling in the date, round or ratings of each game based on
#   the other where possible.
#
proc shareTwinTags {g1 g2 {parent .}} {
  set sharelist [sc_game tags share check $g1 $g2]
  if {[llength $sharelist] == 0} { return }

  set msg "Change the following game tags:\n\n"
  foreach {gn tag old new} $sharelist {
    append msg "Game $gn: $tag: \"$old\" -> \"$new\"\n"
  }
  set answer [tk_messageBox -parent $parent -title "Scid" \
                -type okcancel -default ok -icon question -message $msg]
  if {$answer != "ok"} { return }
  sc_game tags share update $g1 $g2
  sc_game tags reload
  updateBoard -pgn
  ::windows::gamelist::Refresh
}

# baseIsCompactable:
#   Returns true only if the current base is compactable.
#
proc baseIsCompactable {} {
  # Only a database that is in use, not read-only, and not the
  # clipbase, can be compacted:
  if {! [sc_base inUse]} { return 0 }
  if {[sc_base isReadOnly]} { return 0 }
  if {[sc_base current] == [sc_info clipbase]} { return 0 }
  return 1
}

# makeCompactWin:
# Opens the database compaction dialog box.
#
proc makeCompactWin {} {
  if {! [baseIsCompactable]} { return }
  set w .compactWin
  toplevel $w
  wm title $w "Scid: $::tr(CompactDatabase)"
  wm resizable $w 0 0
  foreach f {top names games buttons} { frame $w.$f }
  pack $w.top -side top -fill x -padx 5
  pack $w.names -in $w.top -side left -fill x -anchor n
  addVerticalRule $w.top 12
  pack $w.games -in $w.top -side left -fill x -anchor n
  addHorizontalRule $w
  pack $w.buttons -side top -fill x

  for {set i 0} {$i < 3} {incr i} {
    grid columnconfigure $w.names $i -weight 1
    grid columnconfigure $w.games $i -weight 1
  }
  label $w.names.title -text $::tr(NameFile) -font font_Bold
  grid $w.names.title -columnspan 3 -row 0 -column 0 -sticky n
  label $w.names.nt -text "  $::tr(Names)"
  grid $w.names.nt -row 1 -column 1 -sticky e
  label $w.names.ut -text "  $::tr(Unused)"
  grid $w.names.ut -row 1 -column 2 -sticky e
  frame $w.names.h -height 1 -relief solid -bg black
  grid $w.names.h -columnspan 3 -row 2 -column 0 -sticky we
  set row 3
  set ndata [sc_compact stats names]
  set idx 0
  foreach n {p e s r} name {Players Events Sites Rounds} {
    label $w.names.t$n -text "$::tr($name)  "
    label $w.names.n$n -text "  [::utils::thousands [lindex $ndata $idx]]"
    incr idx
    label $w.names.u$n -text "  [::utils::thousands [lindex $ndata $idx]]"
    incr idx
    grid $w.names.t$n -row $row -column 0 -sticky w
    grid $w.names.n$n -row $row -column 1 -sticky e
    grid $w.names.u$n -row $row -column 2 -sticky e
    incr row
  }

  label $w.games.title -text $::tr(GameFile) -font font_Bold
  grid $w.games.title -columnspan 3 -row 0 -column 0 -sticky n
  label $w.games.gt -text "  [::utils::string::Capital $::tr(games)]"
  grid $w.games.gt -row 1 -column 1 -sticky e
  label $w.games.st -text "  $::tr(SizeKb)"
  grid $w.games.st -row 1 -column 2 -sticky e
  frame $w.games.h -height 1 -relief solid -bg black
  grid $w.games.h -columnspan 3 -row 2 -column 0 -sticky we
  set row 3
  set ndata [sc_compact stats games]
  set idx 0
  foreach g {current compact} name {CurrentState AfterCompaction} {
    label $w.games.t$g -text "$::tr($name)  "
    label $w.games.g$g -text "  [::utils::thousands [lindex $ndata $idx]]"
    incr idx
    set kbytes [expr {int(([lindex $ndata $idx] + 512) / 1024)} ]
    label $w.games.s$g -text "  [::utils::thousands $kbytes]"
    incr idx
    grid $w.games.t$g -row $row -column 0 -sticky w
    grid $w.games.g$g -row $row -column 1 -sticky e
    grid $w.games.s$g -row $row -column 2 -sticky e
    incr row
  }

  button $w.buttons.n -text $::tr(CompactNames) -command compactNames
  button $w.buttons.g -text $::tr(CompactGames) -command compactGames
  button $w.buttons.help -text $::tr(Help) -command {helpWindow Compact}
  button $w.buttons.cancel -text $::tr(Cancel) \
    -command "focus .; grab release $w; destroy $w"
  pack $w.buttons.cancel $w.buttons.help -side right -padx 5 -pady 2
  pack $w.buttons.n $w.buttons.g -side left -padx 5 -pady 2
  grab $w
}

proc compactNames {} {
  set w .compactWin
  set stats [sc_compact stats names]
  if {[lindex $stats 1] == 0  &&  [lindex $stats 3] == 0  && \
        [lindex $stats 5] == 0  &&  [lindex $stats 7] == 0} {
    tk_messageBox -type ok -icon info -parent $w -title "Scid: compaction" \
      -message "There are no unused names, so the name file is already fully compacted."
    return
  }
  progressWindow "Scid" "Compacting the name file..."
  busyCursor .
  set err [catch {sc_compact names} result]
  unbusyCursor .
  closeProgressWindow
  set w .compactWin
  if {$err} {
    tk_messageBox -type ok -icon warning -parent $w \
      -title "Scid: Error compacting file" -message $result
  } else {
    tk_messageBox -type ok -icon info -parent $w \
      -title "Scid: Name file compacted" \
      -message "The name file for the database \"[file tail [sc_base filename]]\" was compacted."
  }
  grab release $w
  destroy $w
  updateBoard
  ::windows::gamelist::Refresh
  ::maint::Refresh
}

proc compactGames {} {
  set w .compactWin
  set stats [sc_compact stats games]
  if {[lindex $stats 1] == [lindex $stats 3]  && \
        [lindex $stats 0] == [lindex $stats 2]} {
    tk_messageBox -type ok -icon info -parent $w -title "Scid: compaction" \
      -message "The game file is already fully compacted."
    return
  }
  progressWindow "Scid" "Compacting the game file..." \
    $::tr(Cancel) "sc_progressBar"
  busyCursor .
  set err [catch {sc_compact games} result]
  unbusyCursor .
  closeProgressWindow
  if {$err} {
    tk_messageBox -type ok -icon warning -parent $w \
      -title "Scid: Error compacting file" -message $result
  } else {
    tk_messageBox -type ok -icon info -parent $w \
      -title "Scid: Game file compacted" \
      -message "The game file for the database \"[file tail [sc_base filename]]\" was compacted."
  }
  grab release $w
  destroy $w
  updateBoard
  ::windows::gamelist::Refresh
  ::maint::Refresh
}

set sortCriteria(real) ""
set sortCriteria(translated) ""

proc clearSortCriteria {} {
  set ::sortCriteria(real) ""
  set ::sortCriteria(translated) ""
  updateSortWin
}

proc addSortCriteria {args} {
  global sortCriteria
  foreach x $args {
    if {$sortCriteria(real) == ""} {
      set sortCriteria(real) $x
      set sortCriteria(translated) $::tr($x)
    } else {
      append sortCriteria(real) ", $x"
      append sortCriteria(translated) ", $::tr($x)"
    }
  }
  updateSortWin
}

proc makeSortWin {} {
  global sortCriteria
  set w .sortWin
  if {[winfo exists $w]} {
    raiseWin $w
    return
  }
  toplevel $w
  wm title $w "Scid: [tr FileMaintSort]"
  wm resizable $w 0 0

  label $w.torder -textvar ::tr(SortCriteria:) -font font_Bold
  pack $w.torder -side top
  label $w.order -textvar sortCriteria(translated) -width 40 -bg white \
    -relief solid -anchor w
  pack $w.order -side top -fill x -pady 2 -padx 2
  addHorizontalRule $w
  label $w.tadd -textvar ::tr(AddCriteria:) -font font_Bold
  pack $w.tadd -side top
  pack [frame $w.add] -side top -fill x
  foreach b {Date Year Month Event Site Country Round Result Length
             White Black Rating ECO Deleted EventDate} {
    set n [string tolower $b]
    button $w.add.$n -textvar ::tr($b) -command "addSortCriteria $b"
  }
  grid $w.add.date -row 0 -column 0 -sticky we
  grid $w.add.year -row 0 -column 1 -sticky we
  grid $w.add.month -row 0 -column 2 -sticky we
  grid $w.add.event -row 1 -column 0 -sticky we
  grid $w.add.site -row 1 -column 1 -sticky we
  grid $w.add.country -row 1 -column 2 -sticky we
  grid $w.add.round -row 2 -column 0 -sticky we
  grid $w.add.result -row 2 -column 1 -sticky we
  grid $w.add.length -row 2 -column 2 -sticky we
  grid $w.add.white -row 3 -column 0 -sticky we
  grid $w.add.black -row 3 -column 1 -sticky we
  grid $w.add.rating -row 3 -column 2 -sticky we
  grid $w.add.eco -row 4 -column 0 -sticky we
  grid $w.add.deleted -row 4 -column 1 -sticky we
  grid $w.add.eventdate -row 4 -column 2 -sticky we

  for {set i 0} {$i < 3} {incr i} {
    grid columnconfigure $w.add $i -weight 1
  }

  addHorizontalRule $w

  label $w.tcommon -textvar ::tr(CommonSorts:) -font font_Bold
  pack $w.tcommon -side top
  pack [frame $w.tc] -side top -fill x
  button $w.tc.ymsedr -text "$::tr(Year), $::tr(Month), $::tr(Site), $::tr(Event), $::tr(Date), $::tr(Round)" -command {
    clearSortCriteria
    addSortCriteria Year Month Site Event Date Round
  }
  button $w.tc.yedr -text "$::tr(Year), $::tr(Event), $::tr(Date), $::tr(Round)" -command {
    clearSortCriteria
    addSortCriteria Year Event Date Round
  }
  button $w.tc.er -text "$::tr(ECO), $::tr(Rating)" -command {
    clearSortCriteria
    addSortCriteria ECO Rating
  }
  grid $w.tc.ymsedr -row 0 -column 0 -sticky we
  grid $w.tc.yedr -row 1 -column 0 -sticky we
  grid $w.tc.er -row 2 -column 0 -sticky we
  grid columnconfigure $w.tc 0 -weight 1
  addHorizontalRule $w
  pack [frame $w.b] -side bottom -fill x
  button $w.b.clear -textvar ::tr(Clear) -command clearSortCriteria
  button $w.b.help -textvar ::tr(Help) -command {helpWindow Sorting}
  button $w.b.sort -textvar ::tr(Sort) -command sortDatabase
  button $w.b.close -textvar ::tr(Close) \
    -command "focus .; destroy $w"
  pack $w.b.close $w.b.sort -side right -padx 5 -pady 2
  pack $w.b.clear $w.b.help -side left -padx 5 -pady 2
  bind $w <F1> {helpWindow Sorting}
  bind $w <Escape> "$w.b.close invoke"
  standardShortcuts $w
  updateSortWin
}

proc updateSortWin {} {
  global sortCriteria
  set w .sortWin
  if {! [winfo exists $w]} { return }
  set state disabled
  if {[sc_base inUse]  &&  $sortCriteria(real) != ""} { set state normal }
  $w.b.sort configure -state $state
}

proc sortDatabase {} {
  global sortCriteria
  set w .sortWin
  if {! [sc_base inUse]} {
    tk_messageBox -type ok -icon info -parent $w -title "Scid: Sort results" \
      -message "This is not an open database; there are no games to sort."
    return
  }
  progressWindow "Scid" "Sorting the database..."
  busyCursor .
  set err [catch {sc_base sort $sortCriteria(real) \
                    {changeProgressWindow "Storing results..."} \
                  } result]
  unbusyCursor .
  closeProgressWindow
  if {$err} {
    tk_messageBox -type ok -icon warning -parent $w \
      -title "Scid: Sort results" -message $result
  } else {
    #tk_messageBox -type ok -icon info -parent $w \
      -title "Scid: Sort results" \
      -message "The database was successfully sorted."
  }
  updateBoard
  ::windows::gamelist::Refresh
  ::maint::Refresh
}

proc makeBaseReadOnly {} {
  if {! [sc_base inUse]} { return }
  if {[sc_base isReadOnly]} { return }
  set result [tk_dialog .roDialog "Scid: [tr FileReadOnly]" \
                $::tr(ReadOnlyDialog) "" 1 $::tr(Yes) $::tr(No)]
  if {$result == 0} {
    sc_base isReadOnly set
    updateMenuStates
  }
}


# allocateRatings:
#   Allocate player ratings to games based on the spellcheck file.
#
set addRatings(overwrite) 0
set addRatings(filter) 0

proc allocateRatings {} {
  if {[catch {sc_name ratings -test 1} result]} {
    tk_messageBox -type ok -icon info -parent . -title "Scid" -message $result
    return
  }
  set w .ardialog
  toplevel $w
  wm title $w "Scid"
  label $w.lab -wraplength 3i -justify left -text "This command will use the current spellcheck file to add Elo ratings to games in this database. Wherever a player has no currrent rating but his/her rating at the time of the game is listed in the spellcheck file, that rating will be added."
  pack $w.lab -side top
  addHorizontalRule $w
  pack [frame $w.r] -side top
  label $w.r.lab -text "Overwrite existing non-zero ratings?"
  radiobutton $w.r.yes -variable addRatings(overwrite) \
    -value 1 -text $::tr(Yes)
  radiobutton $w.r.no -variable addRatings(overwrite) \
    -value 0 -text $::tr(No)
  pack $w.r.lab $w.r.yes $w.r.no -side left
  addHorizontalRule $w
  pack [frame $w.g] -side top
  label $w.g.lab -text "Add ratings to:"
  radiobutton $w.g.all -variable addRatings(filter) \
    -value 0 -text $::tr(SelectAllGames)
  radiobutton $w.g.filter -variable addRatings(filter) \
    -value 1 -text $::tr(SelectFilterGames)
  pack $w.g.lab $w.g.all $w.g.filter -side top
  addHorizontalRule $w
  pack [frame $w.b] -side top -fill x
  button $w.b.ok -text "OK" \
    -command "catch {grab release $w}; destroy $w; doAllocateRatings"
  button $w.b.cancel -text $::tr(Cancel) \
    -command "catch {grab release $w}; destroy $w"
  pack $w.b.cancel $w.b.ok -side right -padx 3 -pady 3
  catch {grab $w}
  focus $w.b.ok
}

proc doAllocateRatings {} {
  global addRatings
  if {[catch {sc_name ratings -test 1} result]} {
    tk_messageBox -type ok -icon info -parent . -title "Scid" -message $result
    return
  }
  progressWindow "Scid" "Adding Elo ratings..."
  busyCursor .
  if {[catch {sc_name ratings -change $addRatings(overwrite) -filter $addRatings(filter)} result]} {
    closeProgressWindow
    tk_messageBox -type ok -icon warning -parent . \
      -title "Scid" -message $result
  } else {
    closeProgressWindow
    set r [::utils::thousands [lindex $result 0]]
    set g [::utils::thousands [lindex $result 1]]
    tk_messageBox -type ok -icon info -parent . \
      -title "Scid" -message "Scid added $r Elo ratings in $g games."
  }
  unbusyCursor .
}


# stripTags:
#   Strip unwanted PGN tags from the current database.

array set stripTagCount {}

proc stripTags {} {
  global stripTagChoice stripTagCount
  set w .striptags
  if {[winfo exists $w]} {
    raise $w
    return
  }
  set stripTagList {}

  # Find extra PGN tags:
  set ::interrupt 0
  progressWindow "Scid" "Searching for extra PGN tags..." \
    $::tr(Cancel) "set ::interrupt 1; sc_progressBar"
  busyCursor .
  set err [catch {sc_base tag list} result]
  unbusyCursor .
  closeProgressWindow
  if {$::interrupt} { return }
  if {$err} {
    tk_messageBox -title "Scid" -icon warning -type ok -message $result
    return
  }

  # Make list of extra tags and their frequency:
  array unset stripTagCount
  set nTags 0
  foreach {tag count} $result {
    set stripTagCount($tag) $count
    incr nTags
  }

  if {$nTags == 0} {
    tk_messageBox -title "Scid" -icon info -type ok \
      -message "No extra tags were found."
    return
  }

  toplevel $w
  wm title $w "Scid: $::tr(StripTags)"
  label $w.title -text "Extra PGN tags:" -font font_Bold
  pack $w.title -side top
  pack [frame $w.f] -side top -fill x
  addHorizontalRule $w
  pack [frame $w.b] -side bottom -fill x

  set row 0
  foreach tag [lsort [array names stripTagCount]] {
    set count $stripTagCount($tag)
    radiobutton $w.f.t$tag -text "$tag  " -variable stripTagChoice -value $tag
    label $w.f.c$tag -text [::utils::thousands $count]
    if {$row == 0} { set stripTagChoice $tag }
    grid $w.f.t$tag -row $row -column 0 -sticky w
    grid $w.f.c$tag -row $row -column 1 -sticky e
    incr row
  }
  button $w.b.find -text $::tr(SetFilter) -command findStripTags
  button $w.b.strip -text $::tr(StripTag...) -command {
    set removed [doStripTags .striptags]
    set stripTagCount($stripTagChoice) \
      [expr {$stripTagCount($stripTagChoice) - $removed} ]
    .striptags.f.c$stripTagChoice configure -text \
      [::utils::thousands $stripTagCount($stripTagChoice)]
  }
  button $w.b.cancel -text $::tr(Cancel) \
    -command "catch {grab release $w}; destroy $w"
  pack $w.b.cancel $w.b.strip $w.b.find -side right -padx 2 -pady 2
  wm resizable $w 0 0
  update
  catch {grab $w}
}

proc doStripTags {{parent .}} {
  global stripTagChoice
  set msg "Do you really want to remove all occurences of the PGN tag"
  append msg " \"$stripTagChoice\" from this database?"
  set result [tk_messageBox -title "Scid" -parent $parent \
                -icon question -type yesno -message $msg]
  if {$result == "no"} { return 0 }
  progressWindow "Scid" "Removing the PGN tag $stripTagChoice..." \
    $::tr(Cancel) "sc_progressBar"
  busyCursor .
  set err [catch {sc_base tag strip $stripTagChoice} result]
  unbusyCursor .
  closeProgressWindow
  set count 0
  if {! $err} {
    set count $result
    set result "Removed $result instances of \"$stripTagChoice\"."
    append result "\n\n"
    append result "To save space and maintain database efficiency, it is a "
    append result "good idea to compact the game file after removing tags."
  }
  tk_messageBox -title "Scid" -parent $parent -type ok -icon info \
    -message $result
  return $count
}

proc findStripTags {} {
  global stripTagChoice
  progressWindow "Scid" "Finding games with the PGN tag $stripTagChoice..." \
    $::tr(Cancel) "sc_progressBar"
  busyCursor .
  set err [catch {sc_base tag find $stripTagChoice} result]
  unbusyCursor .
  closeProgressWindow
  ::windows::stats::Refresh
}


# cleanerWin:
#   Open a dialog so the user can choose several maintenance tasks
#   in one action.

set cleaner(players) 1
set cleaner(events) 1
set cleaner(sites) 1
set cleaner(rounds) 1
set cleaner(eco) 1
set cleaner(elo) 1
set cleaner(twins) 1
set cleaner(cnames) 0
set cleaner(cgames) 0
set cleaner(tree) 0

proc cleanerWin {} {
  set w .mtoolWin
  if {[winfo exists $w]} { return }

  toplevel $w
  wm title $w "Scid: $::tr(Cleaner)"
  bind $w <F1> {helpWindow Maintenance Cleaner}

  pack [frame $w.help] -side top -fill x
  text $w.help.text -width 1 -height 8 -wrap word \
    -relief ridge -cursor top_left_arrow -yscrollcommand "$w.help.ybar set"
  scrollbar $w.help.ybar -orient vertical -command "$w.help.text yview" \
    -takefocus 0
  pack $w.help.ybar -side right -fill y
  pack $w.help.text -side left -fill x -expand yes
  $w.help.text insert end [string trim $::tr(CleanerHelp)]
  $w.help.text configure -state disabled

  pack [frame $w.f] -side top -padx 20
  foreach i {players events sites rounds} j {Players Events Sites Rounds} {
    label $w.f.$i -text "$::tr(Spellchecking): $::tr($j)"
  }
  label $w.f.eco -text $::tr(ReclassifyGames)
  label $w.f.elo -text $::tr(AddEloRatings)
  label $w.f.twins -text $::tr(DeleteTwins)
  label $w.f.cnames -text $::tr(CompactNames)
  label $w.f.cgames -text $::tr(CompactGames)
  label $w.f.tree -text [tr TreeFileFill]

  foreach i {players events sites rounds eco elo twins cnames cgames tree} {
    radiobutton $w.f.y$i -variable cleaner($i) -value 1 -text $::tr(Yes)
    radiobutton $w.f.n$i -variable cleaner($i) -value 0 -text $::tr(No)
  }
  set row 0
  foreach i {players events sites rounds eco elo twins cnames cgames tree} {
    grid $w.f.$i -row $row -column 0 -sticky w
    grid $w.f.y$i -row $row -column 1 -sticky w
    grid $w.f.n$i -row $row -column 2 -sticky w
    incr row
  }

  addHorizontalRule $w
  pack [frame $w.b] -side bottom -fill x
  button $w.b.ok -text "OK" -command "catch {grab release $w}; destroy $w; doCleaner"
  button $w.b.cancel -text $::tr(Cancel) -command "catch {grab release $w}; destroy $w"
  pack $w.b.cancel $w.b.ok -side right -padx 2 -pady 2
  wm resizable $w 0 0
  # Remove the scrollbar if it is not needed:
  update
  set yview [$w.help.text yview]
  if {[lindex $yview 0] <= 0.01  &&  [lindex $yview 1] >= 0.99} {
      pack forget $w.help.ybar
  }
  catch {grab $w}
}

proc doCleaner {} {
  global cleaner twinSettings

  set answer [tk_dialog .mtoolDialog "Scid" \
                [string trim $::tr(CleanerConfirm)] "" \
                0 $::tr(Yes) $::tr(No)]
  if {$answer != 0} { return }

  set w .mtoolStatus
  if {! [winfo exists $w]} {
    toplevel $w
    wm title $w "Scid: $::tr(Cleaner)"
    pack [frame $w.b] -side bottom -fill x
    pack [frame $w.t] -side top -fill both -expand yes
    text $w.t.text -width 60 -height 10 -wrap none -setgrid 1 \
      -cursor top_left_arrow -yscrollcommand "$w.t.ybar set"
    scrollbar $w.t.ybar -orient vertical -command "$w.t.text yview" \
      -takefocus 0 -width 10
    pack $w.t.ybar -side right -fill y
    pack $w.t.text -side left -fill both -expand yes
    button $w.b.close -text $::tr(Close) \
      -command "catch {grab release $w}; destroy $w"
    pack $w.b.close -side right -padx 2 -pady 2
    wm minsize $w 20 5
  }

  busyCursor .
  catch {grab $w}
  set t $w.t.text
  $t delete 1.0 end
  $t insert end "$::tr(Cleaner)."
  $t insert end "  $::tr(Database): [file tail [sc_base filename]]\n"

  $w.b.close configure -state disabled

  set count 1

  foreach nameType {Player Event Site Round} {
    set names $nameType
    append names "s"
    set tag [string tolower $names]
    if {$cleaner($tag)} {
      mtoolAdd $t "$count: $::tr(Spellchecking): $::tr($names)..."
      incr count
      set result "0 $nameType names were corrected."
      if {! [catch {sc_name spellcheck -max 100000 $nameType} corrections]} {
        update
        catch {sc_name correct $nameType $corrections} result
      }
      $t insert end "   $result\n"
      $t see end
    }
  }

  if {$cleaner(eco)} {
    mtoolAdd $t "$count: $::tr(ReclassifyGames)..."
    incr count
    catch {sc_eco base $::classifyOption(AllGames) \
             $::classifyOption(ExtendedCodes)} result
    $t insert end "   $result\n"
    $t see end
  }

  if {$cleaner(elo)} {
    mtoolAdd $t "$count: $::tr(AddEloRatings)..."
    incr count
    if {[catch {sc_name ratings} result]} {
      $t insert end "   $result\n"
    } else {
      set r [::utils::thousands [lindex $result 0]]
      set g [::utils::thousands [lindex $result 1]]
      $t insert end "   Scid added $r Elo ratings in $g games.\n"
    }
  }

  if {$cleaner(twins)} {
    mtoolAdd $t "$count: $::tr(DeleteTwins)..."
    incr count
    if {$twinSettings(undelete) == "Yes"} {
      catch {sc_game flag delete all 0}
      update
    }
    if {[catch {sc_base duplicates -colors $twinSettings(colors) \
                  -event $twinSettings(event) -site $twinSettings(site) \
                  -round $twinSettings(round) -year $twinSettings(year) \
                  -month $twinSettings(month) -day $twinSettings(day) \
                  -result $twinSettings(result) -eco $twinSettings(eco) \
                  -moves $twinSettings(moves) -players $twinSettings(players) \
                  -setfilter $twinSettings(setfilter) \
                  -usefilter $twinSettings(usefilter) \
                  -comments $twinSettings(comments) \
                  -variations $twinSettings(variations) \
                  -delete $twinSettings(delete)} result]} {
      set message $result
    } else {
      set message "Scid found $result twin games"
      if {$result > 0} {append message " and set their delete flags"}
    }
    $t insert end "   $message.\n"
  }

  if {$cleaner(cnames)} {
    mtoolAdd $t "$count: $::tr(CompactNames)..."
    incr count
    set stats [sc_compact stats names]
    if {[lindex $stats 1] == 0  &&  [lindex $stats 3] == 0  && \
          [lindex $stats 5] == 0  &&  [lindex $stats 7] == 0} {
      $t insert end "   Name file already compacted.\n"
    } else {
      set err [catch {sc_compact names} result]
      if {$err} {
        $t insert end "   $result\n"
      } else {
        $t insert end "   Done.\n"
      }
    }
    $t see end
  }

  if {$cleaner(cgames)} {
    mtoolAdd $t "$count: $::tr(CompactGames)..."
    incr count
    set stats [sc_compact stats games]
    if {[lindex $stats 1] == [lindex $stats 3]  && \
          [lindex $stats 0] == [lindex $stats 2]} {
      $t insert end "   Game file already compacted.\n"
    } else {
      set err [catch {sc_compact games} result]
      if {$err} {
        $t insert end "   $result\n"
      } else {
        $t insert end "   Done.\n"
      }
    }
    $t see end
  }

  if {$cleaner(tree)} {
    mtoolAdd $t "$count: [tr TreeFileFill]..."
    incr count
    sc_game push
    set base [sc_base current]
    set len [llength $::tree(standardLines)]
    foreach line $::tree(standardLines) {
      sc_game new
      if {[llength $line] > 0}  {
        foreach move $line {sc_move addSan $move}
      }
      sc_tree search -base $base
      update
    }
    catch {sc_tree write $base} result
    sc_game pop
    $t insert end "   Done.\n"
  }

  mtoolAdd $t "Done."
  updateBoard
  ::windows::gamelist::Refresh
  ::maint::Refresh
  $w.b.close configure -state normal
  catch {grab release $w}
  unbusyCursor .
}

proc mtoolAdd {tw title} {
  set time [clock format [clock seconds] -format "%H:%M:%S"]
  $tw insert end "\n\[$time\]\n"
  if {$title != ""} { $tw insert end "$title\n" }
  $tw see end
  update
}


# copyFEN
#
#   Copies the FEN of the current position to the text clipboard.
#
proc copyFEN {} {
  set fen [sc_pos fen]
  # Create a text widget to hold the fen so it can be the owner
  # of the current text selection:
  set w .tempFEN
  if {! [winfo exists $w]} { text $w }
  $w delete 1.0 end
  $w insert end $fen sel
  clipboard clear
  clipboard append $fen
  selection own $w
  selection get
}

# pasteFEN
#
#   Bypasses the board setup window and tries to paste the current
#   text selection as the setup position, producing a message box
#   if the selection does not appear to be a valid FEN string.
#
proc pasteFEN {} {
  set fenStr ""
  if {[catch {set fenStr [selection get -selection CLIPBOARD]} ]} {
    catch {set fenStr [selection get -selection PRIMARY]}
  }
  set fenStr [string trim $fenStr]

  set fenExplanation {
FEN is the standard text representation of a chess position.
As an example, the FEN representation of the standard starting position is:

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
}

  if {$fenStr == ""} {
    set msg "The current text selection is empty.\n"
    append msg "To paste the start board, select some text that contains\n"
    append msg "a position in FEN notation.\n"
    append msg $fenExplanation
    tk_messageBox -icon info -type ok -title "Scid: Invalid FEN" -message $msg
    return
  }
  if {[catch {sc_game startBoard $fenStr}]} {
    if {[string length $fenStr] > 80} {
      set fenStr [string range $fenStr 0 80]
      append fenStr "..."
    }
    set msg "The current text selection is not a valid chess position in FEN notation.\n"
    append msg "The selected text is:\n\n$fenStr\n"
    append msg $fenExplanation
    tk_messageBox -icon info -type ok -title "Scid: Invalid FEN" -message $msg
    return
  }
  updateBoard -pgn
}

############################################################
### Board setup window:

set setupBd {}
set setupFen {}

# makeSetupFen:
#    Reconstructs the FEN string from the current settings in the
#    setupBoard dialog. Check to see if the position is
#    acceptable (a position can be unacceptable by not having exactly
#    one King per side, or by having more than 16 pieces per side).
#
proc makeSetupFen {} {
  global setupFen setupBd moveNum toMove castling epFile
  set fenStr ""
  set errorStr [validateSetup]
  if {$errorStr != ""} {
    set fenStr "Invalid board: "
    append fenStr $errorStr
    return $fenStr
  }
  for {set bRow 56} {$bRow >= 0} {incr bRow -8} {
    if {$bRow < 56} { append fenStr "/" }
    set emptyRun 0
    for {set bCol 0} {$bCol < 8} {incr bCol} {
      set sq [expr {$bRow + $bCol} ]
      set piece [string index $setupBd $sq]
      if {$piece == "."} {
        incr emptyRun
      } else {
        if {$emptyRun > 0} {
          append fenStr $emptyRun
          set emptyRun 0
        }
        append fenStr $piece
      }
    }
    if {$emptyRun > 0} { append fenStr $emptyRun }
  }
  append fenStr " " [string tolower [string index $toMove 0]] " "
  if {$castling == ""} {
    append fenStr "- "
  } else {
    append fenStr $castling " "
  }
  if {$epFile == ""  ||  $epFile == "-"} {
    append fenStr "-"
  } else {
    append fenStr $epFile
    if {$toMove == "White"} {
      append fenStr "6"
    } else {
      append fenStr "3"
    }
  }
  # We assume a halfmove clock of zero:
  append fenStr " 0 " $moveNum
  set setupFen $fenStr
  return $fenStr
}

# validateSetup:
#   Called by makeSetupFen to check that the board is sensible: that is,
#   that there is one king per side and there are at most 16 pieces per
#   side.
#
proc validateSetup {} {
  global setupBd
  set wkCount 0; set bkCount 0; set wCount 0; set bCount 0
  set wpCount 0; set bpCount 0
  for {set i 0} {$i < 64} {incr i} {
    set p [string index $setupBd $i]
    if {$p == "."} {
    } elseif {$p == "P"} { incr wCount; incr wpCount
    } elseif {$p == "p"} { incr bCount; incr bpCount
    } elseif {$p == "N" || $p == "B" || $p == "R" || $p == "Q"} {
      incr wCount
    } elseif {$p == "n" || $p == "b" || $p == "r" || $p == "q"} {
      incr bCount
    } elseif {$p == "K"} { incr wCount; incr wkCount
    } elseif {$p == "k"} { incr bCount; incr bkCount
    } else { return "Invalid piece: $p" }
  }
  if {$wkCount != 1} { return "There must be one white king"
  } elseif {$bkCount != 1} { return "There must be one black king"
  } elseif {$wCount > 16} { return "Too many white pieces"
  } elseif {$bCount > 16} { return "Too many black pieces"
  } elseif {$wpCount > 8} { return "Too many white pawns"
  } elseif {$bpCount > 8} { return "Too many black pawns" }
  return ""
}

# setupBoardPiece:
#    Called by setupBoard to set or clear a square when it is clicked on.
#    Sets that square to containing the active piece (stored in pastePiece)
#    unless it already contains that piece, in which case the square is
#    cleared to be empty.
#
proc setupBoardPiece { square } {
  global setupBd pastePiece boardSize setupFen
  set oldState $setupBd
  set setupBd {}
  set piece $pastePiece
  if {[string index $oldState $square] == $pastePiece} {
    set piece "."
  }
  if {$piece == "P"  ||  $piece == "p"} {
    if {$square < 8  ||  $square >= 56} {
      set setupBd $oldState
      unset oldState
      return
    }
  }
  append setupBd \
    [string range $oldState 0 [expr {$square - 1} ]] \
    $piece \
    [string range $oldState [expr {$square + 1} ] 63]
  unset oldState
  setBoard .setup.bd $setupBd $boardSize
  set setupFen [makeSetupFen]
}

# switchPastePiece:
#   Changes the active piece selection in the board setup dialog to the
#   next or previous piece in order.
#
proc switchPastePiece { switchType } {
  global pastePiece
  array set nextPiece { K Q Q R R B B N N P P k k q q r r b b n n p p K}
  array set prevPiece { K p Q K R Q B R N B P N k P q k r q b r n b p n}
  if {$switchType == "next"} {
    set pastePiece $nextPiece($pastePiece)
  } else {
    set pastePiece $prevPiece($pastePiece)
  }
}

# Global variables for entry of the start position:
set epFile {}          ;# legal values are empty, or "a"-"h".
set moveNum 1          ;# legal values are 1-999.
set setupStatus {}     ;# stores the FEN string.
set castling KQkq      ;# will be empty or some combination of KQkq letters.
set toMove White       ;# side to move, "White" or "Black".
set pastePiece K       ;# Piece being pasted, "K", "k", "Q", "q", etc.

# Traces to keep entry values sensible:

trace variable moveNum w {::utils::validate::Integer 999 0}
trace variable epFile w {::utils::validate::Regexp {^(-|[a-h])?$}}
trace variable castling w {::utils::validate::Regexp {^(-|[KQkq]*)$}}


# setupBoard:
#   The main procedure for creating the dialog for setting the start board.
#   Calls switchPastePiece and makeSetupFen.
#   On "Setup" button press, calls sc_pos startBoard to try to set the
#   starting board.
#
proc setupBoard {} {
  global boardSize lite dark setupBd pastePiece toMove epFile moveNum
  global setupStatus castling setupFen highcolor
  if {[winfo exists .setup]} { return }
  set setupBd [sc_pos board]
  toplevel .setup
  wm title .setup "Scid: Set Start Board"

  ### Status entrybox contains the current FEN string.

  frame .setup.statusbar
  pack .setup.statusbar -side bottom -expand yes -fill x

  ### The actual board is created here. Bindings: left mouse sets/clears
  ### a square, middle mouse selects previous piece, right mouse selects
  ### next piece.  I should also set shortcut keys, e.g. "Q" for Queen.

  frame .setup.bd -cursor crosshair
  set sbd .setup.bd
  for {set i 0} {$i < 64} {incr i} {
    label $sbd.$i -image e$boardSize
    set rank [expr {7 - int ($i / 8)} ]
    set fyle [expr {$i % 8} ]
    grid $sbd.$i -row $rank -column $fyle -sticky nesw
    if {[expr {($fyle % 2) == ($rank % 2)} ]} {
      $sbd.$i configure -background $lite
    } else {
      $sbd.$i configure -background $dark
    }
    bind $sbd.$i <ButtonPress-1> "setupBoardPiece $i"
    bind $sbd.$i <ButtonPress-2> "switchPastePiece prev"
    bind $sbd.$i <ButtonPress-3> "switchPastePiece next"
  }
  pack $sbd -side left -ipadx 10 -ipady 10
  setBoard $sbd $setupBd $boardSize

  ### Piece Buttons

  frame .setup.r
  set sr .setup.r
  frame $sr.sw; frame $sr.sb
  #set pastePiece P
  #set toMove White
  foreach i {k q r b n p} {
    set i2 [string toupper $i]
    radiobutton $sr.sw.$i -image w${i}$boardSize -indicatoron 0 \
      -variable pastePiece -value $i2 -activebackground $highcolor
    pack $sr.sw.$i -side left
    radiobutton $sr.sb.$i -image b${i}$boardSize -indicatoron 0 \
      -variable pastePiece -value $i -activebackground $highcolor
    pack $sr.sb.$i -side left
  }

  ### Quick Board Setup buttons: Clear Board and Initial Board.

  frame $sr.b
  button $sr.b.clear -textvar ::tr(EmptyBoard) -command {
    set setupBd \
      "................................................................"
    setBoard .setup.bd $setupBd $boardSize
    set castling {}
    set setupFen [makeSetupFen]
  }
  button $sr.b.initial -textvar ::tr(InitialBoard) -command {
    set setupBd \
      "RNBQKBNRPPPPPPPP................................pppppppprnbqkbnr"
    setBoard .setup.bd $setupBd $boardSize
    set castling KQkq
    set setupFen [makeSetupFen]
  }

  ### Side to move frame.

  frame $sr.tomove
  label $sr.tomove.label -textvar ::tr(SideToMove:)
  radiobutton $sr.tomove.w -text $::tr(White) -variable toMove -value White \
    -command {set setupFen [makeSetupFen]}
  radiobutton $sr.tomove.b -text $::tr(Black) -variable toMove -value Black \
    -command {set setupFen [makeSetupFen]}
  pack $sr.tomove.label $sr.tomove.w $sr.tomove.b -side left

  ### Entry boxes: Move number, Castling and En Passant file.

  frame $sr.movenum
  label $sr.movenum.label -textvar ::tr(MoveNumber:)
  entry $sr.movenum.e -width 3 -background white -textvariable moveNum
  pack $sr.movenum.label $sr.movenum.e -side left

  frame $sr.castle
  label $sr.castle.label -textvar ::tr(Castling:)
  ::combobox::combobox $sr.castle.e -width 5 -background white -textvariable castling
  pack $sr.castle.label $sr.castle.e -side left
  foreach c {KQkq KQ kq -} {
    $sr.castle.e list insert end $c
  }

  frame $sr.ep
  label $sr.ep.label -textvar ::tr(EnPassantFile:)
  ::combobox::combobox $sr.ep.e -width 2 -background white -textvariable epFile
  set epFile {}
  pack $sr.ep.label $sr.ep.e -side left
  foreach f {- a b c d e f g h} {
    $sr.ep.e list insert end $f
  }

  # Set bindings so the Fen string is updated at any change. The "after idle"
  # is needed to ensure any keypress which causes a text edit is processed
  # before we regenerate the FEN text.

  foreach i "$sr.ep.e $sr.castle.e $sr.movenum.e" {
    bind $i <Any-KeyPress> {after idle {set setupFen [makeSetupFen]}}
    bind $i <FocusOut> {
      after idle {set setupFen [makeSetupFen]}}
  }

  ### Buttons: Setup and Cancel.

  frame $sr.b2
  button $sr.b2.setup -text "OK" -command {
    if {[catch {sc_game startBoard $setupFen} err]} {
      tk_messageBox -icon info -type ok -title "Scid" -message $err
    } else {
      ::utils::history::AddEntry setupFen $setupFen
      destroy .setup
      updateBoard -pgn
    }
  }
  button $sr.b2.cancel -textvar ::tr(Cancel) -command {
    destroy .setup
  }
  pack $sr.b2.setup $sr.b2.cancel -side left -ipadx 10 -padx 5
  pack $sr -side right
  pack $sr.sw $sr.sb $sr.b $sr.tomove $sr.movenum $sr.castle $sr.ep \
    $sr.b2 -side top -pady 10
  pack $sr.b.clear $sr.b.initial -side left

  button .setup.paste -textvar ::tr(PasteFen) -command {
    if {[catch {set setupFen [selection get -selection CLIPBOARD]} ]} {
      catch {set setupFen [selection get -selection PRIMARY]}
    }
  }
  button .setup.clear -textvar ::tr(ClearFen) -command {set setupFen ""}
  ::combobox::combobox .setup.status -relief sunken -textvariable setupFen \
    -font font_Small -background white
  ::utils::history::SetCombobox setupFen .setup.status
  pack .setup.paste .setup.clear -in .setup.statusbar -side left
  pack .setup.status -in .setup.statusbar -side right -expand yes -fill x -anchor w
  #bind .setup.status <FocusIn>  { %W configure -background lightYellow }
  #bind .setup.status <FocusOut> { %W configure -background white }

  set setupFen [makeSetupFen]
}


# ::game::ConfirmDiscard
#
#   Prompts the user if they want to discard the changes to the
#   current game. Returns 1 if they selected yes, 0 otherwise.
#
proc ::game::ConfirmDiscard {} {
  if {$::trialMode} { return 1 }
  if {[sc_base isReadOnly]} { return 1 }
  if {! [sc_game altered]} { return 1 }
  set answer [ tk_dialog .cgDialog "Scid: [tr GameNew]" \
                 $::tr(ClearGameDialog) "" 0 $::tr(Yes) $::tr(No) ]
  if {$answer == 1} { return  0 }
  return 1
}

# ::game::Clear
#
#   Clears the active game, checking first if it is altered.
#   Updates any affected windows.
#
proc ::game::Clear {} {
  if {![::game::ConfirmDiscard]} { return }
  setTrialMode 0
  sc_game new
  updateBoard -pgn
  updateTitle
  updateMenuStates
}

# ::game::Strip
#
#   Strips all comments or variations from a game
#
proc ::game::Strip {type} {
  if {[catch {sc_game strip $type} result]} {
    tk_messageBox -parent . -type ok -icon info -title "Scid" -message $result
    return
  }
  updateBoard -pgn
  updateTitle
}

# ::game::TruncateBegin
#
proc ::game::TruncateBegin {} {
  if {[catch {sc_game truncate -start} result]} {
    tk_messageBox -parent . -type ok -icon info -title "Scid" -message $result
    return
  }
  updateBoard -pgn
  updateTitle
}

# ::game::Truncate
#
proc ::game::Truncate {} {
  if {[catch {sc_game truncate} result]} {
    tk_messageBox -parent . -type ok -icon info -title "Scid" -message $result
    return
  }
  updateBoard -pgn
  updateTitle
}

# game::LoadNextPrev
#
#   Loads the next or previous filtered game in the database.
#   The parameter <action> should be "previous" or "next".
#
proc ::game::LoadNextPrev {action} {
  global pgnWin statusBar
  if {![sc_base inUse]} {
    set statusBar "  There is no $action game: this is an empty database."
    return
  }
  set number [sc_filter $action]
  if {$number == 0} {
    set statusBar "  There is no $action game in the current filter."
    return
  }
  ::game::Load $number
}

# ::game::Reload
#
#   Reloads the current game.
#
proc ::game::Reload {} {
  if {![sc_base inUse]} { return }
  if {[sc_game number] < 1} { return }
  ::game::Load [sc_game number]
}

# ::game::LoadRandom
#
#   Loads a random game from the database.
#
proc ::game::LoadRandom {} {
  set ngames [sc_filter size]
  if {$ngames == 0} { return }
  set r [expr {(int (rand() * $ngames)) + 1} ]
  set gnumber [sc_filter index $r]
  ::game::Load $gnumber
}


# ::game::LoadNumber
#
#    Prompts for the number of the game to load.
#
set ::game::entryLoadNumber ""
trace variable ::game::entryLoadNumber w {::utils::validate::Regexp {^[0-9]*$}}

proc ::game::LoadNumber {} {
  set ::game::entryLoadNumber ""
  if {![sc_base inUse]} { return }
  if {![::game::ConfirmDiscard]} { return }
  if {[sc_base numGames] < 1} { return }
  set w [toplevel .glnumDialog]
  wm title $w "Scid: [tr GameNumber]"
  grab $w

  label $w.label -text $::tr(LoadGameNumber)
  pack $w.label -side top -pady 5 -padx 5

  entry $w.entry -background white -width 10 -textvariable ::game::entryLoadNumber
  bind $w.entry <Escape> { .glnumDialog.buttons.cancel invoke }
  bind $w.entry <Return> { .glnumDialog.buttons.load invoke }
  pack $w.entry -side top -pady 5

  set b [frame $w.buttons]
  pack $b -side top -fill x
  dialogbutton $b.load -text "OK" -command {
    grab release .glnumDialog
    if {[catch {sc_game load $::game::entryLoadNumber} result]} {
      tk_messageBox -type ok -icon info -title "Scid" -message $result
    }
    focus .
    destroy .glnumDialog
    flipBoardForPlayerNames $::myPlayerNames
    updateBoard -pgn
    ::windows::gamelist::Refresh
    updateTitle
  }
  dialogbutton $b.cancel -text $::tr(Cancel) -command {
    focus .
    grab release .glnumDialog
    destroy .glnumDialog
    focus .
  }
  packbuttons right $b.cancel $b.load

  set x [ expr {[winfo width .] / 4 + [winfo rootx .] }]
  set y [ expr {[winfo height .] / 4 + [winfo rooty .] }]
  wm geometry $w "+$x+$y"

  focus $w.entry
}

# ::game::Load
#
#   Loads a specified game from the active database.
#
proc ::game::Load { selection } {
  # If an invalid game number, just return:
  if {$selection < 1} { return }
  if {$selection > [sc_base numGames]} { return }
  if {![::game::ConfirmDiscard]} { return }
  setTrialMode 0
  sc_game load $selection
  flipBoardForPlayerNames $::myPlayerNames
  updateBoard -pgn
  ::windows::gamelist::Refresh
  updateTitle
}

# ::game::LoadMenu
#
#   Produces a popup dialog for loading a game or other actions
#   such as merging it into the current game.
#
proc ::game::LoadMenu {w base gnum x y} {
  set m $w.gLoadMenu
  if {! [winfo exists $m]} {
    menu $m
    $m add command -label $::tr(BrowseGame)
    $m add command -label $::tr(LoadGame)
    $m add command -label $::tr(MergeGame)
  }
  $m entryconfigure 0 -command "::gbrowser::new $base $gnum"
  $m entryconfigure 1 -command "sc_base switch $base; ::game::Load $gnum"
  $m entryconfigure 2 -command "mergeGame $base $gnum"
  event generate $w <ButtonRelease-1>
  $m post $x $y
  event generate $m <ButtonPress-1>
}


# ::game::moveEntryNumber
#
#   Entry variable for GotoMoveNumber dialog.
#
set ::game::moveEntryNumber ""
trace variable ::game::moveEntryNumber w {::utils::validate::Regexp {^[0-9]*$}}

# ::game::GotoMoveNumber
#
#    Prompts for the move number to go to in the current game.
#
proc ::game::GotoMoveNumber {} {
  set ::game::moveEntryNumber ""
  set w [toplevel .mnumDialog]
  wm title $w "Scid: [tr GameGotoMove]"
  grab $w

  label $w.label -text $::tr(GotoMoveNumber)
  pack $w.label -side top -pady 5 -padx 5

  entry $w.entry -background white -width 10 -textvariable ::game::moveEntryNumber
  bind $w.entry <Escape> { .mnumDialog.buttons.cancel invoke }
  bind $w.entry <Return> { .mnumDialog.buttons.load invoke }
  pack $w.entry -side top -pady 5

  set b [frame $w.buttons]
  pack $b -side top -fill x
  dialogbutton $b.load -text "OK" -command {
    grab release .mnumDialog
    if {$::game::moveEntryNumber > 0} {
      catch {sc_move ply [expr {($::game::moveEntryNumber - 1) * 2}]}
    }
    focus .
    destroy .mnumDialog
    updateBoard -pgn
  }
  dialogbutton $b.cancel -text $::tr(Cancel) -command {
    focus .
    grab release .mnumDialog
    destroy .mnumDialog
    focus .
  }
  packbuttons right $b.cancel $b.load

  set x [ expr {[winfo width .] / 4 + [winfo rootx .] } ]
  set y [ expr {[winfo height .] / 4 + [winfo rooty .] } ]
  wm geometry $w "+$x+$y"

  focus $w.entry
}

####################
# Game Browser window

namespace eval ::gbrowser {}
set ::gbrowser::size 35

proc ::gbrowser::new {base gnum {ply -1}} {
  set n 0
  while {[winfo exists .gb$n]} { incr n }
  set w .gb$n
  toplevel $w
  if {$base < 1} { set base [sc_base current] }
  if {$gnum < 1} { set game [sc_game number] }
  set filename [file tail [sc_base filename $base]]
  wm title $w "Scid: $::tr(BrowseGame) ($filename: $gnum)"
  set header [sc_game summary -base $base -game $gnum header]
  set ::gbrowser::boards($n) [sc_game summary -base $base -game $gnum boards]
  set moves [sc_game summary -base $base -game $gnum moves]

  pack [frame $w.b] -side bottom -fill x
  ::board::new $w.bd $::gbrowser::size
  $w.bd configure -relief solid -borderwidth 1
  pack $w.bd -side left -padx 4 -pady 4

  #pack [frame $w.t] -side right -fill both -expand yes
  #text $w.t.text -foreground black -background white -wrap word \
  #  -width 45 -height 12 -font font_Small -yscrollcommand "$w.t.ybar set" \
  #  -setgrid 1
  #scrollbar $w.t.ybar -command "$w.t.text yview" -takefocus 0
  #pack $w.t.ybar -side right -fill y
  #pack $w.t.text -side left -fill both -expand yes
  autoscrollframe $w.t text $w.t.text \
    -foreground black -background white -wrap word \
    -width 45 -height 12 -font font_Small -setgrid 1
  pack $w.t -side right -fill both -expand yes

  set t $w.t.text
  event generate $t <ButtonRelease-1>
  $t tag configure header -foreground darkBlue
  $t tag configure next -foreground yellow -background darkBlue
  $t insert end "$header" header
  $t insert end "\n\n"
  set m 0
  foreach i $moves {
    set moveTag m$m
    $t insert end $i $moveTag
    $t insert end " "
    $t tag bind $moveTag <ButtonRelease-1> "::gbrowser::update $n $m"
    $t tag bind $moveTag <Any-Enter> \
      "$t tag configure $moveTag -foreground red
       $t configure -cursor hand2"
    $t tag bind $moveTag <Any-Leave> \
      "$t tag configure $moveTag -foreground {}
       $t configure -cursor {}"
    incr m
  }
  bind $w <F1> {helpWindow GameList Browsing}
  bind $w <Escape> "destroy $w"
  bind $w <Home> "::gbrowser::update $n start"
  bind $w <End> "::gbrowser::update $n end"
  bind $w <Left> "::gbrowser::update $n -1"
  bind $w <Right> "::gbrowser::update $n +1"
  bind $w <Up> "::gbrowser::update $n -10"
  bind $w <Down> "::gbrowser::update $n +10"
  bind $w <Control-Shift-Left> "::board::resize $w.bd -1"
  bind $w <Control-Shift-Right> "::board::resize $w.bd +1"

  button $w.b.start -image tb_start -command "::gbrowser::update $n start"
  button $w.b.back -image tb_prev -command "::gbrowser::update $n -1"
  button $w.b.forward -image tb_next -command "::gbrowser::update $n +1"
  button $w.b.end -image tb_end -command "::gbrowser::update $n end"
  frame $w.b.gap -width 3
  button $w.b.autoplay -image autoplay_off -command "::gbrowser::autoplay $n"
  frame $w.b.gap2 -width 3
  set ::gbrowser::flip($n) [::board::isFlipped .board]
  button $w.b.flip -image tb_flip -command "::gbrowser::flip $n"

  pack $w.b.start $w.b.back $w.b.forward $w.b.end $w.b.gap \
    $w.b.autoplay $w.b.gap2 $w.b.flip -side left -padx 3 -pady 1

  set ::gbrowser::autoplay($n) 0

  if {$gnum > 0} {
    button $w.b.load -textvar ::tr(LoadGame) \
      -command "sc_base switch $base; ::game::Load $gnum"
    button $w.b.merge -textvar ::tr(MergeGame) \
      -command "mergeGame $base $gnum"
  }
  button $w.b.close -textvar ::tr(Close) -command "destroy $w"
  pack $w.b.close -side right -padx 1 -pady 1
  if {$gnum > 0} {
    pack $w.b.merge $w.b.load -side right -padx 1 -pady 1
  }

  wm resizable $w 1 0
  if {$ply < 0} {
    set ply 0
    if {$gnum > 0} {
      set ply [sc_filter value $base $gnum]
      if {$ply > 0} { incr ply -1 }
    }
  }
  ::gbrowser::update $n $ply
}

proc ::gbrowser::flip {n} {
  ::board::flip .gb$n.bd
}

proc ::gbrowser::update {n ply} {
  set w .gb$n
  if {! [winfo exists $w]} { return }
  set oldply 0
  if {[info exists ::gbrowser::ply($n)]} { set oldply $::gbrowser::ply($n) }
  if {$ply == "forward"} { set ply [expr {$oldply + 1} ] }
  if {$ply == "back"} { set ply [expr {$oldply - 1} ] }
  if {$ply == "start"} { set ply 0 }
  if {$ply == "end"} { set ply 9999 }
  if {[string index $ply 0] == "-"  ||  [string index $ply 0] == "+"} {
    set ply [expr {$oldply + $ply} ]
  }
  if {$ply < 0} { set ply 0 }
  set max [expr {[llength $::gbrowser::boards($n)] - 1} ]
  if {$ply > $max} { set ply $max }
  set ::gbrowser::ply($n) $ply
  ::board::update $w.bd [lindex $::gbrowser::boards($n) $ply] 1

  set t $w.t.text
  $t configure -state normal
  set moveRange [$t tag nextrange m$ply 1.0]
  $t tag remove next 1.0 end
  set moveRange [$t tag nextrange m$ply 1.0]
  if {[llength $moveRange] == 2} {
    $t tag add next [lindex $moveRange 0] [lindex $moveRange 1]
    $t see [lindex $moveRange 0]
  }
  $t configure -state disabled

  if {$::gbrowser::autoplay($n)} {
    if {$ply >= $max} {
      ::gbrowser::autoplay $n
    } else {
      after cancel "::gbrowser::update $n +1"
      after $::autoplayDelay "::gbrowser::update $n +1"
    }
  }
}

proc ::gbrowser::autoplay {n} {
  if {$::gbrowser::autoplay($n)} {
    set ::gbrowser::autoplay($n) 0
    .gb$n.b.autoplay configure -image autoplay_off
    return
  } else {
    set ::gbrowser::autoplay($n) 1
    .gb$n.b.autoplay configure -image autoplay_on
    ::gbrowser::update $n +1
  }
}

###
### windows.tcl: part of Scid.
### Copyright (C) 1999-2003  Shane Hudson.
###


namespace eval ::windows {

    # TODO
}

########################################################################
###  Optional windows: all off initially.

set treeWin 0
set pgnWin 0
set commentWin 0
set filterGraph 0

set nagValue 0

# recordWinSize:
#   Records window width and height, for saving in options file.
#
proc recordWinSize {win} {
  global winWidth winHeight winX winY
  if {![winfo exists $win]} { return }
  set temp [wm geometry $win]

  set n [scan $temp "%dx%d+%d+%d" width height x y]
  if {$n == 4} {
    set winWidth($win) $width
    set winHeight($win) $height
    set winX($win) $x
    set winY($win) $y
  }
}

proc setWinLocation {win} {
  global winX winY
  if {[info exists winX($win)]  &&  [info exists winY($win)]  && \
        $winX($win) >= 0  &&  $winY($win) >= 0} {
    catch [list wm geometry $win "+$winX($win)+$winY($win)"]
  }
}

proc setWinSize {win} {
  global winWidth winHeight
  if {[info exists winWidth($win)]  &&  [info exists winHeight($win)]  &&  \
    $winWidth($win) > 0  &&  $winHeight($win) > 0} {
    catch [list wm geometry $win "$winWidth($win)x$winHeight($win)"]
  }
}


###
### End of file: windows.tcl
###

########################################################################
### Games list window

set ::windows::gamelist::isOpen 0
set glstart 1
set glSelection 0
set glNumber 0

array set ::windows::gamelist::names {
  g Number
  f Filtered
  w White
  W WElo
  b Black
  B BElo
  e Event
  s Site
  n Round
  d Date
  y Year
  E EDate
  r Result
  m Length
  c Country
  o ECO
  O Opening
  F EndMaterial
  D Deleted
  U Flags
  V Vars
  C Comments
  A Annos
  S Start
}

# glistExtra is the window that displays the starting moves of a
# game when the middle mouse button is pressed in the game list window.

toplevel .glistExtra
wm overrideredirect .glistExtra 1
wm withdraw .glistExtra
text .glistExtra.text -font font_Small -background lightYellow \
  -width 40 -height 8 -wrap word -relief solid -borderwidth 1
pack .glistExtra.text -side top

set glistMaxWidth 30

set ::windows::gamelist::findtext ""
set ::windows::gamelist::goto ""
trace variable ::windows::gamelist::goto w {::utils::validate::Regexp {^[0-9]*$}}


proc ::windows::gamelist::FindText {} {
  global glstart
  variable findtext
  busyCursor .glistWin 1
  ::utils::history::AddEntry ::windows::gamelist::findtext $findtext
  set temp [sc_filter textfind $glstart $findtext]
  busyCursor .glistWin 0
  if {$temp < 1} { set temp 1 }
  set glstart $temp
  ::windows::gamelist::Refresh
}


proc ::windows::gamelist::Open {} {
  global glstart glistSize highcolor glSelection helpMessage
  global glistFields glNumber buttoncolor
  if {[winfo exists .glistWin]} {
    focus .
    destroy .glistWin
    set ::windows::gamelist::isOpen 0
    return
  }
  set w .glistWin
  toplevel $w
  # Window is only directly resizable vertically:
  wm resizable $w false true
  setWinLocation $w

  # Pack buttons frame first:
  pack [frame $w.b] -side bottom -fill x -ipady 5 -padx 10
  scale $w.scale -from 1 -length 250 -orient horiz \
    -variable glstart -showvalue 0 -command ::windows::gamelist::SetStart \
    -bigincrement $glistSize -takefocus 0 -width 10 -troughcolor $buttoncolor
  pack $w.scale -side bottom -fill x -padx 30 -pady 4
  frame $w.columns -takefocus 1 -highlightcolor black -highlightthickness 2
  pack $w.columns -side top -expand yes -fill both

  # Make each column in the listing:
  foreach i $glistFields {
    set code [lindex $i 0]
    set width [lindex $i 1]
    set justify [lindex $i 2]
    set fgcolor [lindex $i 3]
    set sep [lindex $i 4]
    frame $w.c$code

    if {[info exists ::windows::gamelist::names($code)]} {
      set name $::windows::gamelist::names($code)
    }
    if {[info exists ::tr(Glist$name)]} { set name $::tr(Glist$name) }

    # Each heading is a label:
    label $w.c$code.header -foreground darkBlue -width $width \
      -font font_Small -relief flat -background gray90 \
      -text $name -anchor w
    set helpMessage(E,$w.c$code.header) \
      {Press the left or right mouse button here for a configuration menu}

    bind $w.c$code.header <Control-ButtonPress-3> "incrGLwidth $code; break"
    bind $w.c$code.header <Control-ButtonPress-1> "decrGLwidth $code; break"
    bind $w.c$code.header <Shift-ButtonPress-3> "incrGLwidth $code; break"
    bind $w.c$code.header <Shift-ButtonPress-1> "decrGLwidth $code; break"
    bind $w.c$code.header <ButtonPress-1> "popupGLconfig $code %x %y %X %Y"
    bind $w.c$code.header <ButtonPress-3> "popupGLconfig $code %x %y %X %Y"
    pack $w.c$code -in $w.columns -side left -expand yes -fill y -padx 0
    pack $w.c$code.header -side top
    addHorizontalRule $w.c$code 1 flat

    text $w.c$code.text -background white -width $width \
      -height $glistSize -font font_Small -relief flat \
      -foreground $fgcolor -wrap none -setgrid 1 -cursor top_left_arrow
    $w.c$code.text tag configure align -justify $justify \
      -foreground $fgcolor
    $w.c$code.text tag configure highlight -background lightBlue
    $w.c$code.text tag configure current -background lightYellow2
    $w.c$code.text tag configure underline -underline true

    bind $w.c$code.text <Button1-Motion> "break"
    bind $w.c$code.text <Button2-Motion> "break"
    bind $w.c$code.text <Double-Button-1> \
      "::windows::gamelist::SetSelection $code %x %y; ::game::Load \$glNumber; break"
    bind $w.c$code.text <Button-1> \
      "::windows::gamelist::SetSelection $code %x %y; ::windows::gamelist::Highlight \$glSelection; break"
    bind $w.c$code.text <ButtonRelease-1> \
      "::windows::gamelist::SetSelection $code %x %y; ::windows::gamelist::Dehighlight; break"

    bind $w.c$code.text <ButtonPress-3> "popupGLmenu $code %x %y %X %Y"

    bind $w.c$code.text <ButtonPress-2> \
      "::windows::gamelist::SetSelection $code %x %y; ::windows::gamelist::ShowMoves %X %Y; break"
    bind $w.c$code.text <ButtonRelease-2> \
      "wm withdraw .glistExtra; ::windows::gamelist::Dehighlight; break"

    pack $w.c$code.text -side top -expand true -fill y
    if {$sep} { addVerticalRule $w.columns 1 flat }
  }

  menu $w.config -tearoff 0
  $w.config add cascade -label $::tr(GlistMoveField) -menu $w.config.move
  menu $w.config.move -tearoff 0
  $w.config add command -label $::tr(GlistEditField...)
  $w.config add cascade -label $::tr(GlistAddField) -menu $w.config.insert
  menu $w.config.insert -tearoff 0
  $w.config add command -label $::tr(GlistDeleteField)

  menu $w.popup -tearoff 0
  $w.popup add command -label $::tr(BrowseGame) \
    -command {::gbrowser::new 0 $glNumber}
  $w.popup add command -label $::tr(LoadGame) -command {::game::Load $glNumber}
  $w.popup add command -label $::tr(MergeGame) -command mergeGame
  $w.popup add separator
  $w.popup add command -label "Remove this game from Filter" \
    -command removeFromFilter
  $w.popup add command -label "Remove game (and all above it) from Filter" \
    -command {removeFromFilter up}
  $w.popup add command -label "Remove game (and all below it) from Filter" \
    -command {removeFromFilter down}
  $w.popup add separator
  $w.popup add command -label "(Un)Delete this game" \
    -command {::windows::gamelist::ToggleFlag delete}
  $w.popup add command -label "Delete all games in filter" \
    -command {catch {sc_game flag delete filter 1}; ::windows::gamelist::Refresh}
  $w.popup add command -label "Undelete all games in filter" \
    -command {catch {sc_game flag delete filter 0}; ::windows::gamelist::Refresh}

  button $w.b.start -image tb_start -command {set glstart 1; ::windows::gamelist::Refresh}
  set helpMessage(E,$w.b.start) {Go to the first page of games}

  button $w.b.pgup -image tb_prev -command {
    set glstart [expr {$glstart - $glistSize}];
    if {$glstart < 1} { set glstart 1 };
    ::windows::gamelist::Refresh
  }
  set helpMessage(E,$w.b.pgup) {Previous page of games}

  button $w.b.pgdn -image tb_next  -command {
    set glstart [expr {$glstart + $glistSize}];
    if {$glstart > [sc_filter count] } {
      set glstart [sc_filter count]
    }
    if {$glstart < 1} { set glstart 1 }
    ::windows::gamelist::Refresh
  }
  set helpMessage(E,$w.b.pgdn) {Next page of games}

  button $w.b.end -image tb_end -command {
    set glstart [expr {[sc_filter count] - $glistSize + 1}]
    if {$glstart < 1} { set glstart 1}
    ::windows::gamelist::Refresh
  }
  set helpMessage(E,$w.b.end) {Go to the last page of games}

  button $w.b.current -textvar ::tr(Current) -font font_Small -command {
    set glstart [sc_filter locate [sc_game number]]
    if {$glstart < 1} { set glstart 1}
    ::windows::gamelist::Refresh
  }

  bind $w <Up> {
    set glstart [expr {$glstart - 1}]
    if {$glstart < 1} { set glstart 1 }
    ::windows::gamelist::Refresh
  }
  bind $w <Down> {
    set glstart [expr {$glstart + 1}]
    if {$glstart > [sc_filter count] } {
      set glstart [sc_filter count]
    }
    ::windows::gamelist::Refresh
  }

  bind $w <Home>  "$w.b.start invoke"
  bind $w <End>   "$w.b.end invoke"
  bind $w <Prior> "$w.b.pgup invoke"
  bind $w <Next>  "$w.b.pgdn invoke"

  label $w.b.gotolabel -textvar ::tr(GlistGameNumber:)
  entry $w.b.goto -bg white -width 8 -textvariable ::windows::gamelist::goto
  bind $w.b.goto <Home> "$w.b.start invoke; break"
  bind $w.b.goto <End> "$w.b.end invoke; break"
  bind $w.b.goto <Return> {
    set glstart [sc_filter locate $::windows::gamelist::goto]
    if {$glstart < 1} { set glstart 1}
    set ::windows::gamelist::goto ""
    ::windows::gamelist::Refresh
  }

  label $w.b.findlabel -textvar ::tr(GlistFindText:)
  ::combobox::combobox $w.b.find -background white -width 15 \
    -textvariable ::windows::gamelist::findtext
  ::utils::history::SetCombobox ::windows::gamelist::findtext $w.b.find
  bind $w.b.find <Return> ::windows::gamelist::FindText
  bind $w.b.find <Home> "$w.b.find icursor 0; break"
  bind $w.b.find <End> "$w.b.find icursor end; break"

  frame $w.b.space -width 0.25c
  frame $w.b.space2 -width 0.25c

  button $w.b.export -textvar ::tr(Save...) -command openExportGList
  button $w.b.help -textvar ::tr(Help) -command { helpWindow GameList }
  button $w.b.close -textvar ::tr(Close) -command { focus .; destroy .glistWin }

  pack $w.b.start $w.b.pgup $w.b.pgdn $w.b.end $w.b.current -side left -padx 1
  pack $w.b.space $w.b.gotolabel $w.b.goto -side left
  pack $w.b.space2 $w.b.findlabel $w.b.find -side left
  pack $w.b.close $w.b.help $w.b.export -side right -padx 5

  set ::windows::gamelist::isOpen 1
  bind $w <F1> { helpWindow GameList }
  bind $w <Destroy> { set ::windows::gamelist::isOpen 0 }
  bind $w <Escape> "$w.b.close invoke"
  standardShortcuts $w

  # MouseWheel bindings:
  bind $w <MouseWheel> {::windows::gamelist::Scroll [expr {- (%D / 120)}]}
  if {! $::windowsOS} {
    bind $w <Button-4> {::windows::gamelist::Scroll -1}
    bind $w <Button-5> {::windows::gamelist::Scroll 1}
  }

  # Binding to reset glistSize when the window is resized:
  # The way this is done is very ugly, but the only way I could
  # find that actually works.
  # Set temp to window geometry (e.g. 80x20+...) and then
  # extract the part between the "x" and the first "+" or "-":
  bind $w <Configure> {
    recordWinSize .glistWin
    set temp [wm geometry .glistWin]
    set temp [string range $temp [expr {[string first "x" $temp] + 1}] end]
    set idx [string first "+" $temp]
    if {$idx != -1} {
      set temp [string range $temp 0 [expr {$idx - 1}]]
    }
    set idx [string first "-" $temp]
    if {$idx != -1} {
      set temp [string range $temp 0 [expr {$idx - 1}]]
    }
    if {$temp != $glistSize && $temp > 0} {
      set glistSize $temp
      ::windows::gamelist::Refresh
    }
  }

  wm iconname $w "Scid: [tr WindowsGList]"
  ::windows::gamelist::Refresh
  focus $w.b.goto
}

proc ::windows::gamelist::Scroll {nlines} {
  global glstart
  set glstart [expr {$glstart + $nlines}]
  if {$glstart > [sc_filter count] } {
    set glstart [sc_filter count]
  }
  if {$glstart < 1} { set glstart 1 }
  ::windows::gamelist::Refresh
}

proc ::windows::gamelist::SetSelection {code xcoord ycoord} {
  global glSelection glNumber
  set glSelection [expr {int([.glistWin.c$code.text index @$xcoord,$ycoord])}]
  set glNumber [.glistWin.cg.text get $glSelection.0 $glSelection.end]
}

proc incrGLwidth {code} {
  global glistSize glistMaxWidth
  set w .glistWin.c$code
  set width [$w.header cget -width]
  if {$width >= $glistMaxWidth} { return }
  incr width
  $w.header configure -width $width
  $w.text configure -width $width
  updateGLwidths $code $width
}

proc decrGLwidth {code} {
  global glistSize
  set w .glistWin.c$code
  set width [$w.header cget -width]
  if {$width <= 1} { return }
  incr width -1
  $w.header configure -width $width
  $w.text configure -width $width
  updateGLwidths $code $width
}

proc updateGLwidths {code width} {
  global glistFields
  set len [llength $glistFields]
  for {set i 0} {$i < $len} {incr i} {
    set column [lindex $glistFields $i]
    set tcode [lindex $column 0]
    if {$tcode != $code} { continue }
    set oldwidth [lindex $column 1]
    if {$oldwidth != $width} {
      set column [lreplace $column 1 1 $width]
      set glistFields [lreplace $glistFields $i $i $column]
    }
  }
}

proc ::windows::gamelist::Dehighlight {} {
  global glistFields glistSize
  foreach column $glistFields {
    set code [lindex $column 0]
    .glistWin.c$code.text tag remove highlight 1.0 end
  }
}

proc ::windows::gamelist::Highlight {linenum} {
  global glistFields glistSize
  foreach column $glistFields {
    set code [lindex $column 0]
    .glistWin.c$code.text tag remove highlight 1.0 end
    .glistWin.c$code.text tag add highlight $linenum.0 [expr {$linenum+1}].0
  }
}

proc popupGLconfig {code xcoord ycoord xscreen yscreen} {
  global glistFields glistAllFields
  set menu .glistWin.config

  # Move-field submenu:
  $menu.move delete 0 end
  $menu.move add command -label "|<<" -command "moveGLfield $code -99"
  $menu.move add command -label "<" -command "moveGLfield $code -1"
  $menu.move add command -label ">" -command "moveGLfield $code 1"
  $menu.move add command -label ">>|" -command "moveGLfield $code 99"

  # Configure-field command:
  $menu entryconfig 1 -command "configGLdialog $code"

  # Insert-field submenu:
  array set displayed {}
  foreach column $glistAllFields {
    set field [lindex $column 0]
    set displayed($field) 0
  }
  foreach column $glistFields {
    set tcode [lindex $column 0]
    set displayed($tcode) 1
  }
  $menu.insert delete 0 end
  foreach column $glistAllFields {
    set tcode [lindex $column 0]
    if {! $displayed($tcode)} {
      set name $::windows::gamelist::names($tcode)
      $menu.insert add command -label $::tr(Glist$name) \
        -command "insertGLfield $code $tcode"
    }
  }

  # Delete-field command:
  if {$code == "g"} {
    $menu entryconfig 3 -state disabled
  } else {
    $menu entryconfig 3 -state normal -command "deleteGLfield $code"
  }
  # event generate .glistWin <ButtonRelease-3>
  $menu post $xscreen [expr {$yscreen + 2}]
  event generate $menu <ButtonPress-1>
}

array set glconfig {}

proc configGLdialog {code} {
  global glistFields glconfig
  foreach column $glistFields {
    if {$code == [lindex $column 0]} {
      set glconfig(width) [lindex $column 1]
      set glconfig(align) [lindex $column 2]
      set glconfig(color) [lindex $column 3]
      set glconfig(sep) [lindex $column 4]
    }
  }
  set w .glconfig
  if {[winfo exists $w]} { return }
  toplevel $w
  wm title $w "Scid"
  label $w.title -text "$::windows::gamelist::names($code)" -font font_Bold
  pack $w.title -side top
  pack [frame $w.g] -side top -fill x
  label $w.g.width -text $::tr(GlistWidth)
  set m [tk_optionMenu $w.g.vwidth glconfig(width) 1 2 3 4 5 6 7 8 9 10 \
           11 12 13 14 15 16 17 18 19 20]
  $w.g.vwidth configure -width 3
  $m entryconfigure 10 -columnbreak 1
  label $w.g.align -text $::tr(GlistAlign)
  frame $w.g.valign
  radiobutton $w.g.valign.left -text "<<" -indicatoron 0 \
    -variable glconfig(align) -value left
  radiobutton $w.g.valign.right -text ">>" -indicatoron 0 \
    -variable glconfig(align) -value right
  pack $w.g.valign.left $w.g.valign.right -side left -padx 1
  label $w.g.color -text $::tr(GlistColor)
  frame $w.g.vcolor
  foreach color {black darkBlue blue darkGreen darkRed red2 gray50} {
    image create photo color_$color -width 14 -height 16
    color_$color put $color -to 1 1 12 14
    radiobutton $w.g.vcolor.$color -image color_$color -indicatoron 0 \
      -variable glconfig(color) -value $color
    pack $w.g.vcolor.$color -side left -padx 1
  }
  label $w.g.sep -text $::tr(GlistSep)
  frame $w.g.vsep
  radiobutton $w.g.vsep.yes -text $::tr(Yes) -indicatoron 0 \
    -variable glconfig(sep) -value 1
  radiobutton $w.g.vsep.no -text $::tr(No) -indicatoron 0 \
    -variable glconfig(sep) -value 0
  pack $w.g.vsep.yes $w.g.vsep.no -side left -padx 1

  set row 0
  foreach t {width align color sep} {
    grid $w.g.$t -row $row -column 0 -sticky w
    grid $w.g.v$t -row $row -column 1 -sticky e
    incr row
  }

  addHorizontalRule $w
  pack [frame $w.b] -side top -fill x
  button $w.b.ok -text "OK" \
    -command "catch {grab release $w}; destroy $w; configGLfield $code"
  button $w.b.cancel -text $::tr(Cancel) \
    -command "catch {grab release $w}; destroy $w"
  pack $w.b.cancel $w.b.ok -side right -padx 2 -pady 2
  wm resizable $w 0 0
  ::utils::win::Centre $w
  catch {grab $w}
}

proc configGLfield {code} {
  global glistFields glconfig
  set newcolumn [list $code $glconfig(width) $glconfig(align) \
                   $glconfig(color) $glconfig(sep)]
  set len [llength $glistFields]
  for {set i 0} {$i < $len} {incr i} {
    set column [lindex $glistFields $i]
    set tcode [lindex $column 0]
    if {$tcode == $code} {
      set glistFields [lreplace $glistFields $i $i $newcolumn]
      break
    }
  }
  destroy .glistWin
  ::windows::gamelist::Open
}

proc moveGLfield {code delta} {
  global glistFields
  set len [llength $glistFields]
  for {set i 0} {$i < $len} {incr i} {
    set column [lindex $glistFields $i]
    set tcode [lindex $column 0]
    if {$tcode == $code} {
      set glistFields [lreplace $glistFields $i $i]
      set insert [expr {$i + $delta}]
      set glistFields [linsert $glistFields $insert $column]
      break
    }
  }
  destroy .glistWin
  ::windows::gamelist::Open
}

proc insertGLfield {code newcode} {
  global glistFields glistAllFields
  set len [llength $glistFields]
  set newcolumn ""
  foreach column $glistAllFields {
    set tcode [lindex $column 0]
    if {$tcode == $newcode} { set newcolumn $column }
  }
  if {$newcolumn == ""} { return }

  for {set i 0} {$i < $len} {incr i} {
    set column [lindex $glistFields $i]
    set tcode [lindex $column 0]
    if {$tcode == $code} {
      incr i
      set glistFields [linsert $glistFields $i $newcolumn]
      break
    }
  }
  destroy .glistWin
  ::windows::gamelist::Open
}

proc deleteGLfield {code} {
  global glistFields
  set len [llength $glistFields]
  for {set i 0} {$i < $len} {incr i} {
    set column [lindex $glistFields $i]
    set tcode [lindex $column 0]
    if {$tcode != $code} { continue }
    set glistFields [lreplace $glistFields $i $i]
  }
  destroy .glistWin
  ::windows::gamelist::Open
}

proc popupGLmenu {code xcoord ycoord xscreen yscreen} {
  global glSelection glNumber
  ::windows::gamelist::SetSelection $code $xcoord $ycoord
  if {$glNumber < 1} {return}
  ::windows::gamelist::Highlight $glSelection
  if {[sc_base isReadOnly]} {
    .glistWin.popup entryconfig "*elete this*" -state disabled
    .glistWin.popup entryconfig "Delete all*" -state disabled
    .glistWin.popup entryconfig "Undelete all*" -state disabled
  } else {
    .glistWin.popup entryconfig "*elete this*" -state normal
    .glistWin.popup entryconfig "Delete all*" -state normal
    .glistWin.popup entryconfig "Undelete all*" -state normal
  }
  .glistWin.popup post $xscreen [expr {$yscreen + 2}]
  event generate .glistWin.popup <ButtonPress-1>
}

proc ::windows::gamelist::SetStart { start } {
  global glstart
  set glstart $start
  ::windows::gamelist::Refresh
}

proc ::windows::gamelist::ToggleFlag {flag} {
  global glNumber
  # If an invalid game number, just return:
  if {$glNumber < 1} { return }
  if {$glNumber > [sc_base numGames]} { return }
  catch {sc_game flag $flag $glNumber invert}
  ::windows::gamelist::Refresh
}

proc removeFromFilter {{dir none}} {
  global glNumber glstart
  if {$glNumber < 1} { return }
  if {$glNumber > [sc_base numGames]} { return }
  if {$dir == "none"} {
    sc_filter remove $glNumber
  } elseif {$dir == "up"} {
    sc_filter remove 1 $glNumber
    set glstart 1
  } else {
    sc_filter remove $glNumber 9999999
  }
  ::windows::stats::Refresh
  ::windows::gamelist::Refresh
}

proc ::windows::gamelist::ShowMoves {xcoord ycoord} {
  global glistSelectPly glNumber glSelection
  # If an invalid game number, just return:
  if {$glNumber < 1} { return }
  if {$glNumber > [sc_base numGames]} { return }

  ::windows::gamelist::Highlight $glSelection
  .glistExtra.text delete 1.0 end
  .glistExtra.text insert end [sc_game firstMoves $glNumber $glistSelectPly]
  wm geometry .glistExtra +$xcoord+$ycoord
  wm deiconify .glistExtra
  raiseWin .glistExtra
}

proc ::windows::gamelist::Refresh {} {
  global glistSize glstart
  global glistFields
  updateStatusBar
  if {![winfo exists .glistWin]} { return }
  set totalSize [sc_filter count]
  set linenum [sc_game list $glstart $glistSize -current]
  foreach column $glistFields {
    set code [lindex $column 0]
    set cformat $code
    append cformat "*\n"
    .glistWin.c$code.text config -state normal
    .glistWin.c$code.text delete 1.0 end
    .glistWin.c$code.text insert end \
      [sc_game list $glstart $glistSize $cformat] align
    if {$linenum > 0} {
      .glistWin.c$code.text tag add current $linenum.0 [expr {$linenum+1}].0
    }
    .glistWin.c$code.text config -state disabled
  }

  # Now update the window title:
  set str "Scid [tr WindowsGList]: "
  if {$totalSize > 0} {
    set right [expr {$totalSize + 1 - $glistSize}]
    if {$right < 1} { set right 1 }
    .glistWin.scale configure -to $right
    set glend [expr {$glstart + $glistSize - 1}]
    if {$glend > $totalSize} { set glend $totalSize}
    append str [::utils::thousands $glstart] " .. " \
      [::utils::thousands $glend] " / " [::utils::thousands $totalSize] " " $::tr(games)
  } else {
    append str $::tr(noGames)
    .glistWin.scale configure -to 1
  }
  wm title .glistWin $str
}

trace variable glexport w updateExportGList

proc openExportGList {} {
  global glexport
  set w .glexport

  if {[sc_filter count] < 1} {
    tk_messageBox -type ok -icon info -title "Scid" \
      -message "This are no games in the current filter."
    return
  }

  if {[winfo exists $w]} {
    raiseWin $w
    updateExportGList
    return
  }
  toplevel $w
  wm title $w "Scid: Save Game List"

  label $w.lfmt -text "Format:" -font font_Bold
  pack $w.lfmt -side top
  entry $w.fmt -textvar glexport -bg white -fg black -font font_Fixed
  pack $w.fmt -side top -fill x
  text $w.tfmt -width 1 -height 5 -font font_Fixed -fg black \
    -wrap none -relief flat
  pack $w.tfmt -side top -fill x
  $w.tfmt insert end "w: White            b: Black            "
  $w.tfmt insert end "W: White Elo        B: Black Elo        \n"
  $w.tfmt insert end "m: Moves count      r: Result           "
  $w.tfmt insert end "y: Year             d: Date             \n"
  $w.tfmt insert end "e: Event            s: Site             "
  $w.tfmt insert end "n: Round            o: ECO code         \n"
  $w.tfmt insert end "g: Game number      f: Filtered number  "
  $w.tfmt insert end "F: Final material   S: Non-std start pos\n"
  $w.tfmt insert end "D: Deleted flag     U: User flags       "
  $w.tfmt insert end "C: Comments flag    V: Variations flag  \n"
  $w.tfmt configure -cursor top_left_arrow -state disabled
  addHorizontalRule $w
  label $w.lpreview -text $::tr(Preview:) -font font_Bold
  pack $w.lpreview -side top
  text $w.preview -width 80 -height 5 -font font_Fixed -bg gray95 -fg black \
    -wrap none -setgrid 1 -xscrollcommand "$w.xbar set"
  scrollbar $w.xbar -orient horizontal -command "$w.preview xview"
  pack $w.preview -side top -fill x
  pack $w.xbar -side top -fill x
  addHorizontalRule $w
  pack [frame $w.b] -side bottom -fill x
  button $w.b.default -text "Default" -command {set glexport $glexportDefault}
  button $w.b.ok -text "OK" -command saveExportGList
  button $w.b.close -textvar ::tr(Cancel) -command "focus .; grab release $w; destroy $w"
  pack $w.b.close $w.b.ok -side right -padx 2 -pady 2
  pack $w.b.default -side left -padx 2 -pady 2
  wm resizable $w 1 0
  focus $w.fmt
  updateExportGList
  grab $w
}

proc updateExportGList {args} {
  global glexport
  set w .glexport
  if {! [winfo exists $w]} { return }
  set text [sc_game list 1 5 "$glexport\n"]
  $w.preview configure -state normal
  $w.preview delete 1.0 end
  $w.preview insert end $text
  $w.preview configure -state disabled
}

proc saveExportGList {} {
  global glexport
  set ftypes {{"Text files" {.txt}} {"All files" *}}
  set fname [tk_getSaveFile -filetypes $ftypes -parent .glexport \
               -title "Scid: Save Game List"]
  if {$fname == ""} { return }
  set showProgress 0
  if {[sc_filter count] >= 20000} { set showProgress 1 }
  if {$showProgress} {
    progressWindow "Scid" "Saving game list..." $::tr(Cancel) sc_progressBar
  }
  busyCursor .
  set res [catch {sc_game list 1 9999999 "$glexport\n" $fname} err]
  unbusyCursor .
  if {$showProgress} { closeProgressWindow }
  if {$res} {
    tk_messageBox -type ok -icon warning -title "Scid" -message $err
    return
  }
  focus .
  grab release .glexport
  destroy .glexport
  return
}

############################################################
### PGN window

namespace eval ::pgn {}

proc ::pgn::ChooseColor {type name} {
  global pgnColor
  set x [tk_chooseColor -initialcolor $pgnColor($type) \
           -title "PGN $name color"]
  if {$x != ""} { set pgnColor($type) $x; ::pgn::ResetColors }
}

proc ::pgn::ConfigMenus {{lang ""}} {
  if {! [winfo exists .pgnWin]} { return }
  if {$lang == ""} { set lang $::language }
  set m .pgnWin.menu
  foreach menu {file opt color help} tag {File Opt Color Help} {
    configMenuName $m.$menu Pgn$tag $lang
  }
  foreach idx {0 1 3} tag {Copy Print Close} {
    configMenuText $m.file.m $idx PgnFile$tag $lang
  }
  foreach idx {0 1 2 3 4 5 6 7 8} tag {
      Color Short Symbols IndentC IndentV Space Column StripMarks BoldMainLine
  } {
    configMenuText $m.opt.m $idx PgnOpt$tag $lang
  }
  foreach idx {0 1 2 3 4} tag {Header Anno Comments Vars Background} {
    configMenuText $m.color.m $idx PgnColor$tag $lang
  }
  foreach idx {0 1} tag {Pgn Index} {
    configMenuText $m.help.m $idx PgnHelp$tag $lang
  }
}

proc ::pgn::OpenClose {} {
  global pgnWin pgnHeight pgnWidth pgnColor
  if {[winfo exists .pgnWin]} {
    focus .
    destroy .pgnWin
    set pgnWin 0
    return
  }
  set w [toplevel .pgnWin]
  setWinLocation $w
  bind $w <Configure> "recordWinSize $w"

  frame $w.menu -borderwidth 3 -relief raised
  pack $w.menu -side top -fill x
  $w configure -menu $w.menu
  menubutton $w.menu.file -text PgnFile -menu $w.menu.file.m -underline 0
  menubutton $w.menu.opt -text PgnOpt -menu $w.menu.opt.m -underline 0
  menubutton $w.menu.color -text PgnColor -menu $w.menu.color.m -underline 0
  menubutton $w.menu.help -text PgnHelp -menu $w.menu.help.m -underline 0
  foreach i {file opt color help} {
    menu $w.menu.$i.m -tearoff 0
    pack $w.menu.$i -side left
  }

  $w.menu.file.m add command -label PgnFileCopy -command {
     set pgnStr [sc_game pgn -width 75 -indentComments $::pgn::indentComments \
        -indentVariations $::pgn::indentVars -space $::pgn::moveNumberSpaces]
     set wt .tempFEN
     if {! [winfo exists $wt]} { text $wt }
     $wt delete 1.0 end
     $wt insert end $pgnStr sel
     clipboard clear
     clipboard append $pgnStr
     selection own $wt
     selection get
  }

  $w.menu.file.m add command -label PgnFilePrint -command {
    set ftype {
      { "PGN files"  {".pgn"} }
      { "Text files" {".txt"} }
      { "All files"  {"*"}    }
    }
    set fname [tk_getSaveFile -initialdir [pwd] -filetypes $ftype -title "Save PGN file"]
    if {$fname != ""} {
      if {[catch {set tempfile [open $fname w]}]} {
        tk_messageBox -title "Scid: Error saving file" -type ok -icon warning \
          -message "Unable to save the file: $fname\n\n"
      } else {
        puts $tempfile \
          [sc_game pgn -width 75 -symbols $::pgn::symbolicNags \
             -indentVar $::pgn::indentVars -indentCom $::pgn::indentComments \
             -space $::pgn::moveNumberSpaces -format plain -column $::pgn::columnFormat \
             -markCodes $::::pgn::stripMarks]
        close $tempfile
      }
    }
  }
  $w.menu.file.m add separator
  $w.menu.file.m add command -label PgnFileClose -accelerator Esc \
      -command "focus .; destroy $w"

  $w.menu.opt.m add checkbutton -label PgnOptColor \
    -variable ::pgn::showColor -command {updateBoard -pgn}
  $w.menu.opt.m add checkbutton -label PgnOptShort \
    -variable ::pgn::shortHeader -command {updateBoard -pgn}
  $w.menu.opt.m add checkbutton -label PgnOptSymbols \
    -variable ::pgn::symbolicNags -command {updateBoard -pgn}
  $w.menu.opt.m add checkbutton -label PgnOptIndentC \
    -variable ::pgn::indentComments -command {updateBoard -pgn}
  $w.menu.opt.m add checkbutton -label PgnOptIndentV \
    -variable ::pgn::indentVars -command {updateBoard -pgn}
  $w.menu.opt.m add checkbutton -label PgnOptSpace \
    -variable ::pgn::moveNumberSpaces -command {updateBoard -pgn}
  $w.menu.opt.m add checkbutton -label PgnOptColumn \
    -variable ::pgn::columnFormat -command {updateBoard -pgn}
  $w.menu.opt.m add checkbutton -label PgnOptStripMarks \
    -variable ::pgn::stripMarks -command {updateBoard -pgn}
  $w.menu.opt.m add checkbutton -label PgnOptBoldMainLine \
    -variable ::pgn::boldMainLine -command {updateBoard -pgn}

  $w.menu.color.m add command -label PgnColorHeader \
    -command {::pgn::ChooseColor Header "header text"}
  $w.menu.color.m add command -label PgnColorAnno \
    -command {::pgn::ChooseColor Nag annotation}
  $w.menu.color.m add command -label PgnColorComments \
    -command {::pgn::ChooseColor Comment comment}
  $w.menu.color.m add command -label PgnColorVars \
    -command {::pgn::ChooseColor Var variation}
  $w.menu.color.m add command -label PgnColorBackground \
    -command {::pgn::ChooseColor Background background}

  $w.menu.help.m add command -label PgnHelpPgn \
    -accelerator F1 -command {helpWindow PGN}
  $w.menu.help.m add command -label PgnHelpIndex -command {helpWindow Index}

  ::pgn::ConfigMenus

  text $w.text -width $::winWidth($w) -height $::winHeight($w) -wrap word \
    -background $pgnColor(Background) -cursor crosshair \
    -yscrollcommand "$w.scroll set" -setgrid 1 -tabs {1c right 2c 4c}
  if { $::pgn::boldMainLine } {
    $w.text configure -font font_Bold
  }
  
  scrollbar $w.scroll -command "$w.text yview" -takefocus 0
  pack [frame $w.buttons] -side bottom -fill x
  pack $w.scroll -side right -fill y
  pack $w.text -fill both -expand yes
  button $w.buttons.help -textvar ::tr(Help) -command { helpWindow PGN }
  button $w.buttons.close -textvar ::tr(Close) -command { focus .; destroy .pgnWin }
  #pack $w.buttons.close $w.buttons.help -side right -padx 5 -pady 2
  set pgnWin 1
  bind $w <Destroy> { set pgnWin 0 }

  # Bind middle or right button to popup a PGN board:
  bind $w <ButtonPress-2> "::pgn::ShowBoard .pgnWin.text 5 %x %y %X %Y"
  bind $w <ButtonRelease-2> ::pgn::HideBoard
  bind $w <ButtonPress-3> "::pgn::ShowBoard .pgnWin.text 5 %x %y %X %Y"
  bind $w <ButtonRelease-3> ::pgn::HideBoard

  # set the same arrow key, etc bindings that the main window has:
  bind $w <F1> { helpWindow PGN }
  bind $w <Home>  ::move::Start
  bind $w <Up>    {::move::Back 10}
  bind $w <Left>  ::move::Back
  bind $w <Down>  {::move::Forward 10}
  bind $w <Right> ::move::Forward
  bind $w <End>   ::move::End
  bind $w <Escape> {focus .; destroy .pgnWin}
  standardShortcuts $w
  bindMouseWheel $w $w.text

  # Add variation navigation bindings:
  bind $w <KeyPress-v> [bind . <KeyPress-v>]
  bind $w <KeyPress-z> [bind . <KeyPress-z>]

  $w.text tag add Current 0.0 0.0
  ::pgn::ResetColors
}

# ::pgn::ShowBoard:
#    Produces a popup window showing the board position in the
#    game at the current mouse location in the PGN window.
#
proc ::pgn::ShowBoard {win startLine x y xc yc} {
  global lite dark
  set bd [sc_pos pgnBoard [$win get $startLine.0 @$x,$y]]
  set w .pgnPopup
  set psize 30
  if {$psize > $::boardSize} { set psize $::boardSize }

  if {! [winfo exists $w]} {
    toplevel $w -relief solid -borderwidth 2
    wm withdraw $w
    wm overrideredirect $w 1
    ::board::new $w.bd $psize
    pack $w.bd -side top -padx 2 -pady 2
    wm withdraw $w
  }

  ::board::update $w.bd $bd

  # Make sure the popup window can fit on the screen:
  incr xc 5
  incr yc 5
  update idletasks
  set dx [winfo width $w]
  set dy [winfo height $w]
  if {($xc+$dx) > [winfo screenwidth $w]} {
    set xc [expr {[winfo screenwidth $w] - $dx}]
  }
  if {($yc+$dy) > [winfo screenheight $w]} {
    set yc [expr {[winfo screenheight $w] - $dy}]
  }
  wm geometry $w "+$xc+$yc"
  wm deiconify $w
  raiseWin $w
}


# ::pgn::HideBoard
#
#    Hides the window produced by ::pgn::ShowBoard.
#
proc ::pgn::HideBoard {} {
  wm withdraw .pgnPopup
}


# ::pgn::ResetColors
#
#    Reconfigures the pgn Colors, after a color is changed by the user
#
proc ::pgn::ResetColors {} {
  global pgnColor
  if {![winfo exists .pgnWin]} { return }
  .pgnWin.text configure -background $pgnColor(Background)
  .pgnWin.text tag configure Current -background $pgnColor(Current)
  .pgnWin.text tag configure NextMove -background $pgnColor(NextMove)
  ::htext::init .pgnWin.text
  ::htext::updateRate .pgnWin.text 60
  ::pgn::Refresh 1
}

# ::pgn::Refresh
#
#    Updates the PGN window. If $pgnNeedsUpdate == 0, then the
#    window text is not regenerated; only the current and next move
#    tags will be updated.
#
proc ::pgn::Refresh {{pgnNeedsUpdate 0}} {

  if {![winfo exists .pgnWin]} { return }

  set format plain
  if {$::pgn::showColor} {set format color}

  set pgnStr [sc_game pgn -symbols $::pgn::symbolicNags \
                -indentVar $::pgn::indentVars -indentCom $::pgn::indentComments \
                -space $::pgn::moveNumberSpaces -format $format -column $::pgn::columnFormat \
                -short $::pgn::shortHeader -markCodes $::pgn::stripMarks]

  if {$pgnNeedsUpdate} {
    busyCursor .
    set windowTitle [format $::tr(PgnWindowTitle) [sc_game number]]
    wm title .pgnWin "Scid: $windowTitle"
    .pgnWin.text configure -state normal
    .pgnWin.text delete 1.0 end
    if {$::pgn::showColor} {
      #set start [clock clicks -milli]
      ::htext::display .pgnWin.text $pgnStr
      #set end [clock clicks -milli]
      #puts "PGN: [expr $end - $start] ms"
    } else {
      .pgnWin.text insert 1.0 $pgnStr
    }
    unbusyCursor .
  }

  if {$::pgn::showColor} {
     if { $::pgn::boldMainLine } {
        .pgnWin.text configure -font font_Bold
     } else {
        .pgnWin.text configure -font font_Regular
     }
    # Now update Current and NextMove tags:
    .pgnWin.text tag remove Current 1.0 end
    set offset [sc_pos pgnOffset]
    set moveRange [.pgnWin.text tag nextrange "m_$offset" 1.0]
    if {[llength $moveRange] == 2} {
      .pgnWin.text tag add Current [lindex $moveRange 0] [lindex $moveRange 1]
      .pgnWin.text see [lindex $moveRange 0]
    }

    .pgnWin.text tag remove NextMove 1.0 end
    set noffset [sc_pos pgnOffset next]
    if {$noffset == $offset} {set noffset 0}
    set moveRange [.pgnWin.text tag nextrange "m_$noffset" 1.0]
    if {[llength $moveRange] == 2} {
      .pgnWin.text tag add NextMove [lindex $moveRange 0] [lindex $moveRange 1]
    }
    .pgnWin.text configure -state disabled
  }
  return
}

############################################################
### Comment Editor window

namespace eval ::commenteditor {

    namespace export open close update storeComment addNag

    # List of colors and types used to mark a square

    variable  colorList {}  markTypeList {}
    lappend   colorList red orange yellow   \
                        green blue darkBlue \
                        purple white black
    # Each list is a set of buttons in the dialog menu:
    lappend   markTypeList [list full circle disk x + - = ? !]
    lappend   markTypeList [list 1 2 3 4 5 6 7 8 9]

    # IO state of the comment editor
    variable  State
    array set State [list isOpen 0 \
                     markColor red  markType full  text "" \
                     pending ""]

    proc addMark {args} {eval ::board::mark::add $args}
    proc delMark {args} {eval ::board::mark::remove $args}
}

proc ::commenteditor::addNag {nag} {
  if {![winfo exists .commentWin]} { return }
  .commentWin.nf.tf.text insert end "$nag  "
  ::commenteditor::storeComment
  ::pgn::Refresh 1
}

proc makeCommentWin {} {
  if {[winfo exists .commentWin]} {
    ::commenteditor::close
  } else {
    ::commenteditor::Open
  }
}

# ::commenteditor::Open --
#
#	TODO: brief description (abstract)
#
# Arguments:
#	none
# Results:
#	TODO: detailed description
#
proc ::commenteditor::Open {} {
  global commentWin nagValue highcolor helpMessage
  variable colorList
  variable markTypeList
  variable State

  set commentWin 1
  set State(isOpen) 1
  if {[winfo exists .commentWin]} {
    focus .commentWin.cf.text
    return
  }
  set w .commentWin
  toplevel $w
  setWinLocation $w
  bind $w <F1> {helpWindow Comment}
  bind $w <Destroy> [namespace code {set commentWin 0; set State(isOpen) 0}]
  bind $w <Configure> "recordWinSize $w"

  set mark [frame $w.markFrame]
  pack $mark -side left -fill x -padx 2 -anchor n

  # Comment frame:
  frame $w.cf
  text $w.cf.text -width $::winWidth($w) -height $::winHeight($w) \
    -background white -wrap word -font font_Regular \
    -yscrollcommand ".commentWin.cf.scroll set" -setgrid 1
  scrollbar $w.cf.scroll -command ".commentWin.cf.text yview"
  label $w.cf.label -font font_Bold -textvar ::tr(Comment)
  bindFocusColors $w.cf.text
  bind $w.cf.text <Alt-KeyRelease-c> { .commentWin.b.close invoke }
  bind $w.cf.text <Alt-KeyRelease-s> { .commentWin.b.store invoke }

  # NAG frame:
  frame $w.nf -width 100
  frame $w.nf.tf
  entry $w.nf.tf.text -width 20 -background white
  bindFocusColors $w.nf.tf.text
  bind $w.nf.tf.text <Alt-KeyRelease-c> { .commentWin.b.close invoke }

  set nagbox $w.nf.tf.text
  set nagbuttons $w.nf.b
  frame $w.nf.b
  set i 0
  set row 0
  set column 0
  foreach {nag description} {
      ! GoodMove
      ? PoorMove
      !! ExcellentMove
      ?? Blunder
      !? InterestingMove
      ?! DubiousMove
      +- WhiteDecisiveAdvantage
      -+ BlackDecisiveAdvantage
      +/- WhiteClearAdvantage
      -/+ BlackClearAdvantage
      += WhiteSlightAdvantage
      =+ BlackSlightAdvantage
      = Equality
      ~ Unclear
      N Novelty
      D Diagram
  } {
    button $nagbuttons.b$i -takefocus 0 -text "$nag" -width 2 \
             -command [namespace code [list addNag "$nag"]]
    # set helpMessage(E,$nagbuttons.b$i) $description
    ::utils::tooltip::Set $nagbuttons.b$i $description
    grid $nagbuttons.b$i -row [expr {$i % 2}] -column [expr {int($i / 2)}] -padx 2 -pady 2
    incr i
  }

  label $w.nf.label -font font_Bold -textvar ::tr(AnnotationSymbols)
  pack $w.nf -side top -pady 2
  #addHorizontalRule $w

  button $w.nf.tf.clear -textvar ::tr(Clear) -command {
      .commentWin.nf.tf.text delete 0 end
      ::commenteditor::storeComment
      ::pgn::Refresh 1
      updateBoard
  }
  set helpMessage(E,$w.nf.tf.clear) {Clear all symbols for this move}
  pack $w.nf.label -side top -expand 0
  pack $w.nf.tf -side top
  pack $w.nf.tf.text -side left
  pack $w.nf.tf.clear -side right -padx 20 -pady 5
  pack $w.nf.b -side top

  frame $w.b
  pack $w.b -side bottom -ipady 4 -fill x -padx 2

  pack $w.cf -side top -expand 1 -fill both
  pack $w.cf.label -side top -pady 2
  pack $w.cf.scroll -side right -fill y
  pack $w.cf.text -side right -expand 1 -fill both

  # addHorizontalRule $w

  wm minsize $w 40 3

  # Main buttons:

  dialogbutton $w.b.clear -textvar ::tr(Clear) \
    -command [namespace code [list ClearComments .commentWin]]
  set helpMessage(E,$w.b.clear) {Clear this comment}
  dialogbutton $w.b.revert -textvar ::tr(Revert) \
    -command ::commenteditor::Refresh
  set helpMessage(E,$w.b.revert) {Revert to the stored comment}
  dialogbutton $w.b.store -textvar ::tr(Store) \
    -command [namespace code {storeComment; ::pgn::Refresh 1; updateBoard}]
  set helpMessage(E,$w.b.store) {Store this comment in the game}
  frame $w.b.space -width 10
  dialogbutton $w.b.close -textvar ::tr(Close) \
    -command { focus .; destroy .commentWin}
  set helpMessage(E,$w.b.close) {Close the comment editor window}

  pack $w.b.close $w.b.space $w.b.store $w.b.revert $w.b.clear -side right -padx 2

  ### Insert-mark frame

  label $mark.header -font font_Bold -text $::tr(InsertMark:)
  pack $mark.header -side top -ipady 1 -fill x -padx 1

  pack [frame [set usage $mark.usage]] -side bottom -pady 1 -expand true
  pack [label [set usage $usage.text] \
          -text [string trim $::tr(InsertMarkHelp)] -justify left]

  # Subframes for insert board and two button rows:
  pack [frame [set colorButtons $mark.colorButtons]] \
          -side top -pady 1 -anchor n
  pack [frame [set insertBoard $mark.insertBoard]] \
          -side top -pady 1
  pack [frame [set typeButtons $mark.typeButtons]] \
          -side top -pady 1 -anchor s

  # Left subframe: color (radio)buttons
  foreach color $colorList {
    image create photo markColor_$color -width 18 -height 18
    markColor_$color put $color -to 1 1 16 16
    radiobutton $colorButtons.c$color \
            -image markColor_$color \
            -variable [namespace current]::State(markColor) \
            -value $color \
            -indicatoron 0 \
            -takefocus 0 \
            -command [namespace code [list SetMarkColor $color]]
    pack $colorButtons.c$color -side left -padx 0 -pady 3
  }

  # Central subframe: a small board
  set board [::board::new $insertBoard.board 20]
  ::board::showMarks $board 1
  set ::board::_mark($board) $::board::_mark(.board)
  ::board::update $board
  pack $board -side top
  # TODO?: move this for loop into a new proc (e.g. 'BindSquares')
  for {set square 0} {$square < 64} {incr square} {
      ::board::bind $board $square <ButtonPress-1> [namespace code \
               [list InsertMark $board $square]]
      ::board::bind $board $square <ButtonRelease-1> [namespace code \
              [list ButtonReleased $board %b %X %Y]]
      #::board::bind $board $square <ButtonPress-2> [namespace code \
      #        [list InsertMark $board [expr {$square + 64}]]]
      ::board::bind $board $square <ButtonPress-3> [namespace code \
              [list InsertMark $board [expr {$square + 64}]]]
  }

  # Right subframe: type/shape (pseudo-radio)buttons
  set size 20	;# button/rectangle size
  pack [set types [frame $typeButtons.all]] -side left -padx 10
  set row 0
  foreach buttons $markTypeList {
    set column 0
    foreach shape $buttons {
      set color [::board::defaultColor [expr {($column + $row) % 2}]]
      # Create and draw a button:
      set button [frame $types.button_${shape} -class PseudoButton]
      grid $button -row $row -column $column -padx 1 -pady 1
      # The "board" is a 1x1 board, containing one single square.
      set board1x1 [canvas $button.bd \
              -height $size -width $size -highlightthickness 0 \
              -borderwidth 2 -relief raised]
      $board1x1 create rectangle 0 0 $size $size \
              -fill $color -outline "" \
              -tag [list sq0 button${shape}]
      ::board::mark::add $types.button_${shape} \
              $shape 0 $State(markColor) "false"
      pack $board1x1
      bind $board1x1 <Button-1> \
              [namespace code [list SetMarkType $board $shape]]
      incr column
    } ;# foreach shape
    incr row
  } ;# foreach button_line
  # "Press" button:
  SetMarkType $board $State(markType)

  ### Start editing

  wm title $w "Scid: [tr {Comment editor}]"
  wm iconname $w "Scid: [tr {Comment editor}]"
  ::commenteditor::Refresh
  focus $w.cf.text
}

# ::commenteditor::SetMarkColor --
#
#	Called when a color is selected.
#
# Arguments:
#	color	The selected color.
# Results:
#	TODO
#
proc ::commenteditor::SetMarkColor {color} {
    variable   markTypeList
    variable   State
    set path   .commentWin.markFrame.typeButtons.all
    set square 0	;# square number of a 1x1-board
    foreach buttons $markTypeList {
        foreach shape $buttons {
            set button $path.button_${shape}
            if {$shape == "square"} {
                $button.bd itemconfigure sq$square \
                        -fill $color -outline $color
            } else {
                $button.bd delete mark
                addMark $button $shape $square $color "false"
            }
        }
    }
    set State(markColor) $color
}

# ::commenteditor::SetMarkType --
#
# Arguments:
#	board	The frame variable of the board.
#	type	The selected type/shape, e.g. "circle", "1", etc.
# Results:
#	TODO
#
proc ::commenteditor::SetMarkType {board type} {
    variable State
    set cur_type $State(markType)
    set path .commentWin.markFrame.typeButtons.all
    $path.button_${cur_type}.bd configure -relief raised
    $path.button_${type}.bd configure -relief sunken
    set State(markType) $type
}

# ::commenteditor::InsertMark --
#
#	Called when a square is selected on the insert board.
#
# Arguments:
#	board	The frame variable of the board.
#	from	Number (0-63) of the selected square
#		(+64 if right mouse button used).
#	to	Number of destination square (0-63) if an
#		arrow is to be drawn (+64 if right mouse button).
# Results:
#	TODO
#
proc ::commenteditor::InsertMark {board square} {
    variable State
    set textwin .commentWin.cf.text
    if {![string length $State(pending)]} {
        set State(pending) $square
        return
    }
    # Right mouse click results in square-no + 64:
    set from [expr {$State(pending) % 64}]
    set to   [expr {$square         % 64}]

    set key $::board::mark::Command
    array set tag [list remove 0 value {}]
    if {$square == $State(pending)} {
        if {$square >= 64} { return }
        if {[lsearch [$textwin tag names] $square] >= 0} {
            array set tag [list remove 1 value $square]
            delMark $board $square
        } else {
            set tag(value) $square
            addMark $board $State(markType) $square $State(markColor)
            set to [::board::san $square]
            set State(text) "\[%$key $State(markType),$to,$State(markColor)\]"
        }
    } else {
        if {($square & 64) != ($State(pending) & 64)} {
            if {$square < 64} { set State(pending) $square }
            return
        }
        if {[lsearch [$textwin tag names] ${from}:${to}] >= 0} {
            set tag(remove) 1
            set tag(value)  [list ${from}:${to} ${to}:${from}]
            delMark $board $from $to
        } else {
            set tag(value) [list ${from}:${to} ${to}:${from}]
            addMark $board arrow $from $to $State(markColor)
            set from [::board::san $from]
            set to   [::board::san $to]
            set State(text) "\[%$key arrow,$from,$to,$State(markColor)\]"
        }
    }
    set State(pending) ""

    if {$tag(remove)} {
        set remove [lindex $tag(value) 0]
        if [llength [$textwin tag range $remove]] {
            $textwin delete $remove.first $remove.last
        }
        eval $textwin tag delete $tag(value)
    } else {
        $textwin insert insert $State(text) $tag(value)
    }
}

# ::commenteditor::ClearComments --
#
#	Called when the 'Clear' button is pressed.
#
# Arguments:
#	win	The window variable.
# Results:
#	Clears text area and chess board of the comment editor.
#
proc ::commenteditor::ClearComments {win} {
    ${win}.cf.text delete 0.0 end
    set board ${win}.markFrame.insertBoard.board
    ::board::mark::clear $board
    ::board::update $board
}

# ::commenteditor::ButtonReleased --
#
#	Auxiliary routine:
#	Called when a button is released over a square.
#
# Arguments:
#	board	The frame variable of the board.
#	button	The number (%b) of the button that was released.
#	x_root	The x-coodinate (%X) from the event.
#	y_root	The y-coodinate (%Y) from the event.
# Results:
#
proc ::commenteditor::ButtonReleased {board button x_root y_root} {
    set square [::board::getSquare $board $x_root $y_root]
    if {$square < 0}  {
        set $State(pending) ""
        return
    }
    if {$button != 1} {set square [expr {$square + 64}]}
    InsertMark $board $square
}

# ::commenteditor::storeComment --
#
#	Set the comment of the current position to
#	the text of the commenteditor.
#
proc ::commenteditor::storeComment {} {
  if {![winfo exists .commentWin]} { return }
  sc_pos clearNags
  foreach i [split [.commentWin.nf.tf.text get] " "] {
    sc_pos addNag $i
  }

  # The "end-1c" below is because Tk adds a newline to text contents:
  set newComment [.commentWin.cf.text get 1.0 end-1c]
  set oldComment [sc_pos getComment]
  if {[string compare $oldComment $newComment]} {
    sc_pos setComment $newComment
    updateStatusBar
    ::pgn::Refresh 1
    updateBoard
  }
}

# ::commenteditor::Refresh --
#
#	(Re)builds textwindow and board of the comment editor.
#
proc ::commenteditor::Refresh {} {
  if {![winfo exists .commentWin]} { return }
  set nag [sc_pos getNags]
  .commentWin.nf.tf.text configure -state normal
  .commentWin.nf.tf.text delete 0 end
  if {$nag != "0"} {
    .commentWin.nf.tf.text insert end $nag
  }
  # Rewrite text window, tag embedded commands,
  # and draw marks according to text window commands.
  set text  .commentWin.cf.text
  set board .commentWin.markFrame.insertBoard.board
  set comment [sc_pos getComment]
  set offset  0
  ::board::mark::clear $board
  $text delete 1.0 end
  foreach {mark pos} [::board::mark::getEmbeddedCmds $comment] {
      foreach {type square arg color} $mark {begin end} $pos {break}  ;# set
      set square [::board::sq $square]
      regsub -all -- {[^[:alnum:]]} $color {_} _color
      switch -- $type {
          arrow   { set arg  [::board::sq $arg]
                    set tags [list ${square}:${arg} ${arg}:${square} \
                              ${square}:${arg}:$_color]
                  }
          default { set tags [list $square ${square}:$type:$_color] }
      }
      $text insert insert [string range $comment $offset [expr {$begin-1}]]
      $text insert insert [string range $comment $begin $end] $tags
      set offset [expr {$end + 1}]
      addMark $board $type $square $arg $color 1
  }
  $text insert insert [string range $comment $offset end]
  ::board::update $board
}

### End of namespace ::commenteditor

####################
# ECO Browser window

set ::windows::eco::code ""
set ::windows::eco::count 0
set ::windows::eco::isOpen 0

proc ::windows::eco::OpenClose {} {
  if {[winfo exists .ecograph]} {
    destroy .ecograph
  } else {
    ::windows::eco::Refresh
  }
}

# ::windows::eco::Refresh
#
#    Updates the ECO Browser window, opening it if necessary.
#    If the ECO code "code" is "x", then the value of the
#    variable ::windows::eco::code is used instead.
#
proc ::windows::eco::Refresh {{code "x"}} {
  set w .ecograph
  set graph $w.pane.graph
  set text $w.pane.text
  if {$code != "x"} { set ::windows::eco::code $code }
  if {! [winfo exists $w]} {
    set ::windows::eco::isOpen 1
    toplevel $w
    wm minsize $w 200 100
    setWinLocation $w
    bind $w <Escape> "destroy $w"
    bind $w <F1> {helpWindow ECO}
    bind $w <Destroy> {set ::windows::eco::isOpen 0}
    text $w.title -relief flat -height 1 -width 1 -wrap word -font font_Bold
    $w.title tag configure center -justify center
    $w.title configure -cursor top_left_arrow
    pack $w.title -side top -fill x
    frame $w.b
    pack $w.b -side bottom -fill x
    button $w.b.classify -textvar ::tr(ReclassifyGames) -command classifyAllGames
    dialogbutton $w.b.help -textvar ::tr(Help) -command {helpWindow ECO}
    dialogbutton $w.b.close -textvar ::tr(Close) -command "destroy $w"
    pack $w.b.classify -side left -padx 5 -pady 5
    packbuttons right $w.b.close $w.b.help
    set pane [::utils::pane::Create $w.pane graph text 500 400 0.5]
    ::utils::pane::SetRange $w.pane 0.3 0.7
    ::utils::pane::SetDrag $w.pane 0
    pack $pane -side top -expand true -fill both

    canvas $graph.c -width 500 -height 250
    pack $graph.c -side top -fill both -expand yes
    text $text.text -height 12 -width 75 -wrap word -font font_Regular \
      -background white -selectbackground lightBlue \
      -yscroll "$text.ybar set" -xscroll "$text.xbar set"
    $text.text tag configure bold -font font_Bold
    $text.text tag configure indent -lmargin2 20
    $text.text configure -cursor top_left_arrow
    ::htext::init $text.text
    scrollbar $text.ybar -command "$text.text yview"
    scrollbar $text.xbar -orient horizontal -command "$text.text xview"
    grid $text.text -row 0 -column 0 -sticky nesw
    grid $text.ybar -row 0 -column 1 -sticky nesw
    #grid $text.xbar -row 1 -column 0 -sticky nesw
    grid rowconfig $text 0 -weight 1 -minsize 0
    grid columnconfig $text 0 -weight 1 -minsize 0

    foreach i {0 1 2 3 4 5 6 7 8 9 A B C D E a b c d e f g h i j k l m n o p
               q r s t u v w x y z} {
      bind $w <KeyPress-$i> "::windows::eco::KeyPress $i"
    }

    foreach i {Left Delete less BackSpace} {
      bind $w <KeyPress-$i> {::windows::eco::KeyPress "<"}
    }

    bind $w <Home>  {.ecograph.pane.text.text yview moveto 0}
    bind $w <End>   {.ecograph.pane.text.text yview moveto 1.0}
    bind $w <Up>    {.ecograph.pane.text.text yview scroll -1 units}
    bind $w <Down>  {.ecograph.pane.text.text yview scroll 1 units}
    bind $w <Prior> {.ecograph.pane.text.text yview scroll -1 pages}
    bind $w <Next>  {.ecograph.pane.text.text yview scroll 1 pages}
    standardShortcuts $w
    bindMouseWheel $w $w.pane.text.text

    bind $graph.c <1> { ::windows::eco::Select %x }
    bind $graph.c <3> { ::windows::eco::KeyPress "<" }

    bind $graph <Configure> {
      ::utils::graph::configure eco -height [expr {[winfo height .ecograph.pane.graph.c] - 50} ]
      ::utils::graph::configure eco -width [expr {[winfo width .ecograph.pane.graph.c] - 60} ]
      ::utils::graph::redraw eco
    }
    bind $w <Configure> {
      ::utils::graph::configure eco -height [expr {[winfo height .ecograph.pane.graph.c] - 50} ]
      ::utils::graph::configure eco -width [expr {[winfo width .ecograph.pane.graph.c] - 60} ]
      ::utils::graph::redraw eco
    }
    wm title $w "Scid: [tr WindowsECO]"
    ::utils::graph::create eco -width 1 -height 1 -xtop 50 -ytop 20 \
      -xmin 0.5 -xtick 1 -ytick 5 -font font_Small -canvas $graph.c
    update
  }

  set height [expr {[winfo height $graph.c] - 50} ]
  set width [expr {[winfo width $graph.c] - 60} ]

  set code $::windows::eco::code
  # Collect data:
  set len [string length $code]
  set subcodes {}
  if {$len == 0} {
    set subcodes {A B C D E}
  } elseif {$len == 1  ||  $len == 2} {
    set subcodes {0 1 2 3 4 5 6 7 8 9}
  } elseif {$len == 3} {
    set subcodes {a b c d e f g h i j k l m n o p q r s t u v w x y z}
  }

  set xlabels {}
  set count 0
  set data {}
  set maxfreq 1
  set wins {}
  set draws {}

  foreach i $subcodes {
    set subcode "$code$i"
    set stats [sc_base ecoStats $subcode]
    set freq [lindex $stats 0]
    incr count
    lappend data $count
    lappend data $freq
    lappend wins $count
    lappend wins [lindex $stats 1]
    lappend draws $count
    lappend draws [expr {[lindex $stats 1] + [lindex $stats 2] + [lindex $stats 4]} ]
    if {$freq > $maxfreq} {set maxfreq $freq}
    if {$len == 3} {
      set subcode $i
    }
    lappend xlabels [list $count $subcode]
  }
  set hline 5
  if {$maxfreq >    20} { set hline    10 }
  if {$maxfreq >    50} { set hline    25 }
  if {$maxfreq >   100} { set hline    50 }
  if {$maxfreq >   200} { set hline   100 }
  if {$maxfreq >   500} { set hline   250 }
  if {$maxfreq >  1000} { set hline   500 }
  if {$maxfreq >  2000} { set hline  1000 }
  if {$maxfreq >  5000} { set hline  2500 }
  if {$maxfreq > 10000} { set hline  5000 }
  if {$maxfreq > 20000} { set hline 10000 }
  if {$maxfreq > 50000} { set hline 25000 }
  if {$maxfreq > 100000} { set hline 50000 }

  ::utils::graph::create eco -width $width -height $height -xtop 50 -ytop 20 \
    -xmin 0.5 -xtick 1 -ytick $hline -font font_Small -canvas $graph.c
  ::utils::graph::data eco data -color SteelBlue4 -points 0 -lines 0 -bars 1 \
    -barwidth 0.8 -outline black -coords $data
  ::utils::graph::data eco draws -color SteelBlue3 -points 0 -lines 0 -bars 1 \
    -barwidth 0.8 -outline black -coords $draws
  ::utils::graph::data eco wins -color SteelBlue1 -points 0 -lines 0 -bars 1 \
    -barwidth 0.8 -outline black -coords $wins
  ::utils::graph::data eco bounds -points 0 -lines 0 -bars 0 -coords {1 0 1 1}
  ::utils::graph::configure eco -ymin 0 -xmin 0.4 -xmax [expr {$count + 0.6} ] \
    -xlabels $xlabels -hline [list [list gray80 1 each $hline]]
  ::utils::graph::redraw eco
  $text.text configure -state normal
  $text.text delete 1.0 end
  set stats [sc_base eco $code]
  if {$len == 0} {
    set section $::tr(ECOAllSections)
  } elseif {$len < 3} {
    set section "$::tr(ECOSection) \"$code\""
  } else {
    set section "$::tr(ECOCode) \"$code\""
  }
  set header "<center><b>$::tr(ECOSummary) $section</b><br>"
  append header "[lindex $stats 0] $::tr(games): +[lindex $stats 1] =[lindex $stats 2] -[lindex $stats 3]  ([lindex $stats 5]%)</center>\n\n"
  ::htext::display $text.text "$header[sc_eco summary $code 1]"
  $text.text configure -state disabled
  $w.title configure -state normal
  $w.title delete 1.0 end
  $w.title insert end "$::tr(ECOFrequency) $section" center
  $w.title configure -state disabled
  set ::windows::eco::count $count
}

proc ::windows::eco::Select {xc} {
  variable count
  variable code

  set x [::utils::graph::Xunmap eco $xc]
  set selection 0
  for {set i 1} {$i <= $count} {incr i} {
    if {$x >= [expr {$i - 0.4} ]  &&  $x <= [expr {$i + 0.4} ]} {
      set selection $i
    }
  }
  if {$selection == 0} { return }
  incr selection -1
  set len [string length $code]
  if {$len == 0} {
    set code [lindex {A B C D E} $selection]
  } elseif {$len == 1  ||  $len == 2} {
    append code $selection
  } elseif {$len == 3} {
    append code [lindex {a b c d e f g h i j k l m n o p q r s t u v w x y z} $selection]
  } else {
    return
  }
  ::windows::eco::Refresh
}

# ::windows::eco::KeyPress
#
#    Handles keyboard events in ECO browser window
#
proc ::windows::eco::KeyPress {key} {
  set code $::windows::eco::code
  set len [string length $code]
  if {$key == "<"} {
    set ::windows::eco::code [string range $code 0 [expr {$len - 2} ]]
    ::windows::eco::Refresh
    return
  }
  if {$key == "top"} {
    set ::windows::eco::code ""
    ::windows::eco::Refresh
    return
  }

  if {$len == 0} {
    set key [string toupper $key]
    switch $key {
      A - B - C - D - E {
        # nothing
      }
      default { set key "" }
    }
  } elseif {$len == 1 || $len == 2} {
    switch $key {
      0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 {
        # nothing
      }
      default { set key "" }
    }
  } elseif {$len == 3} {
    set key [string tolower $key]
    switch $key {
      a - b - c - d - e - f - g - h - i - j - k - l - m - n - o - p - q - r -
      s - t - u - v - w - x - y - z {
        # nothing
      }
      default { set key "" }
    }
  }

  if {$key != ""} {
    set ::windows::eco::code "$code$key"
    ::windows::eco::Refresh
  }
}

###
### windows/stats.tcl: Filter Statistics window for Scid
###

set ::windows::stats::isOpen 0

proc ::windows::stats::Open {} {
  set w .statsWin
  if {[winfo exists $w]} {
    focus .
    destroy $w
    set ::windows::stats::isOpen 0
    return
  }
  toplevel $w
  wm title $w "Scid: Filter Statistics"
  setWinLocation $w
  bind $w <Configure> "recordWinSize $w"

  frame $w.menu -borderwidth 3 -relief raised
  pack $w.menu -side top -fill x
  $w configure -menu $w.menu
  menubutton $w.menu.file -text StatsFile -menu $w.menu.file.m
  menubutton $w.menu.opt -text StatsOpt -menu $w.menu.opt.m
  menu $w.menu.file.m
  $w.menu.file.m add command -label StatsFilePrint -command {
    set ftype {
      { "Text files" {".txt"} }
      { "All files"  {"*"}    }
    }
    set fname [tk_getSaveFile -initialdir [pwd] -filetypes $ftype -title "Save text file"]
    if {$fname != ""} {
      if {[catch {set tempfile [open $fname w]}]} {
        tk_messageBox -title "Scid: Error saving file" -type ok -icon warning \
          -message "Unable to save the file: $fname\n\n"
      } else {
        puts $tempfile [.statsWin.stats get 1.0 end-1c]
        close $tempfile
      }
    }
  }
  $w.menu.file.m add separator
  $w.menu.file.m add command -label StatsFileClose -accelerator Esc \
      -command "destroy $w"

  menu $w.menu.opt.m
  $w.menu.opt.m add cascade -label $::tr(OprepStatBoth) -menu $w.menu.opt.m.elo
  menu $w.menu.opt.m.elo
  foreach i [lsort -decreasing [array names ::windows::stats::display r*]] {
    set elo [string range $i 1 end]
    $w.menu.opt.m.elo add checkbutton -label "$::tr(OprepStatBoth) $elo+" \
      -variable ::windows::stats::display($i) -command ::windows::stats::Refresh
  }
  $w.menu.opt.m add separator
  $w.menu.opt.m add cascade -label $::tr(OprepStatSince) \
    -menu $w.menu.opt.m.year
  menu $w.menu.opt.m.year
  foreach i [lsort [array names ::windows::stats::display y*]] {
    set year [string range $i 1 end]
    $w.menu.opt.m.year add checkbutton \
      -label "$::tr(OprepStatSince) $year.01.01" \
      -variable ::windows::stats::display($i) -command ::windows::stats::Refresh
  }

  pack $w.menu -side top -fill x
  pack $w.menu.file $w.menu.opt -side left

  text $w.stats -borderwidth 0 \
    -width $::winWidth($w) -height $::winHeight($w) -font font_Fixed \
    -foreground black -background white -cursor top_left_arrow -wrap none \
    -setgrid 1
  pack $w.stats -side top -fill both -expand yes
  set ::windows::stats::isOpen 1
  bind $w <Control-q> "destroy $w"
  bind $w <Escape> "destroy $w"
  bind $w <F1> { helpWindow Index }
  bind $w <Destroy> {
    set ::windows::stats::isOpen 0
  }
  standardShortcuts $w
  wm resizable $w 1 0
  ::windows::stats::ConfigMenus
  ::windows::stats::Refresh
}

proc ::windows::stats::Refresh {} {
  variable display
  if {[winfo exists .playerInfoWin]} { playerInfo }
  ::windows::gamelist::Refresh
  ::maint::Refresh
  updateStatusBar
  ::tools::graphs::filter::Refresh
  if {! [winfo exists .statsWin]} { return }

  # Set up variables for translated phrases:
  set all [::utils::string::Capital $::tr(allGames)]
  set both $::tr(OprepStatBoth)
  set since $::tr(OprepStatSince)
  set games [::utils::string::Capital $::tr(games)]
  set score [::utils::string::Capital $::tr(score)]

  # Find length of longest left-hand column:
  set alen [expr {[string length $all] + 1}]
  set blen [expr {[string length $both] + 7}]
  set slen [expr {[string length $since] + 12}]
  set len $alen
  if {$len < $blen} { set len $blen }
  if {$len < $slen} { set len $slen }

  set height 4
  set ratings 0
  set years 0
  set rlist [lsort -decreasing [array names display r*]]
  set ylist [lsort [array names display y*]]

  foreach i $rlist {
    if {$display($i)} { set ratings 1 }
  }
  foreach i $ylist {
    if {$display($i)} { set years 1 }
  }

  if {$ratings} { incr height }
  if {$years} { incr height }

  set s ""
  set stat ""
  append s " [::utils::string::Pad $stat [expr $len - 4]] [::utils::string::PadRight $games 10]"
  append s "     1-0     =-=     0-1 [::utils::string::PadRight $score 8]\n"
  append s "------------------------------------------------------------------------"
  append s "\n [::utils::string::Pad $all $len]" [sc_filter stats all]

  if {$ratings} {
    append s "\n"
    foreach i $rlist {
      if {$display($i)} {
        incr height
        set elo [string range $i 1 end]
        set stat "$both $elo+"
        append s "\n [::utils::string::Pad $stat $len]"   [sc_filter stats elo $elo]
      }
    }
  }

  if {$years} {
    append s "\n"
    foreach i $ylist {
      if {$display($i)} {
        incr height
        set year [string range $i 1 end]
        set stat "$since $year.01.01"
        append s "\n [::utils::string::Pad $stat $len]"   [sc_filter stats year $year]
      }
    }
  }

  set w .statsWin.stats
  $w configure -state normal
  $w delete 1.0 end
  $w insert end $s
  $w tag configure blue -foreground darkBlue
  $w tag configure red -foreground red
  $w tag add blue 1.0 2.0
  $w tag add red 2.0 3.0
  $w configure -height $height
  $w configure -state disabled
}

proc ::windows::stats::ConfigMenus {{lang ""}} {
  if {! [winfo exists .statsWin]} { return }
  if {$lang == ""} { set lang $::language }
  set m .statsWin.menu
  foreach menu {file opt} tag {File Opt} {
    configMenuName $m.$menu Stats$tag $lang
  }
  foreach idx {0 2} tag {Print Close} {
    configMenuText $m.file.m $idx StatsFile$tag $lang
  }
}

############################################################
### TREE window

namespace eval ::tree {}
set tree(training) 0
set tree(locked) 0
set tree(base) 0
set tree(status) ""

proc ::tree::ConfigMenus {{lang ""}} {
  if {! [winfo exists .treeWin]} { return }
  if {$lang == ""} { set lang $::language }
  set m .treeWin.menu
  foreach menu {file sort opt help} tag {File Sort Opt Help} {
    configMenuName $m.$menu Tree$tag $lang
  }
  foreach idx {0 1 3 4 6 8} tag {Save Fill Best Graph Copy Close} {
    configMenuText $m.file.m $idx TreeFile$tag $lang
  }
  foreach idx {0 1 2 3} tag {Alpha ECO Freq Score} {
    configMenuText $m.sort.m $idx TreeSort$tag $lang
  }
  foreach idx {0 1 3} tag {Lock Training Autosave} {
    configMenuText $m.opt.m $idx TreeOpt$tag $lang
  }
  foreach idx {0 1} tag {Tree Index} {
    configMenuText $m.help.m $idx TreeHelp$tag $lang
  }
}

proc ::tree::copyToSelection {args} {
  set sel [join [.treeWin.f.tl get 0 end] "\n"]
  append sel "\n"
  return $sel
}

proc ::tree::make {} {
  global tree treeWin highcolor geometry helpMessage
  if {[winfo exists .treeWin]} {
    focus .
    destroy .treeWin
    set treeWin 0
    return
  }
  toplevel .treeWin
  set w .treeWin
  setWinLocation $w

  # Set the tree window title now:
  wm title $w "Scid: [tr WindowsTree]"
  set treeWin 1
  set tree(training) 0

  bind $w <Destroy> { set treeWin 0; set tree(locked) 0 }
  bind $w <F1> { helpWindow Tree }
  bind $w <Escape> { .treeWin.buttons.stop invoke }
  standardShortcuts $w

  frame $w.menu
  pack $w.menu -side top -fill x
  $w configure -menu $w.menu
  menubutton $w.menu.file -text TreeFile -menu $w.menu.file.m
  menubutton $w.menu.sort -text TreeSort -menu $w.menu.sort.m
  menubutton $w.menu.opt  -text TreeOpt  -menu $w.menu.opt.m
  menubutton $w.menu.help -text TreeHelp -menu $w.menu.help.m
  foreach i {file sort opt help} {
    menu $w.menu.$i.m -tearoff 0
    pack $w.menu.$i -side left
  }

  $w.menu.file.m add command -label TreeFileSave -command {
    busyCursor .
    update
    if {[catch {sc_tree write $tree(base)} result]} {
      tk_messageBox -type ok -icon warning -title "Scid: Error writing file" \
        -message $result
    }
    unbusyCursor .
  }
  set helpMessage($w.menu.file.m,0) TreeFileSave
  $w.menu.file.m add command -label TreeFileFill -command ::tree::prime
  set helpMessage($w.menu.file.m,1) TreeFileFill
  $w.menu.file.m add separator
  $w.menu.file.m add command -label TreeFileBest -command ::tree::best
  set helpMessage($w.menu.file.m,3) TreeFileBest
  $w.menu.file.m add command -label TreeFileGraph -command ::tree::graph
  set helpMessage($w.menu.file.m,4) TreeFileGraph
  $w.menu.file.m add separator
  $w.menu.file.m add command -label TreeFileCopy -command {
    clipboard clear
    clipboard append [::tree::copyToSelection]
    selection own .treeWin.f.tl
    selection get
  }
  set helpMessage($w.menu.file.m,6) TreeFileCopy
  $w.menu.file.m add separator
  $w.menu.file.m add command -label TreeFileClose \
    -command {.treeWin.buttons.close invoke}
  set helpMessage($w.menu.file.m,8) TreeFileClose

  foreach label {Alpha ECO Freq Score} value {alpha eco frequency score} {
    $w.menu.sort.m add radiobutton -label TreeSort$label \
      -variable tree(order) -value $value -command ::tree::refresh
  }

  $w.menu.opt.m add checkbutton -label TreeOptLock -variable tree(locked) \
    -command ::tree::toggleLock
  set helpMessage($w.menu.opt.m,0) TreeOptLock

  $w.menu.opt.m add checkbutton -label TreeOptTraining \
    -variable tree(training) -command ::tree::toggleTraining
  set helpMessage($w.menu.opt.m,1) TreeOptTraining

  $w.menu.opt.m add separator
  $w.menu.opt.m add checkbutton -label TreeOptAutosave \
    -variable tree(autoSave)
  set helpMessage($w.menu.opt.m,3) TreeOptAutosave

  $w.menu.help.m add command -label TreeHelpTree \
    -accelerator F1 -command {helpWindow Tree}
  $w.menu.help.m add command -label TreeHelpIndex -command {helpWindow Index}

  ::tree::ConfigMenus

  autoscrollframe $w.f listbox $w.f.tl \
    -width $::winWidth($w) -height $::winHeight($w) \
    -font font_Fixed -foreground black -background white \
    -selectmode browse -setgrid 1
  canvas $w.progress -width 250 -height 15 -bg white -relief solid -border 1
  $w.progress create rectangle 0 0 0 0 -fill blue -outline blue -tags bar
  selection handle $w.f.tl ::tree::copyToSelection
  bindMouseWheel $w $w.f.tl

  bind $w.f.tl <Destroy> {
    if {$tree(autoSave)} {
      busyCursor .
      catch {sc_tree write $tree(base)}
      unbusyCursor .
    }
  }

  bind $w <Configure> "recordWinSize $w"

  label $w.status -width 1 -anchor w -font font_Small \
    -relief sunken -textvar tree(status)
  pack $w.status -side bottom -fill x
  pack $w.progress -side bottom
  pack [frame $w.buttons -relief sunken] -side bottom -fill x
  pack $w.f -side top -expand 1 -fill both

  button $w.buttons.best -image b_list -command ::tree::best
  button $w.buttons.graph -image b_bargraph -command ::tree::graph
  checkbutton $w.buttons.lock -textvar ::tr(LockTree) \
    -variable tree(locked) -command ::tree::toggleLock
  checkbutton $w.buttons.training -textvar ::tr(Training) \
    -variable tree(training) -command ::tree::toggleTraining

  foreach {b t} {
    best TreeFileBest graph TreeFileGraph lock TreeOptLock
    training TreeOptTraining
  } {
    set helpMessage($w.buttons.$b) $t
  }

  dialogbutton $w.buttons.stop -textvar ::tr(Stop) -command { sc_progressBar }
  dialogbutton $w.buttons.close -textvar ::tr(Close) -command {
    set geometry(treeWin) [wm geometry .treeWin]
    focus .; destroy .treeWin
  }

  pack $w.buttons.best $w.buttons.graph $w.buttons.lock $w.buttons.training \
    -side left -padx 3 -pady 2
  packbuttons right $w.buttons.close $w.buttons.stop
  $w.buttons.stop configure -state disabled

  wm minsize $w 40 5

  bind $w.f.tl <Return> {
    tree::select [lindex [ .treeWin.f.tl curselection] 0]
  }
  bind $w.f.tl <ButtonRelease-1> {
    .treeWin.f.tl selection clear 0 end
    tree::select [ .treeWin.f.tl nearest %y ]
    .treeWin.f.tl selection clear 0 end
    break
  }

  wm protocol $w WM_DELETE_WINDOW { .treeWin.buttons.close invoke }
  ::tree::refresh
}

proc ::tree::toggleTraining {} {
  global tree
  if {$tree(training)} {
    ::tree::doTraining
  } else {
    ::tree::refresh
  }
}

proc ::tree::doTraining {{n 0}} {
  global tree
  if {$n != 1  &&  [winfo exists .analysisWin1]  &&  $::analysis(automove1)} {
    automove 1
    return
  }
  if {$n != 2  &&  [winfo exists .analysisWin2]  &&  $::analysis(automove2)} {
    automove 2
    return
  }
  if {[::tb::isopen]  &&  $::tbTraining} {
    ::tb::move
    return
  }
  if {! [winfo exists .treeWin]} { return }
  if {$tree(training) == 0} { return }
  set move [sc_tree move $tree(base) random]
  addSanMove $move -animate -notraining
  updateBoard -pgn
}

proc ::tree::toggleLock {} {
  global tree
  if {$tree(locked)} {
    set tree(base) [sc_base current]
  } else {
    set tree(base) 0
  }
  ::tree::refresh
}

proc ::tree::select { selection } {
  global tree
  if {! [winfo exists .treeWin]} { return }
  .treeWin.f.tl selection clear 0 end
  if {$selection == 0} {
    sc_move back
    updateBoard -pgn
    return
  }
  set move [sc_tree move $tree(base) $selection]
  if {$move == ""} { return }
  addSanMove $move -animate
  updateBoard -pgn
}

set tree(refresh) 0

proc ::tree::refresh {} {
  global tree treeWin glstart
  set w .treeWin

  if {![winfo exists $w]} { return }
  busyCursor .
  sc_progressBar $w.progress bar 251 16
  foreach button {best graph training lock close} {
    $w.buttons.$button configure -state disabled
  }
  $w.buttons.stop configure -state normal
  set tree(refresh) 1
  catch {grab $w.buttons.stop}

  update
  set base 0
  if {$tree(locked)} { set base $tree(base) }
  set moves [sc_tree search -hide $tree(training) -sort $tree(order) -base $base]
  catch {grab release $w.buttons.stop}
  set tree(refresh) 0
  foreach button {best graph training lock close} {
    $w.buttons.$button configure -state normal
  }
  $w.buttons.stop configure -state disabled -relief raised

  set moves [split $moves "\n"]
  set len [llength $moves]
  $w.f.tl delete 0 end
  for { set i 0 } { $i < $len } { incr i } {
    $w.f.tl insert end [lindex $moves $i]
  }
  catch {$w.f.tl itemconfigure 0 -foreground darkBlue}

  #set n [expr $len - 4]
  #if {$n > 0} {
  #  for {set i 1} {$i < $n} {incr i} {
  #    set f [string range [lindex $moves $i] 25 27]
  #    if {$f < 5} {
  #      catch {$w.f.tl itemconfigure $i -foreground gray50}
  #    }
  #  }
  #  while {$n < $len} {
  #    catch {$w.f.tl itemconfigure $n -foreground darkBlue}
  #    incr n
  #  }
  #}

  if {[winfo exists .treeBest]} { ::tree::best }

  unbusyCursor .
  $w.f.tl configure -cursor {}
  $w.f.tl selection clear 0 end

  ::tree::status
  set glstart 1
  ::windows::stats::Refresh
  if {[winfo exists .treeGraph]} ::tree::graph
  ::windows::gamelist::Refresh
  updateTitle
}

proc ::tree::status {{msg ""}} {
  global tree
  if {$msg != ""} {
    set tree(status) $msg
    return
  }
  set s "  $::tr(Database)"
  set base [sc_base current]
  if {$tree(locked)} { set base $tree(base) }
  set status "  $::tr(Database) $base: [file tail [sc_base filename $base]]"
  if {$tree(locked)} { append status " ($::tr(TreeLocked))" }
  append status "   $::tr(Filter)"
  append status ": [filterText $base]"
  set tree(status) $status
}

set tree(standardLines) {
  {}
  {1.c4}
  {1.c4 c5}
  {1.c4 c5 2.Nf3}
  {1.c4 e5}
  {1.c4 Nf6}
  {1.c4 Nf6 2.Nc3}
  {1.d4}
  {1.d4 d5}
  {1.d4 d5 2.c4}
  {1.d4 d5 2.c4 c6}
  {1.d4 d5 2.c4 c6 3.Nf3}
  {1.d4 d5 2.c4 c6 3.Nf3 Nf6}
  {1.d4 d5 2.c4 c6 3.Nf3 Nf6 4.Nc3}
  {1.d4 d5 2.c4 c6 3.Nf3 Nf6 4.Nc3 dxc4}
  {1.d4 d5 2.c4 c6 3.Nf3 Nf6 4.Nc3 e6}
  {1.d4 d5 2.c4 c6 3.Nf3 Nf6 4.Nc3 e6 5.e3}
  {1.d4 d5 2.c4 e6}
  {1.d4 d5 2.c4 e6 3.Nc3}
  {1.d4 d5 2.c4 e6 3.Nc3 Nf6}
  {1.d4 d5 2.c4 e6 3.Nf3}
  {1.d4 d5 2.c4 dxc4}
  {1.d4 d5 2.c4 dxc4 3.Nf3}
  {1.d4 d5 2.c4 dxc4 3.Nf3 Nf6}
  {1.d4 d5 2.Nf3}
  {1.d4 d5 2.Nf3 Nf6}
  {1.d4 d5 2.Nf3 Nf6 3.c4}
  {1.d4 d6}
  {1.d4 d6 2.c4}
  {1.d4 Nf6}
  {1.d4 Nf6 2.c4}
  {1.d4 Nf6 2.c4 c5}
  {1.d4 Nf6 2.c4 d6}
  {1.d4 Nf6 2.c4 e6}
  {1.d4 Nf6 2.c4 e6 3.Nc3}
  {1.d4 Nf6 2.c4 e6 3.Nc3 Bb4}
  {1.d4 Nf6 2.c4 e6 3.Nf3}
  {1.d4 Nf6 2.c4 g6}
  {1.d4 Nf6 2.c4 g6 3.Nc3}
  {1.d4 Nf6 2.c4 g6 3.Nc3 Bg7}
  {1.d4 Nf6 2.c4 g6 3.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4 c5 2.Nf3 Nc6 3.Bb5}
  {1.e4 c6}
  {1.e4 c6 2.d4}
  {1.e4 c6 2.d4 d5}
  {1.e4 c6 2.d4 d5 3.e5}
  {1.e4 c6 2.d4 d5 3.Nc3}
  {1.e4 c6 2.d4 d5 3.Nd2}
  {1.e4 d5}
  {1.e4 d6}
  {1.e4 d6 2.d4}
  {1.e4 d6 2.d4 Nf6}
  {1.e4 d6 2.d4 Nf6 3.Nc3}
  {1.e4 e5}
  {1.e4 e5 2.Nf3}
  {1.e4 e5 2.Nf3 Nc6}
  {1.e4 e5 2.Nf3 Nc6 3.d4}
  {1.e4 e5 2.Nf3 Nc6 3.Bb5}
  {1.e4 e5 2.Nf3 Nc6 3.Bb5 a6}
  {1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4}
  {1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6}
  {1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O}
  {1.e4 e5 2.Nf3 Nc6 3.Bc4}
  {1.e4 e5 2.Nf3 Nf6}
  {1.e4 e6}
  {1.e4 e6 2.d4}
  {1.e4 e6 2.d4 d5}
  {1.e4 e6 2.d4 d5 3.Nc3}
  {1.e4 e6 2.d4 d5 3.Nc3 Bb4}
  {1.e4 e6 2.d4 d5 3.Nc3 Nf6}
  {1.e4 e6 2.d4 d5 3.Nd2}
  {1.e4 e6 2.d4 d5 3.Nd2 c5}
  {1.e4 e6 2.d4 d5 3.Nd2 Nf6}
  {1.e4 Nf6}
  {1.e4 Nf6 2.e5}
  {1.e4 Nf6 2.e5 Nd5}
  {1.Nf3}
  {1.Nf3 Nf6}
}

# ::tree::prime
#   Primes the tree for this database, filling it with a number of
#   common opening positions.
#
proc ::tree::prime {} {
  global tree
  if {! [winfo exists .treeWin]} { return }
  set base [sc_base current]
  if {$tree(locked)} { set base $tree(base) }
  if {! [sc_base inUse]} { return }
  set fname [sc_base filename $base]
  if {[string index $fname 0] == "\["  ||  [file extension $fname] == ".pgn"} {
    tk_messageBox -parent .treeWin -icon info -type ok -title "Scid" \
      -message "Sorry, only Scid-format database files can have a tree cache file."
    return
  }

  set ::interrupt 0
  progressWindow "Scid: [tr TreeFileFill]" "" $::tr(Cancel) {set ::interrupt 1}
  resetProgressWindow
  leftJustifyProgressWindow
  busyCursor .
  sc_game push
  set i 1
  set len [llength $tree(standardLines)]
  foreach line $tree(standardLines) {
    sc_game new
    set text [format "%3d/\%3d" $i $len]
    if {[llength $line] > 0}  {
      sc_move addSan $line
      changeProgressWindow "$text: $line"
    } else {
      changeProgressWindow "$text: start position"
    }
    sc_tree search -base $base
    updateProgressWindow $i $len
    incr i
    if {$::interrupt} {
      closeProgressWindow
      set ::interrupt 0
      sc_game pop
      unbusyCursor .
      ::tree::refresh
      return
    }
  }
  closeProgressWindow
  if {[catch {sc_tree write $base} result]} {
    #tk_messageBox -type ok -icon warning -title "Scid: Error writing file" \
        -message $result
  } else {
    #set a "$fname.stc: [sc_tree positions] positions, "
    #append a "$result bytes: "
    #set pergame [expr double($result) / double([sc_base numGames])]
    #append a [format "%.2f" $pergame]
    #append a " bytes per game"
    #tk_messageBox -type ok -parent .treeWin -title "Scid" -message $a
  }
  sc_game pop
  unbusyCursor .
  ::tree::refresh
}

set tree(bestMax) 50
trace variable tree(bestMax) w ::tree::best
set tree(bestRes) "1-0 0-1 1/2 *"
trace variable tree(bestRes) w ::tree::best

# ::tree::best
#   Updates the window of best (highest-rated) tree games.
#
proc ::tree::best {args} {
  global tree
  set w .treeBest
  if {! [winfo exists .treeWin]} { return }
  if {! [winfo exists $w]} {
    toplevel $w
    wm title $w "Scid: $::tr(TreeBestGames)"
    setWinLocation $w
    bind $w <Escape> "destroy $w"
    bind $w <F1> {helpWindow Tree Best}
    pack [frame $w.b] -side bottom -fill x
    pack [frame $w.opt] -side bottom -fill x
    set pane [::utils::pane::Create $w.pane blist bpgn 520 320 0.6]
    ::utils::pane::SetRange $w.pane 0.3 0.8
    pack $pane -side top -expand true -fill both
    scrollbar $pane.blist.ybar -command "$pane.blist.list yview" -takefocus 0
    listbox $pane.blist.list -background white \
      -yscrollcommand "$pane.blist.ybar set" -font font_Small
    pack $pane.blist.ybar -side right -fill y
    pack $pane.blist.list -side left -fill both -expand yes
    bind $pane.blist.list <<ListboxSelect>> ::tree::bestPgn
    bind $pane.blist.list <Double-Button-1> ::tree::bestBrowse

    scrollbar $pane.bpgn.ybar -command "$pane.bpgn.text yview" -takefocus 0
    text $pane.bpgn.text -width 50 -height 20 -background gray90 \
      -cursor top_left_arrow -yscrollcommand "$pane.bpgn.ybar set" -wrap word \
      -state disabled -font font_Small
    pack $pane.bpgn.ybar -side right -fill y
    pack $pane.bpgn.text -side left -fill both -expand yes
    set t $pane.bpgn.text
    bind $t <ButtonPress-1> "::pgn::ShowBoard $pane.bpgn.text 4 %x %y %X %Y"
    bind $t <ButtonRelease-1> ::pgn::HideBoard
    bind $t <ButtonPress-2> "::pgn::ShowBoard $pane.bpgn.text 4 %x %y %X %Y"
    bind $t <ButtonRelease-2> ::pgnHideBoard
    bind $t <ButtonPress-3> "::pgn::ShowBoard $pane.bpgn.text 4 %x %y %X %Y"
    bind $t <ButtonRelease-3> :::pgn::HideBoard

    label $w.opt.lmax -text $::tr(TreeBest:) -font font_Small
    set m [tk_optionMenu $w.opt.max tree(bestMax) 10 20 50 100 200 500]
    $m configure -font font_Small
    $w.opt.max configure -font font_Small
    label $w.opt.lres -text " $::tr(Result):" -font font_Small
    set m [tk_optionMenu $w.opt.res tree(bestRes) \
             "1-0 0-1 1/2 *" 1-0 0-1 "1-0 0-1" 1/2-1/2]
    $m configure -font font_Small
    $w.opt.res configure -font font_Small

    button $w.b.browse -text $::tr(BrowseGame) -command ::tree::bestBrowse
    button $w.b.load -text $::tr(LoadGame) -command ::tree::bestLoad
    button $w.b.merge -text $::tr(MergeGame) -command ::tree::bestMerge
    button $w.b.close -text $::tr(Close) -command "destroy $w"
    foreach i {browse load merge close} { $w.b.$i configure -font font_Small }
    pack $w.b.close $w.b.merge $w.b.load $w.b.browse \
      -side right -padx 1 -pady 2
    pack $w.opt.lmax $w.opt.max -side left -padx 0 -pady 2
    pack $w.opt.lres $w.opt.res -side left -padx 0 -pady 2
    bind $w <Configure> "recordWinSize $w"
    focus $w.pane.blist.list
  }
  $w.pane.blist.list delete 0 end
  set tree(bestList) {}
  set count 0
  if {! [sc_base inUse]} { return }
  foreach {idx line} [sc_tree best $tree(base) $tree(bestMax) $tree(bestRes)] {
    incr count
    $w.pane.blist.list insert end "[format %02d $count]:  $line"
    lappend tree(bestList) $idx
  }
  catch {$w.pane.blist.list selection set 0}
  ::tree::bestPgn
}

proc ::tree::bestLoad {} {
  global tree
  if {[catch {set sel [.treeBest.pane.blist.list curselection]}]} { return }
  if {[catch {set g [lindex $tree(bestList) $sel]}]} { return }
  if {$tree(locked)} { sc_base switch $tree(base) }
  ::game::Load $g
}

proc ::tree::bestMerge {} {
  global tree
  if {[catch {set sel [.treeBest.pane.blist.list curselection]}]} { return }
  if {[catch {set gnum [lindex $tree(bestList) $sel]}]} { return }
  set base [sc_base current]
  if {$tree(locked)} { set base $tree(base) }
  mergeGame $base $gnum
}

proc ::tree::bestBrowse {} {
  global tree
  if {[catch {set sel [.treeBest.pane.blist.list curselection]}]} { return }
  if {[catch {set gnum [lindex $tree(bestList) $sel]}]} { return }
  set base [sc_base current]
  if {$tree(locked)} { set base $tree(base) }
  ::gbrowser::new $base $gnum
}

proc ::tree::bestPgn {} {
  global tree
  set t .treeBest.pane.bpgn.text
  $t configure -state normal
  $t delete 1.0 end
  if {[catch {set sel [.treeBest.pane.blist.list curselection]}]} { return }
  if {[catch {set g [lindex $tree(bestList) $sel]}]} { return }
  set base [sc_base current]
  if {$tree(locked)} { set base $tree(base) }
  if {[catch {sc_game summary -base $base -game $g header} header]} { return }
  if {[catch {sc_game summary -base $base -game $g moves} moves]} { return }
  if {[catch {sc_filter value $base $g} ply]} { return }
  $t tag configure header -foreground darkBlue
  $t tag configure start -foreground darkRed
  $t insert end $header header
  $t insert end "\n\n"
  set m 0
  foreach move $moves {
    incr m
    if {$m < $ply} {
      $t insert end $move start
    } else {
      $t insert end $move
    }
    $t insert end " "
  }
  #catch {$t insert end [sc_game pgn -base $base -game $g \
  #                        -short 1 -indentC 1 -indentV 1 -symbol 1 -tags 0]}
  $t configure -state disabled
}

# ::tree::graph
#   Updates the tree graph window, creating it if necessary.
#
proc ::tree::graph {} {
  set w .treeGraph
  if {! [winfo exists .treeWin]} { return }
  if {! [winfo exists $w]} {
    toplevel $w
    setWinLocation $w
    bind $w <Escape> "destroy $w"
    bind $w <F1> {helpWindow Tree Graph}
    frame $w.menu -relief raised -borderwidth 2
    pack $w.menu -side top -fill x
    $w configure -menu $w.menu
    menubutton $w.menu.file -text GraphFile -menu $w.menu.file.m
    menu $w.menu.file.m
    $w.menu.file.m add command -label GraphFileColor \
      -command "saveGraph color $w.c"
    $w.menu.file.m add command -label GraphFileGrey \
      -command "saveGraph gray $w.c"
    $w.menu.file.m add separator
    $w.menu.file.m add command -label GraphFileClose -command "destroy $w"
    pack $w.menu.file -side left

    canvas $w.c -width 500 -height 300
    pack $w.c -side top -fill both -expand yes
    $w.c create text 25 10 -tag text -justify center -width 1 \
      -font font_Regular -anchor n
    bind $w <Configure> {
      .treeGraph.c itemconfigure text -width [expr {[winfo width .treeGraph.c] - 50}]
      .treeGraph.c coords text [expr {[winfo width .treeGraph.c] / 2}] 10
      ::utils::graph::configure tree -height [expr {[winfo height .treeGraph.c] - 100}]
      ::utils::graph::configure tree -width [expr {[winfo width .treeGraph.c] - 50}]
      ::utils::graph::redraw tree
    }
    bind $w.c <Button-1> ::tree::graph
    wm title $w "Scid: Tree Graph"
    # wm minsize $w 300 200
    standardShortcuts $w
    ::tree::configGraphMenus
  }

  $w.c itemconfigure text -width [expr {[winfo width $w.c] - 50}]
  $w.c coords text [expr {[winfo width $w.c] / 2}] 10
  set height [expr {[winfo height $w.c] - 100}]
  set width [expr {[winfo width $w.c] - 50}]
  ::utils::graph::create tree -width $width -height $height -xtop 25 -ytop 60 \
    -xmin 0.5 -xtick 1 -ytick 5 -font font_Small -canvas $w.c

  set data {}
  set xlabels {}
  set othersCount 0
  set numOthers 0
  set othersName "..."
  set count 0
  set othersScore 0.0
  set mean 50.0
  set totalGames 0
  set treeData [.treeWin.f.tl get 0 end]

  set numTreeLines [llength $treeData]
  set totalLineIndex [expr $numTreeLines - 2]

  for {set i 0} {$i < [llength $treeData]} {incr i} {
    # Extract info from each line of the tree window:
    # Note we convert "," decimal char back to "." where necessary.
    set line [lindex $treeData $i]
    set mNum [string trim [string range $line  0  1]]
    set freq [string trim [string range $line 17 23]]
    set fpct [string trim [string range $line 25 29]]
    regsub -all {,} $fpct . fpct
    set move [string trim [string range $line  4 9]]
    set score [string trim [string range $line 33 37]]
    regsub -all {,} $score . score
    if {$score > 99.9} { set score 99.9 }
    # Check if this line is "TOTAL:" line:
    if {$i == $totalLineIndex} {
      set mean $score
      set totalGames $freq
    }
    # Add info for this move to the graph if necessary:
    if {[string index $line 2] == ":"  &&  [string compare "<end>" $move]} {
      if {$fpct < 1.0  ||  $freq < 5  ||  $i > 5} {
        incr othersCount $freq
        incr numOthers
        set othersScore [expr {$othersScore + (double($freq) * $score)}]
        set m $move
        if {$numOthers > 1} { set m "..." }
      } else {
        incr count
        lappend data $count
        lappend data $score
        lappend xlabels [list $count "$move ([expr round($score)]%)\n$freq: [expr round($fpct)]%"]
      }
    }
  }

  # Add extra bar for other moves if necessary:
  if {$numOthers > 0  &&  $totalGames > 0} {
    incr count
    set fpct [expr {double($othersCount) * 100.0 / double($totalGames)}]
    set sc [expr {round($othersScore / double($othersCount))}]
    set othersName "$m ($sc%)\n$othersCount: [expr round($fpct)]%"
    lappend data $count
    lappend data [expr {$othersScore / double($othersCount)}]
    lappend xlabels [list $count $othersName]
  }

  # Plot fake bounds data so graph at least shows range 40-65:
  ::utils::graph::data tree bounds -points 0 -lines 0 -bars 0 -coords {1 41 1 64}

  # Replot the graph:
  ::utils::graph::data tree data -color red -points 0 -lines 0 -bars 1 \
    -barwidth 0.75 -outline black -coords $data
  ::utils::graph::configure tree -xlabels $xlabels -xmax [expr {$count + 0.5}] \
    -hline [list {gray80 1 each 5} {gray50 1 each 10} {black 2 at 50} \
              {black 1 at 55} [list red 2 at $mean]] \
    -brect [list [list 0.5 55 [expr {$count + 0.5}] 50 LightSkyBlue1]]

  ::utils::graph::redraw tree
  set moves ""
  catch {set moves [sc_game firstMoves 0 -1]}
  if {[string length $moves] == 0} { set moves $::tr(StartPos) }
  set title "$moves ([::utils::thousands $totalGames] $::tr(games))"
  $w.c itemconfigure text -text $title
}

proc ::tree::configGraphMenus {{lang ""}} {
  if {! [winfo exists .treeGraph]} { return }
  if {$lang == ""} { set lang $::language }
  set m .treeGraph.menu
  foreach menu {file} tag {File} {
    configMenuName $m.$menu Graph$tag $lang
  }
  foreach idx {0 1 3} tag {Color Grey Close} {
    configMenuText $m.file.m $idx GraphFile$tag $lang
  }
}

######################################################################
### Crosstable window

namespace eval ::crosstab {}

set crosstab(sort) score
set crosstab(type) auto
set crosstab(ages) "+ages"
set crosstab(colors) "+colors"
set crosstab(ratings) "+ratings"
set crosstab(countries) "+countries"
set crosstab(titles) "+titles"
set crosstab(groups) "-groups"
set crosstab(breaks) "-breaks"
set crosstab(deleted) "-deleted"
set crosstab(cnumbers) "-numcolumns"
set crosstab(text) hypertext

proc ::crosstab::ConfigMenus {{lang ""}} {
  if {! [winfo exists .crosstabWin]} { return }
  if {$lang == ""} { set lang $::language }
  set m .crosstabWin.menu
  foreach menu {file edit opt sort color help} tag {File Edit Opt Sort Color Help} {
    configMenuName $m.$menu Crosstab$tag $lang
  }
  foreach idx {0 1 2 4} tag {Text Html LaTeX Close} {
    configMenuText $m.file.m $idx CrosstabFile$tag $lang
  }
  foreach idx {0 1 2} tag {Event Site Date} {
    configMenuText $m.edit.m $idx CrosstabEdit$tag $lang
  }
  foreach idx {0 1 2 3 5 6 7 8 9 10 12 13 15} tag {All Swiss Knockout Auto Ages Nats Ratings Titles Breaks Deleted Colors ColumnNumbers Group} {
    configMenuText $m.opt.m $idx CrosstabOpt$tag $lang
  }
  foreach idx {0 1 2} tag {Name Rating Score} {
    configMenuText $m.sort.m $idx CrosstabSort$tag $lang
  }
  foreach idx {0 1} tag {Plain Hyper} {
    configMenuText $m.color.m $idx CrosstabColor$tag $lang
  }
  foreach idx {0 1} tag {Cross Index} {
    configMenuText $m.help.m $idx CrosstabHelp$tag $lang
  }
}

proc toggleCrosstabWin {} {
  set w .crosstabWin
  if {[winfo exists $w]} {
    destroy $w
  } else {
    crosstabWin
  }
}

proc ::crosstab::RefreshIfOpen {} {
  set w .crosstabWin
  if {[winfo exists $w]} { crosstabWin }
}

proc ::crosstab::Open {} {
  global crosstab
  set w .crosstabWin
  if {[winfo exists $w]} {
    ::crosstab::Refresh
    return
  }

  toplevel $w
  wm title $w "Scid: [tr ToolsCross]"
  wm minsize $w 50 5
  setWinLocation $w

  frame $w.menu -borderwidth 3 -relief raised
  pack $w.menu -side top -fill x
  $w configure -menu $w.menu
  menubutton $w.menu.file -text CrosstabFile -menu $w.menu.file.m
  menubutton $w.menu.edit -text CrosstabEdit -menu $w.menu.edit.m
  menubutton $w.menu.opt -text CrosstabOpt -menu $w.menu.opt.m
  menubutton $w.menu.sort -text CrosstabSort -menu $w.menu.sort.m
  menubutton $w.menu.color -text CrosstabText -menu $w.menu.color.m
  menubutton $w.menu.help -text CrosstabHelp -menu $w.menu.help.m
  foreach i {file edit opt sort color help} {
    menu $w.menu.$i.m -tearoff 0
    pack $w.menu.$i -side left
  }

  $w.menu.file.m add command -label CrosstabFileText -command {
    set ftype {
      { "Text files" {".txt"} }
      { "All files"  {"*"}    }
    }
    set fname [tk_getSaveFile -initialdir [pwd] -filetypes $ftype  -title "Save Crosstable"]
    if {$fname != ""} {
      if {[catch {set tempfile [open $fname w]}]} {
        tk_messageBox -title "Scid: Error saving file" \
          -type ok -icon warning \
          -message "Unable to save the file: $fname\n\n"
      } else {
        puts -nonewline $tempfile [.crosstabWin.f.text get 1.0 end]
        close $tempfile
      }
    }
  }
  $w.menu.file.m add command -label CrosstabFileHtml -command {
    set ftype {
      { "HTML files" {".html" ".htm"} }
      { "All files"  {"*"}    }
    }
    set fname [tk_getSaveFile -initialdir $::initialDir(html) -filetypes $ftype  -title "Save Crosstable as HTML"]
    if {$fname != ""} {
      if {[catch {set tempfile [open $fname w]}]} {
        tk_messageBox -title "Scid: Error saving file" \
          -type ok -icon warning \
          -message "Unable to save the file: $fname\n\n"
      } else {
        catch {sc_game crosstable html $crosstab(sort) $crosstab(type) \
                 $crosstab(ratings) $crosstab(countries) $crosstab(titles) \
                 $crosstab(colors) $crosstab(groups) $crosstab(ages) \
                 $crosstab(breaks) $crosstab(cnumbers) $crosstab(deleted)} \
          result
        puts $tempfile $result
        close $tempfile
      }
    }
  }
  $w.menu.file.m add command -label CrosstabFileLaTeX -command {
    set ftype {
      { "LaTeX files" {".tex" ".ltx"} }
      { "All files"  {"*"}    }
    }
    set fname [tk_getSaveFile -initialdir $::initialDir(tex) -filetypes $ftype  -title "Save Crosstable as LaTeX"]
    if {$fname != ""} {
      if {[catch {set tempfile [open $fname w]}]} {
        tk_messageBox -title "Scid: Error saving file" \
          -type ok -icon warning \
          -message "Unable to save the file: $fname\n\n"
      } else {
        catch {sc_game crosstable latex $crosstab(sort) $crosstab(type) \
                 $crosstab(ratings) $crosstab(countries) $crosstab(titles) \
                 $crosstab(colors) $crosstab(groups) $crosstab(ages) \
                 $crosstab(breaks) $crosstab(cnumbers) $crosstab(deleted)} \
          result
        puts $tempfile $result
        close $tempfile
      }
    }
  }
  $w.menu.file.m add separator
  $w.menu.file.m add command -label CrosstabFileClose \
    -command { .crosstabWin.b.cancel invoke } -accelerator Esc

  $w.menu.edit.m add command -label CrosstabEditEvent -command {
    makeNameEditor
    setNameEditorType event
    set editName [sc_game info event]
    set editNameNew ""
    set editNameSelect crosstable
  }
  $w.menu.edit.m add command -label CrosstabEditSite -command {
    makeNameEditor
    setNameEditorType site
    set editName [sc_game info site]
    set editNameNew ""
    set editNameSelect crosstable
  }
  $w.menu.edit.m add command -label CrosstabEditDate -command {
    makeNameEditor
    setNameEditorType date
    set editNameNew " "
    set editDate [sc_game info date]
    set editDateNew [sc_game info date]
    set editNameSelect crosstable
  }

  $w.menu.opt.m add radiobutton -label CrosstabOptAll \
    -variable crosstab(type) -value allplay -command crosstabWin
  $w.menu.opt.m add radiobutton -label CrosstabOptSwiss \
    -variable crosstab(type) -value swiss -command crosstabWin
  $w.menu.opt.m add radiobutton -label CrosstabOptKnockout \
    -variable crosstab(type) -value knockout -command crosstabWin
  $w.menu.opt.m add radiobutton -label CrosstabOptAuto \
    -variable crosstab(type) -value auto -command crosstabWin
  $w.menu.opt.m add separator
  $w.menu.opt.m add checkbutton -label CrosstabOptAges \
    -variable crosstab(ages) -onvalue "+ages" \
    -offvalue "-ages" -command crosstabWin
  $w.menu.opt.m add checkbutton -label CrosstabOptNats \
    -variable crosstab(countries) -onvalue "+countries" \
    -offvalue "-countries" -command crosstabWin
  $w.menu.opt.m add checkbutton -label CrosstabOptRatings \
    -variable crosstab(ratings) -onvalue "+ratings" -offvalue "-ratings" \
    -command crosstabWin
  $w.menu.opt.m add checkbutton -label CrosstabOptTitles \
    -variable crosstab(titles) -onvalue "+titles" -offvalue "-titles" \
    -command crosstabWin
  $w.menu.opt.m add checkbutton -label CrosstabOptBreaks \
    -variable crosstab(breaks) -onvalue "+breaks" \
    -offvalue "-breaks" -command crosstabWin
  $w.menu.opt.m add checkbutton -label CrosstabOptDeleted \
    -variable crosstab(deleted) -onvalue "+deleted" \
    -offvalue "-deleted" -command crosstabWin
  $w.menu.opt.m add separator
  $w.menu.opt.m add checkbutton -label CrosstabOptColors \
    -underline 0 -variable crosstab(colors) \
    -onvalue "+colors" -offvalue "-colors" -command crosstabWin
  $w.menu.opt.m add checkbutton -label CrosstabOptColumnNumbers \
    -underline 0 -variable crosstab(cnumbers) \
    -onvalue "+numcolumns" -offvalue "-numcolumns" -command crosstabWin
  $w.menu.opt.m add separator
  $w.menu.opt.m add checkbutton -label CrosstabOptGroup \
    -underline 0 -variable crosstab(groups) \
    -onvalue "+groups" -offvalue "-groups" -command crosstabWin

  $w.menu.sort.m add radiobutton -label CrosstabSortName \
    -variable crosstab(sort) -value name -command crosstabWin
  $w.menu.sort.m add radiobutton -label CrosstabSortRating \
    -variable crosstab(sort) -value rating -command crosstabWin
  $w.menu.sort.m add radiobutton -label CrosstabSortScore \
    -variable crosstab(sort) -value score -command crosstabWin

  $w.menu.color.m add radiobutton -label CrosstabColorPlain \
    -variable crosstab(text) -value plain -command crosstabWin
  $w.menu.color.m add radiobutton -label CrosstabColorHyper \
    -variable crosstab(text) -value hypertext -command crosstabWin

  $w.menu.help.m add command -label CrosstabHelpCross \
    -accelerator F1 -command {helpWindow Crosstable}
  $w.menu.help.m add command -label CrosstabHelpIndex \
     -command {helpWindow Index}

  ::crosstab::ConfigMenus

  frame $w.b
  pack $w.b -side bottom -fill x
  frame $w.f
  pack $w.f -side top -fill both -expand true
  text $w.f.text -width $::winWidth($w) -height $::winHeight($w) \
    -wrap none -font font_Fixed \
    -background white -yscroll "$w.f.ybar set" \
    -xscroll "$w.f.xbar set" -setgrid 1 -cursor top_left_arrow
  ::htext::init $w.f.text
  $w.f.text tag configure bgGray -background gray95
  scrollbar $w.f.ybar -command "$w.f.text yview"
  scrollbar $w.f.xbar -orient horizontal -command "$w.f.text xview"
  grid $w.f.text -row 0 -column 0 -sticky nesw
  grid $w.f.ybar -row 0 -column 1 -sticky nesw
  grid $w.f.xbar -row 1 -column 0 -sticky nesw
  grid rowconfig $w.f 0 -weight 1 -minsize 0
  grid columnconfig $w.f 0 -weight 1 -minsize 0
  button $w.b.stop -textvar ::tr(Stop) -state disabled \
    -command { set ::htext::interrupt 1 }
  menubutton $w.b.type -text "" -menu $w.b.type.menu \
    -relief raised -bd 2 -indicatoron 1
  menu $w.b.type.menu
  $w.b.type.menu add radiobutton -label [tr CrosstabOptAll] \
    -variable crosstab(type) -value allplay -command crosstabWin
  $w.b.type.menu add radiobutton -label [tr CrosstabOptSwiss] \
    -variable crosstab(type) -value swiss -command crosstabWin
  $w.b.type.menu add radiobutton -label [tr CrosstabOptKnockout] \
    -variable crosstab(type) -value knockout -command crosstabWin
  $w.b.type.menu add radiobutton -label [tr CrosstabOptAuto] \
    -variable crosstab(type) -value auto -command crosstabWin
  button $w.b.update -textvar ::tr(Update) -command crosstabWin
  button $w.b.cancel -textvar ::tr(Close) -command {
    focus .
    destroy .crosstabWin
  }
  button $w.b.setfilter -textvar ::tr(SetFilter) -command {
    ::search::filter::reset
    ::search::filter::negate
    sc_game crosstable filter
    ::windows::gamelist::Refresh
  }
  button $w.b.addfilter -textvar ::tr(AddToFilter) -command {
    sc_game crosstable filter
    ::windows::gamelist::Refresh
  }
  pack $w.b.cancel $w.b.update $w.b.type \
    -side right -pady 3 -padx 5
  pack $w.b.setfilter $w.b.addfilter -side left -pady 3 -padx 5

  bind $w <Configure> "recordWinSize $w"
  bind $w <F1> { helpWindow Crosstable }
  bind $w <Return> { .crosstabWin.b.update invoke }
  bind $w <Escape> { .crosstabWin.b.cancel invoke }
  bind $w <Up> { .crosstabWin.f.text yview scroll -1 units }
  bind $w <Down> { .crosstabWin.f.text yview scroll 1 units }
  bind $w <Prior> { .crosstabWin.f.text yview scroll -1 pages }
  bind $w <Next> { .crosstabWin.f.text yview scroll 1 pages }
  bind $w <Left> { .crosstabWin.f.text xview scroll -1 units }
  bind $w <Right> { .crosstabWin.f.text xview scroll 1 units }
  bind $w <Key-Home> {
    .crosstabWin.f.text xview moveto 0
  }
  bind $w <Key-End> {
    .crosstabWin.f.text xview moveto 0.99
  }
  standardShortcuts $w

  # MouseWheel Bindings:
  bind $w <MouseWheel> { .crosstabWin.f.text yview scroll [expr {- (%D / 120)}] units}
  if {! $::windowsOS} {
    bind $w <Button-4> { .crosstabWin.f.text yview scroll -1 units }
    bind $w <Button-5> { .crosstabWin.f.text yview scroll  1 units }
  }

  ::crosstab::Refresh
}

proc crosstabWin {} {
  ::crosstab::Open
}

proc ::crosstab::Refresh {} {
  global crosstab
  set w .crosstabWin
  if {! [winfo exists $w]} { return }

  switch $crosstab(type) {
    allplay  { $w.b.type configure -text [tr CrosstabOptAll] }
    swiss    { $w.b.type configure -text [tr CrosstabOptSwiss] }
    knockout { $w.b.type configure -text [tr CrosstabOptKnockout] }
    auto     { $w.b.type configure -text [tr CrosstabOptAuto] }
  }
  $w.f.text configure -state normal
  $w.f.text delete 1.0 end
  busyCursor .
  $w.f.text configure -state disabled
  update idle
  $w.b.stop configure -state normal
  foreach button {update cancel setfilter addfilter type} {
    $w.b.$button configure -state disabled
  }
  pack $w.b.stop -side right -padx 5 -pady 3
  catch {grab $w.b.stop}
  update
  catch {sc_game crosstable $crosstab(text) $crosstab(sort) $crosstab(type) \
         $crosstab(ratings) $crosstab(countries) $crosstab(titles) \
         $crosstab(colors) $crosstab(groups) $crosstab(ages) \
         $crosstab(breaks) $crosstab(cnumbers) $crosstab(deleted)} result
  $w.f.text configure -state normal
  if {$crosstab(text) == "plain"} {
    $w.f.text insert end $result
  } else {
    ::htext::display $w.f.text $result
  }
  # Shade every second line to help readability:
  set lastLineNum [expr {int([$w.f.text index end])}]
  for {set i 2} {$i <= $lastLineNum} {incr i 2} {
    $w.f.text tag add bgGray $i.0 "$i.0 lineend +1c"
  }
  unbusyCursor .
  catch {grab release $w.b.stop}
  $w.b.stop configure -state disabled
  pack forget $w.b.stop
  foreach button {update cancel setfilter addfilter type} {
    $w.b.$button configure -state normal
  }
  $w.f.text configure -state disabled
  raiseWin $w
}


####################
# Player List window

namespace eval ::plist {}

set plistWin 0

set ::plist::sort Name

proc ::plist::defaults {} {
  set ::plist::name ""
  set ::plist::minGames 0
  set ::plist::maxGames 9999
  set ::plist::minElo 0
  set ::plist::maxElo [sc_info limit elo]
  set ::plist::size 50
}

::plist::defaults

trace variable ::plist::minElo w [list ::utils::validate::Integer [sc_info limit elo] 0]
trace variable ::plist::maxElo w [list ::utils::validate::Integer [sc_info limit elo] 0]
trace variable ::plist::minGames w [list ::utils::validate::Integer 9999 0]
trace variable ::plist::maxGames w [list ::utils::validate::Integer 9999 0]

proc ::plist::toggle {} {
  set w .plist
  if {[winfo exists $w]} {
    destroy $w
  } else {
    ::plist::Open
  }
}

proc ::plist::Open {} {
  global plistWin
  set w .plist
  if {[winfo exists .plist]} { return }
  set plistWin 1

  toplevel $w
  wm title $w "Scid: [tr WindowsPList]"
  setWinLocation $w
  bind $w <Configure> "recordWinSize $w"

  bind $w <F1> {helpWindow PList}
  bind $w <Escape> "$w.b.close invoke"
  bind $w <Return> ::plist::refresh
  bind $w <Destroy> { set plistWin 0 }
  standardShortcuts $w
  bind $w <Up> "$w.t.text yview scroll -1 units"
  bind $w <Down> "$w.t.text yview scroll 1 units"
  bind $w <Prior> "$w.t.text yview scroll -1 pages"
  bind $w <Next> "$w.t.text yview scroll 1 pages"
  bind $w <Key-Home> "$w.t.text yview moveto 0"
  bind $w <Key-End> "$w.t.text yview moveto 0.99"
  #bindMouseWheel $w $w.t.text

  frame $w.menu -relief raised -borderwidth 2
  pack $w.menu -side top -fill x
  $w configure -menu $w.menu
  menubutton $w.menu.file -text File -menu $w.menu.file.m
  menu $w.menu.file.m
  $w.menu.file.m add command -label Update -command ::plist::refresh
  $w.menu.file.m add command -label Close -command "destroy $w"
  menubutton $w.menu.sort -text Sort -menu $w.menu.sort.m
  menu $w.menu.sort.m
  foreach name {Name Elo Games Oldest Newest} {
    $w.menu.sort.m add radiobutton -label $name -variable ::plist::sort \
      -value $name -command ::plist::refresh
  }
  pack $w.menu.file $w.menu.sort -side left

  foreach i {t o1 o2 o3 b} {frame $w.$i}
  $w.t configure -relief sunken -borderwidth 1
  text $w.t.text -width 55 -height 25 -font font_Small -wrap none \
    -fg black -bg white -yscrollcommand "$w.t.ybar set" -setgrid 1 \
    -cursor top_left_arrow -xscrollcommand "$w.t.xbar set" -borderwidth 0
  scrollbar $w.t.ybar -command "$w.t.text yview" -takefocus 0
  scrollbar $w.t.xbar -orient horiz -command "$w.t.text xview" -takefocus 0
  set xwidth [font measure [$w.t.text cget -font] "0"]
  set tablist {}
  foreach {tab justify} {4 r 10 r 18 r 24 r 32 r 35 l} {
    set tabwidth [expr {$xwidth * $tab} ]
    lappend tablist $tabwidth $justify
  }
  $w.t.text configure -tabs $tablist
  $w.t.text tag configure ng -foreground darkBlue
  $w.t.text tag configure date -foreground darkRed
  $w.t.text tag configure elo -foreground darkGreen
  $w.t.text tag configure name -foreground black
  $w.t.text tag configure title -background lightSteelBlue; #-font font_SmallBold

  set font font_Small
  set fbold font_SmallBold

  set f $w.o1
  label $f.nlabel -text $::tr(Player:) -font $fbold
  ::combobox::combobox $f.name -textvariable ::plist::name -width 20 -font $font
  ::utils::history::SetCombobox ::plist::name $f.name
  bindFocusColors $f.name
  focus $f.name
  label $f.size -text $::tr(TmtLimit:) -font $fbold
  ::combobox::combobox $f.esize -width 4 -justify right -textvar ::plist::size \
    -font $font
  trace variable ::plist::size w {::utils::validate::Integer 1000 0}
  bindFocusColors $f.esize
  foreach n {50 100 200 500 1000} {
    $f.esize list insert end $n
  }
  pack $f.esize $f.size -side right
  pack $f.nlabel $f.name -side left

  set f $w.o2
  label $f.elo -text "[tr PListSortElo]:" -font $fbold
  entry $f.emin -textvariable ::plist::minElo
  label $f.eto -text "-"
  entry $f.emax -textvariable ::plist::maxElo
  label $f.games -text "[tr PListSortGames]:" -font $fbold
  entry $f.gmin -textvariable ::plist::minGames
  label $f.gto -text "-"
  entry $f.gmax -textvariable ::plist::maxGames

  foreach entry {emin emax gmin gmax} {
    $f.$entry configure -width 4 -justify right -font $font
    bindFocusColors $f.$entry
    bind $f.$entry <FocusOut> +::plist::check
  }
  pack $f.elo $f.emin $f.eto $f.emax -side left
  pack $f.gmax $f.gto $f.gmin $f.games -side right

  dialogbutton $w.b.defaults -text $::tr(Defaults) -command ::plist::defaults
  dialogbutton $w.b.update -text $::tr(Update) -command ::plist::refresh
  dialogbutton $w.b.close -text $::tr(Close) -command "destroy $w"
  packbuttons left $w.b.defaults
  packbuttons right $w.b.close $w.b.update

  pack $w.b -side bottom -fill x
  pack $w.o3 -side bottom -fill x -padx 2 -pady 2
  pack $w.o2 -side bottom -fill x -padx 2 -pady 2
  pack $w.o1 -side bottom -fill x -padx 2 -pady 2

  pack $w.t -side top -fill both -expand yes
  grid $w.t.text -row 0 -column 0 -sticky news
  grid $w.t.ybar -row 0 -column 1 -sticky news
  grid $w.t.xbar -row 1 -column 0 -sticky news
  grid rowconfig $w.t 0 -weight 1 -minsize 0
  grid columnconfig $w.t 0 -weight 1 -minsize 0

  ::plist::ConfigMenus
  ::plist::refresh
}

proc ::plist::ConfigMenus {{lang ""}} {
  set w .plist
  if {! [winfo exists $w]} { return }
  if {$lang == ""} { set lang $::language }
  set m $w.menu
  foreach menu {file sort} tag {File Sort} {
    configMenuName $m.$menu PList$tag $lang
  }
  foreach idx {0 2} tag {Update Close} {
    configMenuText $m.file.m $idx PListFile$tag $lang
  }
  foreach idx {0 1 2 3 4 5} tag {Name Elo Games Oldest Newest} {
    configMenuText $m.sort.m $idx PListSort$tag $lang
  }
}

proc ::plist::refresh {} {
  set w .plist
  if {! [winfo exists $w]} { return }

  busyCursor .
  ::utils::history::AddEntry ::plist::name $::plist::name
  set t $w.t.text
  $t configure -state normal
  $t delete 1.0 end

  $t insert end "\t" title
  foreach i {Games Oldest Newest Elo Name} {
    #$t tag configure s$i -font font_SmallBold
    $t tag bind s$i <1> "set ::plist::sort $i; ::plist::refresh"
    $t tag bind s$i <Any-Enter> "$t tag config s$i -foreground red"
    $t tag bind s$i <Any-Leave> "$t tag config s$i -foreground {}"
    $t insert end "\t" title
    $t insert end $i [list title s$i]
  }
  $t insert end "\n" title

  update
  set err [catch {sc_name plist -name $::plist::name -size $::plist::size \
            -minGames $::plist::minGames -maxGames $::plist::maxGames \
            -minElo $::plist::minElo -maxElo $::plist::maxElo \
                -sort [string tolower $::plist::sort]} pdata]
  if {$err} {
    $t insert end "\n$pdata\n"
    unbusyCursor .
    return
  }

  set hc yellow
  set count 0
  foreach player $pdata {
    incr count
    set ng [lindex $player 0]
    set oldest [lindex $player 1]
    set newest [lindex $player 2]
    set elo [lindex $player 3]
    set name [lindex $player 4]

    $t tag bind p$count <ButtonPress-1> [list playerInfo $name]
    #$t tag bind p$count <ButtonPress-3> [list playerInfo $name]
    $t tag bind p$count <Any-Enter> \
      "$t tag configure p$count -background $hc"
    $t tag bind p$count <Any-Leave> \
      "$t tag configure p$count -background {}"
    $t insert end "\n"
    $t insert end "\t$count\t" p$count
    $t insert end $ng [list ng p$count]
    $t insert end "\t" p$count
    $t insert end $oldest [list date p$count]
    $t insert end "\t" p$count
    $t insert end "- $newest" [list date p$count]
    $t insert end "\t" p$count
    $t insert end $elo [list elo p$count]
    $t insert end "\t" p$count
    $t insert end $name [list name p$count]
  }
  $t insert end "\n"
  $t configure -state disabled
  unbusyCursor .
}

proc ::plist::check {} {
  if {$::plist::minGames > $::plist::maxGames} {
    set ::plist::maxGames $::plist::minGames
  }
  if {$::plist::minElo > $::plist::maxElo} {
    set ::plist::maxElo $::plist::minElo
  }
}

####################
# Tournament window

namespace eval ::tourney {}

foreach {n v} {start 0000.00.00 end 2047.12.31 minPlayers 2 maxPlayers 999 \
                 minGames 1 maxGames 9999 minElo 0 maxElo 4000 sort Date \
                 country "" site "" event "" player "" size 50} {
  set ::tourney::$n $v
}

trace variable ::tourney::start w ::utils::validate::Date
trace variable ::tourney::end w ::utils::validate::Date
foreach {n v} {minPlayers 999 maxPlayers 999 minGames 9999 maxGames 9999 \
                 minElo [sc_info limit elo] maxElo [sc_info limit elo]} {
  trace variable ::tourney::$n w [list ::utils::validate::Integer $v 0]
}

set tourneyWin 0

proc ::tourney::toggle {} {
  set w .tourney
  if {[winfo exists $w]} {
    destroy $w
  } else {
    ::tourney::Open
  }
}

proc ::tourney::Open {} {
  global tourneyWin
  set w .tourney
  if {[winfo exists $w]} { return }
  set tourneyWin 1

  if {! [info exists ::tourney::_defaults]} { ::tourney::defaults }

  toplevel $w
  wm title $w "Scid: [tr WindowsTmt]"
  setWinLocation $w
  bind $w <Configure> "recordWinSize $w"

  bind $w <F1> {helpWindow Tmt}
  bind $w <Escape> "$w.b.close invoke"
  bind $w <Return> ::tourney::refresh
  bind $w <Destroy> { set tourneyWin 0 }
  standardShortcuts $w
  bind $w <Up> "$w.t.text yview scroll -1 units"
  bind $w <Down> "$w.t.text yview scroll 1 units"
  bind $w <Prior> "$w.t.text yview scroll -1 pages"
  bind $w <Next> "$w.t.text yview scroll 1 pages"
  bind $w <Key-Home> "$w.t.text yview moveto 0"
  bind $w <Key-End> "$w.t.text yview moveto 0.99"
  bindMouseWheel $w $w.t.text

  frame $w.menu -relief raised -borderwidth 2
  pack $w.menu -side top -fill x
  $w configure -menu $w.menu
  menubutton $w.menu.file -text File -menu $w.menu.file.m
  menu $w.menu.file.m
  $w.menu.file.m add command -label Update -command ::tourney::refresh
  $w.menu.file.m add command -label Close -command "destroy $w"
  menubutton $w.menu.sort -text Sort -menu $w.menu.sort.m
  menu $w.menu.sort.m
  foreach name {Date Players Games Elo Site Event Winner} {
    $w.menu.sort.m add radiobutton -label $name \
      -variable ::tourney::sort -value $name -command {::tourney::refresh -fast}
  }
  pack $w.menu.file $w.menu.sort -side left

  foreach i {t o1 o2 o3 b} {frame $w.$i}
  text $w.t.text -width 75 -height 22 -font font_Small -wrap none \
    -fg black -bg white -yscrollcommand "$w.t.ybar set" -setgrid 1 \
    -cursor top_left_arrow -xscrollcommand "$w.t.xbar set"
  scrollbar $w.t.ybar -command "$w.t.text yview" -width 12 -takefocus 0
  scrollbar $w.t.xbar -orient horiz -command "$w.t.text xview" -width 12 \
    -takefocus 0
  set xwidth [font measure [$w.t.text cget -font] "0"]
  set tablist {}
  foreach {tab justify} {3 r 4 l 18 r 23 r 30 r 32 l 55 l} {
    set tabwidth [expr {$xwidth * $tab} ]
    lappend tablist $tabwidth $justify
  }
  $w.t.text configure -tabs $tablist
  $w.t.text tag configure date -foreground darkRed
  $w.t.text tag configure np -foreground darkBlue
  $w.t.text tag configure elo -foreground darkGreen
  $w.t.text tag configure best -foreground steelBlue
  $w.t.text tag configure event -foreground darkRed
  $w.t.text tag configure title -font font_SmallBold

  set font font_Small
  set fbold font_SmallBold
  set f $w.o1
  label $f.from -text "[tr TmtSortDate]:" -font $fbold
  entry $f.efrom -textvariable ::tourney::start -width 10 -font $font
  bindFocusColors $f.efrom
  bind $f.efrom <FocusOut> +::tourney::check
  label $f.to -text "-" -font $font
  entry $f.eto -textvariable ::tourney::end -width 10 -font $font
  bindFocusColors $f.eto
  bind $f.eto <FocusOut> +::tourney::check
  pack $f.from $f.efrom $f.to $f.eto -side left

  label $f.cn -text "  $::tr(Country):" -font $fbold
  ::combobox::combobox $f.ecn -width 4 -font $font -textvar ::tourney::country
  foreach c {{} AUT CZE DEN ENG ESP FRA GER GRE HUN ITA NED POL RUS \
             SCG SUI SWE USA YUG} {
    $f.ecn list insert end $c
  }
  bindFocusColors $f.ecn
  bind $f.ecn <FocusOut> +::tourney::check
  pack $f.cn $f.ecn -side left

  label $f.size -text $::tr(TmtLimit:) -font $fbold
  ::combobox::combobox $f.esize -width 4 -justify right -font $font \
    -textvar ::tourney::size
  trace variable ::tourney::size w {::utils::validate::Integer 1000 0}
  bindFocusColors $f.esize
  foreach n {10 20 50 100 200} {
    $f.esize list insert end $n
  }
  pack $f.esize $f.size -side right

  set f $w.o2
  label $f.players -text "[tr TmtSortPlayers]:" -font $fbold
  entry $f.pmin -textvariable ::tourney::minPlayers \
    -width 3 -justify right -font $font
  bindFocusColors $f.pmin
  bind $f.pmin <FocusOut> +::tourney::check
  label $f.pto -text "-"
  entry $f.pmax -textvariable ::tourney::maxPlayers \
    -width 3 -justify right -font $font
  bindFocusColors $f.pmax
  bind $f.pmax <FocusOut> +::tourney::check
  pack $f.players $f.pmin $f.pto $f.pmax -side left

  label $f.games -text "   [tr TmtSortGames]:" -font $fbold
  entry $f.gmin -textvariable ::tourney::minGames \
    -width 4 -justify right -font $font
  bindFocusColors $f.gmin
  bind $f.gmin <FocusOut> +::tourney::check
  label $f.gto -text "-" -font $font
  entry $f.gmax -textvariable ::tourney::maxGames \
    -width 4 -justify right -font $font
  bindFocusColors $f.gmax
  bind $f.gmax <FocusOut> +::tourney::check
  pack $f.games $f.gmin $f.gto $f.gmax -side left
  label $f.elolab -text "$::tr(TmtMeanElo):" -font $fbold
  entry $f.elomin -textvariable ::tourney::minElo \
    -width 5 -justify right -font $font
  bindFocusColors $f.elomin
  label $f.eto -text "-" -font $font
  entry $f.elomax -textvariable ::tourney::maxElo \
    -width 5 -justify right -font $font
  bindFocusColors $f.elomax
  pack $f.elomax $f.eto $f.elomin $f.elolab -side right

  set f $w.o3
  label $f.sitelab -text "$::tr(Site):" -font $fbold
  ::combobox::combobox $f.site -textvariable ::tourney::site -width 12 -font $font
  ::utils::history::SetCombobox ::tourney::site $f.site
  bindFocusColors $f.site
  pack $f.sitelab $f.site -side left

  label $f.eventlab -text "   $::tr(Event):" -font $fbold
  ::combobox::combobox $f.event -textvariable ::tourney::event -width 12 -font $font
  ::utils::history::SetCombobox ::tourney::event $f.event
  bindFocusColors $f.event
  pack $f.eventlab $f.event -side left

  label $f.playerlab -text "$::tr(Player):" -font $fbold
  ::combobox::combobox $f.player -textvariable ::tourney::player -width 12 -font $font
  ::utils::history::SetCombobox ::tourney::player $f.player
  bindFocusColors $f.player
  pack $f.player $f.playerlab -side right
  focus $f.site

  dialogbutton $w.b.defaults -textvar ::tr(Defaults) -command ::tourney::defaults
  dialogbutton $w.b.help -textvar ::tr(Help) -command {helpWindow Tmt}
  dialogbutton $w.b.update -textvar ::tr(Update) -command ::tourney::refresh
  dialogbutton $w.b.close -textvar ::tr(Close) -command "destroy $w"
  pack $w.b -side bottom -fill x
  packbuttons right $w.b.close $w.b.update $w.b.help
  packbuttons left $w.b.defaults
  pack $w.o3 -side bottom -fill x -padx 2 -pady 2
  pack $w.o2 -side bottom -fill x -padx 2 -pady 2
  pack $w.o1 -side bottom -fill x -padx 2 -pady 2
  pack $w.t -side top -fill both -expand yes
  grid $w.t.text -row 0 -column 0 -sticky news
  grid $w.t.ybar -row 0 -column 1 -sticky news
  grid $w.t.xbar -row 1 -column 0 -sticky news
  grid rowconfig $w.t 0 -weight 1 -minsize 0
  grid columnconfig $w.t 0 -weight 1 -minsize 0

  ::tourney::ConfigMenus
  ::tourney::refresh
}

proc ::tourney::ConfigMenus {{lang ""}} {
  set w .tourney
  if {! [winfo exists $w]} { return }
  if {$lang == ""} { set lang $::language }
  set m $w.menu
  foreach menu {file sort} tag {File Sort} {
    configMenuName $m.$menu Tmt$tag $lang
  }
  foreach idx {0 2} tag {Update Close} {
    configMenuText $m.file.m $idx TmtFile$tag $lang
  }
  foreach idx {0 1 2 3 4 5 6} tag {Date Players Games Elo Site Event Winner} {
    configMenuText $m.sort.m $idx TmtSort$tag $lang
  }
}

proc ::tourney::defaults {} {
  set ::tourney::_defaults 1
  set year [::utils::date::today year]
  #set ::tourney::start "$year.??.??"
  set ::tourney::start "1800.??.??"
  set ::tourney::end "$year.12.31"
  set ::tourney::size 50
  set ::tourney::minPlayers 2
  set ::tourney::maxPlayers 999
  set ::tourney::minGames 1
  set ::tourney::maxGames 9999
  set ::tourney::minElo 0
  set ::tourney::maxElo 4000
  set ::tourney::country ""
  set ::tourney::site ""
  set ::tourney::event ""
  set ::tourney::player ""
}

proc ::tourney::refresh {{option ""}} {
  set w .tourney
  if {! [winfo exists $w]} { return }

  busyCursor $w
  ::utils::history::AddEntry ::tourney::site $::tourney::site
  ::utils::history::AddEntry ::tourney::event $::tourney::event
  ::utils::history::AddEntry ::tourney::player $::tourney::player

  set t $w.t.text
  $t configure -state normal
  $t delete 1.0 end
  update
  set fastmode 0
  if {$option == "-fast"} { set fastmode 1 }

  if {$fastmode  &&  $::tourney::list != ""} {
    set tlist $::tourney::list
  } else {
    if {[catch {sc_base tournaments \
                  -start $::tourney::start \
                  -end $::tourney::end \
                  -size 2500 \
                  -minPlayers $::tourney::minPlayers \
                  -maxPlayers $::tourney::maxPlayers \
                  -minGames $::tourney::minGames \
                  -maxGames $::tourney::maxGames \
                  -minElo $::tourney::minElo \
                  -maxElo $::tourney::maxElo \
                  -country [string toupper $::tourney::country] \
                  -site $::tourney::site \
                  -event $::tourney::event \
                  -player $::tourney::player \
                } tlist]} {
      $t insert end $tlist
      $t configure -state disabled
      unbusyCursor .
      return
    }
    set ::tourney::list $tlist
  }

  switch $::tourney::sort {
    "None" {}
    "Date" { set tlist [lsort -decreasing -index 0 $tlist] }
    "Players" { set tlist [lsort -integer -decreasing -index 3 $tlist] }
    "Games" { set tlist [lsort -integer -decreasing -index 4 $tlist] }
    "Elo" { set tlist [lsort -integer -decreasing -index 5 $tlist] }
    "Site" { set tlist [lsort -dict -index 1 $tlist] }
    "Event" { set tlist [lsort -dict -index 2 $tlist] }
    "Winner" { set tlist [lsort -dict -index 7 $tlist] }
  }

  if {[llength $tlist] > 0} {
    foreach i {Date Players Games Elo Site Event Winner} {
      $t tag configure s$i -font font_SmallBold
      $t tag bind s$i <1> "set ::tourney::sort $i; ::tourney::refresh -fast"
      $t tag bind s$i <Any-Enter> "$t tag config s$i -foreground red"
      $t tag bind s$i <Any-Leave> "$t tag config s$i -foreground {}"
    }
    $t insert end "\t\t"
    $t insert end [tr TmtSortDate] sDate
    $t insert end "\t"
    $t insert end [tr TmtSortPlayers] sPlayers
    $t insert end "\t"
    $t insert end [tr TmtSortGames] sGames
    $t insert end "\t"
    $t insert end [tr TmtSortElo] sElo
    $t insert end "\t"
    $t insert end [tr TmtSortSite] sSite
    $t insert end ": "
    $t insert end [tr TmtSortEvent] sEvent
    $t insert end "\t"
    $t insert end [tr TmtSortWinner] sWinner
    $t insert end "\n"
  } else {
    $t insert end $::tr(TmtNone)
  }

  set hc yellow
  set count 0
  foreach tmt $tlist {
    incr count
    if {$count > $::tourney::size} { break }
    set date [lindex $tmt 0]
    set site [lindex $tmt 1]
    set event [lindex $tmt 2]
    set np [lindex $tmt 3]
    set ng [lindex $tmt 4]
    set elo [lindex $tmt 5]
    set g [lindex $tmt 6]
    set white [::utils::string::Surname [lindex $tmt 7]]
    set welo [lindex $tmt 8]
    set wscore [lindex $tmt 9]
    set black [::utils::string::Surname [lindex $tmt 10]]
    set belo [lindex $tmt 11]
    set bscore [lindex $tmt 12]
    if {$welo > 0} { append white "($welo)" }
    if {$belo > 0} { append black "($belo)" }
    append white " $wscore"
    append black " $bscore"
    set one "1."
    set two "2."
    if {$wscore == $bscore} {
      set one "1="; set two "1="
    }
    set best "$one $white, $two $black, ..."
    if {$np == 2} { set best "$one $white, $two $black" }

    $t tag bind g$count <ButtonPress-1> [list ::tourney::select $g]
    $t tag bind g$count <ButtonPress-3> [list ::tourney::select $g 1]
    $t tag bind g$count <Any-Enter> \
      "$t tag configure g$count -background $hc"
    $t tag bind g$count <Any-Leave> \
      "$t tag configure g$count -background {}"
    $t insert end "\n"
    $t insert end "\t$count\t" g$count
    $t insert end $date [list date g$count]
    $t insert end "\t" g$count
    $t insert end $np [list np g$count]
    $t insert end "\t" g$count
    $t insert end $ng [list ng g$count]
    $t insert end "\t" g$count
    $t insert end $elo [list elo g$count]
    $t insert end "\t" g$count
    $t insert end "$site: " [list site g$count]
    $t insert end "$event" [list event g$count]
    $t insert end "\t$best" [list best g$count]
  }
  $t insert end "\n"
  $t configure -state disabled
  unbusyCursor .
}

proc ::tourney::check {} {
  set start $::tourney::start
  set end $::tourney::end
  if {[string length $start] == 0} { set start "0000" }
  if {[string length $end] == 0} { set end [sc_info limit year]}
  if {[string length $start] == 4} { append start ".??.??" }
  if {[string length $end] == 4} { append end ".12.31" }
  if {[string length $start] == 7} { append start ".??" }
  if {[string length $end] == 7} { append end ".31" }
  set ::tourney::start $start
  set ::tourney::end $end
  if {$::tourney::minPlayers < 2} {set ::tourney::minPlayers 2}
  if {$::tourney::minPlayers > $::tourney::maxPlayers} {
    set ::tourney::maxPlayers $::tourney::minPlayers
  }
  set s $::tourney::country
  set s [string toupper [string trim $s]]
  if {[string length $s] > 3} { set s [string range $s 0 2] }
  set ::tourney::country $s
  if {$::tourney::country == "---"} {
    set ::tourney::country ""
  }
}

proc ::tourney::select {gnum {openCrosstable 0}} {
  if {[catch {::game::Load $gnum} result]} {
    tk_messageBox -type ok -icon info -title "Scid" -message $result
    return
  }
  flipBoardForPlayerNames $::myPlayerNames
  updateBoard -pgn
  updateTitle
  if {$openCrosstable} {
    crosstabWin
  } else {
    ::crosstab::RefreshIfOpen
  }
}

###
### windows/switcher.tcl: part of Scid
### Copyright (C) 2000-2004  Shane Hudson.


# 0: Unknown/empty
image create photo dbt0 -format gif -data \
 "R0lGODdhIAAgAIAAAAAAAP///ywAAAAAIAAgAAACHoyPqcvtD6OctNqLs968+w+G4kiW5omm
  6sq27gubBQA7"

# 1: Temporary database
image create photo dbt1 -format gif -data \
 "R0lGODdhIAAgAKEAAP///wAAAOHh4X9/fywAAAAAIAAgAAACXYSPqcvtD6OctNKAs9Y2iA+G
  X2AB20mWnhimHduWpjDQX127lYfftn6x1YQC4IRnIxolyGFvGWn6cjKpskq8qrJPbE/7+na3
  4p83OX7BRth1UWZCYeD0uv2Oz+sXBQA7"

# 2: Clipbase
image create photo dbt2 -format gif -data \
 "R0lGODdhIAAgAMIAAP///wAAqgAAAP//AOrq6gAAAAAAAAAAACwAAAAAIAAgAAADwAi63P4Q
  hKkCs9NKWvVd2KeFUmmCjVeOG3tWqIpxrHvR2Xp7XOT/wKBwISgaj8ik8SEYOJ/QqPTpaE6v
  2IZ1oOx2tU7BEGgVj39lUGbNbvcA6QphbpwT6vTinBGX2PF3enkCe0RhIH+CgYSDhQp9AYCS
  ikV8hxWTjIuJllwgmYmalYaeco2nmwSdZn6ooKqkrAGhtKern5S5oqxwlxKvqYG3mLq1wrGI
  rsWwj76zyruMw63Br9ORy9W8TbzY0cZFCQA7"

# 3: PGN file
image create photo dbt3 -format gif -data \
 "R0lGODdhIAAgAKEAAP////8AAAAA/wAAACwAAAAAIAAgAAACZISPqcvtD6MMlKIajAXbiP9p
  WMaNpfhsVoWyHQCG5/mKWGqqq3nEgq2z0WqKGmtYInliqMQoE3QQk7vmEiTJaiW+rvcr227B
  ZLBYXE77zmO1m611v+FceZpet5PxEX2ZDxiIVwAAOw=="

# 4: My games
image create photo dbt4 -format gif -data \
 "R0lGODdhIAAgANMAAAAAAAAAqgCqAACqqqoAAKoAqqpVAKqqqlVVVVVV/1X/VVX///9VVf9V
  ////Vf///ywAAAAAIAAgAAAEg9DISau9lOjNu//eI45kaZ7cqa5kyr6mC8+PTL/2veY6uo2B
  gCkIDBqNIxmxtHw0fZqiUFpkKZ9I0TP202aP1V3X+c2Sj8/rWdjcltTg9lSlJnvD9PFyP3e3
  9HN4fkmAQ31oZjw9b2OLUASOYlGRj5SVloyTmISamzWNmyCio6SlphsRADs="

# 5: Large database
image create photo dbt5 -format gif -data \
 "R0lGODdhIAAgAKEAAP8AAP///wAA/wAAACwAAAAAIAAgAAACiYSPqcvtH6KctFpks544iA9+
  WRhGHQmOqGAeUblR8AnH3uzeNxunYkB7/VS8X1DIq6SELQNTspxEdcCcZTqldIjIzZaYrXzB
  tvE1LLaChxmz9IeWuLtQtjbHDmN5xx33eRRHZ4THIlhnyFd4+LZEY9fjuEiyJum0Q3mG0gRg
  4ymn9un1QFpqeloAADs="

# 6: Correspondence chess
image create photo dbt6 -format gif -data \
 "R0lGODdhIAAgANMAAAAAAAAAqgCqAACqqqoAAKoAqqpVAKqqqlVVVVVV/1X/VVX///9VVf9V
  ////Vf///ywAAAAAIAAgAAAEuPDJ+YC1NOs97fkfxo0UcDxgKpIcgL5p6LLZPJ24atM7leu8
  1waHAo5MMM4PtKoliRniwTPdmFLJ4ZWpuVI/2U6sWgsxvk/UltrzMs5f6TpEFk/fF/RpLivf
  zzJUaipqbTKATBd0XFNta1uJi5E9EnFjTJd1XZCXnFwkliqZlJueU52kNQYGlpxNoKusX480
  JbEeuI21qqsmvhe7Xbe/wS23p6nBAMO6xcK9yM7Pss3SGdAuydKvNBEAOw=="

# 7: Computer chess
image create photo dbt7 -format gif -data \
 "R0lGODdhIAAgAKEAAP///wAAAOHh4QAA/ywAAAAAIAAgAAACdISPqcvtD6OctNrrgt680yCE
  4kgGEigM6squoQmBrRrMgwA/cmvWLR7ZrXI+Vy6T4gGKxmByeGDejg3hgMoExp7XRJbKsHY0
  LK0uZJu9TqT2CJwZy+HxuSdoz9Oj7v77rDdmFuZXuGcQaIexyNjo+AgZ6VAAADs="

# 8: Index of games
image create photo dbt8 -format gif -data \
 "R0lGODdhIAAgANMAAAAAAAAAqgCqAACqqqoAAKoAqqpVAKqqqlVVVVVV/1X/VVX///9VVf9V
  ////Vf///ywAAAAAIAAgAAAEovDJSau9OOvNu/9gKALkE5wPqa5A10pJHGtvxrImqkrAcWC1
  i2zGS/kut1wglUwZf5UgbIh09qCT0ml5w1mflNcwsWmZwbyuuvQ1H52hs/z9WkvbVvoIfy0y
  11F8enFtCQGDgBZyKYeDIHKGPo4fco1vW5iZmDVmkZI8Y6FjAEtWllh2ajqebxSir2OnGJq0
  mpJYF7e6u7scvL+3IsLDxMUUEQA7"

# 9: Player collection
image create photo dbt9 -format gif -data \
 "R0lGODdhIAAgAKEAAP///wAAANjGpuFCACwAAAAAIAAgAAACg4SPqcvtD6NMoYYJg9jiYqZx
  m/dR4liaJ5oa4Uq2LxfLcKuyOBLW++wrVWBByewmXCExR2VRYYlKp9FGYIDNarfcQfCadXkq
  YrHWB8aSAeu250zZltnj+jaWVtfn6/shj8W3R8c1VjjoZlDI1iUo2FUBiTgI2WV5iZmpKUnV
  6Tm141AAADs="

# 10: Tournament, all-play-all
image create photo dbt10 -format gif -data \
 "R0lGODdhIAAgAKEAAP///wAAAAAA//8AACwAAAAAIAAgAAACZoSPqcvtH6KMYM6HM7RVdq+F
  4kg2gnEC6YqW7usIsmwExnDnAL7rmA1rAF0zWq+i4yl9mmFQ4QwVU0vkscojRZ+HbayY1AGx
  QS/XnJiGr7X1E13+ztZka5ZrxSO8ara/CqcnOJhQAAA7"

# 11: Tournament, Swiss
image create photo dbt11 -format gif -data \
 "R0lGODdhIAAgAIAAAP8AAP///ywAAAAAIAAgAAACRYSPqcvtD6OctFoQss437d0hnxYeI1di
  Z6qO7BlU8Pw59B03OG3vcO9z6YJCBrG4ONYov1Sz9AxFO9NL1XJlabfcrldRAAA7"

# 12: GM games
image create photo dbt12 -format gif -data \
 "R0lGODdhIAAgANMAAAAAAAAAqgCqAACqqqoAAKoAqqpVAKqqqlVVVVVV/1X/VVX///9VVf9V
  ////Vf///ywAAAAAIAAgAAAEjNDISau9lOjNu//eI45kaZ7cqa5kyr6mC8+PTL/2veY6upWB
  YNA0BAZEMuFIuTwakT9RsUliSouuadX5sHaxUa1K6CRDNVeY+QtGf5vrt7lNSBO5w7kzy91S
  34BJfWx/RXRwcHiDgVGJR1NijG49O42UPpOXMZaaLZydZ3WgJTygpZ2nmiCrrK2urxsRADs="

# 13: IM games
image create photo dbt13 -format gif -data \
 "R0lGODdhIAAgANMAAAAAAAAAqgCqAACqqqoAAKoAqqpVAKqqqlVVVVVV/1X/VVX///9VVf9V
  ////Vf///ywAAAAAIAAgAAAEhNDISau9lOjNu//eI45kaZ7cqa5kyr6mC8+PTL/2veY6up2B
  wChoIpZ4D2NSWFKOkMogUySN/YrT6tApgma10unz2vwaw1YN8LskcmtkUlSIfnu3VKY9js/7
  l2kEa31yYl18f4BlgT04iI0tj5CHapM+lZZHkpNIlp2cm5Ago6SlpqcbEQA7"

# 14: Blitz games
image create photo dbt14 -format gif -data \
 "R0lGODdhIAAgANMAAAAAAAAAqgCqAACqqqoAAKoAqqpVAKqqqlVVVVVV/1X/VVX///9VVf9V
  ////Vf///ywAAAAAIAAgAAAEgvDJSau9OOvNu89AKI7AV4VOqqqlKaHrGroPHKfh4dp3rn+8
  mO/XCcoAhyQQcGMhlR6jM0nkSHGk2ebaxFm7XZGVBHYMo8zwsApKN9dsDHeNVj+hYzUV/33f
  +WM2Ins0NW5whYJ/cUVpg1SFhlh7jI2TkJEoj4A7ZouRE5uchZSgEhEAOw=="

# 15: Tactics
image create photo dbt15 -format gif -data \
 "R0lGODdhIAAgANMAAAAAAAAAqgCqAACqqqoAAKoAqqpVAKqqqlVVVVVV/1X/VVX///9VVf9V
  ////Vf///ywAAAAAIAAgAAAEdtDISau9lOjNu//eI45kaZ7cqa5kyr6mC8+PTL/2veY6uqmB
  wCkY9GmAwlLxsWz9hslRkxkV8URTKil71bK4T1NWWbWGyatx7bwtS93mIxSp6vZG9vtaLoZ7
  Y2x6TnyCJXl3hz2JOos3jTSPM5EwIJWWl5iZGxEAOw=="

# 16: Endings
image create photo dbt16 -format gif -data \
 "R0lGODdhIAAgAKEAAP///wAAAP/73wAAACwAAAAAIAAgAAAChYSPqcsZDWOYsa5ns5lYXwoE
  AsZ54TQ+orqCFToK6RynVsulONpBO6/L9Ro/Hkd4Kx6FQ2JLBpUZPbBltfmyWjeg0ql3jAY3
  wTJYuySLxec1tIs+OuJD0RpLRZsUdvbe4Yan0RclmEH49oeAKKV4wDjiyKUlCcNm6EPnMghZ
  iMmn6SXJUAAAOw=="

# 17: Openings for White
image create photo dbt17 -format gif -data \
 "R0lGODdhIAAgANMAAAAAAAAAqgCqAACqqqoAAKoAqqpVAKqqqlVVVVVV/1X/VVX///9VVf9V
  ////Vf///ywAAAAAIAAgAAAErvDJSau9F+jNu9cYMBxDaZ4oCoRj6rqgJZJvXQLHWs22jec6
  Ca/3+gWCjyExZUQqURLf4XCkPE2UWtPaSmWL0+rkWvrCws6u9yGlpmnQiRbNhWMrYHd9bVbR
  x2plF2d6gHYDGIRiQoGIg0x/jIdLN5FJjZQDW4aZfoWSnSeboKGVn5eTlKOopaaLSRqtmpY/
  H7YetD9Tu7y9vpawv8LCr0IbAcjJysvMSFa30BwSEQA7"

# 18: Openings for Black
image create photo dbt18 -format gif -data \
 "R0lGODdhIAAgANMAAAAAAAAAqgCqAACqqqoAAKoAqqpVAKqqqlVVVVVV/1X/VVX///9VVf9V
  ////Vf///ywAAAAAIAAgAAAErvDJSau9F+jNu9cYMBxDaZ4oCoRj6rqgJZJvXQLHWs22jec6
  Ca/3+gWCjyExZUQqVaJak/I0caSHw5HaYm6wWmcXqgFvJ1VrtJg9C8enKzvMpcU7c3cSfsPD
  2mJ2fR5/dGh8H2txgHVkfiqMh4JLVpFvk5QDU5KZkIaXnYufe5iUm6ChN5akqaqjX62nSVmJ
  tRyrGlm6u7y9u3pJP77DvcDBGgHJysvMzUhUttExEQA7"

# 19: Openings for either color
image create photo dbt19 -format gif -data \
 "R0lGODdhIAAgANMAAAAAAAAAqgCqAACqqqoAAKoAqqpVAKqqqlVVVVVV/1X/VVX///9VVf9V
  ////Vf///ywAAAAAIAAgAAAEuvDJSau9F+jNu9cYMBxDaZ4oCoRj6rqgJZKq+JrAsVZzrd2l
  nG4n6Z04wIEwQHwYcZvksvmEJpWHA5NSVUaBU24LiryFJ1UPOLtFj73q17n4/tgkKja1/hlQ
  jnpiNEB/OIFugzeFQYd0iYoPeVp7jy6LWJOCSRaGmYibFZ1tjoQXjJ6kkJyYo05vlqaslFdy
  ja6VtLJcP7mSrUJ2wRy2GlnGx8jJx61OQsrPyczNGgHV1tfY2U27wt07EQA7"

# 20: Theory: 1.c4
image create photo dbt20 -format gif -data \
 "R0lGODdhIAAgAKEAAP/739jGpgAAAP///ywAAAAAIAAgAAACfYRvoauIzNyBSyYaLMDZcv15
  GDiKFHmaELqqkVvBXCN3UniXebq3/fuLBWlDmwN31CV5S18T+BRqokSqTSCYKB8lwWCQ3Wy1
  PCzZyU15wRdmerX+ZpHvCPY+H7fRZ2h9VvUX2CclaGTI4kc4uKfYWLh4GJkI+cgo5jZZo1EA
  ADs="

# 21: Theory: 1.d4
image create photo dbt21 -format gif -data \
 "R0lGODdhIAAgAKEAAP/739jGpgAAAP///ywAAAAAIAAgAAACf4RvoauIzNyBSyYaLMDZcv15
  GDiKFHmaELqqkVvBXCN3UniXebq3/fuLBWlDmwN31CV5S18T+BRqokSq8aEQCKRYJlYwGGyv
  E2VXyy17y2Bxtet8tMNbFlSuzZMva35cPXMHKOhHuGE2mFaoeNjX+Lf4ligZufdoiASHiVip
  UQAAOw=="

# 22: Theory: 1.d4 d5
image create photo dbt22 -format gif -data \
 "R0lGODdhIAAgAKEAAP/739jGpgAAAP///ywAAAAAIAAgAAACh4RvoauIzNyBSyYaLMDZcv15
  GDiKFHmaELqqkVvBXCN3UggIwlTepa67pHzDoLBFbAF3m57jswzinqPobvpwZocaKneL9Opi
  yZdPMBgIaGWyeM32hrNodRxsftbTa1b+YWUj98fzVThDeJTYZKjohvd4uIglGel4V4l5KQip
  yTiXyRnqZwlQAAA7"

# 23: Theory: QGD
image create photo dbt23 -format gif -data \
 "R0lGODdhIAAgAKEAAP/739jGpgAAAP///ywAAAAAIAAgAAACmYRvoauIzNyB6wgxaZBJm3t1
  FAdo24eJEGmiYelxLQjCo+zRYYvfksn7xYS+l23VQ9JUkWQTYAw6eMvjc5rTWSvOig4jfQyx
  PhIZSURHFRduuikYDFJsuaDRxUNTtrb+DGfXETf3JzZCKBiQWMiStbSoc/LmBlh5CHSFqZlR
  tnnZiWZpGMrJBHpKmjo5yvqpugUbVooa63pQAAA7"

# 24: Theory: Slav
image create photo dbt24 -format gif -data \
 "R0lGODdhIAAgAKEAAP/739jGpgAAAP///ywAAAAAIAAgAAACmIRvoauIzI4QBy5XbTBzJo19
  lkSJUAhoG9CVKvq23hvGcgrWOUbz6u7oBXceU0Q3YnWMF+SJU8IlfckWs+GMyCjCB2grfVLF
  wymqTPZOi9JJc3wUDAaugJyOhb/ZC3ceHTdXdyfwp3ZyJ5iSiAfzdWMns6JnmGF2+PMGqInJ
  aZn2eUQ5uVl5RdppGiZaihrqeep4+aradVAAADs="

# 25: Theory: 1.d4 Nf6
image create photo dbt25 -format gif -data \
 "R0lGODdhIAAgAKEAAP/739jGpgAAAP///ywAAAAAIAAgAAACioRvoauIKqJoLrFVrYwhg4tl
  wcZ5IFWNZCeeJiexqdtCZX29q0lXZNxznGTC4MN4GPJAyxyO0YQ+QzPmFFW0Vp1baZfqyXLF
  3iwHe9QWBYPBhJgep8/wJFLTfkfBD3bbXWeh1rdzFfhxhzg0aMcoKNcI+VgWRxlpOcl3qZmJ
  tunZeahkuAeqKAlQAAA7"

# 26: Theory: 1.e4
image create photo dbt26 -format gif -data \
 "R0lGODdhIAAgAKEAAP/739jGpgAAAP///ywAAAAAIAAgAAACfYRvoauIzNyBSyYaLMDZcv15
  GDiKFHmaELqqkVvBXCN3UniXebq3/fuLBWlDmwN31CV5S18T+BRqokSq8aETCCZKbEowGGw3
  XS5Pa3Z6W2DxhbmOtMNbZLyizdfLb3V6JnVXJXj1F2g4iFjYB0XI0qj4eMg4SQYXWSOZaFAA
  ADs="

# 27: Theory: Sicilian
image create photo dbt27 -format gif -data \
 "R0lGODdhIAAgAKEAAP/739jGpgAAAP///ywAAAAAIAAgAAAChYRvoauIzNyBSyYaLMDZcv15
  GDiKFHmaELqqkVvBXCN30iII8V3yeU7jpYTAoCPk+xkfveNPyXrdnsDo7thkDjXYrbYlBOcm
  WXJKMBgILl6zeM0Gd1todVw6j9TTa2S+QtVXdnf1NVPohmeISLiUyLgxGNnWaPPnWGmFOSm3
  uOnnaRmqUQAAOw=="

# 28: Theory: Sicilian 1.e4 c5 2.Nd3 d6 3.d4
image create photo dbt28 -format gif -data \
 "R0lGODdhIAAgAKEAAP/739jGpgAAAP///ywAAAAAIAAgAAACo4RvoauIzNxZQiyZYMOq1i1p
  oENZ4yNiQOedU8p5rSoGtPzRcLiTdY/S6AIfV0bIIbZsSSRPeWlCdDLjCjjBWYbTGI757IYj
  UrJqHEVbS+nKy+kTDAYmg5x+FPugIHfeHDdXB3An8JdGcidoo4hXc/NFiHMFF6Rn+YOIGSVz
  uJbSaPhYRjFnKorlSURXSHn5BuFB6JjqatY6qsaoiFoJy6BVUQAAOw=="

# 29: Theory: Caro-Kann
image create photo dbt29 -format gif -data \
 "R0lGODdhIAAgAKEAAP/739jGpgAAAP///ywAAAAAIAAgAAACh4RvoauIzI4QBy5XbTBzJo19
  lkSJUAhoG9CVKvq23hvGcgrWOUbz6u7oBYEPYmakQ/qUQ2bReTwlpUtq0/rERiNTLqrqvYaz
  Xo9pvL2wBgOX8axmlXBQeGPdtq/AFwGbTSFE1ncjmHbH97MnFseI6Lg4+CgZeVipB/NGp4XZ
  1UiZWbeJ1olRAAA7"

# 30: Theory: French
image create photo dbt30 -format gif -data \
 "R0lGODdhIAAgAKEAAP/739jGpgAAAP///ywAAAAAIAAgAAACiIRvoauIzNyB6wgxaZBJm3t1
  FAdo24eJEGmiYelxLQjCo+zRYYvfksn7xYQ+R9A4RBYfSeYy81RFeivqlFjFXpVZ7pbk7Ia/
  0OzLJi5PBYNB6jiuoNRyrZztlta9FXwbA0fXoAPYJHhiB4TI12C1F9eYuAg5echiqBfJWJnJ
  iUbWeRn1+WjJUQAAOw=="

# 31: Theory: Open Games
image create photo dbt31 -format gif -data \
 "R0lGODdhIAAgAKEAAP/739jGpgAAAP///ywAAAAAIAAgAAACh4RvoauIzNyBSyYaLMDZcv15
  GDiKFHmaELqqkVvBXCN3UngrghDnab7b0Xwtn3DowCUDQZ5t+Us2hazXbcqr9qBFDdf63T5K
  gN2EHKYJBgPBJTr+md/deGvdpoPtETzbrcRXgbWBJoh0OKOFeAbXWPe4Fyk2yahHeWlZ6Jj5
  lLjoWRnaCapRAAA7"


set base_types {
  Unknown
  {Temporary database}
  Clipbase
  {PGN format file}
  {My games}
  {Large database}
  {Correspondence chess}
  {Computer chess}
  {Sorted Index of games}
  {Player collection}
  {Tournament: All-play-all}
  {Tournament: Swiss}
  {Grandmaster games}
  {International Master games}
  {Blitz (fast) games}
  {Tactics}
  {Endgames}
  {Openings for White}
  {Openings for Black}
  {Openings for either color}
  {Theory: 1.c4}
  {Theory: 1.d4}
  {Theory: 1.d4 d5}
  {Theory: QGD: 1.d4 d5 2.c4 e6}
  {Theory: Slav: 1.d4 d5 2.c4 c6}
  {Theory: 1.d4 Nf6}
  {Theory: 1.e4}
  {Theory: Sicilian: 1.e4 c5}
  {Theory: Sicilian: 1.e4 c5 2.Nf3 d6 3.d4}
  {Theory: Caro-Kann: 1.e4 c6}
  {Theory: French: 1.e4 e6}
  {Theory: Open Games: 1.e4 e5}
}


set numBaseTypeIcons [llength $base_types]

set temp_dbtype 0

proc selectBaseType {type} {
  global temp_dbtype
  set w .btypeWin
  if {![winfo exists $w]} { return }
  $w.t configure -state normal
  set temp_dbtype $type
  set linenum [expr $type + 1]
  $w.t tag remove sel 1.0 end
  $w.t tag remove selected 1.0 end
  $w.t tag add selected "${linenum}.2 linestart" "$linenum.2 lineend"
  $w.t see $linenum.2
  $w.t configure -state disabled
}

proc clickBaseType {x y} {
  set type [.btypeWin.t index "@$x,$y linestart"]
  set type [expr int($type) - 1]
  selectBaseType $type
}

proc changeBaseType {baseNum} {
  global temp_dbtype base_types numBaseTypeIcons
  if {$baseNum > [sc_base count total]} { return }
  set temp_dbtype [sc_base type $baseNum]
  if {$temp_dbtype >= $numBaseTypeIcons} { set temp_dbtype 0 }
  toplevel .btypeWin
  set w .btypeWin
  wm title $w "Scid: Choose database icon"

  text $w.t -yscrollcommand "$w.yscroll set" -font font_Regular \
    -height 25 -width 40 -background white -wrap none \
    -cursor top_left_arrow
  $w.t tag configure selected -background {#ffff80}

  scrollbar $w.yscroll -command "$w.t yview" -takefocus 0
  pack [frame $w.b] -side bottom -pady 5
  pack $w.yscroll -side right -fill y
  pack $w.t -side left -fill both -expand yes

  dialogbutton $w.b.set -text "OK" -command \
    "catch {sc_base type $baseNum \$temp_dbtype}; ::windows::switcher::Refresh;
     focus .; destroy $w"

  dialogbutton $w.b.cancel -text $::tr(Cancel) -command "focus .; destroy $w"
  pack $w.b.set $w.b.cancel -side left -padx 5

  set numtypes [llength $base_types]
  for {set i  0} {$i < $numtypes} {incr i} {
    if {$i > 0} { $w.t insert end "\n" }
    $w.t image create end -image dbt$i -pady 3 -padx 3
    $w.t insert end "   [lindex $base_types $i]  "
  } 

  bind $w.t <Double-ButtonRelease-1> "clickBaseType %x %y; $w.b.set invoke"
  bind $w.t <ButtonRelease-1> "clickBaseType %x %y"
  bind $w.t <Button1-Motion> "clickBaseType %x %y; break"

  bind $w <Up> {
    if {$temp_dbtype != 0} { selectBaseType [expr $temp_dbtype - 1] }
    break
  }

  bind $w <Down> {
    if {$temp_dbtype < [expr [llength $base_types] - 1]} {
      selectBaseType [expr $temp_dbtype + 1]
    }
    break
  }

  bind $w <Home> { selectBaseType 0 }
  bind $w <End> { selectBaseType [expr [llength $base_types] - 1] }
  bind $w <Escape> "$w.b.cancel invoke"
  bind $w <Return> "$w.b.set invoke"

  focus $w.t
  grab $w
  update
  selectBaseType $temp_dbtype
}



proc ::windows::switcher::pressMouseEvent {i} {
  if {! [winfo exists .baseWin]} {return}
  foreach win {"" .img .name .ngames} {
    .baseWin.c.f$i$win configure -cursor exchange
  }
}

proc ::windows::switcher::releaseMouseEvent {fromBase x y} {
  if {! [winfo exists .baseWin]} {return}
  foreach win {"" .img .name .ngames} {
    .baseWin.c.f$fromBase$win configure -cursor {}
  }
  set dropPoint [winfo containing $x $y]
  if {! [string match ".baseWin.c.f*" $dropPoint]} {return}
  set toBase [string range $dropPoint 12 12]
  if {$toBase == $fromBase} {::file::SwitchToBase $toBase} else {
    copyFilter $fromBase $toBase
  }
}

set baseWin 0

proc ::windows::switcher::Open {} {
  global baseWin
  if {[winfo exists .baseWin]} {
    focus .
    destroy .baseWin
    set baseWin 0
    return
  }
  set baseWin 1
  set w [toplevel .baseWin]
  bind $w <Configure> "+recordWinSize $w"
  bind $w <Configure> "+::windows::switcher::Refresh"
  setWinLocation $w

  #wm resizable $w false false
  wm title $w "Scid: [tr WindowsSwitcher]"

  bind $w <Escape> ::windows::switcher::Open
  bind $w <Destroy> { set baseWin 0 }
  bind $w <F1> { helpWindow Switcher }
  standardShortcuts $w

  canvas $w.c -width 300 -height 100 -yscrollcommand [list $w.ybar set]
  scrollbar $w.ybar -takefocus 0 -command [list $w.c yview]
  label $w.status -width 1 -anchor w -relief sunken -borderwidth 1

  grid $w.c -row 0 -column 0 -sticky news
  grid $w.ybar -row 0 -column 1 -sticky ns
  grid $w.status -row 1 -column 0 -sticky we
  grid rowconfigure $w 0 -weight 1
  grid columnconfigure $w 0 -weight 1

  #set side left
  #if {$::windows::switcher::vertical} { set side top }
  set numBases [sc_base count total]

  for {set i 1} {$i <= $numBases} {incr i} {
    set f [frame $w.c.f$i -background white -borderwidth 2 -relief ridge]
    $w.c create window 0 0 -window $w.c.f$i -anchor nw -tag tag$i

    set f $w.c.f$i
    label $f.img -image dbt0 -relief solid -borderwidth 1
    label $f.name -width 11 -anchor w -font font_Small
    label $f.ngames -text "0" -width 11 -anchor e -font font_Tiny
    grid $f.img -row 0 -column 0 -rowspan 2 -padx 2 -pady 2
    grid $f.name -row 0 -column 1 -padx 2 -pady 0 -sticky we
    grid $f.ngames -row 1 -column 1 -padx 2 -pady 0 -sticky we

    foreach win {"" .img .name .ngames} {
      bind $f$win <ButtonPress-1> [list ::windows::switcher::pressMouseEvent $i]
      bind $f$win <ButtonRelease-1> [list ::windows::switcher::releaseMouseEvent $i %X %Y]
    }

    menu $f.menu -tearoff 0
    $f.menu add command -label [tr SearchReset] \
      -command "sc_filter reset $i; ::windows::stats::Refresh"
    $f.menu add command -label "Change icon..." -command "changeBaseType $i"
    $f.menu add separator
    $f.menu add command -label [tr FileOpen] -command ::file::Open
    set closeLabel [tr FileClose]
    if {$i == [sc_info clipbase]} { set closeLabel [tr EditReset] }
    $f.menu add command -label $closeLabel \
      -command [list ::file::Close $i]
    foreach win {"" .img .name .ngames} {
      bind $f$win <ButtonPress-3> "tk_popup $f.menu %X %Y"
    }
    $f.menu add separator
    $f.menu add checkbutton -label "Icons" -variable ::windows::switcher::icons \
      -command ::windows::switcher::Refresh
    #$f.menu add separator
    #$f.menu add command -label $::tr(ChangeOrient) -command ::windows::switcher::Orientate
  }
  setWinSize $w
  ::windows::switcher::Refresh
}

proc ::windows::switcher::Orientate {} {
  #variable vertical
  #if {$vertical} {
  #  set vertical 0
  #  set side left
  #} else {
  #  set vertical 1
  #  set side top
  #}

  #set w .baseWin
  #set numBases [sc_base count total]

  #for {set i 1} {$i <= $numBases} {incr i} {
  #  pack forget $w.f$i
  #}
  #for {set i 1} {$i <= $numBases} {incr i} {
  #  pack $w.f$i -side $side
  #}
}

proc ::windows::switcher::Refresh {} {
  global numBaseTypeIcons
  variable icons
  set w .baseWin

  if {! [winfo exists $w]} { return }
  set numBases [sc_base count total]
  set current [sc_base current]
  set clipbase [sc_info clipbase]

  # Get the canvas width and icon dimensions, to compute the correct
  # scroll region.

  for {set i 1} {$i <= $numBases} {incr i} {
    if {$icons} {
      grid $w.c.f$i.img -row 0 -column 0 -rowspan 2 -padx 2 -pady 2
    } else {
      grid forget $w.c.f$i.img
    }
  }

  set canvasWidth [winfo width $w.c]
  set iconWidth [winfo width $w.c.f$clipbase]
  incr iconWidth 5
  set iconHeight [winfo height $w.c.f$clipbase]
  incr iconHeight 5

  # Compute the number of columns that can fit in the canvas
  set numColumns [expr {int($canvasWidth / $iconWidth)}]
  if {$numColumns < 1} { set numColumns 1 }
  set numDisplayed 0

  set row 0
  set column 0
  set x 0
  set y 0
  set status ""

  for {set i 1} {$i <= $numBases} {incr i} {
    if {[sc_base inUse $i]} {
      set color white
      set filename [file nativename [sc_base filename $i]]
      set n $i
      # Do we want to call the clipbase base number "C"?
      # Only if we do it everywhere else for consistency.
      # if {$i == $clipbase} { set n "C" }

      # Set a different color for the current database.
      if {$i == $current} {
        set color lightSteelBlue
        set status $filename
        if {[sc_base isReadOnly]} { append status " ($::tr(readonly))" }
      }

      $w.c.f$i configure -background $color
      set dbtype [sc_base type $i]
      if {$dbtype >= $numBaseTypeIcons} { set dbtype 0 }
      if {$icons} {
        $w.c.f$i.img configure -image dbt$dbtype -background $color
      } else {
        $w.c.f$i.img configure -image ""
      }
      if {$i == $clipbase} {
        set name [sc_base filename $i]
        $w.c.f$i.name configure -background $color \
      } else {
        set name "$n: [file tail [sc_base filename $i]]"
      }
      $w.c.f$i.name configure -background $color -text $name
      $w.c.f$i.ngames configure -background $color \
        -text "[filterText $i 100000]"
      $w.c itemconfigure tag$i -state normal
      $w.c coords tag$i [expr $x + 2] [expr $y + 2]
      incr column
      if {$column == $numColumns} {
        set column 0
        set x 0
        incr y $iconHeight
        incr row
      } else {
        incr x $iconWidth
      }
      incr numDisplayed
    } else {
      $w.c itemconfigure tag$i -state hidden
    }
  }

  set numRows [expr {int( ($numDisplayed + $numColumns - 1) / $numColumns)}]
  if {$numRows < 1} { set numRows 1 }
  set top 0
  set left 0
  set right [expr {$numColumns * $iconWidth}]
  set bottom [expr {$numRows * $iconHeight}]
  $w.c configure -scrollregion [list $left $top $right $bottom]
  if {[winfo height $w.c] >= $bottom} {
    grid forget $w.ybar
  } else {
    grid $w.ybar -row 0 -column 1 -sticky ns
  }
  $w.status configure -text $status
}
###
### search.tcl: Search routines for Scid.
###

namespace eval ::search {}

# searchType: set to Header or Material in a SearchOptions file
set searchType 0

set ::search::filter::operation 2


# TODO: Rename to ::search::filter::text
# filterText: returns text describing state of filter for specified
#   database, e.g. "no games" or "all / 400" or "1,043 / 2,057"
#
proc filterText {{base 0} {kilo 0}} {
  # Default to current base if no base specified:
  if {$base == 0} { set base [sc_base current] }
  set filterCount [sc_filter count $base]
  set gameCount [sc_base numGames $base]
  if {$gameCount == 0} { return $::tr(noGames) }
  if {$gameCount == $filterCount} {
    return "$::tr(all) / [::utils::thousands $gameCount $kilo]"
  }
  return "[::utils::thousands $filterCount $kilo] / [::utils::thousands $gameCount $kilo]"
}


# search::filter::reset
#   Resets the filter to contain all games. Calls sc_filter reset and
#   updates relevant windows.
#
proc ::search::filter::reset {} {
  global glstart
  sc_filter reset
  set glstart 1
  ::windows::gamelist::Refresh
  ::windows::stats::Refresh
  updateMenuStates
}

# ::search::filter::negate
#
#   Negates the filter, to include only excluded games.
#
proc ::search::filter::negate {} {
  global glstart
  sc_filter negate
  set glstart 1
  ::windows::gamelist::Refresh
  ::windows::stats::Refresh
  updateMenuStates
}



# ::search::addFilterOpFrame
#
#   Adds a search filter operation selection frame to the window.
#   Adds a frame of radiobuttons allowing the filter operation
#   (AND with current filter, OR with current filter, or RESET filter)
#   to be chosen.
#   The default value for the first search is RESET:
proc ::search::addFilterOpFrame {w {small 0}} {
  frame $w.filterop
  set f $w.filterop
  pack $f -side top
  set regular font_Regular
  set bold font_Bold
  if {$small} {
    set regular font_Small
    set bold font_SmallBold
  }
  label $f.title -font $bold -textvar ::tr(FilterOperation)
  radiobutton $f.and -textvar ::tr(FilterAnd) -variable ::search::filter::operation \
    -value 0 -pady 5 -padx 5 -font $regular
  radiobutton $f.or -textvar ::tr(FilterOr) -variable ::search::filter::operation \
    -value 1 -pady 5 -padx 5 -font $regular
  radiobutton $f.ignore -textvar ::tr(FilterIgnore) -variable ::search::filter::operation \
    -value 2 -pady 5 -padx 5 -font $regular
  pack $f.title -side top
  pack $f.and $f.or $f.ignore -side left
}


# ::search::Config
#
#   Sets state of Search button in Header, Board and Material windows
#
proc ::search::Config {{state ""}} {
  if {$state == ""} {
    set state disabled
    if {[sc_base inUse]} { set state normal }
  }
  catch {.sh.b.search configure -state $state }
  catch {.sb.b.search configure -state $state }
  catch {.sm.b3.search configure -state $state }
  catch {.spprep.b.search configure -state $state }
}


proc ::search::usefile {} {
  set ftype { { "Scid SearchOption files" {".sso"} } }
  set ::fName [tk_getOpenFile -initialdir $::initialDir(base) \
                 -filetypes $ftype -title "Select a SearchOptions file"]
  if {$::fName == ""} { return }

  if {[catch {uplevel "#0" {source $::fName} } ]} {
    tk_messageBox -title "Scid: Error reading file" -type ok -icon warning \
                -message "Unable to open or read SearchOptions file: $fName"
  } else {
    switch -- $::searchType {
      "Material" { ::search::material }
      "Header"   { ::search::header }
      default    { return }
    }
  }
}


###
### search/board.tcl: Board Search routines for Scid.
###

set searchInVars 0
set sBoardIgnoreCols 0
set sBoardSearchType Exact

# ::search::board
#   Opens the search window for the current board position.
#
proc ::search::board {} {
  global glstart searchInVars sBoardType sBoardIgnoreCols

  set w .sb
  if {[winfo exists $w]} {
    wm deiconify $w
    raiseWin $w
    return
  }

  toplevel $w
  wm title $w "Scid: $::tr(BoardSearch)"

  bind $w <Escape> "$w.b.cancel invoke"
  bind $w <Return> "$w.b.search invoke"
  bind $w <F1> { helpWindow Searches Board }

  label $w.type -textvar ::tr(SearchType) -font font_Bold
  pack $w.type -side top
  pack [frame $w.g] -side top -fill x
  radiobutton $w.g.exact -textvar ::tr(SearchBoardExact) \
    -variable sBoardSearchType -value Exact
  radiobutton $w.g.pawns -textvar ::tr(SearchBoardPawns) \
    -variable sBoardSearchType -value Pawns
  radiobutton $w.g.files -textvar ::tr(SearchBoardFiles) \
    -variable sBoardSearchType -value Fyles
  radiobutton $w.g.material -textvar ::tr(SearchBoardAny) \
    -variable sBoardSearchType -value Material
  set row 0
  foreach i {exact pawns files material} {
    grid $w.g.$i -row $row -column 0 -sticky w
    incr row
  }
  addHorizontalRule $w

  ::search::addFilterOpFrame $w
  addHorizontalRule $w

  ### Progress bar:

  canvas $w.progress -height 20 -width 300 -bg white -relief solid -border 1
  $w.progress create rectangle 0 0 0 0 -fill blue -outline blue -tags bar
  $w.progress create text 295 10 -anchor e -font font_Regular -tags time \
    -fill black -text "0:00 / 0:00"

  frame $w.b2
  pack $w.b2 -side top
  frame $w.b
  pack $w.b -side top -fill x
  checkbutton $w.b2.vars -textvar ::tr(LookInVars) -padx 10 -pady 5 \
    -onvalue 1 -offvalue 0 -variable searchInVars
  checkbutton $w.b2.flip -textvar ::tr(IgnoreColors) -padx 10 -pady 5 \
    -onvalue 1 -offvalue 0 -variable sBoardIgnoreCols

  dialogbutton $w.b.stop -textvar ::tr(Stop) -command sc_progressBar
  $w.b.stop configure -state disabled

  dialogbutton $w.b.search -textvar ::tr(Search) -command {
    busyCursor .
    .sb.b.stop configure -state normal
    grab .sb.b.stop
    sc_progressBar .sb.progress bar 301 21 time
    set str [sc_search board \
               $::search::filter::operation \
               $sBoardSearchType $searchInVars $sBoardIgnoreCols]
    unbusyCursor .
    grab release .sb.b.stop
    .sb.b.stop configure -state disabled
    #tk_messageBox -type ok -title $::tr(SearchResults) -message $str
    .sb.status configure -text $str
    set glstart 1
    ::windows::gamelist::Refresh
    ::windows::stats::Refresh
  }
  dialogbutton $w.b.cancel -textvar ::tr(Close) -command "focus .; destroy $w"
  pack $w.b2.vars $w.b2.flip -side left -pady 2 -padx 5
  packbuttons right $w.b.cancel .sb.b.search .sb.b.stop
  pack $w.progress -side top -pady 2
  label $w.status -text "" -width 1 -font font_Small -relief sunken -anchor w
  pack $w.status -side bottom -fill x
  wm resizable $w 0 0
  standardShortcuts $w
  ::search::Config
  focus $w.b.search
}
###
### search/header.tcl: Header Search routines for Scid.
###

namespace eval ::search::header {}

set sWhite "";  set sBlack "";  set sEvent ""; set sSite "";  set sRound ""
set sWhiteEloMin 0; set sWhiteEloMax [sc_info limit elo]
set sBlackEloMin 0; set sBlackEloMax [sc_info limit elo]
set sEloDiffMin "-[sc_info limit elo]"; set sEloDiffMax "+[sc_info limit elo]"
set sTitleList [list gm im fm none wgm wim wfm w]
foreach i $sTitleList {
  set sTitles(w:$i) 1
  set sTitles(b:$i) 1
}
set sGlMin 0; set sGlMax 999
set sEcoMin "A00";  set sEcoMax "E99"; set sEco Yes
set sDateMin "0000.00.00"; set sDateMax "[sc_info limit year].12.31"
set sResWin 1; set sResLoss 1; set sResDraw 1; set sResOther 1
set sGnumMin 1; set sGnumMax -1
set sIgnoreCol No
set sSideToMove wb
set sHeaderFlagList {StdStart Promotions Comments Variations Annotations \
      DeleteFlag WhiteOpFlag BlackOpFlag MiddlegameFlag EndgameFlag \
      NoveltyFlag PawnFlag TacticsFlag KsideFlag QsideFlag \
      BrilliancyFlag BlunderFlag UserFlag
}
foreach i $sHeaderFlagList {
    set sHeaderFlags($i) both
}
set sPgntext(1) ""
set sPgntext(2) ""
set sPgntext(3) ""

trace variable sDateMin w ::utils::validate::Date
trace variable sDateMax w ::utils::validate::Date

foreach i {sWhiteEloMin sWhiteEloMax sBlackEloMin sBlackEloMax} {
  trace variable $i w [list ::utils::validate::Integer [sc_info limit elo] 0]
}
trace variable sEloDiffMin w [list ::utils::validate::Integer "-[sc_info limit elo]" 0]
trace variable sEloDiffMax w [list ::utils::validate::Integer "-[sc_info limit elo]" 0]

trace variable sGlMin w {::utils::validate::Integer 9999 0}
trace variable sGlMax w {::utils::validate::Integer 9999 0}

trace variable sGnumMin w {::utils::validate::Integer -9999999 0}
trace variable sGnumMax w {::utils::validate::Integer -9999999 0}

# Forcing ECO entry to be valid ECO codes:
foreach i {sEcoMin sEcoMax} {
  trace variable $i w {::utils::validate::Regexp {^$|^[A-Ea-e]$|^[A-Ea-e][0-9]$|^[A-Ea-e][0-9][0-9]$|^[A-Ea-e][0-9][0-9][a-z]$|^[A-Ea-e][0-9][0-9][a-z][1-4]$}}
}

# checkDates:
#    Checks minimum/maximum search dates in header search window and
#    extends them if necessary.
proc checkDates {} {
  global sDateMin sDateMax
  if {[string length $sDateMin] == 0} { set sDateMin "0000" }
  if {[string length $sDateMax] == 0} { set sDateMax [sc_info limit year]}
  if {[string length $sDateMin] == 4} { append sDateMin ".??.??" }
  if {[string length $sDateMax] == 4} { append sDateMax ".12.31" }
  if {[string length $sDateMin] == 7} { append sDateMin ".??" }
  if {[string length $sDateMax] == 7} { append sDateMax ".31" }
}

proc ::search::header::defaults {} {
  global sWhite sBlack sEvent sSite sRound sDateMin sDateMax sIgnoreCol
  global sWhiteEloMin sWhiteEloMax sBlackEloMin sBlackEloMax
  global sEloDiffMin sEloDiffMax
  global sEco sEcoMin sEcoMax sHeaderFlags sGlMin sGlMax
  global sGnumMin sGnumMax
  global sResWin sResLoss sResDraw sResOther glstart
  global sPgntext sTitles

  set sWhite "";  set sBlack ""
  set sEvent ""; set sSite "";  set sRound ""
  set sWhiteEloMin 0; set sWhiteEloMax [sc_info limit elo]
  set sBlackEloMin 0; set sBlackEloMax [sc_info limit elo]
  set sEloDiffMin "-[sc_info limit elo]"
  set sEloDiffMax "+[sc_info limit elo]"
  set sGlMin 0; set sGlMax 999
  set sEcoMin "A00";  set sEcoMax "E99"; set sEco Yes
  set sGnumMin 1; set sGnumMax -1
  set sDateMin "0000.00.00"; set sDateMax "[sc_info limit year].12.31"
  set sResWin 1; set sResLoss 1; set sResDraw 1; set sResOther 1
  set sIgnoreCol No
  set sSideToMove wb
  foreach flag $::sHeaderFlagList { set sHeaderFlags($flag) both }
  foreach i [array names sPgntext] { set sPgntext($i) "" }
  foreach i $::sTitleList {
    set sTitles(w:$i) 1
    set sTitles(b:$i) 1
  }
}

::search::header::defaults

set sHeaderFlagFrame 0

# ::search::header
#
#   Opens the window for searching by header information.
#
proc search::header {} {
  global sWhite sBlack sEvent sSite sRound sDateMin sDateMax sIgnoreCol
  global sWhiteEloMin sWhiteEloMax sBlackEloMin sBlackEloMax
  global sEloDiffMin sEloDiffMax sSideToMove
  global sEco sEcoMin sEcoMax sHeaderFlags sGlMin sGlMax sTitleList sTitles
  global sResWin sResLoss sResDraw sResOther glstart sPgntext

  set w .sh
  if {[winfo exists $w]} {
    wm deiconify $w
    raiseWin $w
    return
  }

  toplevel $w
  wm title $w "Scid: $::tr(HeaderSearch)"
  foreach frame {cWhite cBlack ignore tw tb eventsite dateround res gl ends eco} {
    frame $w.$frame
  }

  bind $w <F1> { helpWindow Searches Header }
  bind $w <Escape> "$w.b.cancel invoke"
  bind $w <Return> "$w.b.search invoke"

  set regular font_Small
  set bold font_SmallBold

  foreach color {White Black} {
    pack $w.c$color -side top -fill x
    label $w.c$color.lab -textvar ::tr($color:) -font $bold -width 9 -anchor w
    ::combobox::combobox $w.c$color.e -textvariable "s$color" -width 40 -font $regular
    ::utils::history::SetCombobox HeaderSearch$color $w.c$color.e
    label $w.c$color.space
    label $w.c$color.elo1 -textvar ::tr(Rating:) -font $bold
    entry $w.c$color.elomin -textvar s${color}EloMin -width 6 -justify right \
      -font $regular
    label $w.c$color.elo2 -text "-" -font $regular
    entry $w.c$color.elomax -textvar s${color}EloMax -width 6 -justify right \
      -font $regular
    bindFocusColors $w.c$color.e
    bindFocusColors $w.c$color.elomin
    bindFocusColors $w.c$color.elomax
    pack $w.c$color.lab $w.c$color.e $w.c$color.space -side left
    pack $w.c$color.elomax $w.c$color.elo2 $w.c$color.elomin $w.c$color.elo1 \
      -side right
  }

  pack $w.ignore -side top -fill x
  label $w.ignore.l -textvar ::tr(IgnoreColors:) -font $bold
  radiobutton $w.ignore.yes -variable sIgnoreCol -value Yes \
    -textvar ::tr(Yes) -font $regular
  radiobutton $w.ignore.no  -variable sIgnoreCol -value No \
    -textvar ::tr(No) -font $regular
  pack $w.ignore.l $w.ignore.yes $w.ignore.no -side left
  label $w.ignore.rdiff -textvar ::tr(RatingDiff:) -font $bold
  entry $w.ignore.rdmin -width 6 -textvar sEloDiffMin -justify right \
    -font $regular
  label $w.ignore.rdto -text "-" -font $regular
  entry $w.ignore.rdmax -width 6 -textvar sEloDiffMax -justify right \
    -font $regular
  bindFocusColors $w.ignore.rdmin
  bindFocusColors $w.ignore.rdmax
  pack $w.ignore.rdmax $w.ignore.rdto $w.ignore.rdmin $w.ignore.rdiff \
    -side right

  set spellstate normal
  if {[lindex [sc_name read] 0] == 0} { set spellstate disabled }
  foreach c {w b} name {White Black} {
    pack $w.t$c -side top -fill x
    label $w.t$c.label -text "$::tr($name) FIDE:" \
      -font $bold -width 14 -anchor w
    pack $w.t$c.label -side left
    foreach i $sTitleList {
      set name [string toupper $i]
      if {$i == "none"} { set name "-" }
      checkbutton $w.t$c.b$i -text $name -width 5 -font $regular \
        -variable sTitles($c:$i) -offvalue 0 -onvalue 1 -indicatoron 0 \
        -state $spellstate -pady 0
      pack $w.t$c.b$i -side left -padx 1
    }
  }

  addHorizontalRule $w

  set f $w.eventsite
  pack $f -side top -fill x
  foreach i {Event Site} {
    label $f.l$i -textvar ::tr(${i}:) -font $bold
    ::combobox::combobox $f.e$i -textvariable s$i -width 30 -font $regular
    ::utils::history::SetCombobox HeaderSearch$i $f.e$i
    bindFocusColors $f.e$i
  }
  pack $f.lEvent $f.eEvent -side left
  pack $f.eSite $f.lSite -side right

  set f $w.dateround
  pack $f -side top -fill x
  label $f.l1 -textvar ::tr(Date:) -font $bold
  label $f.l2 -text "-" -font $regular
  label $f.l3 -text " " -font $regular
  entry $f.emin -textvariable sDateMin -width 10 -font $regular
  button $f.eminCal -image ::utils::date::calendar -padx 0 -pady 0 -command {
    regsub -all {[.]} $sDateMin "-" newdate
    set ndate [::utils::date::chooser $newdate]
    if {[llength $ndate] == 3} {
      set sDateMin "[lindex $ndate 0].[lindex $ndate 1].[lindex $ndate 2]"
    }
  }
  entry $f.emax -textvariable sDateMax -width 10 -font $regular
  button $f.emaxCal -image ::utils::date::calendar -padx 0 -pady 0 -command {
    regsub -all {[.]} $sDateMax "-" newdate
    set ndate [::utils::date::chooser $newdate]
    if {[llength $ndate] == 3} {
      set sDateMax "[lindex $ndate 0].[lindex $ndate 1].[lindex $ndate 2]"
    }
  }
  bindFocusColors $f.emin
  bindFocusColors $f.emax
  bind $f.emin <FocusOut> +checkDates
  bind $f.emax <FocusOut> +checkDates
  button $f.lyear -textvar ::tr(YearToToday) -font $regular -pady 2 -command {
    set sDateMin "[expr [::utils::date::today year]-1].[::utils::date::today month].[::utils::date::today day]"
    set sDateMax [::utils::date::today]
  }
  if {$::tcl_version >= 8.3} {
    pack $f.l1 $f.emin $f.eminCal $f.l2 $f.emax $f.emaxCal $f.l3 $f.lyear \
      -side left
  } else {
    pack $f.l1 $f.emin $f.l2 $f.emax $f.l3 $f.lyear -side left
  }

  label $f.lRound -textvar ::tr(Round:) -font $bold
  entry $f.eRound -textvariable sRound -width 10 -font $regular
  bindFocusColors $f.eRound
  pack $f.eRound $f.lRound -side right

  addHorizontalRule $w

  pack .sh.res -side top -fill x
  label $w.res.l1 -textvar ::tr(Result:) -font $bold
  pack $w.res.l1 -side left
  foreach i {win draw loss other} \
          v {sResWin sResDraw sResLoss sResOther} \
          text {"1-0 "  "1/2-1/2 "  "0-1 "  "* "} {
    checkbutton $w.res.e$i -text $text -variable $v -offvalue 0 -onvalue 1
    pack $w.res.e$i -side left
  }

  label $w.gl.l1 -textvar ::tr(GameLength:) -font $bold
  label $w.gl.l2 -text "-" -font $regular
  label $w.gl.l3 -textvar ::tr(HalfMoves) -font $regular
  entry $w.gl.emin -textvariable sGlMin -justify right -width 4 -font $regular
  entry $w.gl.emax -textvariable sGlMax -justify right -width 4 -font $regular
  bindFocusColors $w.gl.emin
  bindFocusColors $w.gl.emax
  pack $w.gl -in $w.res -side right -fill x
  pack $w.gl.l1 $w.gl.emin $w.gl.l2 $w.gl.emax $w.gl.l3 -side left

  label $w.ends.label -textvar ::tr(EndSideToMove:) -font $bold
  frame $w.ends.sep1 -width 5
  frame $w.ends.sep2 -width 5
  radiobutton $w.ends.white -textvar ::tr(White) -variable sSideToMove -value w
  radiobutton $w.ends.black -textvar ::tr(Black) -variable sSideToMove -value b
  radiobutton $w.ends.both -textvar ::tr(Both) -variable sSideToMove -value wb
  pack $w.ends.label $w.ends.white $w.ends.sep1 \
    $w.ends.black $w.ends.sep2 $w.ends.both -side left
  pack $w.ends -side top -fill x

  label $w.eco.l1 -textvar ::tr(ECOCode:) -font $bold
  label $w.eco.l2 -text "-" -font $regular
  label $w.eco.l3 -text " " -font $regular
  label $w.eco.l4 -textvar ::tr(GamesWithNoECO:) -font $bold
  entry $w.eco.emin -textvariable sEcoMin -width 5 -font $regular
  entry $w.eco.emax -textvariable sEcoMax -width 5 -font $regular
  bindFocusColors $w.eco.emin
  bindFocusColors $w.eco.emax
  button $w.eco.range -text "..." -font $regular -pady 2 -padx 4 -command {
    set tempResult [chooseEcoRange]
    if {[scan $tempResult "%\[A-E0-9a-z\]-%\[A-E0-9a-z\]" sEcoMin_tmp sEcoMax_tmp] == 2} {
      set sEcoMin $sEcoMin_tmp
      set sEcoMax $sEcoMax_tmp
    }
    unset tempResult
  }
  radiobutton $w.eco.yes -variable sEco -value Yes -textvar ::tr(Yes) \
     -font $regular
  radiobutton $w.eco.no -variable sEco -value No -textvar ::tr(No) \
     -font $regular
  pack $w.eco -side top -fill x
  pack $w.eco.l1 $w.eco.emin $w.eco.l2 $w.eco.emax \
    $w.eco.range $w.eco.l3 $w.eco.l4 $w.eco.yes $w.eco.no -side left

  set f [frame $w.gnum]
  pack $f -side top -fill x
  label $f.l1 -textvar ::tr(GlistGameNumber:) -font $bold
  entry $f.emin -textvariable sGnumMin -width 8 -justify right -font $regular
  label $f.l2 -text "-" -font $regular
  entry $f.emax -textvariable sGnumMax -width 8 -justify right -font $regular
  pack $f.l1 $f.emin $f.l2 $f.emax -side left
  bindFocusColors $f.emin
  bindFocusColors $f.emax
  label $f.l3 -text " " -font $regular
  button $f.all -text [::utils::string::Capital $::tr(all)] -pady 2 -font $regular \
    -command {set sGnumMin 1; set sGnumMax -1}
  menubutton $f.first -textvar ::tr(First...) -pady 2 -font $regular \
    -menu $f.first.m -indicatoron 0 -relief raised
  menubutton $f.last -textvar ::tr(Last...) -pady 2 -font $regular \
    -menu $f.last.m -indicatoron 0 -relief raised
  menu $f.first.m -font $regular
  menu $f.last.m -font $regular
  foreach x {10 50 100 500 1000 5000 10000} {
    $f.first.m add command -label $x \
      -command "set sGnumMin 1; set sGnumMax $x"
    $f.last.m add command -label $x \
      -command "set sGnumMin -$x; set sGnumMax -1"
  }
  pack $f.l3 $f.all $f.first $f.last -side left -padx 2

  set f [frame $w.pgntext]
  pack $f -side top -fill x
  label $f.l1 -textvar ::tr(PgnContains:) -font $bold
  entry $f.e1 -textvariable sPgntext(1) -width 15 -font $regular
  label $f.l2 -text "+" -font $regular
  entry $f.e2 -textvariable sPgntext(2) -width 15 -font $regular
  label $f.l3 -text "+" -font $regular
  entry $f.e3 -textvariable sPgntext(3) -width 15 -font $regular
  bindFocusColors $f.e1
  bindFocusColors $f.e2
  bindFocusColors $f.e3
  pack $f.l1 $f.e1 $f.l2 $f.e2 $f.l3 $f.e3 -side left

  addHorizontalRule $w

  button $w.flagslabel -textvar ::tr(FindGamesWith:) -font $bold -command {
    if {$sHeaderFlagFrame} {
      set sHeaderFlagFrame 0
      pack forget .sh.flags
    } else {
      set sHeaderFlagFrame 1
      pack .sh.flags -side top -after .sh.flagslabel
    }
  }
  pack $w.flagslabel -side top

  frame $w.flags
  if {$::sHeaderFlagFrame} {
    pack $w.flags -side top
  }

  set count 0
  set row 0
  set col 0
  foreach var $::sHeaderFlagList {
    set lab [label $w.flags.l$var -textvar ::tr($var) -font font_Small]
    grid $lab -row $row -column $col -sticky e
    incr col
    grid [radiobutton $w.flags.yes$var -variable sHeaderFlags($var) \
            -ind 0 -value yes -text $::tr(Yes) -padx 2 -pady 0 \
            -font font_Small] \
      -row $row -column $col
    incr col
    grid [radiobutton $w.flags.no$var -variable sHeaderFlags($var) \
            -ind 0 -value no -text $::tr(No) -padx 2 -pady 0 \
            -font font_Small] \
      -row $row -column $col
    incr col
    grid [radiobutton $w.flags.both$var -variable sHeaderFlags($var) \
            -ind 0 -value both -text $::tr(Both) -padx 2 -pady 0 \
            -font font_Small] \
      -row $row -column $col
    incr count
    incr col -3
    incr row
    if {$count == 6} { set col 5; set row 0 }
    if {$count == 12} { set col 10; set row 0 }
  }
  grid [label $w.flags.space -text "" -font $regular] -row 0 -column 4
  grid [label $w.flags.space2 -text "" -font $regular] -row 0 -column 9

  addHorizontalRule $w
  ::search::addFilterOpFrame $w 1
  addHorizontalRule $w

  ### Header search: search/cancel buttons

  frame $w.b
  pack $w.b -side top -pady 2 -fill x
  button $w.b.defaults -textvar ::tr(Defaults) -padx 20 \
    -command ::search::header::defaults
  button $w.b.save -textvar ::tr(Save...) -padx 20 -command ::search::header::save
  button $w.b.stop -textvar ::tr(Stop) -command sc_progressBar
  button $w.b.search -textvar ::tr(Search) -padx 20 -command {
    ::utils::history::AddEntry HeaderSearchWhite $sWhite
    ::utils::history::AddEntry HeaderSearchBlack $sBlack
    ::utils::history::AddEntry HeaderSearchEvent $sEvent
    ::utils::history::AddEntry HeaderSearchSite $sSite

    set sPgnlist {}
    foreach i {1 2 3} {
        set temp [string trim $sPgntext($i)]
        if {$temp != ""} { lappend sPgnlist $temp }
    }
    busyCursor .
    pack .sh.b.stop -side right -padx 5
    grab .sh.b.stop
    sc_progressBar .sh.progress bar 301 21 time
    set wtitles {}
    set btitles {}
    foreach i $sTitleList {
      if $sTitles(w:$i) { lappend wtitles $i }
      if $sTitles(b:$i) { lappend btitles $i }
    }

    set str [sc_search header -white $sWhite -black $sBlack \
               -event $sEvent -site $sSite -round $sRound \
               -date [list $sDateMin $sDateMax] \
               -results [list $sResWin $sResDraw $sResLoss $sResOther] \
               -welo [list $sWhiteEloMin $sWhiteEloMax] \
               -belo [list $sBlackEloMin $sBlackEloMax] \
               -delo [list $sEloDiffMin $sEloDiffMax] \
               -eco [list $sEcoMin $sEcoMax $sEco] \
               -length [list $sGlMin $sGlMax] \
               -toMove $sSideToMove \
               -gameNumber [list $sGnumMin $sGnumMax] \
               -flip $sIgnoreCol -filter $::search::filter::operation \
               -fStdStart $sHeaderFlags(StdStart) \
               -fPromotions $sHeaderFlags(Promotions) \
               -fComments $sHeaderFlags(Comments) \
               -fVariations $sHeaderFlags(Variations) \
               -fAnnotations $sHeaderFlags(Annotations) \
               -fDelete $sHeaderFlags(DeleteFlag) \
               -fWhiteOp $sHeaderFlags(WhiteOpFlag) \
               -fBlackOp $sHeaderFlags(BlackOpFlag) \
               -fMiddlegame $sHeaderFlags(MiddlegameFlag) \
               -fEndgame $sHeaderFlags(EndgameFlag) \
               -fNovelty $sHeaderFlags(NoveltyFlag) \
               -fPawnStruct $sHeaderFlags(PawnFlag) \
               -fTactics $sHeaderFlags(TacticsFlag) \
               -fKingside $sHeaderFlags(KsideFlag) \
               -fQueenside $sHeaderFlags(QsideFlag) \
               -fBrilliancy $sHeaderFlags(BrilliancyFlag) \
               -fBlunder $sHeaderFlags(BlunderFlag) \
               -fUser $sHeaderFlags(UserFlag) \
               -pgn $sPgnlist -wtitles $wtitles -btitles $btitles \
              ]

    grab release .sh.b.stop
    pack forget .sh.b.stop
    unbusyCursor .

    .sh.status configure -text $str
    set glstart 1
    ::windows::gamelist::Refresh
    ::windows::stats::Refresh
  }

  button $w.b.cancel -textvar ::tr(Close) -padx 20 \
    -command {focus .; destroy .sh}

  foreach i {defaults save cancel search stop} {
    $w.b.$i configure -font $regular
  }

  pack $w.b.defaults $w.b.save -side left -padx 5
  pack $w.b.cancel $w.b.search -side right -padx 5


  canvas $w.progress -height 20 -width 300 -bg white -relief solid -border 1
  $w.progress create rectangle 0 0 0 0 -fill blue -outline blue -tags bar
  $w.progress create text 295 10 -anchor e -font font_Regular -tags time \
    -fill black -text "0:00 / 0:00"
  pack $w.progress -side top -pady 2
  label $w.status -text "" -width 1 -font font_Small -relief sunken -anchor w
  pack $w.status -side bottom -fill x
  # update
  wm resizable $w 0 0
  standardShortcuts $w
  ::search::Config
  focus $w.cWhite.e
}

proc ::search::header::save {} {
  global sWhite sBlack sEvent sSite sRound sDateMin sDateMax sIgnoreCol
  global sWhiteEloMin sWhiteEloMax sBlackEloMin sBlackEloMax
  global sEloDiffMin sEloDiffMax sGlMin sGlMax
  global sEco sEcoMin sEcoMax sHeaderFlags sSideToMove
  global sResWin sResLoss sResDraw sResOther glstart sPgntext

  set ftype { { "Scid SearchOptions files" {".sso"} } }
  set fName [tk_getSaveFile -initialdir [pwd] -filetypes $ftype -title "Create a SearchOptions file"]
  if {$fName == ""} { return }

  if {[string compare [file extension $fName] ".sso"] != 0} {
    append fName ".sso"
  }

  if {[catch {set searchF [open [file nativename $fName] w]} ]} {
    tk_messageBox -title "Error: Unable to open file" -type ok -icon error \
      -message "Unable to create SearchOptions file: $fName"
    return
  }
  puts $searchF "\# SearchOptions File created by Scid [sc_info version]"
  puts $searchF "set searchType Header"

  # First write the regular variables:
  foreach i {sWhite sBlack sEvent sSite sRound sDateMin sDateMax sResWin
     sResLoss sResDraw sResOther sWhiteEloMin sWhiteEloMax sBlackEloMin
     sBlackEloMax sEcoMin sEcoMax sEloDiffMin sEloDiffMax
     sIgnoreCol sSideToMove sGlMin sGlMax ::search::filter::operation} {
    puts $searchF "set $i [list [set $i]]"
  }

  # Now write the array values:
  foreach i [array names sHeaderFlags] {
    puts $searchF "set sHeaderFlags($i) [list $sHeaderFlags($i)]"
  }
  foreach i [array names sPgntext] {
    puts $searchF "set sPgntext($i) [list $sPgntext($i)]"
  }

  tk_messageBox -type ok -icon info -title "Search Options saved" \
    -message "Header search options saved to: $fName"
  close $searchF
}


##############################
### Selecting common ECO ranges

set ecoCommonRanges {
  {A04-A09  Reti: 1.Nf3}
  {A10-A39  English: 1.c4}
  {A40-A49  1.d4, 1.d4 Nf6 Miscellaneous}
  {A45l-A45z  Trompowsky: 1.d4 Nf6 2.Bg5}
  {A51-A52  Budapest: 1.d4 Nf6 2.c4 e5}
  {A53-A55  Old Indian: 1.d4 Nf6 2.c4 d6}
  {A57-A59  Benko Gambit: 1.d4 Nf6 2.c4 c5 3.d5 b5}
  {A60-A79  Modern Benoni: 1.d4 Nf6 2.c4 c5 3.d5 e6}
  {A80-A99  Dutch Defence: 1.d4 f5}
  {____________________________________________________________}
  {B00-C99  1.e4}
  {B01-B01     Scandinavian: 1.e4 d5}
  {B02-B05     Alekhine Defence: 1.e4 Nf6}
  {B07-B09     Pirc: 1.e4 d6}
  {B10-B19     Caro-Kann: 1.e4 c6}
  {B12i-B12z      Caro-Kann: Advance: 1.e4 c6 2.d4 d5 3.e5}
  {B20-B99  Sicilian: 1.e4 c5}
  {B22-B22     Sicilian: Alapin: 1.e4 c5 2.c3}
  {B23-B26     Sicilian: Closed: 1.e4 c5 2.Nc3}
  {B30-B39     Sicilian: 1.e4 c5 2.Nf3 Nc6}
  {B40-B49     Sicilian: 1.e4 c5 2.Nf3 e6}
  {B50-B59     Sicilian Rauzer: 1.e4 c5 2.Nf3 d6 ... 5.Nc3 Nc6}
  {B70-B79     Sicilian Dragon: 1.e4 c5 2.Nf3 d6 ... 5.Nc3 g6}
  {B80-B89     Sicilian Scheveningen: 1.e4 c5 2.Nf3 d6 ... 5.Nc3 e6}
  {B90-B99     Sicilian Najdorf: 1.e4 c5 2.Nf3 d6 ... 5.Nc3 a6}
  {____________________________________________________________}
  {C00-C19  French Defence: 1.e4 e6}
  {C02-C02     French: Advance: 1.e4 e6 2.d4 d5 3.e5}
  {C03-C09     French: Tarrasch: 1.e4 e6 2.d4 d5 3.Nd2}
  {C15-C19     French: Winawer: 1.e4 e6 2.d4 d5 3.Nc3 Bb4}
  {C20-C99  Open Game: 1.e4 e5}
  {C25-C29     Vienna: 1.e4 e5 2.Nc3}
  {C30-C39     King's Gambit: 1.e4 e5 2.f4}
  {C42-C43     Russian Game: 1.e4 e5 2.Nf3 Nf6}
  {C44-C49     Open Game: 1.e4 e5 2.Nf3 Nc6}
  {C50-C59     Italian/Two Knights: 1.e4 e5 2.Nf3 Nc6 3.Bc4}
  {C60-C99  Spanish: 1.e4 e5 2.Nf3 Nc6 3.Bb5}
  {C68-C69      Spanish: Exchange: 3.Bb5 a6 4.Bxc6}
  {C80-C83      Spanish: Open: 3.Bb5 a6 4.Ba4 Nf6 5.O-O Nxe4}
  {C84-C99      Spanish: Closed: 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7}
  {____________________________________________________________}
  {D00-D99  Queen's Pawn: 1.d4 d5}
  {D10-D19  Slav: 1.d4 d5 2.c4 c6}
  {D20-D29  QGA: 1.d4 d5 2.c4 dxc4}
  {D30-D69  QGD: 1.d4 d5 2.c4 e6}
  {D35-D36     QGD: Exchange: 1.d4 d5 2.c4 e6 3.cxd5 exd5}
  {D43-D49     Semi-Slav: 3.Nc3 Nf6 4.Nf3 c6}
  {D50-D69     QGD with Bg5: 1.d4 d5 2.c4 e6 3.Nc3 Nf6 4.Bg5}
  {D60-D69     QGD: Orthodox: 4.Bg5 Be7 5.e3 O-O 6.Nf3 Nbd7}
  {D70-D99  Grnfeld: 1.d4 Nf6 2.c4 g6 with 3...d5}
  {D85-D89     Grnfeld: Exchange: 3.Nc3 d5 4.e4 Nxc3 5.bxc3}
  {D96-D99     Grnfeld: Russian: 3.Nc3 d5 4.Nf3 Bg7 5.Qb3}
  {____________________________________________________________}
  {E00-E09  Catalan: 1.d4 Nf6 2.c4 e6 3.g3/...}
  {E02-E05     Catalan: Open: 3.g3 d5 4.Bg2 dxc4}
  {E06-E09     Catalan: Closed: 3.g3 d5 4.Bg2 Be7}
  {E12-E19  Queen's Indian: 1.d4 Nf6 2.c4 e6 3.Nf3 b6}
  {E20-E59  Nimzo-Indian: 1.d4 Nf6 2.c4 e6 3.Nc3 Bb4}
  {E32-E39     Nimzo-Indian: Classical: 4.Qc2}
  {E40-E59     Nimzo-Indian: Rubinstein: 4.e3}
  {E60-E99  King's Indian: 1.d4 Nf6 2.c4 g6}
  {E80-E89     King's Indian: Smisch: 4.e4 d6 5.f3}
  {E90-E99     King's Indian: Main Line: 4.e4 d6 5.Nf3}
}

set scid_ecoRangeChosen ""

proc chooseEcoRange {} {
  global ecoCommonRanges scid_ecoRangeChosen
  if {[winfo exists .ecoRangeWin]} { return }
  set w .ecoRangeWin
  toplevel $w
  wm title $w "Scid: Choose ECO Range"
  wm minsize $w 30 5

  listbox $w.list -yscrollcommand "$w.ybar set" -height 20 -width 60 \
    -background white -setgrid 1
  foreach i $ecoCommonRanges { $w.list insert end $i }
  scrollbar $w.ybar -command "$w.list yview" -takefocus 0
  pack [frame $w.b] -side bottom -fill x
  pack $w.ybar -side right -fill y
  pack $w.list -side left -fill both -expand yes

  button $w.b.ok -text "OK" -command {
    set sel [.ecoRangeWin.list curselection]
    if {[llength $sel] > 0} {
      set scid_ecoRangeChosen [lindex $ecoCommonRanges [lindex $sel 0]]
    }
    focus .
    destroy .ecoRangeWin
  }
  button $w.b.cancel -text $::tr(Cancel) -command "focus .; destroy $w"
  pack $w.b.cancel $w.b.ok -side right -padx 5 -pady 2
  bind $w <Escape> "
    set scid_ecoRangeChosen {}
    grab release $w
    focus .
    destroy $w
    break"
  bind $w <Return> "$w.b.ok invoke; break"
  bind $w.list <Double-ButtonRelease-1> "$w.b.ok invoke; break"
  focus $w.list
  grab $w
  tkwait window $w
  return $scid_ecoRangeChosen
}


###
### End of file: search.tcl

###
### search/material.tcl: Material Search routine for Scid.
###

namespace eval ::search::material {}

image create photo button_oneplus -data {
R0lGODlhFAAUAIAAAAAAAP///yH5BAEKAAEALAAAAAAUABQAAAIpjI+py+0P
FwCSzVnlzZaaC3oJNooadyqmun4OGR1wHMxQ2HYgzfd+UgAAOw==
}

set ignoreColors 0
set minMoveNum 1
set maxMoveNum 999
set minHalfMoves 1
set oppBishops "Either"
set minMatDiff -40
set maxMatDiff +40

trace variable minMoveNum w {::utils::validate::Integer 999 0}
trace variable maxMoveNum w {::utils::validate::Integer 999 0}
trace variable minHalfMoves w {::utils::validate::Integer 99 0}
trace variable minMatDiff w {::utils::validate::Integer -99 0}
trace variable maxMatDiff w {::utils::validate::Integer -99 0}

set nPatterns 10

array set pMin [list wq 0 bq 0 wr 0 br 0 wb 0 bb 0 wn 0 bn 0 wm 0 bm 0 wp 0 bp 0]
array set pMax [list wq 2 bq 2 wr 2 br 2 wb 2 bb 2 wn 2 bn 2 wm 4 bm 4 wp 8 bp 8]
for { set i 1 } { $i <= $nPatterns } { incr i } {
  set pattPiece($i) "?";  set pattFyle($i) "?";  set pattRank($i) "?"
}

proc checkPieceCounts {name el op} {
  global pMin pMax
  ::utils::validate::Integer 9 0 $name $el $op
  # Now make sure minor piece counts fit with bishop/knight counts:
  set wmMin [expr {$pMin(wn) + $pMin(wb)} ]
  set wmMax [expr {$pMax(wn) + $pMax(wb)} ]
  set bmMin [expr {$pMin(bn) + $pMin(bb)} ]
  set bmMax [expr {$pMax(bn) + $pMax(bb)} ]
  if {$pMin(wm) < $wmMin} { set pMin(wm) $wmMin }
  if {$pMax(wm) > $wmMax} { set pMax(wm) $wmMax }
  if {$pMin(bm) < $bmMin} { set pMin(bm) $bmMin }
  if {$pMax(bm) > $bmMax} { set pMax(bm) $bmMax }
  foreach p {wq wr wb wn wm wp bq br bb bn bm bp} {
    if {$pMax($p) != ""  &&  $pMax($p) < $pMin($p)} { set pMax($p) $pMin($p) }
  }
}

trace variable pMin w checkPieceCounts
trace variable pMax w checkPieceCounts


proc makeBoolMenu {w varName} {
  upvar #0 $varName var
  if {![info exists var]} { set var "Yes" }
  menubutton $w -textvariable $varName -indicatoron 0 -menu $w.menu \
    -relief raised -bd 2 -highlightthickness 2 -anchor w -image ""
  menu $w.menu -tearoff 0
  $w.menu add radiobutton -label Yes -image ::rep::_tick \
    -variable $varName -value Yes \
    -command "$w configure -image ::rep::_tick" ;# -hidemargin 1
  $w.menu add radiobutton -label No -image ::rep::_cross \
    -variable $varName -value No \
    -command "$w configure -image ::rep::_cross" ;# -hidemargin 1
  return $w.menu
}

proc makePieceMenu {w varName} {
  global dark
  upvar #0 $varName var
  if {![info exists var]} { set var "?" }
  menubutton $w -textvariable $varName -indicatoron 0 -menu $w.menu \
    -relief raised -bd 2 -highlightthickness 2 -anchor w -image ""
  menu $w.menu -tearoff 0
  $w.menu add radiobutton -label " ? " -variable $varName -value "?" \
    -command "$w configure -image e20" ;# -hidemargin 1
  foreach i {wk wq wr wb wn wp bk bq br bb bn bp} {
    $w.menu add radiobutton -label $i -image ${i}20 -value $i \
      -variable $varName \
      -command "$w configure -image ${i}20" ;# -hidemargin 1
  }
  foreach i {" ? " wk bk} {
    $w.menu entryconfigure $i -columnbreak 1
  }
  return $w.menu
}

proc updatePatternImages {} {
  global pattPiece nPatterns pattBool
  if {! [winfo exists .sm]} { return }
  for {set i 1} {$i <= $nPatterns} {incr i} {
    if {$pattBool($i) == "Yes"} {
      .sm.mp.patt.grid.b$i configure -image ::rep::_tick
    } else {
      .sm.mp.patt.grid.b$i configure -image ::rep::_cross
    }
    if {$pattPiece($i) == "?"} {
      .sm.mp.patt.grid.p$i configure -image e20
    } else {
      .sm.mp.patt.grid.p$i configure -image "$pattPiece($i)20"
    }
  }
}

# ::search::material::zero
#
#   Called to clear all material minumum/maximum values to zero.
#
proc ::search::material::zero {} {
  global pMin pMax
  array set pMin {wq 0 bq 0 wr 0 br 0 wb 0 bb 0 wn 0 bn 0 wm 0 bm 0 wp 0 bp 0}
  array set pMax {wq 0 bq 0 wr 0 br 0 wb 0 bb 0 wn 0 bn 0 wm 0 bm 0 wp 0 bp 0}
}

proc ::search::material::any {} {
  global pMin pMax
  array set pMin {wq 0 bq 0 wr 0 br 0 wb 0 bb 0 wn 0 bn 0 wm 0 bm 0 wp 0 bp 0}
  array set pMax {wq 2 bq 2 wr 2 br 2 wb 2 bb 2 wn 2 bn 2 wm 4 bm 4 wp 8 bp 8}
  set ::minMatDiff -40
  set maxMatDiff +40
}

proc clearPatterns {} {
  global pattPiece pattFyle pattRank pattBool nPatterns

  for { set i 1 } { $i <= $nPatterns } { incr i } {
    set pattPiece($i) "?";  set pattFyle($i) "?";  set pattRank($i) "?"
    set pattBool($i) "Yes"
  }
  updatePatternImages
}

proc setPatterns {pattlist} {
  global pattPiece pattFyle pattRank pattBool nPatterns

  clearPatterns
  set count 1
  foreach patt $pattlist {
    if {$count <= $nPatterns  &&  [llength $patt] == 4} {
      set pattPiece($count) [lindex $patt 0]
      set pattFyle($count) [lindex $patt 1]
      set pattRank($count) [lindex $patt 2]
      set pattBool($count) [lindex $patt 3]
      incr count
    }
  }
  updatePatternImages
}

set smDisplayed(Material) 1
set smDisplayed(Patterns) 0


# ::search::material
#
#   Opens the window for searching by material or patterns.
#
proc ::search::material {} {
  global glstart dark pMin pMax ignoreColors minMoveNum maxMoveNum
  global pattPiece pattFyle pattRank pattBool oppBishops nPatterns
  global minHalfMoves smDisplayed

  set w .sm
  if {[winfo exists $w]} {
    wm deiconify $w
    raiseWin $w
    return
  }
  set small font_Small

  toplevel $w
  wm title $w "Scid: $::tr(MaterialSearch)"
#  button $w.piecelabel -font font_Bold -textvar ::tr(Material:) -command {
#    if {$smDisplayed(Material)} {
#      set smDisplayed(Material) 0
#      pack forget .sm.q .sm.r .sm.b .sm.n .sm.m .sm.p .sm.b1 .sm.mdiff
#    } else {
#      set smDisplayed(Material) 1
#      pack .sm.q .sm.r .sm.b .sm.n .sm.m .sm.p .sm.b1 .sm.mdiff \
#        -after .sm.piecelabel
#    }
#  }

  bind $w <F1> { helpWindow Searches Material }
  bind $w <Escape> "$w.b3.cancel invoke"
  bind $w <Return> "$w.b3.search invoke"

  pack [frame $w.mp] -side top
  pack [frame $w.mp.material] -side left

  label $w.mp.material.title -font font_Bold -textvar ::tr(Material:)
  pack $w.mp.material.title -side top -pady 3

  foreach piece {q r b n m p} {
    frame $w.mp.material.$piece
    pack $w.mp.material.$piece -side top ;# -padx 2
  }

  foreach i {q r b n m p} {
    set f $w.mp.material.$i
    button $f.w0 -text "0" -command "set pMin(w$i) 0; set pMax(w$i) 0"
    button $f.w1 -text "1" -command "set pMin(w$i) 1; set pMax(w$i) 1"
    button $f.w2 -text "2" -command "set pMin(w$i) 2; set pMax(w$i) 2"
    button $f.wa -text "0+" -command "set pMin(w$i) 0; set pMax(w$i) 2"
    button $f.w1p -text "1+" -command "set pMin(w$i) 1; set pMax(w$i) 2"
    label $f.wi -image w${i}20 -font font_Small
    label $f.wto -text "-" -font font_Small -padx 0
    entry $f.wmin -width 2 -relief sunken -textvar pMin(w$i) -font font_Small \
      -justify right
    entry $f.wmax -width 2 -relief sunken -textvar pMax(w$i) -font font_Small \
      -justify right
    pack $f.w0 $f.w1 $f.w2 $f.wa $f.w1p $f.wi $f.wmin $f.wto $f.wmax -side left -pady 1

    pack [frame $f.space -width 20] -side left
    button $f.b0 -text "0" -command "set pMin(b$i) 0; set pMax(b$i) 0"
    button $f.b1 -text "1" -command "set pMin(b$i) 1; set pMax(b$i) 1"
    button $f.b2 -text "2" -command "set pMin(b$i) 2; set pMax(b$i) 2"
    button $f.ba -text "0+" -command "set pMin(b$i) 0; set pMax(b$i) 2"
    button $f.b1p -text "1+" -command "set pMin(b$i) 1; set pMax(b$i) 2"
    label $f.bi -image b${i}20 -font font_Small
    label $f.bto -text "-" -font font_Small
    entry $f.bmin -width 2 -relief sunken -textvar pMin(b$i) -font font_Small \
      -justify right
    entry $f.bmax -width 2 -relief sunken -textvar pMax(b$i) -font font_Small \
      -justify right
    pack $f.b0 $f.b1 $f.b2 $f.ba $f.b1p $f.bi $f.bmin $f.bto $f.bmax -side left -pady 1

    foreach b {0 1 2 a 1p} {
      $f.w$b configure -width 2 -pady 0 -padx 1 -takefocus 0 -font $small
      $f.b$b configure -width 2 -pady 0 -padx 1 -takefocus 0 -font $small
    }
    foreach widget {wmin wmax bmin bmax} {
      bindFocusColors $f.$widget
    }
    if {$i == "p"} {
      $f.w1p configure -command "set pMin(wp) 1; set pMax(wp) 8"
      $f.wa configure -command "set pMin(wp) 0; set pMax(wp) 8"
      $f.b1p configure -command "set pMin(bp) 1; set pMax(bp) 8"
      $f.ba configure -command "set pMin(bp) 0; set pMax(bp) 8"
    }
    if {$i == "m"} {
      $f.w1p configure -command "set pMin(wm) 1; set pMax(wm) 4"
      $f.wa configure -command "set pMin(wm) 0; set pMax(wm) 4"
      $f.b1p configure -command "set pMin(bm) 1; set pMax(bm) 4"
      $f.ba configure -command "set pMin(bm) 0; set pMax(bm) 4"
    }
  }

  # Buttons that manipulate material settings:
  set f $w.mp.material.b1
  pack [frame $f] -side top -ipady 2

  dialogbutton $f.zero -textvar ::tr(Zero) -font $small -command ::search::material::zero
  dialogbutton $f.reset -textvar ::tr(Any) -font $small -command ::search::material::any
  dialogbutton $f.current -textvar ::tr(CurrentBoard) -font $small -command {
      ::search::material::zero
      set bd [sc_pos board]
      for {set i 0} {$i < 64} {incr i} {
        set piece $::board::letterToPiece([ string index $bd $i ])
        if {$piece != "e"  &&  $piece != "wk"  &&  $piece != "bk"} {
          incr pMin($piece); set pMax($piece) $pMin($piece)
        }
      }
    }

  menubutton $f.common -textvar ::tr(CommonEndings...) \
    -menu $f.common.m -relief raised -font $small
  menu $f.common.m -font $small
  set m $f.common.m
  $m add command -label [tr EndingPawns] -command {
    ::search::material::zero
    array set pMin {wp 1 bp 1}
    array set pMax {wp 8 bp 8}
  }
  $m add command -label [tr EndingRookVsPawns] -command {
    ::search::material::zero
    array set pMin {wr 1 bp 1}
    array set pMax {wr 1 bp 8}
  }
  $m add command -label [tr EndingRookPawnVsRook] -command {
    ::search::material::zero
    array set pMin {wr 1 br 1 wp 1}
    array set pMax {wr 1 br 1 wp 1}
  }
  $m add command -label [tr EndingRookPawnsVsRook] -command {
    ::search::material::zero
    array set pMin {wr 1 br 1 wp 1}
    array set pMax {wr 1 br 1 wp 8}
  }
  $m add command -label [tr EndingRooks] -command {
    ::search::material::zero
    array set pMin {wr 1 br 1}
    array set pMax {wr 1 br 1 wp 8 bp 8}
    set pMin(wr) 1; set pMax(wr) 1; set pMin(wp) 0; set mPax(wp) 8
    set pMin(br) 1; set pMax(br) 1; set pMin(bp) 0; set mPax(bp) 8
  }
  $m add command -label [tr EndingRooksPassedA] -command {
    ::search::material::zero
    array set pMin {wr 1 br 1 wp 1}
    array set pMax {wr 1 br 1 wp 8 bp 8}
    setPatterns {{wp a ? Yes} {bp a ? No} {bp b ? No}}
    set ignoreColors 1
  }
  $m add command -label [tr EndingRooksDouble] -command {
    ::search::material::zero
    array set pMin {wr 2 br 2}
    array set pMax {wr 2 br 2 wp 8 bp 8}
  }
  $m add command -label [tr EndingBishops] -command {
    ::search::material::zero
    array set pMin {wb 1 bb 1 wm 1 bm 1}
    array set pMax {wb 1 bb 1 wm 1 bm 1 wp 8 bp 8}
  }
  $m add command -label [tr EndingBishopVsKnight] -command {
    ::search::material::zero
    array set pMin {wb 1 bn 1 wm 1 bm 1}
    array set pMax {wb 1 bn 1 wm 1 bm 1 wp 8 bp 8}
  }
  $m add command -label [tr EndingKnights] -command {
    ::search::material::zero
    array set pMin {wn 1 bn 1 wm 1 bm 1}
    array set pMax {wn 1 bn 1 wm 1 bm 1 wp 8 bp 8}
  }
  $m add command -label [tr EndingQueens] -command {
    ::search::material::zero
    array set pMin {wq 1 bq 1}
    array set pMax {wq 1 bq 1 wp 8 bp 8}
  }
  $m add command -label [tr EndingQueenPawnVsQueen] -command {
    ::search::material::zero
    array set pMin {wq 1 bq 1 wp 1}
    array set pMax {wq 1 bq 1 wp 1}
  }
  $m add command -label [tr BishopPairVsKnightPair] -command {
    ::search::material::zero
    array set pMin {wb 2 bn 2 wm 2 bm 2}
    array set pMax {wq 1 bq 1 wr 2 br 2 wb 2 bn 2 wm 2 bm 2 wp 8 bp 8}
  }

  pack $f.zero $f.reset $f.current $f.common -side left -pady 5 -padx 10
  #if {! $smDisplayed(Material)} {
  #  pack forget .sm.q .sm.r .sm.b .sm.n .sm.m .sm.p .sm.b1 .sm.mdiff
  #}

  set f $w.mp.material.mdiff
  pack [frame $f] -side top
  label $f.label -font font_SmallBold -textvar ::tr(MaterialDiff:)
  entry $f.min -width 3 -relief sunken -textvar minMatDiff -font $small \
    -justify right
  bindFocusColors $f.min
  label $f.sep -text "-" -font $small
  entry $f.max -width 3 -relief sunken -textvar maxMatDiff -font $small \
    -justify right
  bindFocusColors $f.max
  label $f.sep2 -text " " -font $small
  button $f.any -textvar ::tr(Any) -font $small -padx 1 -pady 1 \
    -command {set minMatDiff -40; set maxMatDiff +40}
  button $f.w1 -text " + " -font $small -padx 1 -pady 1 \
    -command {set minMatDiff +1; set maxMatDiff +40}
  button $f.equal -text " = " -font $small -padx 1 -pady 1 \
    -command {set minMatDiff 0; set maxMatDiff 0}
  button $f.b1 -text " - " -font $small -padx 1 -pady 1 \
    -command {set minMatDiff -40; set maxMatDiff -1}
  pack $f.label $f.min $f.sep $f.max -side left
  pack $f.sep2 $f.any $f.w1 $f.equal $f.b1 -side left
  set f [frame $w.mp.material.mdiff2]
  pack $f -side top
  label $f.explan -font $small \
    -text "($::tr(MaterialDiff) = $::tr(White) - $::tr(Black); Q=9 R=5 B=3 N=3 P=1)"
  pack $f.explan -side top

  addVerticalRule $w.mp

  set f [frame $w.mp.patt]
  pack $f -side top
  
  #dialogbutton $w.pattl -font font_Bold -textvar ::tr(Patterns:) -command {
  #  if {$smDisplayed(Patterns)} {
  #    set smDisplayed(Patterns) 0
  #    pack forget .sm.patt .sm.b2
  #  } else {
  #    set smDisplayed(Patterns) 1
  #    pack .sm.patt .sm.b2 -after .sm.pattl
  #  }
  #}
  label $w.mp.patt.title -textvar ::tr(Patterns:) -font font_Bold
  pack $w.mp.patt.title -side top -pady 3

  pack [frame $f.grid] -side top
  for { set i 1 } { $i <= $nPatterns } { incr i } {
    makeBoolMenu $f.grid.b$i pattBool($i)
    set menuPiece1 [ makePieceMenu $f.grid.p$i pattPiece($i) ]
    tk_optionMenu $f.grid.f$i pattFyle($i) "?" a b c d e f g h
    tk_optionMenu $f.grid.r$i pattRank($i) "?" 1 2 3 4 5 6 7 8
    $f.grid.b$i configure -indicatoron 0 ;# -width 4
    $f.grid.f$i configure -indicatoron 0 -width 1 -pady 1
    $f.grid.r$i configure -indicatoron 0 -width 1 -pady 1
    set column [expr {5 * (($i - 1) / 5)} ]
    set row [expr {($i - 1) % 5} ]
    grid $f.grid.b$i -row $row -column $column -padx 0; incr column
    grid $f.grid.p$i -row $row -column $column -padx 0; incr column
    grid $f.grid.f$i -row $row -column $column -padx 0; incr column
    grid $f.grid.r$i -row $row -column $column -padx 0; incr column
    if {$column == 4  ||  $column == 9} {
      label $f.grid.sp_$i -text "  "
      grid $f.grid.sp_$i -row $row -column $column
    }
  }

  updatePatternImages

  ### Buttons that manipulate patterns:
  set f .sm.mp.patt.b2
  frame $f
  dialogbutton $f.clearPat -textvar ::tr(Clear) -command clearPatterns
  menubutton $f.common -textvar ::tr(CommonPatterns...) \
    -menu $f.common.m -relief raised -font $small
  menu $f.common.m -font $small
  $f.common.m add command -label [tr PatternWhiteIQP] -command {
    if {$pMin(wp) < 1} { set pMin(wp) 1 }
    setPatterns {{wp d ? Yes} {wp c ? No} {wp e ? No}}
  }
  $f.common.m add command -label [tr PatternWhiteIQPBreakE6] -command {
    if {$pMin(wp) < 1} { set pMin(wp) 1 }
    if {$pMin(bp) < 1} { set pMin(bp) 1 }
    setPatterns {{wp d 5 Yes} {wp c ? No} {wp e ? No} {wp d 4 No} \
                   {bp e 6 Yes} {bp c ? No} {bp d ? No}}
  }
  $f.common.m add command -label [tr PatternWhiteIQPBreakC6] -command {
    if {$pMin(wp) < 1} { set pMin(wp) 1 }
    if {$pMin(bp) < 1} { set pMin(bp) 1 }
    setPatterns {{wp d 5 Yes} {wp c ? No} {wp e ? No} {wp d 4 No} \
                   {bp c 6 Yes} {bp e ? No} {bp d ? No}}
  }
  $f.common.m add command -label [tr PatternBlackIQP] -command {
    if {$pMin(bp) < 1} { set pMin(bp) 1 }
    setPatterns {{bp d ? Yes} {bp c ? No} {bp e ? No}}
  }
  $f.common.m add command -label [tr PatternWhiteBlackIQP] -command {
    if {$pMin(wp) < 1} { set pMin(wp) 1 }
    if {$pMin(bp) < 1} { set pMin(bp) 1 }
    setPatterns {{wp d ? Yes} {wp c ? No} {wp e ? No} \
                   {bp d ? Yes} {bp c ? No} {bp e ? No}}
  }
  $f.common.m add command -label [tr PatternCoupleC3D4] -command {
    set pMin(wp) 4; set pMax(wp) 6
    set pMin(bp) 4; set pMax(bp) 6
    setPatterns {{wp c 3 Yes} {wp d 4 Yes} {wp b ? No} {wp e ? No}
      {bp c ? No} {bp d ? No}}
  }
  $f.common.m add command -label [tr PatternHangingC5D5] -command {
    set pMin(bp) 4; set pMax(bp) 6
    set pMin(wp) 4; set pMax(wp) 6
    setPatterns {{bp c 5 Yes} {bp d 5 Yes} {bp b ? No} {bp e ? No}
      {wp c ? No} {wp d ? No}}
  }
  $f.common.m add command -label [tr PatternMaroczy] -command {
    if {$pMin(bp) < 1} { set pMin(bp) 1 }
    if {$pMax(bp) > 7} { set pMax(bp) 7 }
    if {$pMin(wp) < 2} { set pMin(wp) 2 }
    if {$pMax(wp) > 7} { set pMax(wp) 7 }
    setPatterns {{wp c 4 Yes} {wp e 4 Yes} {bp d ? Yes} {wp d ? No}
                 {bp c ? No} {bp d 5 No}}
  }
  $f.common.m add command -label [tr PatternRookSacC3] -command {
    set pMin(br) 2; set pMax(br) 2
    set pMin(wr) 2; set pMax(wr) 2
    setPatterns { {br c 3 Yes} {wp b 2 Yes} }
  }
  $f.common.m add command -label [tr PatternKc1Kg8] -command {
    setPatterns { {wk c 1 Yes} {bk g 8 Yes} }
  }
  $f.common.m add command -label [tr PatternKg1Kc8] -command {
    setPatterns { {wk g 1 Yes} {bk c 8 Yes} }
  }
  $f.common.m add command -label [tr PatternLightFian] -command {
    set pMin(wb) 1; set pMin(bb) 1
    setPatterns { {wb g 2 Yes} {bb b 7 Yes} }
  }
  $f.common.m add command -label [tr PatternDarkFian] -command {
    set pMin(wb) 1; set pMin(bb) 1
    setPatterns { {wb b 2 Yes} {bb g 7 Yes} }
  }
  $f.common.m add command -label [tr PatternFourFian] -command {
    set pMin(wb) 2; set pMin(bb) 2
    setPatterns { {wb b 2 Yes} {wb g 2 Yes} {bb b 7 Yes} {bb g 7 Yes} }
  }

  pack $f -side top
  pack $f.clearPat $f.common -side left -pady 5 -padx 10
  #if {! $smDisplayed(Patterns)} {
  #  pack forget $w.patt $w.b2
  #}
  updatePatternImages

  addHorizontalRule $w

  ### Now the move counter:

  set f $w.bishops
  pack [frame $f] -side top
  label $f.t1 -text "1" -font font_Small
  label $f.t2 -image wb20
  label $f.t3 -text "- 1" -font font_Small
  label $f.t4 -image bb20
  label $f.t5 -textvar ::tr(squares:) -font font_Small
  radiobutton $f.same -textvar ::tr(SameColor) -variable oppBishops \
    -value "Same" -padx 5 -pady 4 -font font_Small
  radiobutton $f.opp -textvar ::tr(OppColor) -variable oppBishops \
    -value "Opposite" -padx 5 -pady 4 -font font_Small
  radiobutton $f.either -textvar ::tr(Either) -variable oppBishops \
    -value "Either" -padx 5 -pady 4 -font font_Small
  foreach i {t1 t2 t3 t4 t5 same opp either} { pack $f.$i -side left }

  set f $w.move
  pack [frame $f] -side top -ipady 5
  label $f.fromlab -textvar ::tr(MoveNumberRange:)
  entry $f.from -width 4 -relief sunken -textvar minMoveNum -justify right
  label $f.tolab -text "-"
  entry $f.to -width 4 -relief sunken -textvar maxMoveNum -justify right
  label $f.space -text "  "
  label $f.label1 -textvar ::tr(MatchForAtLeast)
  entry $f.hmoves -width 3 -relief sunken -textvar minHalfMoves -justify right
  label $f.label2 -textvar ::tr(HalfMoves)
  bindFocusColors $f.from
  bindFocusColors $f.to
  bindFocusColors $f.hmoves
  pack $f.fromlab $f.from $f.tolab $f.to $f.space \
    $f.label1 $f.hmoves $f.label2 -side left

  addHorizontalRule $w
  ::search::addFilterOpFrame $w 1
  addHorizontalRule $w

  ### Progress bar:

  canvas $w.progress -height 20 -width 300 -bg white -relief solid -border 1
  $w.progress create rectangle 0 0 0 0 -outline blue -fill blue -tags bar
  $w.progress create text 295 10 -anchor e -font font_Regular -tags time \
    -fill black -text "0:00 / 0:00"

  ### Last of all, the buttons frame:

  set f $w.b3
  pack [frame $f] -side top -ipady 5 -fill x
  checkbutton $f.ignorecol -textvar ::tr(IgnoreColors) \
    -variable ignoreColors -padx 4

  dialogbutton $f.save -textvar ::tr(Save...) -padx 10 -command ::search::material::save

  dialogbutton $f.stop -textvar ::tr(Stop) -command sc_progressBar
  $f.stop configure -state disabled

  dialogbutton $f.search -textvar ::tr(Search) -command {
    busyCursor .
    .sm.b3.stop configure -state normal
    grab .sm.b3.stop
    sc_progressBar .sm.progress bar 301 21 time
    set str [sc_search material \
               -wq [list $pMin(wq) $pMax(wq)] -bq [list $pMin(bq) $pMax(bq)] \
               -wr [list $pMin(wr) $pMax(wr)] -br [list $pMin(br) $pMax(br)] \
               -wb [list $pMin(wb) $pMax(wb)] -bb [list $pMin(bb) $pMax(bb)] \
               -wn [list $pMin(wn) $pMax(wn)] -bn [list $pMin(bn) $pMax(bn)] \
               -wm [list $pMin(wm) $pMax(wm)] -bm [list $pMin(bm) $pMax(bm)] \
               -wp [list $pMin(wp) $pMax(wp)] -bp [list $pMin(bp) $pMax(bp)] \
               -flip $ignoreColors -filter $::search::filter::operation \
               -range [list $minMoveNum $maxMoveNum] \
               -length $minHalfMoves -bishops $oppBishops \
               -diff [list $minMatDiff $maxMatDiff] \
               -patt "$pattBool(1) $pattPiece(1) $pattFyle(1) $pattRank(1)" \
               -patt "$pattBool(2) $pattPiece(2) $pattFyle(2) $pattRank(2)" \
               -patt "$pattBool(3) $pattPiece(3) $pattFyle(3) $pattRank(3)" \
               -patt "$pattBool(4) $pattPiece(4) $pattFyle(4) $pattRank(4)" \
               -patt "$pattBool(5) $pattPiece(5) $pattFyle(5) $pattRank(5)" \
               -patt "$pattBool(6) $pattPiece(6) $pattFyle(6) $pattRank(6)" \
               -patt "$pattBool(7) $pattPiece(7) $pattFyle(7) $pattRank(7)" \
               -patt "$pattBool(8) $pattPiece(8) $pattFyle(8) $pattRank(8)" \
               -patt "$pattBool(9) $pattPiece(9) $pattFyle(9) $pattRank(9)" \
               -patt "$pattBool(10) $pattPiece(10) $pattFyle(10) $pattRank(10)" ]
    grab release .sm.b3.stop
    .sm.b3.stop configure -state disabled
    unbusyCursor .
    #tk_messageBox -type ok -title $::tr(SearchResults) -message $str
    .sm.status configure -text $str
    set glstart 1
    ::windows::gamelist::Refresh
    ::windows::stats::Refresh
  }

  dialogbutton $f.cancel -textvar ::tr(Close) \
    -command { focus .; destroy .sm }

  pack $f.ignorecol $w.b3.save -side left -pady 5 -padx 5
  pack $w.b3.cancel $w.b3.search $w.b3.stop -side right -pady 5 -padx 5
  pack $w.progress -side top -pady 2

  label $w.status -text "" -width 1 -font font_Small -relief sunken -anchor w
  pack $w.status -side bottom -fill x

  # update
  wm resizable $w 0 0
  standardShortcuts $w
  ::search::Config
  focus $f.search
}

proc ::search::material::save {} {
  global pMin pMax ignoreColors minMoveNum maxMoveNum minHalfMoves
  global pattPiece pattFyle pattRank pattBool oppBishops nPatterns

  set ftype { { "Scid SearchOptions files" {".sso"} } }
  set fName [tk_getSaveFile -initialdir [pwd] -filetypes $ftype -title "Create a SearchOptions file"]
  if {$fName == ""} { return }

  if {[string compare [file extension $fName] ".sso"] != 0} {
    append fName ".sso"
  }

  if {[catch {set searchF [open $fName w]}]} {
    tk_messageBox -title "Error: Unable to open file" -type ok -icon error \
      -message "Unable to create SearchOptions file: $fName"
    return
  }
  puts $searchF "\# SearchOptions File created by Scid [sc_info version]"
  puts $searchF "set searchType Material"
  # First write the material counts:
  foreach i {wq bq wr br wb bb wn bn wp bp} {
    puts $searchF "set pMin($i) $pMin($i)"
    puts $searchF "set pMax($i) $pMax($i)"
  }
  # Now write other numeric values:
  foreach i {
    ignoreColors minMoveNum maxMoveNum minHalfMoves oppBishops
    ::search::filter::operation
  } {
    puts $searchF "set $i [set $i]"
  }
  # Last, write the patterns:
  for {set i 1} {$i <= $nPatterns} {incr i} {
    puts $searchF "set pattPiece($i) $pattPiece($i)"
    puts $searchF "set pattFyle($i) $pattFyle($i)"
    puts $searchF "set pattRank($i) $pattRank($i)"
    puts $searchF "set pattBool($i) $pattBool($i)"
  }
  tk_messageBox -type ok -icon info -title "Search Options saved" \
    -message "Material/pattern search options saved to: $fName"
  close $searchF
}

# ezsmtp.tcl --
#
#	"Easy" SMTP-base mail sending library.  See the ezsmtp.html
#	file for documentation on using this package.
#
# Copyright (c) 1999-2000 by D. J. Hagberg and other parties
#
# See the file "license.txt" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

package provide ezsmtp 1.0.0

namespace eval ::ezsmtp {
    global env tcl_platform
    variable mail

    # Make CVS version ID accessible.
    set mail(cvsid) \
            {$Id: ezsmtp.tcl,v 1.1.1.2 2005/01/18 16:27:30 petervr Exp $}

    # Global variables that may be altered through ezsmtp::config.
    set mail(vars) [list verbose mailhost port from batchsize \
                         logproc strictaddr]
    set mail(verbose) 0                 ;# No logging output
    set mail(mailhost) localhost        ;# Host with smtp daemon
    set mail(port) 25                   ;# port for smtp daemon
    set mail(batchsize) 0               ;# no batching of RCPT TO's.
    set mail(logproc) {}		;# empty means log to stdout.
    set mail(strictaddr) 0		;# should we enforce RFC821 addresses?

    # Try to figure out a reasonable default FROM.
    # Tcl8.1 already has figured out the username for us.
    # Older versions are not so nice-- need to look in the environment
    if {[info exists tcl_platform(user)]} {set mail(from) $tcl_platform(user)}\
    elseif {[info exists env(LOGNAME)]}   {set mail(from) $env(LOGNAME)} \
    elseif {[info exists env(USERNAME)]}  {set mail(from) $env(USERNAME)} \
    elseif {[info exists env(USER)]}      {set mail(from) $env(USER)} \
    else   {set mail(from) {}}
    
    # Trim any leading/trailing spaces and add @ current host name
    set mail(from) [string trim $mail(from)]
    if {[string length $mail(from)] > 0} {
        append mail(from) @ [info hostname]
    }

    # Regular-expression for validating email addresses.
    set mail(hostre) {[A-Za-z]([A-Za-z0-9-]*[A-Za-z0-9])*|\#[0-9]+|}
    append mail(hostre) {\[[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\]}
    set mail(hostre) "($mail(hostre))(\\.($mail(hostre)))*"
    set mail(strictre) "^\[^\x01-\x20\x7F-\xFF<>@\]+@"
    append mail(strictre) $mail(hostre) {$}
    set mail(!strictre) {^[^@]+|[^@]+@[^@]+$}

    # Default character set/encoding settings
    set mail(tclcharset) ascii
    set mail(mimecharset) us-ascii

    # Package-wide header settings to be sent in the DATA section of the email.
    # Note each header variable is a list -- one element per line.
    set mail(x-mailer) "Tcl ezsmtp Mailer Package"
    if {[llength $mail(cvsid)] > 2} {
        append mail(x-mailer) " (build " [lindex $mail(cvsid) 3] ")"
    }
    set mail(x-mailer:)     [list $mail(x-mailer)]
    set mail(mime-version:) [list "1.0"]
}


#############################################################################
##
## PUBLICALLY-DOCUMENTED PROCS
##
#############################################################################


# ezsmtp::config --
#
#	See documentation for details.
#
# Arguments:
#	args		Options parsed by the procedure.
# Results:
#	See documentation
#
proc ::ezsmtp::config {args} {
    variable mail

    if {[llength $args] == 0} {
        set resl {}
        foreach v $mail(vars) {lappend resl "-$v" [set mail($v)]}
        return $resl
    }

    # Build up a list of valid switches.
    set swl {}
    foreach sw $mail(vars) {lappend swl "-$sw"}

    # If we got a single arg, return its associated variable value
    if {[llength $args] == 1} {
        set v [lindex $args 0]
        if {[lsearch $swl $v] == -1} {
            error "invalid config option, must be one of: $swl"
	}
        return $mail([string trimleft $v -])
    }

    # If we got multiple args, make sure we got an even number.
    set argc [llength $args]
    if {$argc % 2} {
        error "must have an even number of config -option value's."
    }

    # Try each -option/value
    foreach {sw v} $args {
        if {[lsearch $swl $sw] == -1} {
            error "invalid config option, must be one of $swl"
	}

        # Verify numeric & other config values.
        switch -regexp -- $sw {
            {^-(verbose|batchsize)} { 
                set v [expr {int($v)}]
                if {$v < 0} {
                    error "config value for $sw must be a number >= 0"
		}
	    }
            {^-strictaddr$} {
                set v [expr {$v ? 1 : 0}]
	    }
            {^-from$} {
                set v [private_valid_address $v -from]
	    }
            default { }
        }
        set mail([string trimleft $sw -]) $v
    }

    return 1
}


# ezsmtp::send --
#
#	See documentation for details.
#
# Arguments:
#	args		Options parsed by the procedure.
# Results:
#	Throws an error if anything goes wrong.
#
proc ::ezsmtp::send {args} {
    global errorInfo errorCode
    variable mail

    # Set defaults for the current send based on global variables
    foreach v [list mailhost port from batchsize tclcharset mimecharset] {
        set cur($v) [set mail($v)]
    }

    # Start with an empty recipient list and return-receipt disabled
    set cur(rcpt) {}
    set cur(receipt) 0

    # process arguments to smtp::send.
    set validopts [list -subject -from -mailhost -port -channel -body \
            -batchsize]
    set argc [llength $args]
    for {set i 0} {$i < $argc} {incr i} {
        set arg [lindex $args $i]
        switch -regexp -- $arg {
            {^-headers$} {
                incr i; set arg [lindex $args $i]
                if {[llength $arg] % 2} {
                    error "Invalid -headers.  Must be a well-formatted list\
                            of even length with alternating keys/values."
                }
                foreach {k v} $arg { private_add_header cur $k $v }
            }
            {^-(to|cc|bcc|tolist|cclist|bcclist|replyto|replytolist)$} {
                incr i
                set recip [lindex $args $i]
                private_add_recip cur [string trimleft $arg -] $recip
            }
            {^-receipt$} {
                incr i
                private_return_receipt cur [lindex $args $i]
            }
            {^-charset$} {
                incr i
                private_set_charset cur [lindex $args $i]
            }
	    {^-} {
                if {[lsearch $validopts $arg] == -1} {
                    error "Unknown option: $arg.  Must be one of: -headers\
                            -to -cc -bcc -tolist -cclist -bcclist -replyto\
                            -replytolist $validopts"
		}
                incr i
                set cur([string trimleft $arg -]) [lindex $args $i]
            }
            default {
                break
            }
        }
    }

    # Throw an error on any remaining arguments.  Older versions (< 1.0)
    # allowed addresses to be specified after the last arg...
    if {$i < [llength $args]} {
        error "Unknown argument(s): [lrange $args $i [expr\
                {[llength $args]-1}]].  Please read the docs about\
                ezsmtp::send -to/-cc/-bcc/-tolist/-cclist/-bcclist."
    }

    # Make sure we have at least one recipient.
    if {[llength $cur(rcpt)] < 1} {
        error "Missing RECIPIENTs.  Must be: ...send ?options?\
                ?RECIPIENT? ?RECIPIENT...?"
    }

    # Make sure we have a from address and header configured
    set cur(from) [string trim $cur(from)]
    if {![string length $cur(from)]} {
        error "no from address has been specified (length=0)"
    }
    if {![info exists cur(from:)]} {private_add_header cur from $cur(from)}
    set cur(from) [private_valid_address $cur(from) -from]

    # Make sure we have either -channel or -body specified.
    if {[info exists cur(channel)] && [info exists cur(body)]} {
        error "Cannot specify both -channel and -body options."
    } elseif {!([info exists cur(channel)] || [info exists cur(body)])} {
        error "Must specify either -channel or -body option."
    }

    # Open a socket to the SMTP server and send the message, catching any
    # errors to ensure the socket gets closed.  Rethrow error after close.
    set s [socket $cur(mailhost) $cur(port)]
    if {[catch [list private_smtp_begin $s cur] msg]} {
        set tmp_EI $::errorInfo; set tmp_EC $::errorCode
        private_log 9 "errorCode=$tmp_EC errorInfo=$tmp_EI"
        catch [list close $s]
        error $msg $tmp_EI $tmp_EC
    }
    catch [list close $s]
    return $msg
}



#############################################################################
##
## PRIVATE PROCS - SUBJECT TO RADICAL CHANGE ON THE SLIGHTEST WHIM.
##
#############################################################################


# ezsmtp::private_add_header --
#
#	Validate and add a single header to the list of email headers to be 
#	sent before the message.
#
# Arguments:
#	var		Variable name for associative array in the calling 
#			proc containing the specification for this send.
#	key		An RFC822-compliant header name without the trailing
#			colon.  Example: Reply-To
#	value		Value to be sent for the above header name.  Multi-line
#			headers may be specified using newline (\n) separators.
# Results:
#	Throws an error if anything goes wrong.
#
proc ::ezsmtp::private_add_header {var key value} {
    upvar 1 $var cur
    variable mail

    # Force the header name to lower case and ensure RFC compliance.
    set key [string tolower $key]
    if {[regexp "\[\x01-\x20\x7F-\xFF:\]" $key]} {
        error "Invalid header name ($key).  RFC 822 stipulates ASCII\
                Characters excluding CTRL characters, space, and `:'"
    }

    # split value into lines, trimming leading and trailing space.
    set vall {}
    foreach ln [split $value \n] {
        set ln [string trim $ln]
        if {[string length $ln] > 65} {
            private_log 2 "Header $key contains line longer than 65\
                    chars:\n$ln"
        }
        lappend vall $ln
    }
    
    # set in the current send session's array by appending colon to key.
    private_log 6 "Header $key=[join $vall "\n\t"]"
    set cur([set key]:) $vall
}


# ezsmtp::private_set_charset --
#
#	Validate and set the Tcl socket encoding and default MIME charset 
#	for this send.
#
# Arguments:
#	var		Variable name for associative array in the calling 
#			proc containing the specification for this send.
#	value		A Tcl list with either 1 or 2 elements, per the
#			docs for ezsmtp::send -charset
# Results:
#	Throws an error if anything goes wrong.
#
proc ::ezsmtp::private_set_charset {var value} {
    upvar 1 $var cur
    global tcl_version

    if {$tcl_version < 8.1} {
        error "Cannot specify -charset running in Tcl versions < 8.1"
    }

    if {[llength $value] == 1} {
        set cstcl [string tolower [lindex $value 0]]
        if {[string compare $cstcl ascii] == 0} {
            set csmime us-ascii
	} else {
            set csmime $cstcl
	}
    } elseif {[llength $value] == 2} {
        set cstcl [string tolower [lindex $value 0]]
        set csmime [string tolower [lindex $value 1]]
    } else {
        error "-charset value must be a Tcl list with either one or two\
                elements"
    }
    if {[lsearch -exact [encoding names] $cstcl] == -1} {
        error "charset $cstcl is not a valid Tcl encoding"
    }
    set cur(mimecharset) $csmime
    set cur(tclcharset) $cstcl
}


# ezsmtp::private_add_recip --
#
#	Add a single or list of recipients/respondants as either `To:', 
#	`Cc:', Bcc, or `Reply-To:' addresses.
#
# Arguments:
#	var		Variable name for associative array in the calling 
#			proc containing the specification for this send.
#	type		One of to, cc, bcc, replyto, tolist, cclist, bcclist,
#			or replytolist.
#	value		If the `type' specified is one of tolist, cclist, 
#			bcclist, or replytolist this must be a well-formed Tcl
#			list of addresses.  If the `type' specified is one of
#			to, cc, bcc, or replyto this must be a single email 
#			address to add.
# Results:
#	Throws an error if anything goes wrong.
#
proc ::ezsmtp::private_add_recip {var type value} {
    upvar 1 $var cur
    variable mail
    set rcpt_added 0
    set is_replyto 0
    set is_bcc 0

    # decide whether "value" is a list or a single-element address 
    # based on whether the type ends in "list".  If it ends in "list", 
    # strip that off the end.  If no recipients, return immediately.
    if {[string match *list $type]} {
        set reciplist $value
        regsub {list$} $type {} type
    } else {
        set reciplist [list $value]
    }
    if {[llength $reciplist] < 1} {
        return $rcpt_added
    }

    # At this point $type will be "bcc", "to", "cc", or "replyto".
    # Determine which header variable we will be affecting and make
    # sure it exists, skipping bcc.  "replyto" should be "reply-to" in
    # the headers, so we switch it here.
    if {[string compare $type bcc] == 0} {
        set is_bcc 1
    } elseif {[string compare $type replyto] == 0} {
        set is_replyto 1
        set type reply-to
    }
    if {!$is_bcc} {
        set headvar "cur([set type]:)"
        if {[info exists $headvar]} {
            set curlist [set $headvar]
        } else {
            set curlist {}
        }

        # If current stuff in header and we need to add more to the header,
        # make sure the last element ends with a comma (,).
        if {([llength $curlist] > 0) && ([llength $reciplist] > 0)} {
            set idxend [expr {[llength $curlist]-1}]
            set lastelem [lindex $curlist $idxend]
            append lastelem ","
            set curlist [lreplace $curlist $idxend $idxend $lastelem]
        }
    }

    # Loop through all the addresses passed to this proc
    foreach addr $reciplist {
        set addr [string trim $addr]
        if {![string length $addr]} {
            private_log 1 "WARNING: empty address ignored"
            continue
        }

        # Add the address to `To:', `Cc:', and `Reply-To:' headers verbatim.
        if {!$is_bcc} { lappend curlist "$addr," }

        # Do fussy-validation on the recipient address before adding to rcpt's
        set addr [private_valid_address $addr -$type]

        # Add all but Reply-To addresses to the recipient list
        if {!$is_replyto} {
            lappend cur(rcpt) $addr
	}

        incr rcpt_added
    }

    # Nuke any trailing comma in To:/Cc:/Reply-To: header var's, 
    # then and set header var.
    if {!$is_bcc} {
        if {[llength $curlist] > 0} {
            set idxend [expr {[llength $curlist]-1}]
            set lastelem [string trimright [lindex $curlist $idxend] ,]
            set curlist [lreplace $curlist $idxend $idxend $lastelem]
        }
        set $headvar $curlist
    }

    # Return number of addresses added
    set rcpt_added
}


# ezsmtp::private_return_receipt --
#
#	Sets the return-receipt behavior of this send.  See the docs
#	for ezsmtp::send -receipt to describe the arglist argument.
#
# Arguments:
#	var		Variable name for associative array in the calling 
#			proc containing the specification for this send.
#	arglist		May be either a single boolean element or a key/value
#			list of return-receipt settings, per the docs.
# Results:
#	Throws an error if anything goes wrong.
#
proc ::ezsmtp::private_return_receipt {var arglist} {
    upvar 1 $var cur

    # List of valid keys for -receipt list options
    set validopts [list delivery delay nsmail returnfull envelopeid]

    # Set receipt off and array values to default settings.
    array set cur [list receipt 0 receipt,delivery 1 receipt,delay 1 \
            receipt,nsmail 0 receipt,returnfull 0 receipt,envelopeid {}]

    # Single-argument to -receipt should be a boolean on/off for defaults.
    if {[llength $arglist] == 1} {
        set cur(receipt) [expr {[lindex $arglist 0] ? 1 : 0}]
        return
    }

    # Otherwise, we have a list of arguments that must be validated & set.
    # First, make sure the argument list has a valid length...
    if {([llength $arglist] < 2) || ([llength $arglist] % 2)} {
        error "ERROR: keyvaluelist passed to ezsmtp::send -receipt must have\
                an even number of elements and a length of at least 2 elements"
    }

    # And validate each setting, setting appropriate current-send variable.
    foreach {k v} $arglist {
        switch -exact -- $k {
            envelopeid {
                if {[string length [set v [private_xtext $v]]] > 38} {
                    error "ERROR: encoded envelope ID ($v) is too long.  Must\
                            be < 38 chars encoded."
		}
                set cur(receipt,$k) $v
	    }
            default {
                if {[lsearch -exact $validopts $k] == -1} {
                    error "ERROR: bad setting for -receipt key.  Must be 1 of:\
                             [join $validopts { }]"
		}
                set cur(receipt,$k) [expr {$v ? 1 : 0}]
	    }
	}
    }
    set cur(receipt) 1
}


# ezsmtp::private_smtp_begin --
#
#	Start the send by trying EHLO/HELO greeting followed by one or more
#	SMTP conversations, optionally batching some number of recipients.
#
# Arguments:
#	s		Open socket to SMTP server.
#	var		Variable name for associative array in the calling 
#			proc containing the specification for this send.
# Results:
#	Throws an error if anything goes wrong.
#
proc ::ezsmtp::private_smtp_begin {s var} {
    upvar 1 $var cur
    global tcl_version
    variable mail

    # Set up the socket for line-buffering/translation.  Only set encoding
    # if we're running in Tcl 8.1 or newer that supports encodings.
    if {$tcl_version < 8.1} {
        fconfigure $s -buffering line -blocking 1 -eofchar {} \
                -translation {auto crlf}
    } else {
        fconfigure $s -buffering line -blocking 1 -eofchar {} \
                -translation {auto crlf} -encoding $cur(tclcharset)
    }
    private_log 2 "Opened connection to SMTP server $cur(mailhost)"
    private_read_all $s 3 220

    # Try to set up for ESMTP conversation
    set cur(esmtp) 0
    private_send_line $s 3 "EHLO [info hostname]"
    set buf [private_read_all $s 3 {[0-9][0-9][0-9]}]
    if {[string match "250*" $buf]} {
        set cur(esmtp) 1
        set buf [split $buf \n]
        foreach ln [lrange $buf 1 [expr {[llength $buf]-1}]] {
            if {[regexp -nocase \
		    "^250\[ -\](\[A-Z0-9\]\[A-Z0-9-\]*) (\[^\x01-\x20\x7F\])"\
                    $ln nil ehlo_keyword ehlo_param]} {
                set ehlo_keyword [string tolower $ehlo_keyword]
                set ehlo_param [string tolower $ehlo_param]
                set cur(esmtp,$ehlo_keyword) $ehlo_param
	    } elseif {[regexp -nocase "^250\[ -\](\[A-Z0-9\]\[A-Z0-9-\]*)" \
                    $ln nil ehlo_keyword]} {
                set ehlo_keyword [string tolower $ehlo_keyword]
                set cur(esmtp,$ehlo_keyword) 1
	    }
	}
    } else {
        # Otherwise, set up for normal RFC-821 SMTP conversation.
        private_send_line $s 3 "HELO [info hostname]"
        private_read_all $s 3 250
    }

    # If user requested return-receipt but not supported by server, bail.
    if {$cur(receipt) && ![info exists cur(esmtp,dsn)]} {
        error "ERROR: Server does not support DSN for return receipt"
    }

    # If user requested 8bit charset but not supported by server, bail.
    if {([string compare $cur(tclcharset) ascii] != 0) && \
            ![info exists cur(esmtp,8bitmime)]} {
        error "Server does not support 8-bit characters"
    }

    # If we are not doing any batching, do a straightforward send
    set sentcnt 0
    set rcptlen [llength $cur(rcpt)]
    if {($cur(batchsize) <= 0) || ($rcptlen <= $cur(batchsize))} {
        private_log 1 "Starting mail send to [join $cur(rcpt) {, }]"
        private_smtp_batch $s cur 0 [expr {$rcptlen-1}]
        incr sentcnt $rcptlen
        private_log 1 "Mail sent OK"
        return $sentcnt
    }

    # If we are batching sends and reading message body from a channel,
    # find out what position we are in the channel if we are sending to
    # more addr's than our batch size, to allow multiple send batches.
    if {[info exists cur(channel)] && [info exists cur(batchsize)]} {
        set cur(channelpos) [tell $cur(channel)]
        if {($cur(channelpos) == -1) && ($cur(batchsize) > 0)} {
            error "Channel must be seek-able when a batch size has been\
                    specified."
	}
    }

    # Loop through the batches of recipients
    set i 0
    while {$i < $rcptlen} {
        set e [expr {$i+$cur(batchsize)-1}]
        if {$e >= $rcptlen} {
            set e [expr {$rcptlen-1}] 
        }
        private_log 1 "Starting mail send for recipients $i to $e:\n \
                [join [lrange $cur(rcpt) $i $e] "\n  "]"
        private_smtp_batch $s cur $i $e
        incr sentcnt [expr {$e-$i+1}]
        private_log 1 "Mail sent OK"

        # If we need to, send server a reset and rewind the channel position.
        if {($e < ($rcptlen-1)) && [info exists cur(channelpos)]} {
            seek $cur(channelpos)
        }

        set i [expr {$e + 1}]
    }

    # Return the count of unique recipients
    set sentcnt
}


# ezsmtp::private_smtp_batch --
#
#	Implement the SMTP conversation necessary to send the message
#	to a batch of recipients.  This proc works off a subset of the
#	cur(rcpt) array of recipient email addresses specified by the
#	rcptstart and rcptend arguments.
#
# Arguments:
#	s		Open socket to SMTP server.
#	var		Variable name for associative array in the calling 
#			proc containing the specification for this send.
#	rcptstart	index in the cur(rcpt) array to start
#	rcptend		index in the cur(rcpt) array to end
# Results:
#	Throws an error if anything goes wrong.
#
proc ::ezsmtp::private_smtp_batch {s var rcptstart rcptend} {
    upvar 1 $var cur
    variable mail

    # Reset the SMTP server's state to begin a new conversation
    private_send_line $s 3 "RSET"
    private_read_all $s 3

    # Try to build a valid "MAIL FROM:" command, including return-receipt info
    set cmd "MAIL FROM:<$cur(from)>"
    if {$cur(receipt)} {
        if {$cur(receipt,returnfull)} {append cmd " RET=FULL"} \
        else {append cmd " RET=HDRS"}
        if {[string length $cur(receipt,envelopeid)]} {
            append cmd " ENVID=" $cur(receipt,envelopeid)
	}
    }
    private_send_line $s 3 $cmd
    private_read_all $s 3

    # Build up our `NOTIFY=' extension if necessary
    set notifystr {}
    if {$cur(receipt)} {
        set notifyl [list FAILURE]
        if {$cur(receipt,delivery)} { lappend notifyl SUCCESS }
        if {$cur(receipt,delay)}    { lappend notifyl DELAY }
        append notifystr " NOTIFY=" [join $notifyl ,]
    }

    # Each recipent may be specified as "emailaddr" or "Full Name <emailaddr>"
    set rcptlist [lrange $cur(rcpt) $rcptstart $rcptend]
    foreach r $rcptlist {
        if {$cur(receipt)} {
            set orcptstr " ORCPT=rfc822;[private_xtext $r]"
            private_send_line $s 3 "RCPT TO:<$r>${notifystr}${orcptstr}"
	} else {
            private_send_line $s 3 "RCPT TO:<$r>"
	}
        private_read_all $s 3 {25[01]}
    }

    private_send_line $s 3 "DATA"
    private_read_all $s 3 354

    # Send all the mail headers followed by a blank line
    private_send_mail_headers $s cur

    private_log 4 ">>\[message body\]"
    # If we were given a -body in the send command, split into lines and send,
    # ensuring that we strip any stray CR's.
    if {[info exists cur(body)]} {
        set linenum 0
        regsub -all "\r" $cur(body) {} cur(body)
        foreach line [split $cur(body) \n] {
            incr linenum

            # Force breaks at 998 chars to comply with RFC 821 limit.
            while {[string length $line] > 998} {
                private_log 1 "WARNING: >998 chars split at line $linenum"
                set first998 [string range $line 0 997]
                set line [string range 998 [expr \
                        {[string length $line]-1}]]
                if {[string match ".*" $first998]} {
                    set first998 ".$first998"
                }
                private_send_line $s 5 $first998
	    }

            # Send remainder <= 998 chars.
            if {[string match ".*" $line]} {          ;# Double up leading '.'
                set line ".$line"
            }
            private_send_line $s 5 $line
	}
    }

    # If we were given a -channel in the send command, read from the channel
    # one line at a time and send.  Assuming channel configured to strip CRs.
    if {[info exists cur(channel)]} {
        set linenum 0
        while {[gets $cur(channel) line] != -1} {
            incr linenum

            # Force breaks at 998 chars to comply with RFC 821 limit.
            while {[string length $line] > 998} {
                private_log 1 "WARNING: >998 chars split at line $linenum"
                set first998 [string range $line 0 997]
                set line [string range 998 [expr \
                        {[string length $line]-1}]]
                if {[string match ".*" $first998]} {
                    set first998 ".$first998"
                }
                private_send_line $s 5 $first998
	    }

            # Send remainder <= 998 chars.
            if {[string match ".*" $line]} {          ;# Double up leading '.'
                set line ".$line"
            }
            private_send_line $s 5 $line
        }
    }

    # Finally, send the message terminator and read any result.
    private_send_line $s 4 "."
    private_read_all $s 3
}


# ezsmtp::private_send_mail_headers --
#
#	Output all the available email headers at the beginning of the 
#	message, followed by a single empty line.
#
# Arguments:
#	s		Open socket to SMTP server.
#	var		Variable name for associative array in the calling 
#			proc containing the specification for this send.
# Results:
#	Throws an error if anything goes wrong.
#
proc ::ezsmtp::private_send_mail_headers {s var} {
    upvar 1 $var cur
    variable mail

    set doNotSend [list date: subject: from: bcc: content-type: \
            content-transfer-encoding:]

    # If user didn't force a custom date, use the current time in GMT.
    set frm "%a, %d %b %Y %H:%M:%S +0000"
    if {[info exists cur(date:)]} {
        private_send_header $s date: $cur(date:)
    } else {
        private_send_line $s 4 "Date: [clock format [clock seconds] -gmt 1 \
                -format $frm]"
    }

    # If user didn't specify a custom "From:" header, use the one specified
    # by -from parameter or system default.
    if {[info exists cur(from:)]} {
        private_send_header $s from: $cur(from:)
    } else {
        private_send_line $s 4 "From: $cur(from)"
    }

    # Send -subject parameter if specified, or from Subject: custom header.
    if {[info exists cur(subject)]} {
        private_send_line $s 4 "Subject: $cur(subject)"
    } elseif {[info exists cur(subject:)]} {
        private_send_header $s subject: $cur(subject:)
    }

    # Send the required MIME content-type and content-transfer-encoding.
    if {[info exists cur(content-type:)]} {
        private_send_header $s content-type: $cur(content-type:)
    } else {
        private_send_line $s 4 "Content-Type: text/plain;\
                charset=$cur(mimecharset)"
    }
    if {[info exists cur(content-transfer-encoding:)]} {
        private_send_header $s content-transfer-encoding: \
                $cur(content-transfer-encoding:)
    } elseif {[string compare $cur(tclcharset) ascii] == 0} {
        private_send_line $s 4 "Content-Transfer-Encoding: 7bit"
    } else {
        private_send_line $s 4 "Content-Transfer-Encoding: 8bit"
    }

    # Send the custom headers for this current session.
    foreach h [array names cur *:] {
        if {[lsearch $doNotSend $h] != -1} continue
        private_send_header $s $h $cur($h)
    }

    # Send our global headers IFF they are not excluded or custom to 
    # the current sending session.
    foreach h [array names mail *:] {
        if {[lsearch $doNotSend $h] != -1} continue
        if {[info exists cur($h)]} continue
        private_send_header $s $h $mail($h)
    }

    # Check to see if the user requested netscape-style return-receipt on open
    if {$cur(receipt)} {
        if {$cur(receipt,nsmail) && \
                ![info exists cur(disposition-notification-to:)]} {
            private_send_line $s 4 "Disposition-Notification-To: $cur(from)"
	}
    }

    private_send_line $s 4 ""
}


# ezsmtp::private_send_header --
#
#	Sends a header (possibly multi-line) to the SMTP server socket, 
#	formatting the header in proper-text and indenting subsequent
#	lines with a single tab.
#
# Arguments:
#	s		Open socket to SMTP server.
#	name		Name of the header being sent w/trailing colon,
#			like reply-to:
#	valuel		value of header as a list -- one line per list
#			element.
# Results:
#	Header is formatted and output.  Returns number of lines output.
#
proc ::ezsmtp::private_send_header {s name valuel} {
    set lines 0
    set first [lindex $valuel 0]
    set remain [lrange $valuel 1 [expr {[llength $valuel]-1}]]
    private_send_line $s 4 "[private_proper_header $name] $first"
    incr lines
    foreach ln $remain {
        private_send_line $s 4 "\t$ln"
        incr lines
    }
    set lines
}
       

# ezsmtp::private_send_line --
#
#	Sends a line of text to the SMTP server socket, logging at the
#	specified level.
#
# Arguments:
#	s		Open socket to SMTP server.
#	level		Log level between 0 and 9, where 0 is always,
#			1 is whenever -verbose is on, and 9 is the highest
#			debug level available.  Suggested: 4
#	line		Line of text to be sent to the SMTP server, minus
#			any trailing newline or carriage-return characters.
# Results:
#	Closes socket $s and un-sets buffer and status variables.
#
proc ::ezsmtp::private_send_line {s level line} {
    private_log $level "S: $line"
    puts $s $line
    flush $s
}


# ezsmtp::private_read_all --
#
#	Read all available data from the SMTP server socket, handling
#	multi-line responses if necessary, and checking  for a response 
#	code.
#
# Arguments:
#	s		Open socket to SMTP server.
#	level		log level for data read from the socket.
#	resp		glob-style expression to match against the start of
#			data received from the SMTP server.  If left un-
#			specified, the standard 250 (OK) is expected.
# Results:
#	Throws an error if anything goes wrong or an unexpected response 
#	is seen.  Otherwise, returns the data read from the server, with
#	multi-line responses separated by newline (\n) characters.
#
proc ::ezsmtp::private_read_all {s level {resp 250}} {
    variable mail

    # Read response from SMTP server.  Single line or last line of multi-line
    # response will have three digits followed by a space.  Other multi-line
    # responses will have three digits followed by a dash (RFC 821 appendix E).
    # Anything else, including eof, is an error.
    set buf {}
    while {1} {
        if {[eof $s]} {
            error "ERROR: unexpected EOF waiting for output from SMTP server"
        }
        set ln [gets $s]
        append buf $ln \n
        private_log $level "R: $ln"
        if {[string match {[0-9][0-9][0-9] *} $ln]} {
            break
	}
        if {![string match {[0-9][0-9][0-9]-*} $ln]} {
            error "ERROR: unexpected response from SMTP server.  Expected\
                    three digits followed by either a space or a dash (-)"
	}
    }

    # Validate the start of the response
    if {![string match "$resp*" $buf]} {
        error "ERROR: bad response `$buf', wanted: `$resp'"
    }

    # and return the contents of all lines read, separated by newlines.
    set buf
}


# ezsmtp::private_proper_header --
#
#	Proper-cases an RFC 822-style email header name.
#
# Arguments:
#	h		header name like reply-to
# Results:
#	Returns the header name capitalized as most email users 
#	expect: the first letter of each dash-separated word is 
#	capitalized and the remainder is lower-cased, thus the
#	result from above would be Reply-To
#
proc ::ezsmtp::private_proper_header {h} {
    set h [string tolower $h]
    set resl {}

    # RFC 1521 clearly specifies the exact case, verbatim, for mime-version.
    if {[regexp -nocase mime-version: $h]} {
        return "MIME-Version:"
    }

    # For other headers, we capitalize the leading letter of each dash-
    # separated word.
    foreach elem [split $h -] {
        set str [string toupper [string index $elem 0]]
        append str [string range $elem 1 [expr {[string length $elem]-1}]]
        lappend resl $str
    }
    join $resl -
}


# ezsmtp::private_xtext --
#
#	Encode a string as an RFC 1891-compliant xtext value.  Characters 
#	outside the range ! (33) to ~ (126) or the plus (+ (43)) or 
#	equals (= (61)) characters are coded as the plus sign (+) followed
#	by two upper-case hexadecimal digits representing the character code.
#
# Arguments:
#	str		string to be encoded
# Results:
#	xtext-encoded value of str, per the above spec.
#
proc ::ezsmtp::private_xtext {str} {
    set result {}
    foreach c [split $str {}] {
        scan $c %c x
        if {($x < 33) || ($x > 126) || ($x == 43) || ($x == 61)} {
            append result + [format %02X $x]
        } else {
            append result $c
	}
    }
    set result
}


# ezsmtp::private_valid_address --
#
#	Validate and return the essential part of an email address,
#	using the contents of <addr> inside a `Full Name <addr>' spec.
#
# Arguments:
#	addrspec	address spec like `user@a.com' or
#			`Full Name <user@b.com>'
#	setting		setting to be output in an error message, like
#			-from, -to, ...
# Results:
#	stripped-down email address, if valid.  If invalid, an error is 
#	thrown.
#
proc ::ezsmtp::private_valid_address {addrspec setting} {
    variable mail

    set addrspec [string trim $addrspec]
    if {[regexp {<([^>]*)>$} $addrspec nil inneraddr]} {
        set addrspec [string trim $inneraddr]
    }
    if {$mail(strictaddr)} {set re $mail(strictre)} \
    else {set re $mail(!strictre)}
    if {![regexp $re $addrspec]} {
        error "ERROR: $setting address specified ($addrspec) is not compliant.\
                Must be in a form like `user@a.domain' or `Full Name\
                <user@b.domain>'"
    }
    set addrspec
}


# ezsmtp::private_log --
#
#	Log a progress/debug message to stdout or to a user-customized 
#	procedure.
#
# Arguments:
#	level		numeric level at which to log, usu. between 0 (always)
#			and 9 (low-level full debug).
#	msg		message text to log
# Results:
#	xtext-encoded value of str, per the above spec.
#
proc ::ezsmtp::private_log {level msg} {
    variable mail

    if {$mail(verbose) >= $level} {
        if {[string length $mail(logproc)]} {
            uplevel #0 $mail(logproc) $msg
	} else {
            puts stdout "$msg"
            flush stdout
	}
    }
}
###
### tools/email.tcl: part of Scid.
### Copyright (C) 1999-2003  Shane Hudson.
###

# Email manager window: closed by default
set emailWin 0


# ::tools::email
#
#   Opens the email chess manager window, for sending moves to opponents.
#
proc ::tools::email {} {
  global emailWin emailData
  set w .emailWin
  if {[winfo exists $w]} {
    destroy .emailWin
    set emailWin 0
    return
  }
  set emailWin 1
  toplevel $w
  wm title $w "Scid: Email Manager"
  wm minsize $w 25 10

  bind $w <Destroy> { set .emailWin 0 }
  bind $w <F1> { helpWindow Email }

  frame $w.f
  frame $w.b
  pack $w.f -side left -fill y
  addVerticalRule $w
  pack $w.b -side right -fill y

  set f $w.f
  label $f.title -text "Opponent list" -font font_Bold
  listbox $f.list -height 16 -width 40 -exportselection false \
    -selectmode browse -selectbackground lightBlue -font font_Fixed \
    -yscrollcommand "$f.scroll set" -background white -setgrid 1
  scrollbar $f.scroll -command "$w.list yview" -takefocus 0
  pack $f -side left -expand true -fill both
  pack $f.title -side top
  pack $f.scroll -side right -fill y
  pack $f.list -side right -expand true -fill both

  bind $f.list <ButtonRelease-1> ::tools::email::refreshButtons
  bind $f.list <Enter> ::tools::email::refreshButtons
  bind $f.list <Key-Up> ::tools::email::refreshButtons
  bind $f.list <Key-Down> ::tools::email::refreshButtons

  bind $f.list <Key-a> {.emailWin.b.add invoke}
  bind $f.list <Key-e> {.emailWin.b.edit invoke}
  bind $f.list <Key-d> {.emailWin.b.delete invoke}
  bind $f.list <Key-l> {.emailWin.b.load invoke}
  bind $f.list <Key-s> {.emailWin.b.send invoke}
  bind $f.list <Key-t> {.emailWin.b.time.m post [winfo pointerx .] [winfo pointery .]}

  set b .emailWin.b

  button $b.add -text "Add..." -underline 0 -command {
    set idx [llength $emailData]
    lappend emailData [list "" "" "" "" ""]
    modifyEmailDetails $idx
    ::tools::email::refresh
  }

  button $b.edit -text "Edit..." -underline 0 -command ::tools::email::EditButton
  button $b.delete -text "Delete..." -underline 0 -command ::tools::email::DeleteButton
  button $b.load -text "Load game" -underline 0 -command ::tools::email::LoadButton
  button $b.send -text "Send email..." -underline 0 -command ::tools::email::SendButton
  menubutton $b.time -text "Time" -underline 0 -indicatoron 1 \
    -menu $b.time.m -relief raised
  menu $b.time.m
  $b.time.m add command -label "Received today" -underline 0 \
    -command {::tools::email::TimesButton r}
  $b.time.m add command -label "Sent today" -underline 0 \
    -command {::tools::email::TimesButton s}
  $b.time.m add command -label "Edit..." -underline 0 \
    -command {::tools::email::TimesButton e}

  button $b.config -text "Settings..." -command ::tools::email::config
  button $b.help -text $::tr(Help) -command { helpWindow Email }
  button $b.close -text $::tr(Close) -command { destroy .emailWin }

  foreach i {add edit delete load send time config help close} {
    $b.$i configure -font font_Small
  }
  pack $b.add $b.edit $b.delete $b.load $b.send $b.time \
    -side top -pady 1 -padx 5 -fill x
  pack $b.close $b.help $b.config -side bottom -pady 1 -padx 5  -fill x

  bind $w <Destroy> { set emailWin 0 }
  set emailData [::tools::email::readOpponentFile]
  focus $w.f.list
  ::tools::email::refresh
}

proc ::tools::email::config {} {
  global email
  set w .emailConfig
  toplevel $w
  wm title $w "Scid"
  label $w.use -text "Send email using:" -font font_Bold
  frame $w.smtp
  radiobutton $w.smtp.b -text "SMTP server:" -variable email(smtp) -value 1
  entry $w.smtp.s -width 30 -textvar email(server) -bg white
  frame $w.sm
  radiobutton $w.sm.b -text "sendmail process:" -variable email(smtp) -value 0
  entry $w.sm.s -width 30 -textvar email(smproc) -bg white
  pack $w.use -side top
  pack $w.smtp $w.sm -side top -fill x
  pack $w.smtp.s $w.smtp.b -side right
  pack $w.sm.s $w.sm.b -side right
  addHorizontalRule $w
  label $w.addr -text "Email address fields:" -font font_Bold
  frame $w.from
  label $w.from.lab -text "From:"
  entry $w.from.e -textvar email(from) -width 30 -bg white
  frame $w.bcc
  label $w.bcc.lab -text "Bcc:"
  entry $w.bcc.e -textvar email(bcc) -width 30 -bg white
  pack $w.addr $w.from $w.bcc -side top -fill x
  pack $w.from.e $w.from.lab -side right
  pack $w.bcc.e $w.bcc.lab -side right
  addHorizontalRule $w
  pack [frame $w.b] -side top -fill x
  button $w.b.ok -text [tr OptionsSave] -command {
    .menu.options invoke [tr OptionsSave]
    catch {grab release .emailConfig}
    destroy .emailConfig
  }
  button $w.b.cancel -text $::tr(Cancel) \
    -command "catch {grab release $w}; destroy $w"
  pack $w.b.cancel $w.b.ok -side right -padx 2 -pady 2
  wm resizable $w 1 0
  catch {grab $w}
}

proc ::tools::email::EditButton {} {
  global emailData
  set sel [.emailWin.f.list curselection]
  if {[llength $sel] == 1} {
    set idx [lindex $sel 0]
    if {[llength $emailData] > $idx} {
      modifyEmailDetails $idx
    }
  }
  ::tools::email::refresh
}

proc ::tools::email::DeleteButton {} {
  global emailData
  set sel [.emailWin.f.list curselection]
  if {[llength $sel] != 1} { return }
  set idx [lindex $sel 0]
  if {[llength $emailData] <= $idx} { return }
  set confirm [tk_messageBox -icon question -type yesno -default yes \
                 -parent .emailWin -title "Really delete opponent?" \
                 -message "Do you really want to delete this opponent?"]
  if {$confirm == "yes"} {
      set emailData [lreplace $emailData $idx $idx]
    ::tools::email::writeOpponentFile $emailData
    ::tools::email::refresh
  }
}

proc ::tools::email::LoadButton {} {
  global emailData
  set sel [.emailWin.f.list curselection]
  if {[llength $sel] != 1} { return }
  set idx [lindex $sel 0]
  if {[llength $emailData] <= $idx} { return }
  set details [lindex $emailData $idx]
  if {[llength [lindex $details 3]] > 0} {
    if {[catch {::game::Load [lindex [lindex $details 3] 0]} result]} {
      tk_messageBox -type ok -icon warning -title "Scid" -message $result
    } else {
      sc_move end
    }
  }
}

proc ::tools::email::SendButton {} {
  global emailData
  set sel [.emailWin.f.list curselection]
  if {[llength $sel] != 1} { return }
  set idx [lindex $sel 0]
  if {[llength $emailData] <= $idx} { return }
  set details [lindex $emailData $idx]
  emailMessageEditor $idx [lindex $details 0] [lindex $details 1] \
    [lindex $details 2] [lindex $details 3] [lindex $details 4]
}

set emailTimesIdx 0

proc ::tools::email::TimesButton {type} {
  global emailData emailTimesIdx
  set sel [.emailWin.f.list curselection]
  if {[llength $sel] != 1} { return }
  set idx [lindex $sel 0]
  if {[llength $emailData] <= $idx} { return }
  set details [lindex $emailData $idx]
  while {[llength $details] < 6} { lappend details {} }
  set timeList [lindex $details 5]
  set last [lindex $timeList end]

  if {$type == "r"  || $type == "s"} {
    ::tools::email::addSentReceived $idx $type
    return
  }

  set emailTimesIdx $idx
  set w .emailTimesWin
  if {[winfo exists $w]} { return }
  toplevel $w
  wm title $w "Scid: Email Times"
  label $w.title -text "Email Times for [lindex $details 0]"
  frame $w.t
  text $w.t.text -height 15 -width 30 -font font_Fixed -setgrid 1 \
    -yscrollcommand "$w.t.ybar set" -bg white -fg black
  scrollbar $w.t.ybar -command "$w.t.text yview"
  frame $w.b
  button $w.b.ok -text "OK" -command {
    set details [lindex $emailData $emailTimesIdx]
    set timeList [split [string trim [.emailTimesWin.t.text get 1.0 end]] "\n"]
    set details [lreplace $details 5 5 $timeList]
    set emailData [lreplace $emailData $emailTimesIdx $emailTimesIdx $details]
    ::tools::email::writeOpponentFile $emailData
    grab release .emailTimesWin
    ::tools::email::refresh 0
    catch {focus .emailWin}
    destroy .emailTimesWin
  }
  button $w.b.cancel -text $::tr(Cancel) \
    -command "grab release $w; catch {focus .emailWin}; destroy $w"
  pack $w.title -side top -fill x
  pack $w.t -side top -fill both
  pack $w.t.ybar -side right -fill y
  pack $w.t.text -side left -fill both -expand yes
  pack $w.b -side bottom -fill x
  pack $w.b.cancel $w.b.ok -side right -padx 2 -pady 2
  foreach i $timeList {
    $w.t.text insert end "$i\n"
  }
  grab $w
}

proc ::tools::email::addSentReceived {idx type} {
  global emailData
  if {[llength $emailData] <= $idx} { return }
  set details [lindex $emailData $idx]
  while {[llength $details] < 6} { lappend details {} }
  set timeList [lindex $details 5]
  set last [lindex $timeList end]

  set new ""
  if {$type == "r"} { append new "Received " } else { append new "Sent     " }

  set oppGList [lindex $details 3]
  if {[llength $oppGList] > 0} {
    set oppGNum [lindex $oppGList 0]
    sc_game push
    set mnum "     "
    if {[catch {::game::Load $oppGNum}]} {
    } else {
      sc_move end
      set m [llength [split [sc_game moves coord list]]]
      if {$m > 0} {
        set m [expr int(($m+1)/2)]
        set mnum [format "%3d  " $m]
      }
    }
    sc_game pop
    append new $mnum
  }
  append new [::utils::date::today]
  if {! [string compare $last $new]} { return }
  lappend timeList $new
  set details [lreplace $details 5 5 $timeList]
  set emailData [lreplace $emailData $idx $idx $details]
  ::tools::email::writeOpponentFile $emailData
  ::tools::email::refresh 0
}

proc ::tools::email::refreshButtons {} {
  set sel [.emailWin.f.list curselection]
  if {[llength $sel] > 0} {
    .emailWin.b.edit configure -state normal
    .emailWin.b.delete configure -state normal
    .emailWin.b.load configure -state normal
    .emailWin.b.send configure -state normal
  } else {
    .emailWin.b.edit configure -state disabled
    .emailWin.b.delete configure -state disabled
    .emailWin.b.load configure -state disabled
    .emailWin.b.send configure -state disabled
  }
}

proc ::tools::email::refresh {{clearSelection 1}} {
  global emailWin emailData
  if {! [winfo exists .emailWin]} { return }
  if {$clearSelection} {
    set sel ""
    .emailWin.f.list selection clear 0 end
  } else {
    set sel [lindex [.emailWin.f.list curselection] 0]
  }
  .emailWin.f.list delete 0 end
  # set emailData [lsort -dictionary -index 0 $emailData]
  foreach i $emailData {
    set name [lindex $i 0]
    set time ""
    if {[llength $i] == 6} {
      set timeList [lindex $i 5]
      set time [lindex $timeList end]
    }
    .emailWin.f.list insert end [format "%-14s %s" $name $time]
  }
  if {$sel != ""} {
    .emailWin.f.list selection set $sel
  }
  ::tools::email::refreshButtons
}

#Initial values for globals:
set emailData {}
set emailData_index 0
set emailData_name ""
set emailData_addr ""
set emailData_subj ""
set emailData_glist ""
set emailData_dates ""
set emailData_helpBar {}
array set ::tools::email::helpBar ""

# Force the game numbers list to be digits and spaces only:
trace variable emailData_glist w {::utils::validate::Regexp {^[0-9\ ]*$}}


# emailCount: counter to give each email window a unique name.
set emailCount 0

# emailMessageEditor:
#    Contsructs the email message to the opponent and
#    creates the editor window for editing and sending the message.
#
proc emailMessageEditor {idx name addr subj gamelist sig} {
  global emailCount emailData email
  incr emailCount
  if {$emailCount >= 10000} { set emailCount 1 }

  set w ".emailMessageWin$emailCount"
  toplevel $w
  wm title $w "Send email to $name"
  set f [frame $w.fields]

  label $f.fromlab -text "From: "
  entry $f.from -background white
  $f.from insert end $email(from)

  label $f.tolab -text "To: "
  entry $f.to -background white
  $f.to insert end $addr

  label $f.subjlab -text "Subject: "
  entry $f.subj -background white
  $f.subj insert end $subj

  label $f.bcclab -text "Bcc: "
  entry $f.bcc -background white
  $f.bcc insert end $email(bcc)

  button $f.send -text "Send" -command "::tools::email::processMessage $w $idx"
  button $f.cancel -text "Cancel" -command "destroy $w"

  grid $f.send -row 0 -column 3 -rowspan 2 -sticky nesw
  grid $f.cancel -row 2 -column 3 -rowspan 2 -sticky nesw
  grid $f.fromlab -row 0 -column 0 -sticky e
  grid $f.from -row 0 -column 1 -sticky ew
  grid $f.tolab -row 1 -column 0 -sticky e
  grid $f.to -row 1 -column 1 -sticky ew
  grid $f.subjlab -row 2 -column 0 -sticky e
  grid $f.subj -row 2 -column 1 -sticky ew
  grid $f.bcclab -row 3 -column 0 -sticky e
  grid $f.bcc -row 3 -column 1 -sticky ew
  grid columnconfigure $f 1 -weight 1

  set f [frame $w.message]
  pack $w.fields -fill x -padx 4 -pady 4
  pack $w.message -expand yes -fill both -padx 4 -pady 4

  scrollbar $f.ybar -command "$f.text yview"
  scrollbar $f.xbar -orient horizontal -command "$f.text xview"
  text $f.text -yscrollcommand "$f.ybar set" -xscrollcommand "$f.xbar set" \
    -setgrid 1 -width 72 -height 20 -background white -wrap none

  grid $f.text -row 0 -column 0 -sticky news
  grid $f.ybar -row 0 -column 1 -sticky news
  grid $f.xbar -row 1 -column 0 -sticky news

  grid rowconfig $w.message 0 -weight 1 -minsize 0
  grid columnconfig $w.message 0 -weight 1 -minsize 0

  # Right-mouse button cut/copy/paste menu:
  menu $f.text.edit -tearoff 0
  $f.text.edit add command -label "Cut" -command "tk_textCut $f.text"
  $f.text.edit add command -label "Copy" -command "tk_textCopy $f.text"
  $f.text.edit add command -label "Paste" -command "tk_textPaste $f.text"
  bind $f.text <ButtonPress-3> "tk_popup $f.text.edit %X %Y"

  set text $w.message.text
  # $text insert end "Hi $name,\n\n"
  $text insert end "\n"
  foreach i $gamelist {
    catch {set gamePgn [sc_game pgn -gameNumber $i -width 70 -tags 0 \
                          -variations 0 -comments 0]}
    $text insert end "$gamePgn\n"
  }
  $text insert end $sig
  return
}

proc ::tools::email::processMessage {w idx} {
  global emailData
  set from [$w.fields.from get]
  set to [$w.fields.to get]
  set subj [$w.fields.subj get]
  set bcc [$w.fields.bcc get]
  set message [$w.message.text get 1.0 end]
  if {[string trim $to] == ""} {
    tk_messageBox -icon error -type ok -title "Empty email address" \
      -message "You must specify an email address."
    return
  }
  set cmd {::tools::email::sendMessage $from $to $subj $bcc $message}
  if {[catch $cmd result] != 0} {
    tk_messageBox -icon error -type ok -title "Error sending email" \
      -message "Error sending email: $result"
  } else {
    ::tools::email::addSentReceived $idx s
    tk_messageBox -icon info -type ok -title "Scid" -message $result
    destroy $w
  }
}

proc ::tools::email::sendMessage {from to subject bcc message} {
  global email

  ### Uncomment following line for testing, to avoid sending email:
  # return "Testing, no email was actually sent"

  set copy_id ""
  catch {set copy_id [open [file nativename $email(logfile)] "a+"]}
  if {$copy_id == ""} {
    return -code error "Unable to open $email(logfile)"
  }
  if {$email(smtp)} {
    set cmdargs "-to {$to} -subject {$subject} "
    if {$email(server) != ""} { ::ezsmtp::config -mailhost $email(server) }
    if {$email(from) != ""} {
      if {[catch {::ezsmtp::config -from $from} result]} {
        close $copy_id
        return -code error "Error configuring SMTP: $result"
      }
      append cmdargs "-from {$from} "
    }
    if {$email(bcc) != ""} {
      append cmdargs "-bcc {$bcc} "
    }
    if {[catch {eval "::ezsmtp::send $cmdargs -body {$message}"} result]} {
      close $copy_id
      return -code error "Error sending mail with SMTP: $result"
    }
  } else {
    if {[catch {open "| $email(smproc) -oi -t" "w"} ::tools::email::id]} {
      close $copy_id
      return -code error "Scid could not find the sendmail program: $email(smproc)"
    }
    if {[string trim $from] != ""} {
      puts $::tools::email::id "From: $from"
    }
    puts $::tools::email::id "To: $to"
    puts $::tools::email::id "Subject: $subject"
    if {[string trim $bcc] != ""} {
      puts $::tools::email::id "Bcc: $bcc"
    }
    puts $::tools::email::id ""
    puts $::tools::email::id $message
    close $::tools::email::id
  }
  puts $copy_id  "To: $to"
  puts $copy_id  "Subject: $subject"
  puts $copy_id  ""
  puts $copy_id $message
  close $copy_id
  return "The email message was sent; a copy was appended to $email(logfile)"
}

proc modifyEmailDetails {i} {
  global emailData emailData_name emailData_addr emailData_glist emailData_subj
  global emailData_sig emailData_index emailData_helpBar ::tools::email::helpBar

  toplevel .emailEditor
  set w .emailEditor
  bind $w <F1> { helpWindow Email }
  set emailData_index $i
  if {[lindex [lindex $emailData $i] 0] == ""} {
    wm title $w "Add opponent details"
  } else {
    wm title $w "Edit opponent details"
  }
  set f [frame $w.name]
  label $f.label -text "Name: "
  entry $f.entry -width 30 -background white -textvariable emailData_name
  set ::tools::email::helpBar(name) "Enter the opponent's name"

  set f [frame $w.addr]
  label $f.label -text "Email address: "
  entry $f.entry -width 30 -background white -textvariable emailData_addr
  set ::tools::email::helpBar(addr) "Enter the opponent's email address"

  set f [frame $w.subj]
  label $f.label -text "Subject: "
  entry $f.entry -width 30 -background white -textvariable emailData_subj
  set ::tools::email::helpBar(subj) "Enter the subject for each message"

  set f [frame $w.glist]
  label $f.label -text "Game Numbers: "
  entry $f.entry -width 30 -background white -textvariable emailData_glist
  set ::tools::email::helpBar(glist) \
    "Enter opponent's game numbers, separated by spaces"

  foreach f {name addr subj glist} {
    pack $w.$f -side top -fill x
    pack $w.$f.entry $w.$f.label -side right -anchor e
    set e $w.$f.entry
    bind $e <FocusIn> "$e configure -background lightYellow;
      set emailData_helpBar \$::tools::email::helpBar($f)"
    bind $e <FocusOut> "$e configure -background white"
  }

  addHorizontalRule $w

  set f [frame $w.sig]
  label $f.label -text "Signature: " -anchor n
  text $f.entry -width 30 -height 5 -background white
  bind $f.entry <FocusIn> "$f.entry configure -background lightYellow
    set emailData_helpBar {Enter the closing text for each message}"
  bind $f.entry <FocusOut> "$f.entry configure -background white"

  pack $f -side top -fill x
  pack $f.entry $f.label -side right -anchor n

  addHorizontalRule $w

  set f [frame $w.buttons]
  button $w.buttons.save -text "Save" -command {
    set gNumberErr [::tools::email::validGameNumbers $emailData_glist]
    if {$gNumberErr != -1} {
      tk_messageBox -icon error -type ok -title "Invalid data" \
        -message "The games list contains an invalid game number: $gNumberErr; there are only [sc_base numGames] games in this database."
    } else {
      set emailData [lreplace $emailData $emailData_index \
                       $emailData_index \
                       [list $emailData_name $emailData_addr $emailData_subj \
                          $emailData_glist \
                          [.emailEditor.sig.entry get 1.0 end-1c]]]
      ::tools::email::writeOpponentFile $emailData
      destroy .emailEditor
      ::tools::email::refresh
    }
  }
  button $f.cancel -text "Cancel" -command {
    set emailData [::tools::email::readOpponentFile]
    destroy .emailEditor
    ::tools::email::refresh
  }
  pack $f -side top
  pack $f.save $f.cancel -side left -padx 20 -pady 10

  label $w.helpBar -width 1 -textvariable emailData_helpBar -relief sunken \
    -font font_Small -anchor w
  pack $w.helpBar -side bottom -fill x

  # Set up the initial values in the entry boxes:
  set details [lindex $emailData $emailData_index]
  set emailData_name [lindex $details 0]
  set emailData_addr [lindex $details 1]
  set emailData_subj [lindex $details 2]
  set emailData_glist [lindex $details 3]
  $w.sig.entry insert 1.0 [lindex $details 4]
  grab .emailEditor
}

proc ::tools::email::validGameNumbers {numberList} {
  foreach i $numberList {
    if {$i < 1  ||  $i > [sc_base numGames]} { return $i }
  }
  return -1
}

proc ::tools::email::opponentFilename {} {
  set filename [sc_base filename]
  append filename ".sem"
  return $filename
}

proc ::tools::email::readOpponentFile {} {
  set filename [::tools::email::opponentFilename]
  if {[catch {set f [open $filename "r"]} ]} {
    # puts "Unable to open opponent file"
    return {}
  }
  set data [read -nonewline $f]
  close $f
  return $data
}

proc ::tools::email::writeOpponentFile {data} {
  set filename [::tools::email::opponentFilename]
  if {[catch {set f [open $filename "w"]} ]} {
    # puts "Unable to write opponent file"
    return {}
  }
  puts $f $data
  close $f
}

###
### import.tcl: part of Scid.
### Copyright (C) 2000  Shane Hudson.
###

### Import game window

proc importPgnGame {} {
  if {[winfo exists .importWin]} { return }
  set w [toplevel .importWin]
  wm title $w "Scid: Import PGN game"
  wm minsize $w 50 5
  frame $w.b
  pack $w.b -side bottom
  set pane [::utils::pane::Create $w.pane edit err 650 300 0.8]
  pack $pane -side top -expand true -fill both
  set edit $w.pane.edit
  text $edit.text -height 12 -width 80 -wrap none -background white \
    -yscroll "$edit.ybar set" -xscroll "$edit.xbar set"  -setgrid 1
  # Override tab-binding for this widget:
  bind $edit.text <Key-Tab> "[bind all <Key-Tab>]; break"
  scrollbar $edit.ybar -command "$edit.text yview" -takefocus 0
  scrollbar $edit.xbar -orient horizontal -command "$edit.text xview" \
    -takefocus 0
  grid $edit.text -row 0 -column 0 -sticky nesw
  grid $edit.ybar -row 0 -column 1 -sticky nesw
  grid $edit.xbar -row 1 -column 0 -sticky nesw
  grid rowconfig $edit 0 -weight 1 -minsize 0
  grid columnconfig $edit 0 -weight 1 -minsize 0

  # Right-mouse button cut/copy/paste menu:
  menu $edit.text.rmenu -tearoff 0
  $edit.text.rmenu add command -label "Cut" -command "tk_textCut $edit.text"
  $edit.text.rmenu add command -label "Copy" -command "tk_textCopy $edit.text"
  $edit.text.rmenu add command -label "Paste" -command "tk_textPaste $edit.text"
  $edit.text.rmenu add command -label "Select all" -command \
    "$edit.text tag add sel 1.0 end"
  bind $edit.text <ButtonPress-3> "tk_popup $edit.text.rmenu %X %Y"

  text $pane.err.text -height 4 -width 75 -wrap word \
    -yscroll "$pane.err.scroll set"
  $pane.err.text insert end $::tr(ImportHelp1)
  $pane.err.text insert end "\n"
  $pane.err.text insert end $::tr(ImportHelp2)
  $pane.err.text configure -state disabled
  scrollbar $pane.err.scroll -command "$pane.err.text yview" -takefocus 0
  pack $pane.err.scroll -side right -fill y
  pack $pane.err.text -side left -expand true -fill both

  button $w.b.paste -text "$::tr(PasteCurrentGame) (Alt-P)" -command {
    .importWin.pane.edit.text delete 1.0 end
    .importWin.pane.edit.text insert end [sc_game pgn -width 70]
    .importWin.pane.err.text configure -state normal
    .importWin.pane.err.text delete 1.0 end
    .importWin.pane.err.text configure -state disabled
  }
  button $w.b.clear -text "$::tr(Clear) (Alt-C)" -command {
    .importWin.pane.edit.text delete 1.0 end
    .importWin.pane.err.text configure -state normal
    .importWin.pane.err.text delete 1.0 end
    .importWin.pane.err.text configure -state disabled
  }
  button $w.b.ok -text "$::tr(Import) (Alt-I)" -command {
    set err [catch {sc_game import \
                      [.importWin.pane.edit.text get 1.0 end]} result]
    .importWin.pane.err.text configure -state normal
    .importWin.pane.err.text delete 1.0 end
    .importWin.pane.err.text insert end $result
    .importWin.pane.err.text configure -state disabled
    if {! $err} {
      updateBoard -pgn
      updateTitle
    }
  }
  button $w.b.cancel -textvar ::tr(Close) -command {
    destroy .importWin; focus .
  }
  frame $w.b.space -width 20
  pack $w.b.paste $w.b.clear $w.b.space -side left -padx 2 -pady 2
  pack $w.b.cancel $w.b.ok -side right -padx 10 -pady 5
  # Paste the current selected text automatically:
  if {[catch {$w.pane.edit.text insert end [selection get]}]} {
    # ?
  }
  # Select all of the pasted text:
  $w.pane.edit.text tag add sel 1.0 end

  bind $w <F1> { helpWindow Import }
  bind $w <Alt-i> { .importWin.b.ok invoke }
  bind $w <Alt-p> { .importWin.b.paste invoke }
  bind $w <Alt-c> { .importWin.b.clear invoke }
  bind $w <Escape> { .importWin.b.cancel invoke }
  # bind $w.pane.edit.text <Any-KeyRelease> { .importWin.b.ok invoke }
  focus $w.pane.edit.text
}


proc importClipboardGame {} {
  importPgnGame
  catch {event generate .importWin.pane.edit.text <<Paste>>}
}

proc importPgnLine {line} {
  importPgnGame
  set w .importWin.pane.edit.text
  $w delete 1.0 end
  $w insert end $line
  $w tag add sel 1.0 end
  focus $w
}

proc importMoveList {line} {
  sc_move start
  sc_move addSan $line
  updateBoard -pgn
}

set importPgnErrors ""

### Import file of Pgn games:

proc importPgnFile {} {
  global importPgnErrors

  set err ""
  if {[sc_base isReadOnly]} { set err "This database is read-only." }
  if {![sc_base inUse]} { set err "This is not an open database." }
  if {$err != ""} {
    tk_messageBox -type ok -icon error -title "Scid: Error" -message $err
    return
  }
  if {[sc_info gzip]} {
    set ftypes {
      { "Portable Game Notation files" {".pgn" ".PGN" ".pgn.gz"} }
      { "Text files" {".txt" ".TXT"} }
      { "All files" {"*"} }
    }
  } else {
    set ftypes {
      { "Portable Game Notation files" {".pgn" ".PGN"} }
      { "Text files" {".txt" ".TXT"} }
      { "All files" {"*"} }
    }
  }
  set fname [tk_getOpenFile -filetypes $ftypes -title "Import from a PGN file"]
  if {$fname == ""} {return}
  doPgnFileImport $fname ""
}

proc doPgnFileImport {fname text} {
  set w .ipgnWin
  if {[winfo exists $w]} { destroy $w }
  toplevel $w
  wm title $w "Scid: Importing PGN file"
  canvas $w.progress -width 400 -height 20 -bg white -relief solid -border 1
  $w.progress create rectangle 0 0 0 0 -fill blue -outline blue -tags bar
  $w.progress create text 395 10 -anchor e -font font_Regular -tags time \
    -fill black -text "0:00 / 0:00"

  pack $w.progress -side bottom

  frame $w.buttons
  pack $w.buttons -side bottom -fill x
  button $w.buttons.stop -textvar ::tr(Stop) -command {sc_progressBar}
  button $w.buttons.close -textvar ::tr(Close) -command "focus .; destroy $w"
  pack $w.buttons.close $w.buttons.stop -side right -ipadx 5 -padx 5 -pady 2

  pack [frame $w.tf] -side top -expand yes -fill both
  text $w.text -height 8 -width 60 -background gray90 \
    -wrap none -cursor watch -setgrid 1 -yscrollcommand "$w.ybar set"
  scrollbar $w.ybar -command "$w.text yview"
  pack $w.ybar -in $w.tf -side right -fill y
  pack $w.text -in $w.tf -side left -fill both -expand yes
  update

  busyCursor .
  sc_progressBar $w.progress bar 401 21 time
  catch {grab $w.buttons.stop}
  bind $w <Escape> "$w.buttons.stop invoke"
  $w.buttons.close configure -state disabled
  $w.text insert end $text
  $w.text insert end "Importing PGN games from [file tail $fname]...\n\n"
  $w.text configure -state disabled

  set importPgnErrors ""
  set err [catch {sc_base import file $fname} result]
  set warnings ""
  $w.text configure -state normal
  $w.text configure -cursor top_left_arrow
  if {$err} {
    $w.text insert end $result
  } else {
    set nImported [lindex $result 0]
    set warnings [lindex $result 1]
    set str "Imported $nImported "
    if {$nImported == 1} { append str "game" } else { append str "games" }
    if {$warnings == ""} {
      append str " with no PGN errors or warnings."
    } else {
      append str ".\nPGN errors/warnings:\n$warnings"
    }
    $w.text insert end $str
  }
  $w.text configure -state disabled
  $w.buttons.close configure -state normal
  $w.buttons.stop configure -state disabled
  catch {grab release $w.buttons.stop}
  bind $w <Escape> "$w.buttons.close invoke; break"
  unbusyCursor .
  # Auto-close import progress window if there were no errors/warnings?
  if {!$err  &&  $warnings == ""} { destroy $w }
  updateTitle
  updateMenuStates
  ::windows::switcher::Refresh
  ::maint::Refresh
  update
}

###
### End of file: import.tcl
###

### optable.tcl: Opening report and theory table generation.
### Part of Scid. Copyright 2001-2003 Shane Hudson.

namespace eval ::optable {}
array set ::optable::_data {}

set ::optable::_data(exclude) "---"
set ::optable::_docStart(text) {}
set ::optable::_docEnd(text) {}
set ::optable::_docStart(ctext) {}
set ::optable::_docEnd(ctext) {}
set ::optable::_flip 0

set ::optable::_docStart(html) {<html>
<head>
  <title>[OprepTitle]</title>
  <style type="text/css">
  <!--
    h1 { color:#990000 }
    h2 { color:#990000 }
    h3 { color:#990000 }
    .player {
      color:darkblue
    }
    .elo {
      color:green
      font-style:italic
    }
    sup {
      color:red
    }
  -->
  </style>
</head>
<body bgcolor="#ffffff">
}
set ::optable::_docEnd(html) {</body>
</html>
}

set ::optable::_docStart(latex) {\documentclass[10pt,a4paper]{article}
% This is a LaTeX file generated by Scid.
% You must have the "chess12" package installed to typeset this file.

\usepackage{times}
\usepackage{a4wide}
\usepackage{chess}
\usepackage[T1]{fontenc}

\setlength{\columnsep}{1cm}
\setlength{\parindent}{0pt}
\setlength{\parskip}{3pt}

\font\F=chessf10
\newcommand{\B}{{\F B}}
\newcommand{\N}{{\F N}}
\newcommand{\R}{{\F R}}
\newcommand{\Q}{{\F Q}}
\newcommand{\K}{{\F K}}
\newcommand{\tspace}{{\vspace{0.08cm}}}
\newcommand{\draw}{{\small$\frac{1}{2}$:$\frac{1}{2}$}}
\newcommand{\loss}{\mbox{0:1}}
\newcommand{\win}{\mbox{1:0}}
\newcommand{\notenum}[1]{\hspace{-0.7cm}\makebox[0.55cm][r]{$^{ #1 }$ }\makebox[0.05cm]{}}

%\font\Chess=chess10
\begin{document}
\raggedright
\nochess
}
set ::optable::_docEnd(latex) {
\end{document}
}

proc ::optable::ConfigMenus {{lang ""}} {
  if {! [winfo exists .oprepWin]} { return }
  if {$lang == ""} { set lang $::language }
  set m .oprepWin.menu
  foreach menu {file favorites help} tag {File Favorites Help} {
    configMenuName $m.$menu Oprep$tag $lang
  }
  foreach idx {0 1 2 4 6} tag {Text Html LaTeX Options Close} {
    configMenuText $m.file.m $idx OprepFile$tag $lang
  }
  foreach idx {0 1 2} tag {Add Edit Generate} {
    configMenuText $m.favorites.m $idx OprepFavorites$tag $lang
  }
  foreach idx {0 1} tag {Report Index} {
    configMenuText $m.help.m $idx OprepHelp$tag $lang
  }
}

proc ::optable::makeReportWin {args} {
  if {! [sc_base inUse]} { return }
  set showProgress 1
  set args [linsert $args 0 "args"]
  if {[lsearch -exact $args "-noprogress"] >= 0} { set showProgress 0 }
  if {$showProgress} {
    set w .progress
    toplevel $w
    wm withdraw $w
    wm title $w "Scid: Generating Report"
    bind $w <Visibility> "raiseWin $w"

    pack [frame $w.b] -side bottom -fill x
    set ::optable::_interrupt 0
    button $w.b.cancel -text $::tr(Cancel) -command {
      set ::optable::_interrupt 1
      sc_progressBar
    }
    pack $w.b.cancel -side right -pady 5 -padx 2

    foreach i {1 2} name {"Searching database for report games"
                        "Generating report information"} {
      label $w.text$i -text "$i. $name"
      pack $w.text$i -side top
      canvas $w.c$i -width 400 -height 20 -bg white -relief solid -border 1
      $w.c$i create rectangle 0 0 0 0 -fill blue -outline blue -tags bar
      $w.c$i create text 395 10 -anchor e -font font_Regular -tags time \
        -fill black -text "0:00 / 0:00"
      pack $w.c$i -side top -pady 10
    }
    wm resizable $w 0 0
    # Set up geometry for middle of screen:
    set x [winfo screenwidth $w]; set x [expr $x - 400]; set x [expr $x / 2]
    set y [winfo screenheight $w]; set y [expr $y - 20]; set y [expr $y / 2]
    wm geometry $w +$x+$y
    wm deiconify $w
    grab $w.b.cancel
    sc_progressBar $w.c1 bar 401 21 time
    busyCursor .
  }
  set newTreeData [sc_tree search -time 0 -epd 0]
  if {$showProgress} {
    if {$::optable::_interrupt} {
      unbusyCursor .
      grab release $w.b.cancel
      destroy $w
      return
    }
    sc_progressBar $w.c2 bar 401 21 time
  }
  sc_report opening create $::optable(ExtraMoves) $::optable(MaxGames)\
    $::optable::_data(exclude)
  if {$showProgress} {
    unbusyCursor .
    grab release $w.b.cancel
    destroy $w
    if {$::optable::_interrupt} { return }
  }
  set ::optable::_data(tree) $newTreeData
  ::optable::latexifyTree
  set ::optable::_data(bdLaTeX) [sc_pos tex]
  set ::optable::_data(bdHTML) [sc_pos html]
  set ::optable::_data(bdLaTeX_flip) [sc_pos tex flip]
  set ::optable::_data(bdHTML_flip) [sc_pos html -flip 1]
  ::optable::setupRatios
  set report [::optable::report ctext 1]

  if {[lsearch -exact $args "-nodisplay"] >= 0} { return }

  set w .oprepWin
  if {![winfo exists $w]} {
    toplevel $w
    wm title $w "Scid: [tr ToolsOpReport]"
    frame $w.menu
    pack $w.menu -side top -fill x
    $w configure -menu $w.menu
    menubutton $w.menu.file -text OprepFile -menu $w.menu.file.m
    menubutton $w.menu.favorites -text OprepFavorites -menu $w.menu.favorites.m
    menubutton $w.menu.help -text OprepHelp -menu $w.menu.help.m
    foreach i {file favorites help} {
      menu $w.menu.$i.m -tearoff 0
      pack $w.menu.$i -side left
    }
    $w.menu.file.m add command -label OprepFileText \
      -command {::optable::saveReport text}
    $w.menu.file.m add command -label OprepFileHtml \
      -command {::optable::saveReport html}
    $w.menu.file.m add command -label OprepFileLaTeX \
      -command {::optable::saveReport latex}
    $w.menu.file.m add separator
    $w.menu.file.m add command -label OprepFileOptions \
      -command ::optable::setOptions
    $w.menu.file.m add separator
    $w.menu.file.m add command -label OprepFileClose \
      -command "$w.b.close invoke"
    $w.menu.favorites.m add command -label OprepFavoritesAdd \
      -command ::optable::addFavoriteDlg
    $w.menu.favorites.m add command -label OprepFavoritesEdit \
      -command ::optable::editFavoritesDlg
    $w.menu.favorites.m add command -label OprepFavoritesGenerate \
      -command ::optable::generateFavoriteReports
    $w.menu.favorites.m add separator
    $w.menu.help.m add command -label OprepHelpReport \
      -accelerator F1 -command {helpWindow Reports Opening}
    $w.menu.help.m add command -label OprepHelpIndex \
      -command {helpWindow Index}
    ::optable::updateFavoritesMenu

    bind $w <F1> {helpWindow Reports Opening}
    bind $w <Escape> "$w.b.close invoke"
    bind $w <Up> "$w.text yview scroll -1 units"
    bind $w <Down> "$w.text yview scroll 1 units"
    bind $w <Prior> "$w.text yview scroll -1 pages"
    bind $w <Next> "$w.text yview scroll 1 pages"
    bind $w <Key-Home> "$w.text yview moveto 0"
    bind $w <Key-End> "$w.text yview moveto 0.99"
    bindMouseWheel $w $w.text

    text $w.text -height 30 -width 85 -font font_Small -setgrid 1 \
      -wrap word -bg white -foreground black -yscrollcommand "$w.ybar set" \
      -cursor top_left_arrow
    ::htext::init $w.text
    scrollbar $w.ybar -command "$w.text yview"
    frame $w.b
    button $w.b.previewLaTeX -textvar ::tr(OprepViewLaTeX) \
      -command ::optable::previewLaTeX
    button $w.b.previewHTML -textvar ::tr(OprepViewHTML) \
      -command ::optable::previewHTML
    button $w.b.opts -text [tr OprepFileOptions] -command ::optable::setOptions
    label $w.b.lexclude -text "Exclude:"
    menubutton $w.b.exclude -textvar ::optable::_data(exclude) \
      -indicatoron 1 -relief raised -bd 2 -menu $w.b.exclude.m -padx 1
    menu $w.b.exclude.m -tearoff 0
    button $w.b.update -textvar ::tr(Update) -command {
      set ::optable::_data(yview) [lindex [.oprepWin.text yview] 0]
      ::optable::makeReportWin
      .oprepWin.text yview moveto $::optable::_data(yview)
    }
    button $w.b.help -textvar ::tr(Help) -command {helpWindow Reports Opening}
    button $w.b.close -textvar ::tr(Close) -command "focus .; destroy $w"
    pack $w.b -side bottom -fill x
    pack $w.ybar -side right -fill y
    pack $w.text -side left -fill both -expand yes
    pack $w.b.close $w.b.update -side right -padx 1 -pady 2
    if {! $::windowsOS} {
      pack $w.b.previewLaTeX -side left -padx 1 -pady 2
    } else {
      pack $w.b.previewHTML -side left -padx 1 -pady 2
    }
    pack $w.b.opts $w.b.lexclude $w.b.exclude -side left -padx 1 -pady 2
    ::optable::ConfigMenus
    ::utils::win::Centre $w
  }

  catch {destroy $w.text.bd}
  ::board::new $w.text.bd 30
  if {$::optable::_flip} { ::board::flip $w.text.bd }
  $w.text.bd configure -relief solid -borderwidth 1
  for {set i 0} {$i < 63} {incr i} {
    ::board::bind $w.text.bd $i <ButtonPress-1> ::optable::flipBoard
    #::board::bind $w.text.bd $i <ButtonPress-3> ::optable::resizeBoard
  }
  ::board::update $w.text.bd [sc_pos board]
  $w.b.exclude.m delete 0 end
  $w.b.exclude.m add radiobutton -label "---" \
    -variable ::optable::_data(exclude) -command "$w.b.update invoke"
  foreach move $::optable::_data(moves) {
    $w.b.exclude.m add radiobutton -label $move \
      -variable ::optable::_data(exclude) -command "$w.b.update invoke"
  }
  if {[lsearch $::optable::_data(moves) $::optable::_data(exclude)] < 0} {
    set ::optable::_data(exclude) "---"
  }
  busyCursor .
  $w.text configure -state normal
  $w.text delete 1.0 end
  regsub -all "\n" $report "<br>" report
  ::htext::display $w.text $report
  $w.text configure -state disabled
  unbusyCursor .
  ::windows::gamelist::Refresh
  ::windows::stats::Refresh
}

proc ::optable::flipBoard {} {
  ::board::flip .oprepWin.text.bd
  set ::optable::_flip [::board::isFlipped .oprepWin.text.bd]
}

proc ::optable::resizeBoard {} {
  set bd .oprepWin.text.bd
  set size [::board::size $bd]
  if {$size >= 40} { set size 25 } else { incr size 5 }
  ::board::resize $bd $size
}

proc ::optable::setOptions {} {
  set w .oprepOptions
  if {[winfo exists $w]} { return }
  toplevel $w
  pack [frame $w.f] -side top -fill x -padx 5 -pady 5
  set row 0
  foreach i {Stats Popular AvgPerf Results MovesFrom Themes Endgames} {
    set yesno($i) 1
  }
  set left 0
  set right 1
  foreach i {Stats Oldest Newest Popular MostFrequent sep \
               AvgPerf HighRating sep \
               Results Shortest col \
               MoveOrders MovesFrom Themes Endgames gap sep \
               MaxGames ExtraMoves sep} {
    set from 0; set to 10; set tick 1; set res 1
    if {$i == "MaxGames"} {
      set from 0; set to 500; set tick 100; set res 50
    }
    if {$i == "col"} {
      incr left 4
      frame $w.f.colsep$left -width 8
      grid $w.f.colsep$left -row 0 -column $left
      incr left
      set right [expr {$left + 1}]
      set row 0
    } elseif {$i == "gap"} {
      # nothing
    } elseif {$i == "sep"} {
      frame $w.f.fsep$row$left -height 2 -borderwidth 2 -relief sunken -bg white
      frame $w.f.tsep$row$left -height 2 -borderwidth 2 -relief sunken -bg white
      grid $w.f.fsep$row$left -row $row -column $left -sticky we -columnspan 4
      #grid $w.f.tsep$row$left -row $row -column $right -sticky we -columnspan 2
    } elseif {[info exists yesno($i)]} {
#      frame $w.f.f$i
#      radiobutton $w.f.f$i.yes -variable ::optable($i) -value 1 \
#        -text "$::tr(Yes)   " -font font_Small
#      radiobutton $w.f.f$i.no -variable ::optable($i) -value 0 \
#        -text "$::tr(No)   "  -font font_Small
#      pack $w.f.f$i.yes -side left
#      pack $w.f.f$i.no -side right
      checkbutton $w.f.f$i -variable ::optable($i) -onvalue 1 -offvalue 0
      label $w.f.t$i -textvar ::tr(Oprep$i) -font font_Small
      grid $w.f.f$i -row $row -column $left -sticky n
      grid $w.f.t$i -row $row -column $right -sticky w -columnspan 3
    } else {
#      scale $w.f.s$i -variable ::optable($i) -from $from -to $to \
#        -width 8 -length 160 -tickinterval $tick -orient horizontal \
#        -font font_Small -resolution $res -showvalue 0 -sliderlength 20
      ::combobox::combobox $w.f.s$i -textvariable ::optable($i) \
        -editable false -width 2 -height 11 -justify right -font font_Small
      if {$i == "MaxGames"} {
        $w.f.s$i configure -width 3
      }
      for {set x $from} {$x <= $to} {incr x $res} {
        $w.f.s$i list insert end $x
      }
      label $w.f.t$i -textvar ::tr(Oprep$i) -font font_Small
      grid $w.f.s$i -row $row -column $left ;# -sticky e
      if {$i == "MostFrequent"  ||  $i == "Shortest"} {
        checkbutton $w.f.w$i -text $::tr(White) -font font_Small \
          -variable ::optable(${i}White)
        checkbutton $w.f.b$i -text $::tr(Black) -font font_Small \
          -variable ::optable(${i}Black)
        grid $w.f.t$i -row $row -column $right -sticky w
        grid $w.f.w$i -row $row -column 2
        grid $w.f.b$i -row $row -column 3
      } else {
        grid $w.f.t$i -row $row -column $right -sticky w -columnspan 3
      }
    }
    grid rowconfigure $w.f $row -pad 2
    if {$i != "col"} { incr row }
  }
  addHorizontalRule $w
  pack [frame $w.b] -side bottom -fill x
  dialogbutton $w.b.defaults -textvar ::tr(Defaults) -command {
    array set ::optable [array get ::optableDefaults]
  }
  dialogbutton $w.b.ok -text "OK" -command {
    destroy .oprepOptions
    catch {set ::optable::_data(yview) [lindex [.oprepWin.text yview] 0]}
    ::optable::makeReportWin
    catch {.oprepWin.text yview moveto $::optable::_data(yview)}
  }
  dialogbutton $w.b.cancel -textvar ::tr(Cancel) -command {
    array set ::optable [array get ::optable::backup]
    destroy .oprepOptions
  }
  packbuttons left $w.b.defaults
  packbuttons right $w.b.cancel $w.b.ok
  array set ::optable::backup [array get ::optable]
  wm resizable $w 0 0
  wm title $w  "Scid: [tr ToolsOpReport]: [tr OprepFileOptions]"
  bind $w <Escape> "$w.b.cancel invoke"
}

# previewLaTeX:
#   Saves the report to a temporary file, runs latex on it, then
#   "dvips" to produce PostScript, and "ghostview" to display it.
#
proc ::optable::previewLaTeX {} {
  busyCursor .
  set tmpdir $::scidLogDir
  set tmpfile "TempOpeningReport"
  set fname [file join $tmpdir $tmpfile]
  catch {exec /bin/sh -c "rm $fname.*" }
  if {[catch {set tempfile [open $fname.tex w]}]} {
    tk_messageBox -title "Scid: Error writing report" -type ok -icon warning \
      -message "Unable to write the file: $fname.tex"
  }
  # Add the "batchmode" command to the top of the file to prevent latex
  # pausing for input on errors:
  puts $tempfile "\\batchmode"
  puts $tempfile [::optable::report latex 1 $::optable::_flip]
  close $tempfile
  if {! [catch {exec /bin/sh -c "cd $tmpdir; latex '$tmpfile.tex'" >& /dev/null}]} {
    if {[catch {exec /bin/sh -c "cd $tmpdir; dvips '$tmpfile.dvi'" >& /dev/null}]} {
      tk_messageBox -title "Scid" -icon warning -type ok \
        -message "Unable to run \"dvips\" to convert the report to PostScript."
    } else {
      if {[catch {exec /bin/sh -c "ghostview '$fname.ps'" >& /dev/null &}]} {
        tk_messageBox -title "Scid" -icon warning -type ok \
          -message "Unable to run \"xdvi\" to view the report."
      }
    }
  } else {
    tk_messageBox -title "Scid: Errors producing report" -type ok \
      -icon warning \
      -message "Errors running latex on the file: $fname.tex\n\nSee $fname.log for details."
  }
  unbusyCursor .
}

# previewHTML:
#   Saves the report to a temporary file, and invokes the user's web
#   browser to display it.
#
proc ::optable::previewHTML {} {
  busyCursor .
  set tmpdir $::scidLogDir
  set tmpfile "TempOpeningReport"
  set fname [file join $tmpdir $tmpfile]
  if {[catch {set tempfile [open $fname.html w]}]} {
    tk_messageBox -title "Scid: Error writing report" -type ok -icon warning \
      -message "Unable to write the file: $fname.html"
  }
  puts $tempfile [::optable::report html 1 $::optable::_flip]
  close $tempfile
  if {[string match $::tcl_platform(os) "Windows NT"]} {
    catch {exec $::env(COMSPEC) /c start $fname.html &}
  } else {
    catch {exec start $fname.html &}
  }
  unbusyCursor .
}

# saveReport:
#   Saves the current opening report to a file.
#   "fmt" is the format: text, html or latex.
#   "type" is the report type: report, table, or both.
#
proc ::optable::saveReport {fmt} {
  set t [tk_dialog .dialog "Scid: Select report type" \
           "Select the report type. You may save a full report (which includes the theory table), a compact report (with no theory table), or just the theory table by itself." \
           "" 0 "Full report" "Compact report" \
           "Theory table" "Cancel"]
  if {$t == 3} { return }
  set default ".txt"
  set ftype {
    { "Text files" {".txt"} }
    { "All files"  {"*"}    }
  }
  if {$fmt == "latex"} {
    set default ".tex"
    set ftype {
      { "LaTeX files" {".tex" ".ltx"} }
      { "All files"  {"*"}    }
    }
  } elseif {$fmt == "html"} {
    set default ".html"
    set ftype {
      { "HTML files" {".html" ".htm"} }
      { "All files"  {"*"}    }
    }
  }

  set fname [tk_getSaveFile -initialdir [pwd] -filetypes $ftype \
               -defaultextension $default -title "Scid: Save opening report"]
  if {$fname == ""} { return }

  busyCursor .
  if {[catch {set tempfile [open $fname w]}]} {
    tk_messageBox -title "Scid: Error writing report" -type ok -icon warning \
      -message "Unable to write the file: $fname\n\n"
  } else {
    if {$t == 2} {
      set report [::optable::table $fmt]
    } elseif {$t == 1} {
      set report [::optable::report $fmt 0 $::optable::_flip]
    } else {
      set report [::optable::report $fmt 1 $::optable::_flip]
    }
    if {$::hasEncoding  &&  $::langEncoding($::language) != ""} {
      catch {set report [encoding convertto $::langEncoding($::language) $report]}
    }
    puts $tempfile $report
    close $tempfile
  }
  unbusyCursor .
}

proc ::optable::create {} {
  set ::optable::_data(tree) [sc_tree search -time 0 -epd 0]
  ::optable::latexifyTree
  set ::optable::_data(bdLaTeX) [sc_pos tex]
  set ::optable::_data(bdHTML) [sc_pos html]
  set ::optable::_data(bdLaTeX_flip) [sc_pos tex flip]
  set ::optable::_data(bdHTML_flip) [sc_pos html -flip 1]
  sc_report opening create $::optable(ExtraMoves) $::optable(MaxGames)
  ::optable::setupRatios
}

# latexifyTree
#   Convert the plain text tree output used for text/html reports
#   to a table for LaTeX output.
#
proc ::optable::latexifyTree {} {
  set ::optable::_data(moves) {}
  if {! [info exists ::optable::_data(tree)]} { return }
  set tree [split $::optable::_data(tree) "\n"]
  set ltree "\\begin{tabular}{rllr@{:}rrrrrr}\n\\hline\n"
  append ltree " & Move & ECO & \\multicolumn{2}{c}{Frequency}"
  append ltree " & Score & \$\\mu\$Elo & Perf & \$\\mu\$Year & \\% Draws \\\\ \n"
  append ltree "\\hline\n"
  set len [llength $tree]
  set done 0
  for {set i 1} {$i < $len} {incr i} {
    set line [lindex $tree $i]
    if {[string index $line 0] == "_"} {
      append ltree "\\hline\n"
      continue
    }
    if {[string length $line] == 0} { continue }
    set num    [string range $line  0  1]
    set move   [string range $line  4  9]
    set eco    [string range $line 11 15]
    set freq   [string range $line 17 23]
    set fpct   [string range $line 25 29]
    set score  [string range $line 33 37]
    set avElo  [string range $line 41 44]
    set perf   [string range $line 47 50]
    set avYear [string range $line 53 56]
    set pctDraw [string range $line 59 61]
    set mv [string trim $move]
    regsub K $move {{\\K}} move
    regsub Q $move {{\\Q}} move
    regsub R $move {{\\R}} move
    regsub B $move {{\\B}} move
    regsub N $move {{\\N}} move
    if {[string index $line 0] == "T"} {
      append ltree "\\multicolumn{2}{l}{Total}"
    } else {
      append ltree " $num & $move "
      lappend ::optable::_data(moves) $mv
    }
    append ltree " & $eco & $freq & $fpct\\% & $score\\%"
    append ltree " & $avElo & $perf & $avYear & $pctDraw\\% \\\\ \n"
  }
  append ltree "\\hline\n"
  append ltree "\\end{tabular}\n"
  set ::optable::_data(latexTree) $ltree
}

proc ::optable::setupRatios {} {
  set r [sc_filter freq date 0000.00.00]
  if {[lindex $r 0] == 0} {
    set ::optable::_data(ratioAll) 0
  } else {
    set ::optable::_data(ratioAll) \
      [expr {int(double([lindex $r 1]) / double([lindex $r 0]))} ]
  }
  foreach {start end} {1800 1899  1900 1949  1950 1969  1970 1979
    1980 1989 1990 1999 2000 2009} {
    set r [sc_filter freq date $start.00.00 $end.12.31]
    set filter [lindex $r 0]
    set all [lindex $r 1]
    if {$filter == 0} {
      set ::optable::_data(range$start) "---"
    } else {
      set ::optable::_data(range$start) \
        [expr {int(double($all) / double($filter))} ]
    }
  }
  foreach y {1 5 10} {
    set year "[expr [::utils::date::today year]-$y]"
    append year ".[::utils::date::today month].[::utils::date::today day]"
    set r [sc_filter freq date $year]
    set filter [lindex $r 0]
    set all [lindex $r 1]
    if {$filter == 0} {
      set ::optable::_data(ratio$y) 0
    } else {
      set ::optable::_data(ratio$y) \
        [expr {int(double($all) / double($filter))} ]
    }
    if {$::optable::_data(ratio$y) == 0} {
      set r 1.0
    } else {
      set r [expr {double($::optable::_data(ratioAll))} ]
      set r [expr {$r / double($::optable::_data(ratio$y))} ]
    }
    set ::optable::_data(delta$y) [expr {int(($r - 1.0) * 100.0 + 0.5)} ]
  }
}

proc ::optable::_percent {x fmt} {
  set p "%"
  if {$fmt == "latex"} { set p "\\%" }
  return "[expr $x / 10][sc_info decimal][expr $x % 10]$p"
}

proc ::optable::results {reportType fmt} {
  set s {}

  set n "\n"; set next " "; set p "%"
  set white "1-0"; set draw "=-="; set black "0-1"

  if {$fmt == "latex"} {
    set next " & "; set n "\\\\\n"; set p "\\%"
    set white "\\win"; set draw "\\draw"; set black "\\loss"
    append s "\\begin{tabular}{lccccccc}\n"
  }

  if {$fmt == "html"} { append s "<pre>\n" }
  if {$fmt == "ctext"} { append s "<tt>" }
  if {$fmt == "latex"} { append s "\\hline\n" }

  set lenReport [string length $::tr(OprepReportGames)]
  set lenAll [string length $::tr(OprepAllGames)]
  set len [expr {($lenReport > $lenAll) ? $lenReport : $lenAll} ]
  set score [::utils::string::Capital $::tr(score)]
  set slen [string length $score]
  if {$slen < 7} { set slen 7 }

  append s " [::utils::string::Pad {} $len] $next"
  append s "[::utils::string::PadRight $score $slen] $next"
  if {$fmt == "latex"} {
    append s "\\multicolumn{3}{c}{$::tr(OprepLength)} & "
    append s "\\multicolumn{3}{c}{$::tr(OprepFrequency)} $n "
  } else {
    append s "[::utils::string::PadCenter $::tr(OprepLength) 19] $next"
    append s "[::utils::string::PadCenter $::tr(OprepFrequency) 22] $n"
  }

  append s " [::utils::string::Pad {} $len] $next"
  append s "[::utils::string::PadRight {} $slen] $next"
  append s "[::utils::string::PadRight $white 5] $next"
  append s "[::utils::string::PadRight $draw  5] $next"
  append s "[::utils::string::PadRight $black 5] $next"
  append s "[::utils::string::PadRight $white 5]  $next"
  append s "[::utils::string::PadRight $draw  5]  $next"
  append s "[::utils::string::PadRight $black 5]  $n"
  if {$fmt == "latex"} { append s "\\hline\n" }

  set sc [sc_report $reportType score]
  set wlen [sc_report $reportType avgLength 1]
  set dlen [sc_report $reportType avgLength =]
  set blen [sc_report $reportType avgLength 0]
  set wf [sc_report $reportType freq 1]
  set df [sc_report $reportType freq =]
  set bf [sc_report $reportType freq 0]

  append s " [::utils::string::Pad $::tr(OprepReportGames) $len] $next"
  append s "[::utils::string::PadRight [::optable::_percent [lindex $sc 0] $fmt] $slen] $next"
  append s "[::utils::string::PadRight [lindex $wlen 0] 5] $next"
  append s "[::utils::string::PadRight [lindex $dlen 0] 5] $next"
  append s "[::utils::string::PadRight [lindex $blen 0] 5] $next"
  append s "[::utils::string::PadRight [::optable::_percent [lindex $wf 0] $fmt] 6] $next"
  append s "[::utils::string::PadRight [::optable::_percent [lindex $df 0] $fmt] 6] $next"
  append s "[::utils::string::PadRight [::optable::_percent [lindex $bf 0] $fmt] 6] $n"

  append s " [::utils::string::Pad $::tr(OprepAllGames) $len] $next"
  append s "[::utils::string::PadRight [::optable::_percent [lindex $sc 1] $fmt] $slen] $next"
  append s "[::utils::string::PadRight [lindex $wlen 1] 5] $next"
  append s "[::utils::string::PadRight [lindex $dlen 1] 5] $next"
  append s "[::utils::string::PadRight [lindex $blen 1] 5] $next"
  append s "[::utils::string::PadRight [::optable::_percent [lindex $wf 1] $fmt] 6] $next"
  append s "[::utils::string::PadRight [::optable::_percent [lindex $df 1] $fmt] 6] $next"
  append s "[::utils::string::PadRight [::optable::_percent [lindex $bf 1] $fmt] 6] $n"

  if {$fmt == "latex"} { append s "\\hline\n\\end{tabular}\n" }
  if {$fmt == "html"} { append s "</pre>\n" }
  if {$fmt == "ctext"} { append s "</tt>" }
  return $s
}

proc ::optable::stats {fmt} {
  global stats
  set s {}
  set all $::tr(OprepStatAll)
  set both $::tr(OprepStatBoth)
  set since $::tr(OprepStatSince)
  set games [::utils::string::Capital $::tr(games)]
  set score [::utils::string::Capital $::tr(score)]

  set alen [string length $all]
  set blen [expr {[string length $both] + 6} ]
  set slen [expr {[string length $since] + 11} ]
  set len $alen
  if {$len < $blen} { set len $blen }
  if {$len < $slen} { set len $slen }

  set ratings 0
  set years 0
  set rlist [lsort -decreasing [array names stats r*]]
  set ylist [lsort [array names stats y*]]
  foreach i $rlist { if {$stats($i)} { set ratings 1 } }
  foreach i $ylist { if {$stats($i)} { set years 1 } }

  if {$fmt == "latex"} {
    append s "\\begin{tabular}{l r r r r r @{.} l}\n\\hline\n"
    append s "       & $games & \\win & \\draw & \\loss & "
    append s "\\multicolumn{2}{c}{$score} \\tspace \\\\ \\hline \n"
    scan [sc_filter stats all] "%u%u%u%u%u%\[.,\]%u" g w d l p c x
    append s "$all & $g & $w & $d & $l & $p&$x\\% \\\\\n"

    if {$ratings} {
      append s "\\hline\n"
      foreach i $rlist {
        if {$stats($i)} {
          set elo [string range $i 1 end]
          scan [sc_filter stats elo $elo] "%u%u%u%u%u%\[.,\]%u" g w d l p c x
          append s "$both $elo+ & $g & $w & $d & $l & $p&$x\\% \\\\\n"
        }
      }
    }
    if {$years} {
      append s "\\hline\n"
      foreach i $ylist {
        if {$stats($i)} {
          set year [string range $i 1 end]
          scan [sc_filter stats year $year] "%u%u%u%u%u%\[.,\]%u" g w d l p c x
          append s "$since $year.01.01 & $g & $w & $d & $l & $p&$x\\% \\\\\n"
        }
      }
    }
    append s "\\hline\n\\end{tabular}\n"
    return $s
  }

  # For non-LaTeX format, just display in plain text:
  if {$fmt == "html"} { append s "<pre>\n" }
  if {$fmt == "ctext"} { append s "<tt>" }
  set stat ""
  append s " [::utils::string::Pad $stat [expr $len - 4]] [::utils::string::PadRight $games 10]"
  append s "     1-0     =-=     0-1 [::utils::string::PadRight $score 8]\n"
  append s "-----------------------------------------------------------"
  append s "\n [::utils::string::Pad $all $len]"     [sc_filter stats all]

  if {$ratings} {
    append s "\n"
    foreach i $rlist {
      if {$stats($i)} {
        set elo [string range $i 1 end]
        set stat "$both $elo+"
        append s "\n [::utils::string::Pad $stat $len]"   [sc_filter stats elo $elo]
      }
    }
  }
  if {$years} {
    append s "\n"
    foreach i $ylist {
      if {$stats($i)} {
        set year [string range $i 1 end]
        set stat "$since $year.01.01"
        append s "\n [::utils::string::Pad $stat $len]"   [sc_filter stats year $year]
      }
    }
  }
  append s "\n-----------------------------------------------------------\n"
  if {$fmt == "html"} { append s "</pre>\n" }
  if {$fmt == "ctext"} { append s "</tt>" }
  return $s
}

proc ::optable::_reset {} {
  set ::optable::_data(sec) 0
  set ::optable::_data(subsec) 0
}

proc ::optable::_title {} {
  set fmt $::optable::_data(fmt)
  set title $::tr(OprepTitle)
  if {$fmt == "latex"} {
    return "\\begin{center}{\\LARGE \\bf $title}\\end{center}\n\n"
  } elseif {$fmt == "html"} {
    return "<h1><center>$title</center></h1>\n\n"
  } elseif {$fmt == "ctext"} {
    return "<h1><center>$title</center></h1>\n\n"
  }
  set r    "--------------------------------------------------------------"
  append r "\n                        [string toupper $title]\n"
  append r "--------------------------------------------------------------"
  append r "\n\n"
  return $r
}

proc ::optable::_sec {text} {
  set fmt $::optable::_data(fmt)
  incr ::optable::_data(sec)
  set ::optable::_data(subsec) 0
  if {$fmt == "latex"} {
    return "\n\n\\section{$text}\n"
  } elseif {$fmt == "html"} {
    return "\n<h2>$::optable::_data(sec). $text</h2>\n"
  } elseif {$fmt == "ctext"} {
    return "<h4>$::optable::_data(sec). $text</h4>"
  }
  set line "$::optable::_data(sec). [string toupper $text]"
  set underline "-----------------------------------------------------"
  return "\n\n$line\n[string range $underline 1 [string length $line]]\n"
}

proc ::optable::_subsec {text} {
  set fmt $::optable::_data(fmt)
  incr ::optable::_data(subsec)
  if {$fmt == "latex"} {
    return "\n\\subsection{$text}\n\n"
  } elseif {$fmt == "html"} {
    return "\n<h3>$::optable::_data(sec).$::optable::_data(subsec) $text</h3>\n\n"
  } elseif {$fmt == "ctext"} {
    return "\n<maroon><b>$::optable::_data(sec).$::optable::_data(subsec) $text</b></maroon>\n\n"
  }
  return "\n$::optable::_data(sec).$::optable::_data(subsec)  $text\n\n"
}

# report:
#   Produces a report in the appropriate format. If "withTable" is true,
#   the theory table is also included.
#
proc ::optable::report {fmt withTable {flipPos 0}} {
  global tr
  sc_report opening format $fmt
  set fmt [string tolower $fmt]
  set ::optable::_data(fmt) $fmt
  ::optable::_reset

  # numRows: the number of rows to show in the theory table.
  # If it is zero, the number of rows if decided according to the
  # number of games in the report.
  set numRows 0

  # Specify whether a theory table is to be printed, so note numbers
  # can be generated and displayed if necessary:
  sc_report opening notes $withTable $numRows

  set n "\n"; set p "\n\n"; set preText ""; set postText ""
  set percent "%"; set bullet "  * "
  if {$fmt == "latex"} {
    set n "\\\\\n"; set p "\n\n"
    #set preText "{\\samepage\\begin{verbatim}\n"
    #set postText "\\end{verbatim}\n}\n"
    set percent "\\%"; set bullet "\\hspace{0.5cm}\$\\bullet\$"
  } elseif {$fmt == "html"} {
    set n "<br>\n"; set p "<p>\n\n"
    set preText "<pre>\n"; set postText "</pre>\n"
  } elseif {$fmt == "ctext"} {
    set preText "<tt>"; set postText "</tt>"
  }

  # Generate the report:
  set games $tr(games)
  set moves $tr(moves)
  set counts [sc_report opening count]
  set rgames [lindex $counts 0]
  set tgames [lindex $counts 1]

  set r {}
  append r $::optable::_docStart($fmt)
  set title $::tr(OprepTitle)
  set r [string map [list "\[OprepTitle\]" $title] $r]
  append r [::optable::_title]
  append r "$tr(Database): [file tail [sc_base filename]] "
  append r "([::utils::thousands [sc_base numGames]] $games)$n"
  append r "$tr(OprepReport): [sc_report opening line] ("
  if {$fmt == "ctext"} {
    append r "<darkblue><run sc_report opening select all 0; ::windows::stats::Refresh>"
  }
  append r "$rgames"
  if {$fmt == "ctext"} { append r "</run></darkblue>"; }
  append r " $games)$n"
  set eco [sc_report opening eco]
  if {$eco != ""} {
    append r "$tr(ECO): $eco$n"
  }
  append r "$::tr(OprepGenerated) Scid [sc_info version], [::utils::date::today]\n"
  if {$fmt == "latex"} {
    if {$flipPos} {
      append r $::optable::_data(bdLaTeX_flip)
    } else {
      append r $::optable::_data(bdLaTeX)
    }
    append r {$$\showboard$$}
  } elseif {$fmt == "html"} {
    if {$flipPos} {
      append r $::optable::_data(bdHTML_flip)
    } else {
      append r $::optable::_data(bdHTML)
    }
  } elseif {$fmt == "ctext"} {
    append r "\n<center><window .oprepWin.text.bd></center>\n"
  }
  if {$rgames == 0} {
    append r $::optable::_docEnd($fmt)
    return $r
  }

  if {$::optable(Stats) > 0  ||
      $::optable(Oldest) > 0  ||
      $::optable(Newest) > 0  ||
      $::optable(Popular) > 0  ||
      ($::optable(MostFrequent) > 0 &&
       ($::optable(MostFrequentWhite) || $::optable(MostFrequentBlack)))} {
    append r [::optable::_sec $tr(OprepStatsHist)]
  }
  if {$::optable(Stats)} {
    append r [::optable::_subsec $tr(OprepStats)]
    append r [::optable::stats $fmt]
  }
  if {$::optable(Oldest) > 0} {
    append r [::optable::_subsec $tr(OprepOldest)]
    append r [sc_report opening best o $::optable(Oldest)]
  }
  if {$::optable(Newest) > 0} {
    append r [::optable::_subsec $tr(OprepNewest)]
    append r [sc_report opening best n $::optable(Newest)]
  }

  if {$::optable(Popular) > 0} {
    append r [::optable::_subsec $tr(OprepPopular)]
    set next ""
    if {$fmt == "latex"} { set next " & " }

    # A table showing popularity by year ranges:
    if {$fmt == "latex"} {
      append r "\\begin{tabular}{lccccccc}\n\\hline\n"
    } else {
      append r $preText
    }
    set sYear $tr(Year)
    set sEvery [::utils::string::Capital $tr(OprepEvery)]
    regsub "%u" $sEvery X sEvery
    set len [string length $sYear]
    if {[string length $sEvery] > $len} { set len [string length $sEvery] }
    append r [::utils::string::Pad $tr(Year) $len]
    foreach range {1800-99 1900-49 1950-69 1970-79 1980-89 1990-99 2000-09} {
      append r $next
      append r [::utils::string::PadCenter $range 8]
    }
    append r $n
    append r [::utils::string::Pad $sEvery $len]
    foreach y {1800 1900 1950 1970 1980 1990 2000} {
      append r $next
      append r [::utils::string::PadCenter $::optable::_data(range$y) 8]
    }
    append r $n
    if {$fmt == "latex"} {
      append r "\\hline\n\\end{tabular}\n"
    } else {
      append r $postText
    }

    append r "\n"

    # A table showing popularity in the last 1/5/10 years:
    if {$fmt == "latex"} {
      append r "\\begin{tabular}{lrr}\n"
    }
    foreach y {All 10 5 1} {
      if {$fmt == "ctext"} { append r "<tt>" }
      append r $tr(OprepFreq$y)
      if {$fmt == "ctext"} { append r "</tt>" }
      append r $next
      append r [format $tr(OprepEvery) $::optable::_data(ratio$y)]
      if {$y != "All"} {
        append r $next
        set d $::optable::_data(delta$y)
        if {$d > 0} {
          append r " ([format $tr(OprepUp) $d $percent])"
        } elseif {$d < 0} {
          append r " ([format $tr(OprepDown) [expr 0- $d] $percent])"
        } else {
        append r " ($tr(OprepSame))"
        }
      }
      append r "$n"
    }
    if {$fmt == "latex"} {
      append r "\\end{tabular}\n"
    }
  }

  if {$::optable(MostFrequent) > 0  &&  $::optable(MostFrequentWhite)} {
    append r [::optable::_subsec "$tr(OprepMostFrequent) ($tr(White))"]
    append r [sc_report opening players white $::optable(MostFrequent)]
  }
  if {$::optable(MostFrequent) > 0  &&  $::optable(MostFrequentBlack)} {
    append r [::optable::_subsec "$tr(OprepMostFrequent) ($tr(Black))"]
    append r [sc_report opening players black $::optable(MostFrequent)]
  }

  if {$::optable(AvgPerf)  ||  $::optable(HighRating)} {
    append r [::optable::_sec $tr(OprepRatingsPerf)]
  }
  if {$::optable(AvgPerf)} {
    append r [::optable::_subsec $tr(OprepAvgPerf)]
    set e [sc_report opening elo white]
    set welo [lindex $e 0]; set wng [lindex $e 1]
    set bpct [lindex $e 2]; set bperf [lindex $e 3]
    set e [sc_report opening elo black]
    set belo [lindex $e 0]; set bng [lindex $e 1]
    set wpct [lindex $e 2]; set wperf [lindex $e 3]
    append r "$tr(OprepWRating): $welo ($wng $games);  "
    append r "$tr(OprepWPerf): $wperf ($wpct$percent vs $belo)$n"
    append r "$tr(OprepBRating): $belo ($bng $games);  "
    append r "$tr(OprepBPerf): $bperf ($bpct$percent vs $welo)$n"
  }
  if {$::optable(HighRating) > 0} {
    append r [::optable::_subsec $tr(OprepHighRating)]
    append r [sc_report opening best a $::optable(HighRating)]
  }

  if {$::optable(Results)  ||
      ($::optable(Shortest) > 0  &&
       ($::optable(ShortestBlack) || $::optable(ShortestBlack)))} {
    append r [::optable::_sec $tr(OprepTrends)]
  }

  if {$::optable(Results)} {
    append r [::optable::_subsec $::tr(OprepResults)]
    append r [::optable::results opening $fmt]
  }
  if {$::optable(Shortest) > 0  &&  $::optable(ShortestWhite)} {
    append r [::optable::_subsec "$tr(OprepShortest) ($tr(White))"]
    append r [sc_report opening best w $::optable(Shortest)]
  }
  if {$::optable(Shortest) > 0  &&  $::optable(ShortestBlack)} {
    append r [::optable::_subsec "$tr(OprepShortest) ($tr(Black))"]
    append r [sc_report opening best b $::optable(Shortest)]
  }

  if {$::optable(MoveOrders) > 0  ||
      $::optable(MovesFrom) > 0  ||
      $::optable(Themes) > 0  ||
      $::optable(Endgames) > 0} {
    append r [::optable::_sec $tr(OprepMovesThemes)]
  }
  if {$::optable(MoveOrders) > 0} {
    append r [::optable::_subsec $tr(OprepMoveOrders)]
    set nOrders [sc_report opening moveOrders 0]
    set maxOrders $::optable(MoveOrders)
    if {$nOrders == 1} {
      append r $tr(OprepMoveOrdersOne)
    } elseif {$nOrders <= $maxOrders} {
      append r [format $tr(OprepMoveOrdersAll) $nOrders]
    } else {
      append r [format $tr(OprepMoveOrdersMany) $nOrders $maxOrders]
    }
    append r $n
    append r [sc_report opening moveOrders $maxOrders]
  }
  if {$::optable(MovesFrom)} {
    append r [::optable::_subsec $tr(OprepMovesFrom)]
    if {$fmt == "latex"} {
      append r $::optable::_data(latexTree)
    } else {
      append r $preText
      append r $::optable::_data(tree)
      append r $postText
    }
  }

  if {$::optable(Themes) > 0} {
    append r [::optable::_subsec $tr(OprepThemes)]
    append r [sc_report opening themes $tr(OprepThemeDescription:) \
                $tr(OprepThemeSameCastling:) $tr(OprepThemeOppCastling:) \
                $tr(OprepThemeKPawnStorm:) $tr(OprepThemeQueenswap:) \
                $tr(OprepTheme1BishopPair:) \
                $tr(OprepThemeWIQP:) $tr(OprepThemeBIQP:) \
                $tr(OprepThemeWP567:) $tr(OprepThemeBP234:) \
                $tr(OprepThemeOpenCDE:) ]
  }

  if {$::optable(Endgames) > 0} {
    append r [::optable::_subsec $tr(OprepEndgames)]
    append r "$tr(OprepEndClass:)$n"
    append r [sc_report opening endmat]
  }

  if {$withTable  &&  $::optable(MaxGames) > 0} {
    set sec [::optable::_sec $tr(OprepTheoryTable)]
    set comment ""
    if {$tgames > $::optable(MaxGames)} {
      set comment [format $tr(OprepTableComment) $::optable(MaxGames)]
    }
    append r [sc_report opening print $numRows $sec $comment]
  }
  append r $::optable::_docEnd($fmt)

  # Eszet (ss) characters seem to be mishandled by LaTeX, even with
  # the font encoding package, so convert them explicitly:
  if {$fmt == "latex"} { regsub -all  $r {{\\ss}} r }

  return $r
}

# table:
#   Produces only the ECO table, not any other part of the report.
#
proc ::optable::table {fmt} {
  sc_report opening format $fmt
  set ::optable::_data(fmt) $fmt
  set r {}
  append r $::optable::_docStart($fmt)
  set r [string map [list "\[OprepTitle\]" $::tr(OprepTitle)] $r]
  append r [sc_report opening print]
  append r $::optable::_docEnd($fmt)
  return $r
}


set reportFavorites {}

# updateFavoritesMenu
#   Update the Favorites menu in the report window, adding a
#   command for each favorite report position.
#
proc ::optable::updateFavoritesMenu {} {
  set m .oprepWin.menu.favorites.m
  $m delete 3 end
  $m add separator
  foreach entry $::reportFavorites {
    set name [lindex $entry 0]
    set moves [lindex $entry 1]
    $m add command -label $name \
      -command "importMoveList [list $moves]; ::optable::makeReportWin"
  }
  if {[llength $::reportFavorites] == 0} {
    $m entryconfigure 1 -state disabled
    $m entryconfigure 2 -state disabled
  } else {
    $m entryconfigure 1 -state normal
    $m entryconfigure 2 -state normal
  }
}

# favoriteReportNames
#   Return a list of the favorite report names.
#
proc ::optable::favoriteReportNames {} {
  set reportNames {}
  foreach entry $::reportFavorites {
    lappend reportNames [lindex $entry 0]
  }
  return $reportNames
}

# addFavoriteDlg
#   Adds the current position to the opening report favorites list.
#
proc ::optable::addFavoriteDlg {} {
  set w .addFavoriteDlg
  toplevel $w
  wm title $w "Scid: Add Opening Report Favorite"
  label $w.name -text "Enter a name for the opening report of this position:"
  pack $w.name -side top
  # label $w.name2 -text "(Use letters, digits, spaces and undercores only)"
  # pack $w.name2 -side top
  entry $w.e -width 40
  pack $w.e -side top -fill x -padx 2
  addHorizontalRule $w
  label $w.old -text "Existing favorite report names:"
  pack $w.old -side top
  pack [frame $w.existing] -side top -fill x -padx 2
  text $w.existing.list -width 30 -height 10 -background gray90 \
    -yscrollcommand [list $w.existing.ybar set]
  scrollbar $w.existing.ybar -command [list $w.existing.list yview]
  pack $w.existing.ybar -side right -fill y
  pack $w.existing.list -side left -fill both -expand yes
  foreach entry $::reportFavorites {
      $w.existing.list insert end "[lindex $entry 0]\n"
  }
  $w.existing.list configure -state disabled
  addHorizontalRule $w
  frame $w.b
  pack $w.b -side bottom -fill x
  button $w.b.ok -text OK -command ::optable::addFavoriteOK
  button $w.b.cancel -text $::tr(Cancel) -command "grab release $w; destroy $w"
  pack $w.b.cancel $w.b.ok -side right -padx 5 -pady 5
  focus $w.e
  grab $w
}

proc ::optable::addFavoriteOK {} {
  global reportFavorites
  set w .addFavoriteDlg
  set reportName [$w.e get]
  set err ""
  if {$reportName == ""} {
    set err "The report name must not be empty."
  } elseif {[lsearch -exact [::optable::favoriteReportNames] $reportName] >= 0} {
    set err "That name is already used for another favorite report position."
  } else {
    lappend reportFavorites [list $reportName [sc_game moves]]
    ::optable::saveFavorites
    ::optable::updateFavoritesMenu
    grab release $w
    destroy $w
    return
  }
  tk_messageBox -title Scid -icon info -type ok -message $err
}

set reportFavoritesName ""

# editFavoritesDlg
#   Open the dialog box for editing the list of opening report
#   favorite positions.
#
proc ::optable::editFavoritesDlg {} {
  global reportFavorites reportFavoritesTemp reportFavoritesName
  set w .editFavoritesDlg
  if {[winfo exists $w]} { return }

  set ::reportFavoritesTemp $::reportFavorites
  toplevel $w
  wm title $w "Scid: [tr OprepFavoritesEdit]"
  wm transient $w .
  bind $w <F1> {helpWindow Reports Opening}
  entry $w.e -width 60 -foreground black -background white \
    -textvariable reportFavoritesName -font font_Small -exportselection 0
  bind $w.e <FocusIn>  "$w.e configure -background lightYellow"
  bind $w.e <FocusOut> "$w.e configure -background white"

  trace variable reportFavoritesName w ::optable::editFavoritesRefresh
  pack $w.e -side top -fill x
  pack [frame $w.b] -side bottom -fill x
  autoscrollframe $w.f listbox $w.f.list -width 50 -height 10 \
    -fg black -bg white -exportselection 0 -font font_Small -setgrid 1
  pack $w.f -side top -fill both -expand yes
  bind $w.f.list <<ListboxSelect>>  ::optable::editFavoritesSelect
  foreach entry $::reportFavoritesTemp {
    set name [lindex $entry 0]
    set moves [lindex $entry 1]
    $w.f.list insert end "$name \[$moves\]"
  }
  button $w.b.delete -text $::tr(Delete)  -command ::optable::editFavoritesDelete
  button $w.b.up -image bookmark_up -command {::optable::editFavoritesMove up}
  button $w.b.down -image bookmark_down -command {::optable::editFavoritesMove down}
  foreach i [list $w.b.up $w.b.down] {
    $i configure -padx 0 -pady 0 -borderwidth 1
  }
  button $w.b.ok -text "OK" -command ::optable::editFavoritesOK
  button $w.b.cancel -text "Cancel" -command {
    catch {grab release .editFavoritesDlg}
    destroy .editFavoritesDlg
  }
  pack $w.b.delete $w.b.up $w.b.down -side left -padx 2 -pady 2
  pack $w.b.cancel $w.b.ok -side right -padx 2 -pady 2
  set editFavoritesName ""

  wm withdraw $w
  update idletasks
  set x [expr {[winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \
                 - [winfo vrootx .]}]
  set y [expr {[winfo screenheight $w]/2 - [winfo reqheight $w]/2 \
                 - [winfo vrooty .]}]
  wm geom $w +$x+$y
  wm protocol $w WM_DELETE_WINDOW [list $w.b.cancel invoke]
  wm deiconify $w
  update
  catch {grab $w}
}

proc ::optable::editFavoritesRefresh {args} {
  global reportFavoritesTemp reportFavoritesName
  set list .editFavoritesDlg.f.list
  set sel [lindex [$list curselection] 0]
  if {$sel == ""} { return }
  set name $reportFavoritesName
  set e [lindex $reportFavoritesTemp $sel]
  set moves [lindex $e 1]
  set e [lreplace $e 0 0 $name]
  set reportFavoritesTemp [lreplace $reportFavoritesTemp $sel $sel $e]
  $list insert $sel "$name \[$moves\]"
  $list delete [expr $sel + 1]
  $list selection clear 0 end
  $list selection set $sel
}

proc ::optable::editFavoritesSelect {} {
  set list .editFavoritesDlg.f.list
  set sel [lindex [$list curselection] 0]
  if {$sel == ""} {
    set ::reportFavoritesName ""
    return
  }
  if {$sel >= [llength $::reportFavoritesTemp]} {
    $list selection clear 0 end
    set ::reportFavoritesName ""
    return
  }
  set e [lindex $::reportFavoritesTemp $sel]
  set ::reportFavoritesName [lindex $e 0]
}

proc ::optable::editFavoritesDelete {} {
  global reportFavoritesTemp
  set w .editFavoritesDlg
  set list $w.f.list
  set sel [lindex [$list curselection] 0]
  if {$sel == ""} { return }
  set reportFavoritesTemp [lreplace $reportFavoritesTemp $sel $sel]
  $list selection clear 0 end
  $list delete $sel
  set ::reportFavoritesName ""

}

proc ::optable::editFavoritesMove {dir} {
  global reportFavoritesTemp
  set w .editFavoritesDlg
  set list $w.f.list
  set sel [lindex [$list curselection] 0]
  if {$sel == ""} { return }
  set e [lindex $reportFavoritesTemp $sel]
  set name [lindex $e 0]
  set moves [lindex $e 1]
  set text "$name \[$moves\]"

  set newsel $sel
  if {$dir == "up"} {
    incr newsel -1
    if {$newsel < 0} { return }
  } else {
    incr newsel
    if {$newsel >= [$list index end]} { return }
  }
  set reportFavoritesTemp [lreplace $reportFavoritesTemp $sel $sel]
  set reportFavoritesTemp [linsert $reportFavoritesTemp $newsel $e]
  $list selection clear 0 end
  $list delete $sel
  $list insert $newsel $text
  $list selection set $newsel
}

proc ::optable::editFavoritesOK {} {
  set w .editFavoritesDlg
  catch {grab release $w}
  destroy $w
  set ::reportFavorites $::reportFavoritesTemp
  ::optable::saveFavorites
  ::optable::updateFavoritesMenu
}

proc ::optable::favoritesFilename {} {
  return [scidConfigFile reports]
}

proc ::optable::saveFavorites {} {
  set fname [::optable::favoritesFilename]
  if {[catch {open $fname w} f]} {
    # tk_messageBox ...
    return
  }
  puts $f "# Scid opening report favorites file"
  puts $f ""
  puts $f "set reportFavorites [list $::reportFavorites]"
  close $f
}

proc ::optable::loadFavorites {} {
  global reportFavorites
  set fname [::optable::favoritesFilename]
  catch {source $fname}
}

::optable::loadFavorites

set reportFormat html
set reportType full

proc ::optable::generateFavoriteReports {} {
  global reportFavorites
  if {[llength $reportFavorites] == 0} {
    tk_messageBox -title "Scid" -type ok -icon info \
      -message "You have no favorite report positions."
    return
  }
  set ::reportDir $::initialDir(report)

  set w .reportFavoritesDlg
  if {[winfo exists $w]} { return }
  toplevel $w
  wm title $w "Scid: Generate Reports..."
  pack [label $w.typelabel -text "Select the report type:" -font font_Bold] -side top
  pack [frame $w.type] -side top -padx 2
  radiobutton $w.type.full -text "Full" -variable reportType -value full
  radiobutton $w.type.compact -text "Compact (no theory table)" -variable reportType -value compact
  radiobutton $w.type.theory -text "Theory table only" -variable reportType -value theory
  pack $w.type.full $w.type.compact $w.type.theory -side left -padx 4
  addHorizontalRule $w
  pack [label $w.fmtlabel -text "Select the report file format:" -font font_Bold] -side top
  pack [frame $w.fmt] -side top -padx 2
  radiobutton $w.fmt.text -text "Plain text (.txt)" -variable reportFormat -value text
  radiobutton $w.fmt.html -text "HTML" -variable reportFormat -value html
  radiobutton $w.fmt.latex -text "LaTeX" -variable reportFormat -value latex
  pack $w.fmt.text $w.fmt.html $w.fmt.latex -side left -padx 4
  addHorizontalRule $w
  pack [frame $w.dir] -side top -padx 2 -pady 2
  label $w.dir.label -text "Save reports in the folder: " -font font_Bold
  entry $w.dir.entry -background white -textvariable ::reportDir
  button $w.dir.choose -text $::tr(Browse...) -command {
    set tmpdir [tk_chooseDirectory -parent .reportFavoritesDlg \
      -title "Scid: Choose Report Folder"]
    if {$tmpdir != ""} {
      set ::reportDir [file nativename $tmpdir]
    }
  }
  pack $w.dir.label -side left
  pack $w.dir.choose -side right
  pack $w.dir.entry -side left -fill x
  addHorizontalRule $w
  pack [frame $w.b] -side bottom -fill x
  button $w.b.ok -text "OK"\
    -command "::optable::reportFavoritesOK; grab release $w; destroy $w; ::optable::makeReportWin"
  button $w.b.cancel -text $::tr(Cancel) -command "grab release $w; destroy $w"
  pack $w.b.cancel $w.b.ok -side right -padx 5 -pady 5
  grab $w
}

proc ::optable::reportFavoritesOK {} {
  global reportDir reportFormat reportType
  set ::initialDir(report) $reportDir
  set fmt $reportFormat
  switch $reportFormat {
    "html" { set suffix ".html" }
    "text" { set suffix ".txt" }
    "latex" { set suffix "tex" }
  }

  set w .reportsProgress
  toplevel $w
  wm withdraw $w
  wm title $w "Scid: Generating Reports"
  bind $w <Visibility> "raiseWin $w"
  pack [label $w.t -width 40 -text "Generating reports. Please wait..." -font font_Bold] -side top -pady 5
  pack [label $w.report] -side top -pady 5
  ::utils::win::Centre $w
  wm deiconify $w
  grab $w
  update

  set count 0
  set total [llength $::reportFavorites]
  foreach entry $::reportFavorites {
    set name [lindex $entry 0]
    set moves [lindex $entry 1]
    set fname [file join $reportDir "$name$suffix"]
    if {[catch {open $fname w} f]} {
      tk_messageBox -title "Scid" -icon warning -type ok \
        -message "Unable to write file: $fname\n$f"
      grab release $w
      destroy $w
      return
    }
    incr count
    $w.report configure -text "$count / $total: $name$suffix"
    update
    sc_game push
    sc_move addSan $moves
    ::optable::makeReportWin -nodisplay -noprogress
    if {$reportType == "theory"} {
      set report [::optable::table $fmt]
    } elseif {$reportType == "compact"} {
      set report [::optable::report $fmt 0 $::optable::_flip]
    } else {
      set report [::optable::report $fmt 1 $::optable::_flip]
    }
    if {$::hasEncoding  &&  $::langEncoding($::language) != ""} {
      catch {set report [encoding convertto $::langEncoding($::language) $report]}
    }
    sc_game pop
    puts $f $report
    close $f
  }
  grab release $w
  destroy $w
}

# end of optable.tcl
# end of optable.tcl
# preport.tcl: Player reports.
# Part of Scid. Copyright 2003 Shane Hudson

namespace eval ::preport {}
array set ::preport::_data {}

set preport(MaxGames) 400

set ::preport::_player ""
set ::preport::_color white
set ::preport::_pos start
set ::preport::_clipbase 0

# preportDlg
#   Present a dialog allowing the user to select the
#   player and color for which to generate a player report.
#
proc ::preport::preportDlg {args} {

  # Set default player and color if parameters are provided
  if {[llength $args] >= 1} {
    set ::preport::_player [lindex $args 0]
    if {$::preport::_player == [sc_game info white]} {
      set ::preport::_color white
    } elseif {$::preport::_player == [sc_game info black]} {
      set ::preport::_color black
    }
  }
  if {[llength $args] >= 2} {
    set ::preport::_color [lindex $args 1]
  }

  set w .preportDlg
  if {[winfo exists $w]} { return }
  toplevel $w
  wm title $w "Scid: [tr ToolsPlayerReport]"
  wm resizable $w 0 0
  pack [label $w.plabel -text "Generate Player Report"]
  pack [frame $w.g] -side top -fill x -expand yes -padx 2
  label $w.g.where -text "Player:"
  grid $w.g.where -row 0 -column 0 -sticky w
  ::combobox::combobox $w.g.player -width 40 -textvariable ::preport::_player
  ::utils::history::SetCombobox ::preport::_player $w.g.player
  grid $w.g.player -row 0 -column 1 -sticky we
  label $w.g.has -text "Color:"
  grid $w.g.has -row 1 -column 0 -sticky w
  frame $w.g.color
  radiobutton $w.g.color.white -text $::tr(White) \
    -variable ::preport::_color -value white
  frame $w.g.color.gap -width 5
  radiobutton $w.g.color.black -text $::tr(Black) \
    -variable ::preport::_color -value black
  pack $w.g.color.white $w.g.color.gap $w.g.color.black -side left
  grid $w.g.color -row 1 -column 1 -sticky w
  label $w.g.pos -text "Start position:"
  grid $w.g.pos -row 2 -column 0
  frame $w.g.pselect
  radiobutton $w.g.pselect.start -text "Standard start position" \
    -variable ::preport::_pos -value start
  radiobutton $w.g.pselect.current -text "Current board position" \
    -variable ::preport::_pos -value current
  pack $w.g.pselect.start $w.g.pselect.current -side left
  grid $w.g.pselect -row 2 -column 1 -sticky w
  checkbutton $w.g.clipbase -text $::tr(PReportClipbase) \
    -variable ::preport::_clipbase
  grid $w.g.clipbase -row 3 -column 1 -sticky w
  addHorizontalRule $w
  pack [frame $w.b] -side bottom -fill x
  pack [frame $w.b2] -side bottom -fill x
  set whiteName [sc_game info white]
  set blackName [sc_game info black]
  dialogbutton $w.b2.white -text "$::tr(White) ($whiteName)" -command {
    set ::preport::_player [sc_game info white]
    set ::preport::_color white
  } -font font_Small
  dialogbutton $w.b2.black -text "$::tr(Black) ($blackName)" -command {
    set ::preport::_player [sc_game info black]
    set ::preport::_color black
  } -font font_Small
  if {$whiteName == ""  ||  $whiteName == "?"} {
    $w.b2.white configure -state disabled
  }
  if {$blackName == ""  ||  $blackName == "?"} {
    $w.b2.black configure -state disabled
  }

  dialogbutton $w.b.help -text $::tr(Help) \
    -command {helpWindow Reports Player}
  dialogbutton $w.b.ok -text OK \
    -command "catch {grab release $w}; destroy $w; ::preport::makeReportWin"
  dialogbutton $w.b.cancel -text $::tr(Cancel) \
    -command "catch {grab release $w}; destroy $w"
  foreach button {help ok cancel} {
    $w.b.$button configure -font font_Small
  }
  if {$whiteName != ""  &&  $whiteName != "?"} {
    packbuttons left $w.b2.white
  }
  if {$blackName != ""  &&  $blackName != "?"} {
    packbuttons right $w.b2.black
  }
  packbuttons right $w.b.cancel $w.b.ok
  packbuttons left $w.b.help
  if {[sc_base current] == [sc_info clipbase]} {
    $w.g.clipbase configure -state disabled
  }
  bind $w <Return> [list $w.b.ok invoke]
  bind $w <Escape> [list $w.b.cancel invoke]
  ::utils::win::Centre $w
  grab $w
  focus $w.g.player
}

proc ::preport::ConfigMenus {{lang ""}} {
  if {! [winfo exists .preportWin]} { return }
  if {$lang == ""} { set lang $::language }
  set m .preportWin.menu
  foreach menu {file help} tag {File Help} {
    configMenuName $m.$menu Oprep$tag $lang
  }
  foreach idx {0 1 2 4 6} tag {Text Html LaTeX Options Close} {
    configMenuText $m.file.m $idx OprepFile$tag $lang
  }
  foreach idx {0 1} tag {Report Index} {
    configMenuText $m.help.m $idx OprepHelp$tag $lang
  }

}

proc ::preport::makeReportWin {args} {
  if {! [sc_base inUse]} { return }
  set showProgress 1
  set args [linsert $args 0 "args"]
  if {[lsearch -exact $args "-noprogress"] >= 0} { set showProgress 0 }
  if {$showProgress} {
    set w .progress
    toplevel $w
    wm withdraw $w
    wm title $w "Scid: [tr ToolsPlayerReport]"
    bind $w <Visibility> "raiseWin $w"

    pack [frame $w.b] -side bottom -fill x
    set ::preport::_interrupt 0
    button $w.b.cancel -text $::tr(Cancel) -command {
      set ::preport::_interrupt 1
      sc_progressBar
    }
    pack $w.b.cancel -side right -pady 5 -padx 2

    foreach i {1 2} name {"Searching database for report games"
                        "Generating report information"} {
      label $w.text$i -text "$i. $name"
      pack $w.text$i -side top
      canvas $w.c$i -width 400 -height 20 -bg white -relief solid -border 1
      $w.c$i create rectangle 0 0 0 0 -fill blue -outline blue -tags bar
      $w.c$i create text 395 10 -anchor e -font font_Regular -tags time \
        -fill black -text "0:00 / 0:00"
      pack $w.c$i -side top -pady 10
    }
    wm resizable $w 0 0
    # Set up geometry for middle of screen:
    set x [winfo screenwidth $w]; set x [expr $x - 400]; set x [expr $x / 2]
    set y [winfo screenheight $w]; set y [expr $y - 20]; set y [expr $y / 2]
    wm geometry $w +$x+$y
    wm deiconify $w
    grab $w.b.cancel
    sc_progressBar $w.c1 bar 401 21 time
    busyCursor .
  }
  set searchArgs {}
  lappend searchArgs -filter RESET
  lappend searchArgs "-$::preport::_color"
  lappend searchArgs "\"$::preport::_player\""
  eval sc_search header $searchArgs
  if {$showProgress} {
    if {$::preport::_interrupt} {
      unbusyCursor .
      catch {grab release $w.b.cancel}
      destroy $w
      return
    }
    sc_progressBar $w.c2 bar 401 21 time
  }

  ::utils::history::AddEntry ::preport::_player $::preport::_player

  if {$::preport::_pos == "start"} { sc_game push }
  sc_search board AND Exact false
  sc_report player create $::preport(ExtraMoves) $::preport(MaxGames)
  if {$::preport::_pos == "start"} { sc_game pop }
  if {$::preport::_clipbase} {
    if {[sc_base current] != [sc_info clipbase]} {
      sc_clipbase clear
      sc_filter copy [sc_base current] [sc_info clipbase]
    }
  }
  if {$showProgress} {
    unbusyCursor .
    catch {grab release $w.b.cancel}
    destroy $w
    if {$::preport::_interrupt} { return }
  }
  set report [::preport::report ctext 1]

  if {[lsearch -exact $args "-nodisplay"] >= 0} { return }

  set w .preportWin
  if {![winfo exists $w]} {
    toplevel $w
    wm title $w "Scid: $::tr(PReportTitle)"
    frame $w.menu
    pack $w.menu -side top -fill x
    $w configure -menu $w.menu
    menubutton $w.menu.file -text File -menu $w.menu.file.m
    menubutton $w.menu.help -text Help -menu $w.menu.help.m
    foreach i {file help} {
      menu $w.menu.$i.m -tearoff 0
      pack $w.menu.$i -side left
    }
    $w.menu.file.m add command -label OprepFileText \
      -command {::preport::saveReport text}
    $w.menu.file.m add command -label OprepFileHtml \
      -command {::preport::saveReport html}
    $w.menu.file.m add command -label OprepFileLaTeX \
      -command {::preport::saveReport latex}
    $w.menu.file.m add separator
    $w.menu.file.m add command -label OprepFileOptions \
      -command ::preport::setOptions
    $w.menu.file.m add separator
    $w.menu.file.m add command -label Close \
      -command "$w.b.close invoke"
    $w.menu.help.m add command -label "Player Report Help" \
      -accelerator F1 -command {helpWindow Reports Player}
    $w.menu.help.m add command -label "Index" \
      -command {helpWindow Index}

    bind $w <F1> {helpWindow Reports Player}
    bind $w <Escape> "$w.b.close invoke"
    bind $w <Up> "$w.text yview scroll -1 units"
    bind $w <Down> "$w.text yview scroll 1 units"
    bind $w <Prior> "$w.text yview scroll -1 pages"
    bind $w <Next> "$w.text yview scroll 1 pages"
    bind $w <Key-Home> "$w.text yview moveto 0"
    bind $w <Key-End> "$w.text yview moveto 0.99"
    bindMouseWheel $w $w.text

    autoscrollframe -bars y $w.scroll text $w.text \
      -height 30 -width 85 -font font_Small -setgrid 1 -wrap word \
      -background white -foreground black -cursor top_left_arrow
    ::htext::init $w.text
    frame $w.b
    button $w.b.opts -text [tr OprepFileOptions] -command ::preport::setOptions
    button $w.b.help -textvar ::tr(Help) -command {helpWindow Reports Player}
    button $w.b.viewHTML -text $::tr(OprepViewHTML) \
      -command ::preport::previewHTML
    button $w.b.update -textvar ::tr(Update...) -command {
      ::preport::preportDlg
    }
    button $w.b.close -textvar ::tr(Close) -command "focus .; destroy $w"
    pack $w.b -side bottom -fill x
    pack $w.scroll -side top -fill both -expand yes
    pack $w.b.close $w.b.update -side right -padx 2 -pady 2
    if {$::windowsOS} {
      pack $w.b.viewHTML -side left -padx 2 -pady 2
    }
    pack $w.b.opts -side left -padx 2 -pady 2
    ::preport::ConfigMenus
    ::utils::win::Centre $w
  }

  busyCursor .
  $w.text configure -state normal
  $w.text delete 1.0 end
  regsub -all "\n" $report "<br>" report
  ::htext::display $w.text $report
  $w.text configure -state disabled
  unbusyCursor .
  ::windows::gamelist::Refresh
  ::windows::stats::Refresh
}


proc ::preport::setOptions {} {
  set w .preportOptions
  if {[winfo exists $w]} { return }
  toplevel $w
  pack [frame $w.f] -side top -fill x -padx 5 -pady 5
  set row 0
  foreach i {Stats AvgPerf Results MovesFrom Themes Endgames} {
    set yesno($i) 1
  }
  foreach i {Stats Oldest Newest MostFrequentOpponents Results sep \
               AvgPerf HighRating sep \
               MostFrequentEcoCodes Themes Endgames sep \
               MaxGames ExtraMoves} {
    set from 0; set to 10; set tick 1; set res 1
    if {$i == "MaxGames"} {
      set from 0; set to 500; set tick 100; set res 50
    }
    if {$i == "sep"} {
      frame $w.f.fsep$row -height 2 -borderwidth 2 -relief sunken -bg white
      frame $w.f.tsep$row -height 2 -borderwidth 2 -relief sunken -bg white
      grid $w.f.fsep$row -row $row -column 0 -sticky we -columnspan 4
      #grid $w.f.tsep$row -row $row -column 1 -sticky we -columnspan 2
    } elseif {[info exists yesno($i)]} {
      frame $w.f.f$i
      radiobutton $w.f.f$i.yes -variable ::preport($i) -value 1 \
        -text "$::tr(Yes)   " -font font_Small
      radiobutton $w.f.f$i.no -variable ::preport($i) -value 0 \
        -text "$::tr(No)   "  -font font_Small
      pack $w.f.f$i.yes -side left
      pack $w.f.f$i.no -side right
      label $w.f.t$i -textvar ::tr(Oprep$i) -font font_Small
      grid $w.f.f$i -row $row -column 0 -sticky n
      grid $w.f.t$i -row $row -column 1 -sticky w -columnspan 3
    } else {
      scale $w.f.s$i -variable ::preport($i) -from $from -to $to \
        -width 8 -length 200 -tickinterval $tick -orient horizontal \
        -font font_Small -resolution $res -showvalue 0
      label $w.f.t$i -textvar ::tr(Oprep$i) -font font_Small
      grid $w.f.s$i -row $row -column 0 -sticky we
      grid $w.f.t$i -row $row -column 1 -sticky w -columnspan 3
    }
    grid rowconfigure $w.f $row -pad 2
    incr row
  }
  addHorizontalRule $w
  pack [frame $w.b] -side bottom -fill x
  button $w.b.defaults -textvar ::tr(Defaults) -command {
    array set ::preport [array get ::preportDefaults]
  }
  button $w.b.ok -text "OK" -command {
    destroy .preportOptions
    catch {set ::preport::_data(yview) [lindex [.preportWin.text yview] 0]}
    ::preport::makeReportWin
    catch {.preportWin.text yview moveto $::preport::_data(yview)}
  }
  button $w.b.cancel -textvar ::tr(Cancel) -command {
    array set ::preport [array get ::preport::backup]
    destroy .preportOptions
  }
  pack $w.b.defaults -side left -padx 5 -pady 5
  pack $w.b.cancel $w.b.ok -side right -padx 5 -pady 5
  array set ::preport::backup [array get ::preport]
  wm resizable $w 0 0
  wm title $w  "Scid: [tr ToolsPlayerReport]: [tr OprepFileOptions]"
  bind $w <Escape> "$w.b.cancel invoke"
}


# previewHTML:
#   Saves the report to a temporary file, and invokes the user's web
#   browser to display it.
#
proc ::preport::previewHTML {} {
  busyCursor .
  set tmpdir $::scidLogDir
  set tmpfile "TempPlayerReport"
  set fname [file join $tmpdir $tmpfile]
  if {[catch {set tempfile [open $fname.html w]}]} {
    tk_messageBox -title "Scid: Error writing report" -type ok -icon warning \
      -message "Unable to write the file: $fname.html"
  }
  puts $tempfile [::preport::report html 1]
  close $tempfile
  if {[string match $::tcl_platform(os) "Windows NT"]} {
    catch {exec $::env(COMSPEC) /c start $fname.html &}
  } else {
    catch {exec start $fname.html &}
  }
  unbusyCursor .
}

proc ::preport::saveReport {fmt} {
  set default ".txt"
  set ftype {
    { "Text files" {".txt"} }
    { "All files"  {"*"}    }
  }
  if {$fmt == "latex"} {
    set default ".tex"
    set ftype {
      { "LaTeX files" {".tex" ".ltx"} }
      { "All files"  {"*"}    }
    }
  } elseif {$fmt == "html"} {
    set default ".html"
    set ftype {
      { "HTML files" {".html" ".htm"} }
      { "All files"  {"*"}    }
    }
  }

  set fname [tk_getSaveFile -initialdir [pwd] -filetypes $ftype \
               -defaultextension $default -title "Scid: Save opening report"]
  if {$fname == ""} { return }

  busyCursor .
  if {[catch {set tempfile [open $fname w]}]} {
    tk_messageBox -title "Scid: Error writing report" -type ok -icon warning \
      -message "Unable to write the file: $fname\n\n"
  } else {
    set report [::preport::report $fmt 1]
    if {$::hasEncoding  &&  $::langEncoding($::language) != ""} {
      catch {set report [encoding convertto $::langEncoding($::language) $report]}
    }
    puts $tempfile $report
    close $tempfile
  }
  unbusyCursor .
}

proc ::preport::_reset {} {
  set ::preport::_data(sec) 0
  set ::preport::_data(subsec) 0
}

proc ::preport::_title {} {
  set fmt $::preport::_data(fmt)
  set title $::tr(PReportTitle)
  if {$fmt == "latex"} {
    return "\\begin{center}{\\LARGE \\bf $title}\\end{center}\n\n"
  } elseif {$fmt == "html"} {
    return "<h1><center>$title</center></h1>\n\n"
  } elseif {$fmt == "ctext"} {
    return "<h1><center>$title</center></h1>\n\n"
  }
  set r    "--------------------------------------------------------------"
  append r "\n                        [string toupper $title]\n"
  append r "--------------------------------------------------------------"
  append r "\n\n"
  return $r
}

proc ::preport::_sec {text} {
  set fmt $::preport::_data(fmt)
  incr ::preport::_data(sec)
  set ::preport::_data(subsec) 0
  if {$fmt == "latex"} {
    return "\n\n\\section{$text}\n"
  } elseif {$fmt == "html"} {
    return "\n<h2>$::preport::_data(sec). $text</h2>\n"
  } elseif {$fmt == "ctext"} {
    return "<h4>$::preport::_data(sec). $text</h4>"
  }
  set line "$::preport::_data(sec). [string toupper $text]"
  set underline "-----------------------------------------------------"
  return "\n\n$line\n[string range $underline 1 [string length $line]]\n"
}

proc ::preport::_subsec {text} {
  set fmt $::preport::_data(fmt)
  incr ::preport::_data(subsec)
  if {$fmt == "latex"} {
    return "\n\\subsection{$text}\n\n"
  } elseif {$fmt == "html"} {
    return "\n<h3>$::preport::_data(sec).$::preport::_data(subsec) $text</h3>\n\n"
  } elseif {$fmt == "ctext"} {
    return "\n<maroon><b>$::preport::_data(sec).$::preport::_data(subsec) $text</b></maroon>\n\n"
  }
  return "\n$::preport::_data(sec).$::preport::_data(subsec)  $text\n\n"
}


proc ::preport::report {fmt {withTable 1}} {
  global tr preport
  sc_report player format $fmt
  set fmt [string tolower $fmt]
  set ::preport::_data(fmt) $fmt
  ::preport::_reset

  # numRows: the number of rows to show in the theory table.
  # If it is zero, the number of rows if decided according to the
  # number of games in the report.
  set numRows 0

  # Specify whether a theory table is to be printed, so note numbers
  # can be generated and displayed if necessary:
  sc_report player notes $withTable $numRows

  set n "\n"; set p "\n\n"; set preText ""; set postText ""
  set percent "%"; set bullet "  * "
  if {$fmt == "latex"} {
    set n "\\\\\n"; set p "\n\n"
    #set preText "{\\samepage\\begin{verbatim}\n"
    #set postText "\\end{verbatim}\n}\n"
    set percent "\\%"; set bullet "\\hspace{0.5cm}\$\\bullet\$"
  } elseif {$fmt == "html"} {
    set n "<br>\n"; set p "<p>\n\n"
    set preText "<pre>\n"; set postText "</pre>\n"
  } elseif {$fmt == "ctext"} {
    set preText "<tt>"; set postText "</tt>"
  }

  # Generate the report:
  set games $tr(games)
  set moves $tr(moves)
  set counts [sc_report player count]
  set rgames [lindex $counts 0]
  set tgames [lindex $counts 1]

  set r {}
  append r $::optable::_docStart($fmt)
  set r [string map [list "\[OprepTitle\]" $tr(PReportTitle)] $r]
  append r [::preport::_title]
  append r "$tr(Player): \"$::preport::_player\""
  if {$::preport::_color == "white"} {
    append r " $tr(PReportColorWhite)"
  } else {
    append r " $tr(PReportColorBlack)"
  }
  set eco ""
  if {$::preport::_pos == "current"  &&  ![sc_pos isAt start]} {
    append r " [format $tr(PReportMoves) [sc_report player line]]"
    set eco [sc_report player eco]
  }
  append r " ("
  if {$fmt == "ctext"} {
    append r "<darkblue><run sc_report player select all 0; ::windows::stats::Refresh>"
  }
  append r "$rgames"
  if {$fmt == "ctext"} { append r "</run></darkblue>"; }
  append r " $games)$n"
  append r "$tr(Database): [file tail [sc_base filename]] "
  append r "([::utils::thousands [sc_base numGames]] $games)$n"
  if {$eco != ""} {
    append r "$tr(ECO): $eco$n"
  }
  append r "$::tr(OprepGenerated) Scid [sc_info version], [::utils::date::today]$n"

  if {$preport(Stats)  ||  $preport(Oldest) > 0  ||  $preport(Newest) > 0  ||
      $preport(MostFrequentOpponents) > 0  ||  $preport(Results)} {
    append r [::preport::_sec $tr(OprepStatsHist)]
  }
  if {$preport(Stats)} {
    append r [::preport::_subsec $tr(OprepStats)]
    append r [::optable::stats $fmt]
  }
  if {$preport(Oldest) > 0} {
    append r [::preport::_subsec $tr(OprepOldest)]
    append r [sc_report player best o $preport(Oldest)]
  }
  if {$preport(Newest) > 0} {
    append r [::preport::_subsec $tr(OprepNewest)]
    append r [sc_report player best n $preport(Newest)]
  }
  if {$preport(MostFrequentOpponents) > 0} {
    append r [::preport::_subsec "$tr(OprepMostFrequentOpponents)"]
    if {$::preport::_color == "white"} {
      append r [sc_report player players black $preport(MostFrequentOpponents)]
    } else {
      append r [sc_report player players white $preport(MostFrequentOpponents)]
    }
  }
  if {$preport(Results)} {
    append r [::preport::_subsec $::tr(OprepResults)]
    append r [::optable::results player $fmt]
  }

  if {$preport(AvgPerf)  ||  $preport(HighRating)} {
    append r [::preport::_sec $tr(OprepRatingsPerf)]
  }
  if {$preport(AvgPerf)} {
    append r [::preport::_subsec $tr(OprepAvgPerf)]
    set e [sc_report player elo white]
    set welo [lindex $e 0]; set wng [lindex $e 1]
    set bpct [lindex $e 2]; set bperf [lindex $e 3]
    set e [sc_report player elo black]
    set belo [lindex $e 0]; set bng [lindex $e 1]
    set wpct [lindex $e 2]; set wperf [lindex $e 3]
    append r "$tr(OprepWRating): $welo ($wng $games);  "
    append r "$tr(OprepWPerf): $wperf ($wpct$percent vs $belo)$n"
    append r "$tr(OprepBRating): $belo ($bng $games);  "
    append r "$tr(OprepBPerf): $bperf ($bpct$percent vs $welo)$n"
  }
  if {$preport(HighRating) > 0} {
    append r [::preport::_subsec $tr(OprepHighRating)]
    append r [sc_report player best a $preport(HighRating)]
  }

  if {$preport(Themes)  ||  $preport(MostFrequentEcoCodes) > 0  ||
      $preport(Endgames)} {
    append r [::preport::_sec $tr(OprepMovesThemes)]
  }
  if {$preport(MostFrequentEcoCodes) > 0} {
    append r [::preport::_subsec $tr(PReportOpenings)]
    append r [sc_report player eco $preport(MostFrequentEcoCodes)]
  }
  if {$preport(Themes)} {
    append r [::preport::_subsec $tr(OprepThemes)]
    append r [sc_report player themes $tr(OprepThemeDescription:) \
                $tr(OprepThemeSameCastling:) $tr(OprepThemeOppCastling:) \
                $tr(OprepThemeKPawnStorm:) $tr(OprepThemeQueenswap:) \
                $tr(OprepTheme1BishopPair:) \
                $tr(OprepThemeWIQP:) $tr(OprepThemeBIQP:) \
                $tr(OprepThemeWP567:) $tr(OprepThemeBP234:) \
                $tr(OprepThemeOpenCDE:) ]
  }
  if {$preport(Endgames)} {
    append r [::preport::_subsec $tr(OprepEndgames)]
    append r "$tr(OprepEndClass:)$n"
    append r [sc_report player endmat]
  }

  if {$withTable  &&  $::preport(MaxGames) > 0} {
    set sec [::preport::_sec $tr(OprepTheoryTable)]
    set comment ""
    if {$tgames > $::preport(MaxGames)} {
      set comment [format $tr(OprepTableComment) $::preport(MaxGames)]
    }
    append r [sc_report player print $numRows $sec $comment]
  }
  append r $::optable::_docEnd($fmt)

  # Eszet (ss) characters seem to be mishandled by LaTeX, even with
  # the font encoding package, so convert them explicitly:
  if {$fmt == "latex"} { regsub -all  $r {{\\ss}} r }

  return $r
}

####################
# Player Info window

set playerInfoName ""

proc playerInfo {{player ""}} {
  global playerInfoName
  if {$player == ""} { set player $playerInfoName }
  if {[catch {sc_name info -htext $player} pinfo]} { return }
  set playerInfoName $player
  set ::rgraph(player) $player
  set w .playerInfoWin
  if {! [winfo exists $w]} {
    toplevel $w
    setWinLocation $w
    wm title $w "Scid: [tr ToolsPInfo]"
    wm minsize $w 40 5
    pack [frame $w.b2] -side bottom -fill x
    pack [frame $w.b] -side bottom -fill x
    button $w.b.graph -text [tr ToolsRating] \
      -command {::tools::graphs::rating::Refresh player $playerInfoName}
    button $w.b.edit -text $::tr(PInfoEditRatings) -command {
      makeNameEditor
      setNameEditorType rating
      set editName $playerInfoName
      set editNameSelect crosstable
    }
    button $w.b2.report -text [tr ToolsPlayerReport] \
      -command {::preport::preportDlg $playerInfoName}
    dialogbutton $w.b2.help -textvar ::tr(Help) -command {helpWindow PInfo}
    dialogbutton $w.b2.update -textvar ::tr(Update) -command {playerInfo $playerInfoName}
    dialogbutton $w.b2.close -textvar ::tr(Close) -command "focus .; destroy $w"
    packbuttons right $w.b2.close $w.b2.update $w.b2.help
    packbuttons left $w.b.graph $w.b.edit
    packbuttons left $w.b2.report

    autoscrollframe $w.frame text $w.text -font font_Regular -background white \
      -width $::winWidth($w) -height $::winHeight($w) -setgrid 1 -wrap none
    #scrollbar $w.ybar -command "$w.text yview"
    #pack $w.ybar -side right -fill y
    #text $w.text -font font_Regular -background white \
    #  -width $::winWidth($w) -height $::winHeight($w) \
    #  -setgrid 1 -wrap none -yscrollcommand "$w.ybar set"
    label $w.photo -background white
    #pack $w.text -side top -fill both -expand yes
    pack $w.frame -side top -fill both -expand yes
    bind $w <Escape> "focus .; destroy $w"
    ::htext::init $w.text
    ::htext::updateRate $w.text 0
    bind $w <Escape> "focus .; destroy $w"
    bind $w <F1> {helpWindow PInfo}
    bind $w <Configure> "recordWinSize $w"
    standardShortcuts $w
  }
  if {[info exists ::photo($player)]} {
    image create photo photoPInfo -data $::photo($player)
    $w.photo configure -image photoPInfo -anchor ne
    place $w.photo -in $w.text -relx 1.0 -x -1 -rely 0.0 -y 1 -anchor ne
  } else {
    place forget $w.photo
  }
  $w.text configure -state normal
  $w.text delete 1.0 end
  ::htext::display $w.text $pinfo
  $w.text configure -state disabled
  ::windows::gamelist::Refresh
  ::maint::Refresh
  #raiseWin $w
}

###
### analysis.tcl: part of Scid.
### Copyright (C) 1999-2003  Shane Hudson.
###

######################################################################
### Analysis window: uses a chess engine to analyze the board.

# analysis(logMax):
#   The maximum number of log message lines to be saved in a log file.
set analysis(logMax) 500

# analysis(log_stdout):
#   Set this to 1 if you want Scid-Engine communication log messages
#   to be echoed to stdout.
#
set analysis(log_stdout) 0


# resetEngine:
#   Resets all engine-specific data.
#
proc resetEngine {n} {
  global analysis
  set analysis(pipe$n) ""             ;# Communication pipe file channel
  set analysis(seen$n) 0              ;# Seen any output from engine yet?
  set analysis(seenEval$n) 0          ;# Seen evaluation line yet?
  set analysis(score$n) 0             ;# Current score in centipawns
  set analysis(nodes$n) 0             ;# Number of (kilo)nodes searched
  set analysis(depth$n) 0             ;# Depth in ply
  set analysis(prev_depth$n) 0        ;# Previous depth
  set analysis(time$n) 0              ;# Time in centisec (or sec; see below)
  set analysis(moves$n) ""            ;# PV (best line) output from engine
  set analysis(movelist$n) {}         ;# Moves to reach current position
  set analysis(nonStdStart$n) 0       ;# Game has non-standard start
  set analysis(has_analyze$n) 0       ;# Engine has analyze command
  set analysis(has_setboard$n) 0      ;# Engine has setboard command
  set analysis(send_sigint$n) 0       ;# Engine wants INT signal
  set analysis(wants_usermove$n) 0    ;# Engine wants "usermove" before moves
  set analysis(isCrafty$n) 0          ;# Engine appears to be Crafty
  set analysis(wholeSeconds$n) 0      ;# Engine times in seconds not centisec
  set analysis(analyzeMode$n) 0       ;# Scid has started analyze mode
  set analysis(invertScore$n) 1       ;# Score is for side to move, not white
  set analysis(automove$n) 0
  set analysis(automoveThinking$n) 0
  set analysis(automoveTime$n) 4000
  set analysis(lastClicks$n) 0
  set analysis(after$n) ""
  set analysis(log$n) ""              ;# Log file channel
  set analysis(logCount$n) 0          ;# Number of lines sent to log file
  set analysis(wbEngineDetected$n) 0  ;# Is this a special Winboard engine?
  set analysis(priority$n) normal     ;# CPU priority: idle/normal
}

resetEngine 1
resetEngine 2

set annotateMode 0
set annotateMoves all

 
# calculateNodes:
#   Divides string-represented node count by 1000
#
proc calculateNodes {{n}} {
  set len [string length $n]
  if { $len < 4 } {
     return 0 
  } else {
     set shortn [string range $n 0 [expr {$len - 4}]]
     scan $shortn "%d" nd
     return $nd
  }
}


# resetAnalysis:
#   Resets the analysis statistics: score, depth, etc.
#
proc resetAnalysis {{n 1}} {
  global analysis
  set analysis(score$n) 0
  set analysis(nodes$n) 0
  set analysis(prev_depth$n) 0
  set analysis(depth$n) 0
  set analysis(time$n) 0
  set analysis(moves$n) ""
}

namespace eval enginelist {}

set engines(list) {}

# engine:
#   Adds an engine to the engine list.
#   Calls to this function will be found in the user engines.lis
#   file, which is sourced below.
#
proc engine {arglist} {
  global engines
  array set newEngine {}
  foreach {attr value} $arglist {
    set newEngine($attr) $value
  }
  # Check that required attributes exist:
  if {! [info exists newEngine(Name)]} { return  0 }
  if {! [info exists newEngine(Cmd)]} { return  0 }
  if {! [info exists newEngine(Dir)]} { return  0 }
  # Fill in optional attributes:
  if {! [info exists newEngine(Args)]} { set newEngine(Args) "" }
  if {! [info exists newEngine(Elo)]} { set newEngine(Elo) 0 }
  if {! [info exists newEngine(Time)]} { set newEngine(Time) 0 }
  if {! [info exists newEngine(URL)]} { set newEngine(URL) "" }
  lappend engines(list) [list $newEngine(Name) $newEngine(Cmd) \
                           $newEngine(Args) $newEngine(Dir) \
                           $newEngine(Elo) $newEngine(Time) \
                           $newEngine(URL)]
  return 1
}

# ::enginelist::read
#   Reads the user Engine list file.
#
proc ::enginelist::read {} {
  catch {source [scidConfigFile engines]}
}

# ::enginelist::write:
#   Writes the user Engine list file.
#
proc ::enginelist::write {} {
  global engines
  set enginesFile [scidConfigFile engines]
  set enginesBackupFile [scidConfigFile engines.bak]
  # Try to rename old file to backup file and open new file:
  catch {file rename -force $enginesFile $enginesBackupFile}
  if {[catch {open $enginesFile w} f]} {
    catch {file rename $enginesBackupFile $enginesFile}
    return 0
  }

  puts $f "\# Analysis engines list file for Scid [sc_info version]"
  puts $f ""
  foreach e $engines(list) {
    set name [lindex $e 0]
    set cmd [lindex $e 1]
    set args [lindex $e 2]
    set dir [lindex $e 3]
    set elo [lindex $e 4]
    set time [lindex $e 5]
    set url [lindex $e 6]
    puts $f "engine {"
    puts $f "  Name [list $name]"
    puts $f "  Cmd  [list $cmd]"
    puts $f "  Args [list $args]"
    puts $f "  Dir  [list $dir]"
    puts $f "  Elo  [list $elo]"
    puts $f "  Time [list $time]"
    puts $f "  URL  [list $url]"
    puts $f "}"
    puts $f ""
  }
  close $f
  return 1
}

# Read the user Engine List file now:
#
catch { ::enginelist::read }
if {[llength $engines(list)] == 0} {
  # No engines, so set up a default engine list with Scidlet and Crafty:
  set cmd scidlet
  if {$::windowsOS} {
    set cmd [file join $::scidExeDir scidlet.exe]
  }
  engine [list \
    Name Scidlet \
    Cmd  $cmd \
    Dir  . \
  ]
  set cmd crafty
  if {$::windowsOS} { set cmd wcrafty.exe }
  engine [list \
    Name Crafty \
    Cmd  $cmd \
    Dir  . \
    URL  ftp://ftp.cis.uab.edu/pub/hyatt/ \
  ]
}

# ::enginelist::date
#   Given a time in seconds since 1970, returns a
#   formatted date string.
proc ::enginelist::date {time} {
  return [clock format $time -format "%a %b %d %Y %H:%M"]
}

# ::enginelist::sort
#   Sort the engine list.
#   If the engine-open dialog is open, its list is updated.
#   The type defaults to the current engines(sort) value.
#
proc ::enginelist::sort {{type ""}} {
  global engines

  if {$type == ""} {
    set type $engines(sort)
  } else {
    set engines(sort) $type
  }
  switch $type {
    Name {
      set engines(list) [lsort -dictionary -index 0 $engines(list)]
    }
    Elo {
      set engines(list) [lsort -integer -decreasing -index 4 $engines(list)]
    }
    Time {
      set engines(list) [lsort -integer -decreasing -index 5 $engines(list)]
    }
  }

  # If the Engine-open dialog is open, update it:
  #
  set w .enginelist
  if {! [winfo exists $w]} { return }
  set f $w.list.list
  $f delete 0 end
  set count 0
  foreach engine $engines(list) {
    incr count
    set name [lindex $engine 0]
    set elo [lindex $engine 4]
    set time [lindex $engine 5]
    set date [::enginelist::date $time]
    set text [format "%2u. %-21s " $count $name]
    set eloText "    "
    if {$elo > 0} { set eloText [format "%4u" $elo] }
    append text $eloText
    set timeText "  "
    if {$time > 0} { set timeText "   $date" }
    append text $timeText
    $f insert end $text
  }
  $f selection set 0

  # Show the sorted column heading in red text:
  $w.title configure -state normal
  foreach i {Name Elo Time} {
    $w.title tag configure $i -foreground {}
  }
  $w.title tag configure $engines(sort) -foreground red
  $w.title configure -state disabled
}

# ::enginelist::choose
#   Select an engine from the Engine List.
#   Returns an integer index into the engines(list) list variable.
#   If no engine is selected, returns the empty string.
#
proc ::enginelist::choose {} {
  global engines
  set w .enginelist
  toplevel $w
  wm title $w "Scid: [tr ToolsAnalysis]"
   label $w.flabel -text $::tr(EngineList:) -font font_Bold
  pack $w.flabel -side top

  pack [frame $w.buttons] -side bottom -pady 6 -fill x
  frame $w.rule -height 2 -borderwidth 2 -relief sunken -background white
  pack $w.rule -side bottom -fill x -pady 5

  # Set up title frame for sorting the list:
  text $w.title -width 55 -height 1 -font font_Fixed -relief flat \
    -cursor top_left_arrow
  $w.title insert end "    "
  $w.title insert end $::tr(EngineName) Name
  for {set i [string length $::tr(EngineName)]} {$i < 21} { incr i } {
    $w.title insert end " "
  }
  $w.title insert end "  "
  $w.title insert end $::tr(EngineElo) Elo
  for {set i [string length $::tr(EngineElo)]} {$i < 4} { incr i } {
    $w.title insert end " "
  }
  $w.title insert end "  "
  $w.title insert end $::tr(EngineTime) Time
  foreach i {Name Elo Time} {
    $w.title tag bind $i <Any-Enter> \
      "$w.title tag configure $i -background yellow"
    $w.title tag bind $i <Any-Leave> \
      "$w.title tag configure $i -background {}"
    $w.title tag bind $i <1> [list ::enginelist::sort $i]
  }
  $w.title configure -state disabled
  pack $w.title -side top -fill x

  # The list of choices:
  set f $w.list
  pack [frame $f] -side top -expand yes -fill both
  listbox $f.list -height 10 -width 55  -selectmode browse \
    -background white -setgrid 1 \
    -yscrollcommand "$f.ybar set" -font font_Fixed -exportselection 0
  bind $f.list <Double-ButtonRelease-1> "$w.buttons.ok invoke; break"
  scrollbar $f.ybar -command "$f.list yview"
  pack $f.ybar -side right -fill y
  pack $f.list -side top -fill both -expand yes
  $f.list selection set 0

  set f $w.buttons
  dialogbutton $f.add -text $::tr(EngineNew...) -command {::enginelist::edit -1}
  dialogbutton $f.edit -text $::tr(EngineEdit...) -command {
    ::enginelist::edit [lindex [.enginelist.list.list curselection] 0]
  }
  dialogbutton $f.delete -text $::tr(Delete...) -command {
    ::enginelist::delete [lindex [.enginelist.list.list curselection] 0]
  }
  label $f.sep -text "   "
  dialogbutton $f.ok -text "OK" -command {
    set engines(selection) [lindex [.enginelist.list.list curselection] 0]
    destroy .enginelist
  }
  dialogbutton $f.cancel -text $::tr(Cancel) -command {
    set engines(selection) ""
    destroy .enginelist
  }
  packbuttons right $f.cancel $f.ok
  pack $f.add $f.edit $f.delete -side left -padx 1

  ::enginelist::sort
  ::utils::win::Centre $w
  focus $w.list.list
  wm protocol $w WM_DELETE_WINDOW "destroy $w"
  bind $w <F1> { helpWindow Analysis List }
  bind $w <Escape> "destroy $w"
  bind $w.list.list <Return> "$w.buttons.ok invoke; break"
  set engines(selection) ""
  catch {grab $w}
  tkwait window $w
  return $engines(selection)
}

# ::enginelist::setTime
#   Sets the last-opened time of the engine specified by its
#   index in the engines(list) list variable.
#   The time should be in standard format (seconds since 1970)
#   and defaults to the current time.
#
proc ::enginelist::setTime {index {time -1}} {
  global engines
  set e [lindex $engines(list) $index]
  if {$time < 0} { set time [clock seconds] }
  set e [lreplace $e 5 5 $time]
  set engines(list) [lreplace $engines(list) $index $index $e]
}

trace variable engines(newElo) w [list ::utils::validate::Integer [sc_info limit elo] 0]

# ::enginelist::delete
#   Removes an engine from the list.
#
proc ::enginelist::delete {index} {
  global engines
  if {$index == ""  ||  $index < 0} { return }
  set e [lindex $engines(list) $index]
  set msg "Name: [lindex $e 0]\n"
  append msg "Command: [lindex $e 1]\n\n"
  append msg "Do you really want to remove this engine from the list?"
  set answer [tk_messageBox -title Scid -icon question -type yesno \
                -message $msg]
  if {$answer == "yes"} {
    set engines(list) [lreplace $engines(list) $index $index]
    ::enginelist::sort
    ::enginelist::write
  }
}

# ::enginelist::edit
#   Opens a dialog for editing an existing engine list entry (if
#   index >= 0), or adding a new entry (if index is -1).
#
proc ::enginelist::edit {index} {
  global engines
  if {$index == ""} { return }

  if {$index >= 0  ||  $index >= [llength $engines(list)]} {
    set e [lindex $engines(list) $index]
  } else {
    set e [list "" "" "" . 0 0 ""]
  }

  set engines(newIndex) $index
  set engines(newName) [lindex $e 0]
  set engines(newCmd) [lindex $e 1]
  set engines(newArgs) [lindex $e 2]
  set engines(newDir) [lindex $e 3]
  set engines(newElo) [lindex $e 4]
  set engines(newTime) [lindex $e 5]
  set engines(newURL) [lindex $e 6]
  set engines(newDate) $::tr(None)
  if {$engines(newTime) > 0 } {
    set engines(newDate) [::enginelist::date $engines(newTime)]
  }

  set w .engineEdit
  toplevel $w
  wm title $w Scid

  set f [frame $w.f]
  pack $f -side top -fill x -expand yes
  set row 0
  foreach i {Name Cmd Args Dir URL} {
    label $f.l$i -text $i
    if {[info exists ::tr(Engine$i)]} {
      $f.l$i configure -text $::tr(Engine$i)
    }
    entry $f.e$i -textvariable engines(new$i) -width 40
    bindFocusColors $f.e$i
    grid $f.l$i -row $row -column 0 -sticky w
    grid $f.e$i -row $row -column 1 -sticky we

    # Browse button for choosing an executable file:
    if {$i == "Cmd"} {
      button $f.b$i -text "..." -command {
        if {$::windowsOS} {
          set scid_temp(filetype) {
            {"Applications" {".bat" ".exe"} }
            {"All files" {"*"} }
          }
        } else {
          set scid_temp(filetype) {
            {"All files" {"*"} }
          }
        }
        set scid_temp(cmd) [tk_getOpenFile -initialdir $engines(newDir) \
                              -title "Scid: [tr ToolsAnalysis]" \
                    -filetypes $scid_temp(filetype)]
        if {$scid_temp(cmd) != ""} {
          set engines(newCmd) $scid_temp(cmd)
          if {[string first " " $scid_temp(cmd)] >= 0} {
            # The command contains spaces, so put it in quotes:
            set engines(newCmd) "\"$scid_temp(cmd)\""
          }
          # Set the directory from the executable path if possible:
          set engines(newDir) [file dirname $scid_temp(cmd)]
          if {$engines(newDir) == ""} [ set engines(newDir) .]
        }
      }
      grid $f.b$i -row $row -column 2 -sticky we
    }

    if {$i == "Dir"} {
      button $f.current -text " . " -command {
         set engines(newDir) .
      }
      button $f.user -text "~/.scid" -command {
        set engines(newDir) $scidUserDir
      }
      if {$::windowsOS} {
        $f.user configure -text "scid.exe dir"
      }
      grid $f.current -row $row -column 2 -sticky we
      grid $f.user -row $row -column 3 -sticky we
    }

    if {$i == "URL"} {
      button $f.bURL -text [tr FileOpen] -command {
        if {$engines(newURL) != ""} { openURL $engines(newURL) }
      }
      grid $f.bURL -row $row -column 2 -sticky we
    }

    incr row
  }

  grid columnconfigure $f 1 -weight 1

  # Mark required fields:
  $f.lName configure -font font_Bold
  $f.lCmd configure -font font_Bold
  $f.lDir configure -font font_Bold

  label $f.lElo -text $::tr(EngineElo)
  entry $f.eElo -textvariable engines(newElo) -justify right -width 5
  bindFocusColors $f.eElo
  grid $f.lElo -row $row -column 0 -sticky w
  grid $f.eElo -row $row -column 1 -sticky w
  incr row

  label $f.lTime -text $::tr(EngineTime)
  label $f.eTime -textvariable engines(newDate) -anchor w -width 1
  grid $f.lTime -row $row -column 0 -sticky w
  grid $f.eTime -row $row -column 1 -sticky we
  button $f.clearTime -text $::tr(Clear) -command {
    set engines(newTime) 0
    set engines(newDate) $::tr(None)
  }
  button $f.nowTime -text $::tr(Update) -command {
    set engines(newTime) [clock seconds]
    set engines(newDate) [::enginelist::date $engines(newTime)]
  }
  grid $f.clearTime -row $row -column 2 -sticky we
  grid $f.nowTime -row $row -column 3 -sticky we

  addHorizontalRule $w
  set f [frame $w.buttons]
  button $f.ok -text OK -command {
    if {[string trim $engines(newName)] == ""  ||
        [string trim $engines(newCmd)] == ""  ||
        [string trim $engines(newDir)] == ""} {
      tk_messageBox -title Scid -icon info \
        -message "The Name, Command and Directory fields must not be empty."
    } else {
      set newEntry [list $engines(newName) $engines(newCmd) \
                      $engines(newArgs) $engines(newDir) \
                      $engines(newElo) $engines(newTime) \
                      $engines(newURL)]
      if {$engines(newIndex) < 0} {
        lappend engines(list) $newEntry
      } else {
        set engines(list) [lreplace $engines(list) \
                             $engines(newIndex) $engines(newIndex) $newEntry]
      }
      destroy .engineEdit
      ::enginelist::sort
      ::enginelist::write
    }
  }
  button $f.cancel -text $::tr(Cancel) -command "destroy $w"
  pack $f -side bottom -fill x
  pack $f.cancel $f.ok -side right -padx 2 -pady 2
  label $f.required -font font_Small -text $::tr(EngineRequired)
  pack $f.required -side left

  bind $w <Return> "$f.ok invoke"
  bind $w <Escape> "destroy $w"
  bind $w <F1> { helpWindow Analysis List }
  focus $w.f.eName
  wm resizable $w 1 0
  catch {grab $w}
}

proc addAnalysisVariation {{n 1}} {
  global analysis annotateMoves annotateMode
  if {! [winfo exists .analysisWin$n]} { return }
  # Cannot add a variation to an empty variation:
  if {[sc_pos isAt vstart]  &&  [sc_pos isAt vend]} { return }
  # Cannot (yet) add a variation at the end of the game or a variation:
  if {[sc_pos isAt vend]} { return }

  set tomove [sc_pos side]
  if {$annotateMode} {
    if {$annotateMoves == "white"  &&  $tomove == "black"} { return }
    if {$annotateMoves == "black"  &&  $tomove == "white"} { return }
  }
  set text [format "%d:%+.2f" $analysis(depth$n) $analysis(score$n)]
  set moves $analysis(moves$n)
  # Temporarily clear the pre-move command since we want to add a
  # whole line without Scid updating stuff:
  sc_info preMoveCmd {}
  # Add the variation:
  sc_var create
  # Add the comment at the start of the variation:
  sc_pos setComment $text
  # Add as many moves as possible from the engine analysis:
  catch {sc_move addSan $moves}
  sc_var exit
  # Remove the variation if necessary:
  if {$annotateMode  &&  $annotateMoves == "notbest"} {
    set lastvar [expr {[sc_var count] - 1} ]
    set firstMove [lindex [sc_var list] $lastvar]
    if {$firstMove == [sc_game info next]} {
      sc_var delete $lastvar
    }
  }
  # Restore the pre-move command:
  sc_info preMoveCmd preMoveCommand
  updateBoard -pgn
  # Update score graph if it is open:
  if {[winfo exists .sgraph]} { ::tools::graphs::score::Refresh }
}

proc addAnalysisToComment {line {n 1}} {
  global analysis
  if {! [winfo exists .analysisWin$n]} { return }

  # If comment editor window is open, add the score there, otherwise
  # just add the comment directly:
  if {[winfo exists .commentWin]} {
    set tempStr [.commentWin.cf.text get 1.0 "end-1c"]
  } else {
    set tempStr [sc_pos getComment]
  }
  set score $analysis(score$n)
  if {$analysis(invertScore$n)  && (! [string compare [sc_pos side] "black"])} {
    set score [expr {0.0 - $score} ]
  }

  # If line is true, add the whole line, else just add the score:
  if {$line} {
    set scoretext [format "%+.2f: %s" $score $analysis(moves$n)]
  } else {
    set scoretext [format "%+.2f" $score]
  }

  # Strip out old score if it exists at the start of the comment:
  regsub {^\".*\"} $tempStr "" tempStr
  set newText "\"$scoretext\"$tempStr"
  if {[winfo exists .commentWin]} {
    .commentWin.cf.text delete 1.0 end
    .commentWin.cf.text insert 1.0 $newText
  } else {
    sc_pos setComment $newText
  }
  ::pgn::Refresh 1
}

proc makeAnalysisMove {{n 1}} {
  set s $::analysis(moves$n)
  while {1} {
    if {[string length $s] == 0} { return 0 }
    set c [string index $s 0]
    switch -- $c {
      a - b - c - d - e - f - g - h -
      K - Q - R - B - N - O {
        break
      }
    }
    set s [string range $s 1 end]
  }
  if {[scan $s "%s" move] != 1} { return 0 }
  set action "replace"
  if {! [sc_pos isAt vend]} {
      set action [confirmReplaceMove]
  }
  if {$action == "cancel"} { return }
  set ::analysis(automoveThinking$n) 0
  if {$action == "var"} { sc_var create }
  if {[catch {sc_move addSan $move}]} { return 0 }
  updateBoard -pgn -animate
  ::utils::sound::AnnounceNewMove $move
  return 1
}

# destroyAnalysisWin:
#   Closes an engine, because its analysis window is being destroyed.
#
proc destroyAnalysisWin {{n 1}} {
  global windowsOS analysis

  # Check the pipe is not already closed:
  if {$analysis(pipe$n) == ""} {
    set ::analysisWin$n 0
    return
  }

  # Send interrupt signal if the engine wants it:
  if {(!$windowsOS)  &&  $analysis(send_sigint$n)} {
    catch {exec -- kill -s INT [pid $analysis(pipe$n)]}
  }

  # Some engines in analyze mode may not react as expected to "quit"
  # so ensure the engine exits analyze mode first:
  sendToEngine $n "exit"
  sendToEngine $n "quit"
  flush $analysis(pipe$n)

  # Uncomment the following line to turn on blocking mode before
  # closing the engine (but probably not a good idea!)
  #   fconfigure $analysis(pipe$n) -blocking 1

  # Close the engine, ignoring any errors since nothing can really
  # be done about them anyway -- maybe should alert the user with
  # a message box?
  catch {close $analysis(pipe$n)}

  if {$analysis(log$n) != ""} {
    catch {close $analysis(log$n)}
    set analysis(log$n) ""
  }
  set analysis(pipe$n) ""
  set ::analysisWin$n 0
}

# sendToEngine:
#   Send a command to a running analysis engine.
#
proc sendToEngine {n text} {
  logEngine $n "Scid  : $text"
  catch {puts $::analysis(pipe$n) $text}
}

# sendMoveToEngine:
#   Sends a move to a running analysis engine, using sendToEngine.
#   If the engine has indicated (with "usermove=1" on a "feature" line)
#   that it wants it, send with "usermove " before the move.
#
proc sendMoveToEngine {n move} {
  # Convert "e7e8Q" into "e7e8q" since that is the XBoard/WinBoard
  # standard for sending moves in coordinate notation:
  set move [string tolower $move]
  if {$::analysis(wants_usermove$n)} {
    sendToEngine $n "usermove $move"
  } else {
    sendToEngine $n $move
  }
}

# logEngine:
#   Log Scid-Engine communication.
#
proc logEngine {n text} {
  global analysis

  # Print the log message to stdout if applicable:
  if {$::analysis(log_stdout)} {
    puts stdout $text
  }

  if {$::analysis(log$n) != ""} {
    puts $::analysis(log$n) $text

    # Close the log file if the limit is reached:
    incr analysis(logCount$n)
    if {$analysis(logCount$n) >= $analysis(logMax)} {
        puts $::analysis(log$n) \
          "NOTE  : Log file size limit reached; closing log file."
        catch {close $analysis(log$n)}
        set analysis(log$n) ""
    }
  }
}

# logEngineNote:
#   Add a note to the engine comminucation log file.
#
proc logEngineNote {n text} {
  logEngine $n "NOTE  : $text"
}


# makeAnalysisWin:
#   Produces the engine list dialog box for choosing an engine,
#   then opens an analysis window and starts the engine.
#
proc makeAnalysisWin {{n 1}} {
  global analysisWin$n font_Analysis analysisCommand analysis
  set w ".analysisWin$n"
  if {[winfo exists $w]} {
    focus .
    destroy $w
    set analysisWin$n 0
    resetEngine $n
    return
  }

  resetEngine $n
  set index [::enginelist::choose]
  if {$index == ""  ||  $index < 0} {
    set analysisWin$n 0
    return
  }
  ::enginelist::setTime $index
  catch {::enginelist::write}
  set engineData [lindex $::engines(list) $index]
  set analysisName [lindex $engineData 0]
  set analysisCommand [lindex $engineData 1]
  set analysisArgs [lindex $engineData 2]
  set analysisDir [lindex $engineData 3]
  if {$analysisArgs != ""} {
    append analysisCommand " $analysisArgs"
  }

  # If the analysis directory is not current dir, cd to it:
  set oldpwd ""
  if {$analysisDir != "."} {
    set oldpwd [pwd]
    catch {cd $analysisDir}
  }

  # Try to execute the analysis program:
  if {[catch {set analysis(pipe$n) [open "| $analysisCommand" "r+"]} result]} {
    if {$oldpwd != ""} { catch {cd $oldpwd} }
    tk_messageBox -title "Scid: error starting analysis" \
      -icon warning -type ok \
      -message "Unable to start the program:\n$analysisCommand"
    set analysisWin$n 0
    resetEngine $n
    return
  }

  set analysisWin$n 1

  # Return to original dir if necessary:
  if {$oldpwd != ""} { catch {cd $oldpwd} }

  # Open log file if applicable:
  set analysis(log$n) ""
  if {$analysis(logMax) > 0} {
    if {! [catch {open [file join $::scidLogDir "engine$n.log"] w} log]} {
      set analysis(log$n) $log
      logEngine $n "Scid-Engine communication log file"
      logEngine $n "Engine: $analysisName"
      logEngine $n "Command: $analysisCommand"
      logEngine $n "Date: [clock format [clock seconds]]"
      logEngine $n ""
      logEngine $n "This file was automatically generated by Scid."
      logEngine $n "It is rewritten every time an engine is started in Scid."
      logEngine $n ""
    }
  }

  # Configure pipe for line buffering and non-blocking mode:
  fconfigure $analysis(pipe$n) -buffering line -blocking 0

  #
  # Set up the  analysis window:
  #
  toplevel $w
  if {$n == 1} {
    wm title $w "Scid: Analysis: $analysisName"
  } else {
    wm title $w "Scid: Analysis $n: $analysisName"
  }
  bind $w <F1> { helpWindow Analysis }
  setWinLocation $w

  ::board::new $w.bd 25
  $w.bd configure -relief solid -borderwidth 1
  set analysis(showBoard$n) 0

  frame $w.b1
  frame $w.b2
  pack $w.b2 -side bottom -fill x
  pack $w.b1 -side bottom -fill x
  checkbutton $w.b1.automove -textvar ::tr(Training) \
    -relief raised -pady 5 -padx 4 \
    -command "toggleAutomove $n" -variable analysis(automove$n)
  button $w.b1.line -textvar ::tr(AddVariation) \
    -command "addAnalysisVariation $n"
  button $w.b1.move -textvar ::tr(AddMove) \
    -command "makeAnalysisMove $n"
  button $w.b1.showboard -image tb_coords -command "toggleAnalysisBoard $n"
  ::utils::tooltip::Set $w.b1.showboard "Show Analysis Board"
  if {$n == 1} {
    checkbutton $w.b2.annotate -textvar ::tr(Annotate...) \
      -variable annotateMode -relief raised -pady 5 -padx 4 \
      -command {toggleAutoplay 1}
  }
  checkbutton $w.b2.priority -text $::tr(LowPriority) \
      -variable analysis(priority$n) -onvalue idle -offvalue normal \
      -command "setAnalysisPriority $n"
  button $w.b2.update -textvar ::tr(Update) \
    -command "sendToEngine $n ."
  button $w.b2.help -textvar ::tr(Help) -command { helpWindow Analysis }
  button $w.b2.close -textvar ::tr(Close) -command "focus .; destroy $w"

  pack $w.b1.automove $w.b1.line $w.b1.move -side left -padx 2 -pady 2
  pack $w.b1.showboard -side right -padx 2 -pady 2
  pack $w.b2.close $w.b2.help $w.b2.update -side right -padx 2 -pady 2
  if {$n == 1} {
    pack $w.b2.annotate -side left -padx 2 -pady 2
  }
  pack $w.b2.priority -side left -padx 2 -pady 2

  text $w.text -width 50 -height 5 -fg black -bg white -font font_Fixed \
    -wrap word
  frame $w.hist
  text $w.hist.text -width 50 -height 4 -fg black -bg white -font font_Fixed \
    -wrap word -setgrid 1 -yscrollcommand "$w.hist.ybar set"
  $w.hist.text tag configure indent -lmargin2 \
    [font measure font_Fixed "xxxxxxxxxx"]
  scrollbar $w.hist.ybar -command "$w.hist.text yview" -takefocus 0
  pack $w.text -side top -fill both
  pack $w.hist -side top -expand 1 -fill both
  pack $w.hist.ybar -side right -fill y
  pack $w.hist.text -side left -expand 1 -fill both
  $w.text tag bind score <ButtonPress-1> "
    set analysis(invertScore$n) \[expr 1 - \$analysis(invertScore$n)\]
    updateAnalysisText $n
  "
  $w.text tag configure blue -foreground blue
  $w.text insert end "With some engines, you will not see any analysis \
until the board changes. So if you see this message, try changing the board \
by moving backwards or forwards or making a new move."
  $w.text configure -state disabled
  bind $w <Destroy> "destroyAnalysisWin $n"
  bind $w <Configure> "recordWinSize $w"
  wm minsize $w 45 0
  bindMouseWheel $w $w.hist.text

  fileevent $analysis(pipe$n) readable "processAnalysisInput $n"

  after 1000 "checkAnalysisStarted $n"
}

# setAnalysisPriority
#   Sets the priority class (in Windows) or nice level (in Unix)
#   of a running analysis engine.
#
proc setAnalysisPriority {n} {
  global analysis

  # Get the process ID of the analysis engine:
  if {$analysis(pipe$n) == ""} { return }
  set pidlist [pid $analysis(pipe$n)]
  if {[llength $pidlist] < 1} { return }
  set pid [lindex $pidlist 0]

  # Set the priority class (idle or normal):
  if {$::windowsOS} {
    catch {sc_info priority $pid $analysis(priority$n)}
  } else {
    set priority 0
    if {$analysis(priority$n) == "idle"} { set priority 15 }
    catch {sc_info priority $pid $priority}
  }

  # Re-read the priority class for confirmation:
  if {[catch {sc_info priority $pid} newpriority]} { return }
  if {$::windowsOS} {
    if {$newpriority == "idle"  ||  $newpriority == "normal"} {
      set analysis(priority$n) $newpriority
    }
  } else {
    set priority normal
    if {$newpriority > 0} { set priority idle }
    set analysis(priority$n) $priority
  }
}

# checkAnalysisStarted
#   Called a short time after an analysis engine was started
#   to send it commands if Scid has not seen any output from
#   it yet.
#
proc checkAnalysisStarted {n} {
  global analysis
  if {$analysis(seen$n)} { return }

  # Some Winboard engines do not issue any output when
  # they start up, so the fileevent above is never triggered.
  # Most, but not all, of these engines will respond in some
  # way once they have received input of some type.  This
  # proc will issue the same initialization commands as
  # those in processAnalysisInput below, but without the need
  # for a triggering fileevent to occur.

  logEngineNote $n {Quiet engine (still no output); sending it initial commands.}
  set analysis(seen$n) 1
  sendToEngine $n "xboard"
  sendToEngine $n "protover 2"
  sendToEngine $n "post"
  # Prevent some engines from making an immediate "book"
  # reply move as black when position is sent later:
  sendToEngine $n "force"
}

# processAnalysisInput
#   Called from a fileevent whenever there is a line of input
#   from an analysis engine waiting to be processed.
#
proc processAnalysisInput {{n 1}} {
  global analysis

  # Get one line from the engine:
  set line [gets $analysis(pipe$n)]
  logEngine $n "Engine: $line"

  # Check that the engine did not terminate unexpectedly:
  if {[eof $analysis(pipe$n)]} {
    fileevent $analysis(pipe$n) readable {}
    catch {close $analysis(pipe$n)}
    set analysis(pipe$n) ""
    logEngineNote $n {Engine terminated without warning.}
    catch {destroy .analysisWin$n}
    tk_messageBox -type ok -icon info -parent . -title "Scid" \
      -message "The analysis engine terminated without warning; it probably crashed or had an internal error."
  }

  if {! $analysis(seen$n)} {
    # First line of output from the program, so send initial commands:
    logEngineNote $n {First line from engine seen; sending it initial commands now.}
    set analysis(seen$n) 1
    sendToEngine $n "xboard"
    sendToEngine $n "protover 2"
    sendToEngine $n "post"
  }

  # Check for "feature" commands so we can determine if the engine
  # has the setboard and analyze commands:
  #
  if {! [string compare [string range $line 0 6] "feature"]} {
    if {[string match "*analyze=1*" $line]} { set analysis(has_analyze$n) 1 }
    if {[string match "*setboard=1*" $line]} { set analysis(has_setboard$n) 1 }
    if {[string match "*usermove=1*" $line]} { set analysis(wants_usermove$n) 1 }
    if {[string match "*sigint=1*" $line]} { set analysis(send_sigint$n) 1 }
    if {[string match "*myname=*" $line] && \
        [regexp "myname=\"(\[^\"\]*)\"" $line dummy name]} {
      if {$n == 1} {
        catch {wm title .analysisWin$n "Scid: Analysis: $name"}
      } else {
        catch {wm title .analysisWin$n "Scid: Analysis $n: $name"}
      }
    }
    if {$analysis(has_analyze$n)} { startAnalyzeMode $n }
    return
  }

  # Check for a line starting with "Crafty", so Scid can work well
  # with older Crafty versions that do not recognize "protover":
  #
  if {! [string compare [string range $line 0 5] "Crafty"]} {
    logEngineNote $n {Seen "Crafty"; assuming analyze and setboard commands.}
    set major 0
    if {[scan $line "Crafty v%d.%d" major minor] == 2  &&  $major >= 18} {
      logEngineNote $n {Crafty version is >= 18.0; assuming scores are from White perspective.}
      set analysis(invertScore$n) 0
    }
    # Turn off crafty logging, to reduce number of junk files:
    sendToEngine $n "log off"
    # Set a fairly low noise value so Crafty is responsive to board changes,
    # but not so low that we get lots of short-ply search data:
    sendToEngine $n "noise 1000"
    set analysis(isCrafty$n) 1
    set analysis(has_setboard$n) 1
    set analysis(has_analyze$n) 1
    startAnalyzeMode $n
    return
  }

  # Scan the line from the engine for the analysis data:
  #
  set res [scan $line "%d%c %d %d %s %\[^\n\]\n" \
             temp_depth dummy temp_score \
             temp_time temp_nodes temp_moves]
  if {$res == 6} {
    set analysis(depth$n) $temp_depth
    set analysis(score$n) $temp_score
    set analysis(time$n) $temp_time
    set analysis(nodes$n) [calculateNodes $temp_nodes]
    set analysis(moves$n) [formatAnalysisMoves $temp_moves]
    # Convert score to pawns from centipawns:
    set analysis(score$n) [expr {double($analysis(score$n)) / 100.0} ]
    # Convert time to seconds from centiseconds:
    if {! $analysis(wholeSeconds$n)} {
      set analysis(time$n) [expr {double($analysis(time$n)) / 100.0} ]
    }
    updateAnalysisText $n
    if {! $analysis(seenEval$n)} {
      # This is the first evaluation line seen, so send the current
      # position details to the engine:
      set analysis(seenEval$n) 1
      updateAnalysis $n
    }
    return
  }

  # Check for a "stat01:" line, the reply to the "." command:
  #
  if {! [string compare [string range $line 0 6] "stat01:"]} {
    if {[scan $line "%s %d %s %d" \
           dummy temp_time temp_nodes temp_depth] == 4} {
      set analysis(depth$n) $temp_depth
      set analysis(time$n) $temp_time
      set analysis(nodes$n) [calculateNodes $temp_nodes]
      # Convert time to seconds from centiseconds:
      if {! $analysis(wholeSeconds$n)} {
        set analysis(time$n) [expr {double($analysis(time$n)) / 100.0} ]
      }
      updateAnalysisText $n
    }
    return
  }

  # Check for other engine-specific lines:
  # The following checks are intended to make Scid work with
  # various WinBoard engines that are not properly configured
  # by the "feature" line checking code above.
  #
  # Many thanks to Allen Lake for testing Scid with many
  # WinBoard engines and providing this code and the detection
  # code in wbdetect.tcl

  if { !$analysis(wbEngineDetected$n) } { detectWBEngine $n $line }
  if { $analysis(has_analyze$n) } { startAnalyzeMode $n }

}

# formatAnalysisMoves:
#   Given the text at the end of a line of analysis data from an engine,
#   this proc tries to strip out some extra stuff engines add to make
#   the text more compatible for adding as a variation.
#
proc formatAnalysisMoves {text} {
  # Yace puts ".", "t", "t-" or "t+" at the start of its moves text,
  # unless directed not to in its .ini file. Get rid of it:
  if {[strIsPrefix ". " $text]} { set text [string range $text 2 end]}
  if {[strIsPrefix "t " $text]} { set text [string range $text 2 end]}
  if {[strIsPrefix "t- " $text]} { set text [string range $text 3 end]}
  if {[strIsPrefix "t+ " $text]} { set text [string range $text 3 end]}

  # Trim any initial or final whitespace:
  set text [string trim $text]

  # Yace often adds "H" after a move, e.g. "Bc4H". Remove them:
  regsub -all "H " $text " " text

  # Crafty adds "<HT>" for a hash table comment. Change it to "{HT}":
  regsub "<HT>" $text "{HT}" text

  return $text
}

# startAnalyzeMode:
#   Put the engine in analyze mode for the first time.
#
proc startAnalyzeMode {{n 1}} {
  global analysis
  # Check that the engine has not already had analyze mode started:
  if {$analysis(analyzeMode$n)} { return }
  set analysis(analyzeMode$n) 1
  set analysis(has_analyze$n) 1
  sendToEngine $n "analyze"
}

# updateAnalysisText
#   Update the text in an analysis window.
#
proc updateAnalysisText {{n 1}} {
  global analysis
  set nps 0
  if {$analysis(time$n) > 0.0} {
    set nps [expr {round($analysis(nodes$n) / $analysis(time$n))} ]
  }
  set newStr [format "Depth:   %6u      Nodes: %6uK (%u kn/s)\n" \
                $analysis(depth$n) $analysis(nodes$n) $nps]
  set score $analysis(score$n)
  if {$analysis(invertScore$n)  && (![string compare [sc_pos side] "black"])} {
    set score [expr {0.0 - $score} ]
  }
  append newStr [format "Score: %+8.2f      Time: %9.2f seconds\n" \
                   $score $analysis(time$n)]
  set t .analysisWin$n.text
  $t configure -state normal
  $t delete 0.0 end
  $t insert 1.0 $newStr
  if {$analysis(automove$n)} {
    if {$analysis(automoveThinking$n)} {
      set moves "   Thinking..... "
    } else {
      set moves "   Your move..... "
    }
    $t insert end $moves blue
    $t configure -state disabled
    updateAnalysisBoard $n ""
    return
  }

  set moves $analysis(moves$n)
  set h .analysisWin$n.hist.text
  $h configure -state normal
  set cleared 0
  if {$analysis(depth$n) < $analysis(prev_depth$n)  || \
      $analysis(prev_depth$n) == 0} {
    $h delete 1.0 end
    set cleared 1
  }
  if {! $cleared} { $h insert end "\n" }
  $h insert end [format "%2d %+5.2f  %s (%.2f)" $analysis(depth$n) \
                   $score $moves $analysis(time$n)] indent
  $h see end-1c
  $h configure -state disabled
  set analysis(prev_depth$n) $analysis(depth$n)

  $t insert end $moves blue
  $t tag add score 2.0 2.13
  $t configure -state disabled

  updateAnalysisBoard $n $moves
}

# toggleAnalysisBoard
#   Toggle whether the small analysis board is shown.
#
proc toggleAnalysisBoard {n} {
  global analysis
  if {$analysis(showBoard$n)} {
    set analysis(showBoard$n) 0
    pack forget .analysisWin$n.bd
  } else {
    set analysis(showBoard$n) 1
    pack .analysisWin$n.bd -side right -before .analysisWin$n.b2 \
      -padx 4 -pady 4 -anchor n
  }
}

# updateAnalysisBoard
#   Update the small analysis board in the analysis window,
#   showing the position after making the specified moves
#   from the current main board position.
#
proc updateAnalysisBoard {n moves} {
  global analysis
  # if {! $analysis(showBoard$n)} { return }

  set bd .analysisWin$n.bd
  # Temporarily wipe the premove command:
  sc_info preMoveCmd {}
  # Push a temporary copy of the current game:
  sc_game push copy

  # Make the engine moves and update the board:
  catch {sc_move addSan $moves}
  ::board::update $bd [sc_pos board]

  # Pop the temporary game:
  sc_game pop
  # Restore pre-move command:
  sc_info preMoveCmd preMoveCommand
}

# updateAnalysis
#   Update an analysis window by sending the current board
#   to the engine.
#
proc updateAnalysis {{n 1}} {
  global analysisWin analysis windowsOS
  if {$analysis(pipe$n) == ""} { return }
  # Just return if no output has been seen from the analysis program yet:
  if {! $analysis(seen$n)} { return }

  # If too close to the previous update, and no other future update is
  # pending, reschedule this update to occur in another 0.3 seconds:
  #
  if {[catch {set clicks [clock clicks -milliseconds]}]} {
    set clicks [clock clicks]
  }
  set diff [expr {$clicks - $analysis(lastClicks$n)} ]
  if {$diff < 300  &&  $diff >= 0} {
    if {$analysis(after$n) == ""} {
      set analysis(after$n) [after 300 updateAnalysis $n]
    }
    return
  }
  set analysis(lastClicks$n) $clicks
  set analysis(after$n) ""
  after cancel updateAnalysis $n

  set old_movelist $analysis(movelist$n)
  set movelist [sc_game moves coord list]
  set analysis(movelist$n) $movelist
  set nonStdStart [sc_game startBoard]
  set old_nonStdStart $analysis(nonStdStart$n)
  set analysis(nonStdStart$n) $nonStdStart

  if {$analysis(has_analyze$n)} {

    #
    # This section is for engines that support "analyze":
    #

    sendToEngine $n "exit"   ;# Get out of analyze mode, to send moves.

    # On Crafty, "force" command has different meaning when not in
    # XBoard mode, and some users have noticed Crafty not being in
    # that mode at this point -- although I cannot reproduce this.
    # So just re-send "xboard" to Crafty to make sure:
    if {$analysis(isCrafty$n)} { sendToEngine $n "xboard" }

    sendToEngine $n "force"  ;# Stop engine replying to moves.

    # Check if the setboard command must be used -- that is, if the
    # previous or current position arose from a non-standard start.

    if {$analysis(has_setboard$n)  &&  ($old_nonStdStart  || $nonStdStart)} {
      sendToEngine $n "setboard [sc_pos fen]"
      # Most engines with setboard do not recognize the crafty "mn"
      # command (it is not in the XBoard/WinBoard protocol), so
      # only send it to crafty:
      if {$analysis(isCrafty$n)} {
        sendToEngine $n "mn [sc_pos moveNumber]"
      }
      sendToEngine $n "analyze"
      return
    }

    # If we need a non-standard start and the engine does not have
    # setboard, the user is out of luck:
    if {$nonStdStart} {
      set analysis(moves$n) "  Sorry, this game has a non-standard start position."
      updateAnalysisText $n
      return
    }

    # Here, the engine has the analyze command but this game does
    # not have a non-standard start position.

    set oldlen [llength $old_movelist]
    set newlen [llength $movelist]

    # Check for optimization to minimize the commands to be sent:
    # Scid sends "undo" to backup wherever possible, and avoid "new" as
    # on many engines this would clear hash tables, causing poor
    # hash table performance.

    # Send just the new move if possible (if the new move list is exactly
    # the same as the previous move list, with one extra move):

    if {($newlen == $oldlen + 1) \
          && ($old_movelist == [lrange $movelist 0 [expr {$oldlen - 1} ]])} {
      sendMoveToEngine $n [lindex $movelist $oldlen]

    } elseif {($newlen + 1 == $oldlen) && \
                ($movelist == [lrange $old_movelist 0 [expr {$newlen - 1} ]])} {

      # Here the new move list is the same as the old list but with one
      # less move, just send one "undo":

      sendToEngine $n "undo"

    } elseif {$newlen == $oldlen  &&  $old_movelist == $movelist} {

      # Here the board has not changed, so send nothing

    } else {

      # Otherwise, undo and re-send all moves:
      for {set i 0} {$i < $oldlen} {incr i} {
        sendToEngine $n "undo"
      }
      foreach m $movelist {
        sendMoveToEngine $n $m
      }
    }

    sendToEngine $n "analyze"

  } else {

    # This section is for engines without the analyze command:
    # In this case, Scid just sends "new", "force" and a bunch
    # of moves, then sets a very long search time/depth and
    # sends "go". This is not ideal but it works OK for engines
    # without "analyze" that I have tried.

    # If Unix OS and engine wants it, send an INT signal:
    if {(!$windowsOS)  &&  $analysis(send_sigint$n)} {
      catch {exec -- kill -s INT [pid $analysis(pipe$n)]}
    }
    sendToEngine $n "new"
    sendToEngine $n "force"
    if {$nonStdStart} {
      set analysis(moves$n) "  Sorry, this game has a non-standard start position."
      updateAnalysisText $n
      return
    }
    foreach m $movelist {
      sendMoveToEngine $n $m
    }
    # Set engine to be white or black:
    sendToEngine $n [sc_pos side]
    # Set search time and depth to something very large and start search:
    sendToEngine $n "st 120000"
    sendToEngine $n "sd 50"
    sendToEngine $n "post"
    sendToEngine $n "go"
  }
}

set temptime 0
trace variable temptime w {::utils::validate::Regexp {^[0-9]*\.?[0-9]*$}}

proc setAutomoveTime {{n 1}} {
  global analysis temptime dialogResult
  set ::tempn $n
  set temptime [expr {$analysis(automoveTime$n) / 1000.0} ]
  set w .apdialog
  toplevel $w
  #wm transient $w .analysisWin
  wm title $w "Scid: Engine thinking time"
  wm resizable $w 0 0
  label $w.label -text "Set the engine thinking time per move in seconds:"
  pack $w.label -side top -pady 5 -padx 5
  entry $w.entry -background white -width 10 -textvariable temptime
  pack $w.entry -side top -pady 5
  bind $w.entry <Escape> { .apdialog.buttons.cancel invoke }
  bind $w.entry <Return> { .apdialog.buttons.ok invoke }

  addHorizontalRule $w

  set dialogResult ""
  set b [frame $w.buttons]
  pack $b -side top -fill x
  button $b.cancel -text $::tr(Cancel) -command {
    focus .
    catch {grab release .apdialog}
    destroy .apdialog
    focus .
    set dialogResult Cancel
  }
  button $b.ok -text "OK" -command {
    catch {grab release .apdialog}
    if {$temptime < 0.1} { set temptime 0.1 }
    set analysis(automoveTime$tempn) [expr {int($temptime * 1000)} ]
    focus .
    catch {grab release .apdialog}
    destroy .apdialog
    focus .
    set dialogResult OK
  }
  pack $b.cancel $b.ok -side right -padx 5 -pady 5
  focus $w.entry
  update
  catch {grab .apdialog}
  tkwait window .apdialog
  if {$dialogResult != "OK"} {
    return 0
  }
  return 1
}

proc toggleAutomove {{n 1}} {
  global analysis
  if {! $analysis(automove$n)} {
    cancelAutomove $n
  } else {
    set analysis(automove$n) 0
    if {! [setAutomoveTime $n]} {
      return
    }
    set analysis(automove$n) 1
    automove $n
  }
}

proc cancelAutomove {{n 1}} {
  global analysis
  set analysis(automove$n) 0
  after cancel "automove $n"
  after cancel "automove_go $n"
}

proc automove {{n 1}} {
  global analysis autoplayDelay
  if {! $analysis(automove$n)} { return }
  after cancel "automove $n"
  set analysis(automoveThinking$n) 1
  after $analysis(automoveTime$n) "automove_go $n"
}

proc automove_go {{n 1}} {
  global analysis
  if {$analysis(automove$n)} {
    if {[makeAnalysisMove $n]} {
      set analysis(autoMoveThinking$n) 0
      updateBoard -pgn
      after cancel "automove $n"
      ::tree::doTraining $n
    } else {
      after 1000 "automove $n"
    }
  }
}

###
### End of file: analysis.tcl
###
###
###
### wbdetect.tcl: part of Scid.
### Copyright (C) 1999-2002  Shane Hudson.
###

######################################################################
#
# Code to detect various Winboard engines being used as analysis
# engines in Scid.
#
# Thanks to Allen Lake for testing many WinBoard engines
# with Scid in Windows and providing this code.
#
# Most cases below are for engines that have analyze mode but
# do not let Scid know about it by sending a "feature" line
# with "analyze=1" in response to the "protover 2" command.
# Some cases also cover engines that report times in seconds
# instead of centiseconds.

proc detectWBEngine { {n 1} engineOutput } {

  global analysis

  # Check for a line containing "Amy version" to detect use of
  # the Amy 0.7 Winboard engine, which doesn't support the
  # "setboard" command, but does support the "analyze" command.
  if {[string match "*Amy version*" $engineOutput] } {
    logEngineNote $n {Seen "Amy"; assuming analyze command.}
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "Baron" to detect use of the
  # Baron 0.26, 0.26a, 0.27, or 0.28a Winboard engines.  These
  # engines display analysis time in whole seconds, rather than
  # in centiseconds, so I have added code to detect this.
  if {[string match "*Baron*" $engineOutput] } {
    logEngineNote $n {Seen "Baron"; assuming analyze, setboard, times in seconds.}
    set analysis(has_setboard$n) 1
    set analysis(has_analyze$n) 1
    set analysis(wholeSeconds$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "D U K E" to detect use of
  # the Duke 1.0 or 1.1 Winboard engines, which don't support the
  # "setboard" command, but do support the "analyze" command.
  if {[string match "*D U K E*" $engineOutput] } {
    logEngineNote $n {Seen "Duke"; assuming analyze command.}
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "ESCbook.bin" to detect use of
  # the Esc 1.09 Winboard engine, which doesn't support the
  # "setboard" command, but does support the "analyze" command.
  if {[string match "*ESCbook.bin*" $engineOutput] } {
    logEngineNote $n {Seen "ESC"; assuming analyze command.}
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "FORTRESS" to detect use of
  # the Fortress 1.62 Winboard engine, which doesn't support the
  # "setboard" command, but does support the "analyze" command.
  if {[string match "*FORTRESS*" $engineOutput] } {
    logEngineNote $n {Seen "Fortress"; assuming analyze command.}
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing only "Chess", to detect the use of
  # GNU Chess 4, which issues time in whole seconds rather than in
  # centiseconds.
  #if {! [string compare $engineOutput "Chess"]} {
  #  logEngineNote $n {Seen "GNU Chess 4"; assuming times in seconds.}
  #  set analysis(wholeSeconds$n) 1
  #  set analysis(wbEngineDetected$n) 1
  #  return
  #}

  # Check for a line containing "GNU Chess v5" to detect use of
  # the GNU Chess 5.02 or 5.03 Winboard engine, which don't support the
  # "analyze" command, but do support the "setboard" command.
  if {[string match "*GNU Chess v5*" $engineOutput] } {
    logEngineNote $n {Seen "GNU Chess 5"; assuming setboard command.}
    set analysis(has_setboard$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "Gromit3" to detect use of the
  # Gromit 3.00 or Gromit 3.8.2 Winboard engine, which don't
  # support the "setboard" command, but do support the
  # "analyze" command.
  if {[string match "*Gromit3*" $engineOutput]  ||  [string match "GROMIT" $engineOutput]} {
    logEngineNote $n {Seen "Gromit"; assuming analyze command.}
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "Jester" to detect use of the
  # Jester 0.82 Winboard engine.  This engine supports "analyze"
  # but does not support "setboard" or "protover".
  if {[string match "*Jester*" $engineOutput] } {
    logEngineNote $n {Seen "Jester"; assuming analyze command.}
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "Calzerano" to detect use of the
  # Leila 0.36 or Leila 0.41i Winboard engine, which don't
  # support the "setboard" command, but do support the
  # "analyze" command.
  if {[string match "*Calzerano*" $engineOutput] } {
    logEngineNote $n {Seen "Calzerano" (Leila); assuming analyze command.}
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "LordKing" to detect use of the
  # LordKing 3.0, 3.1, or 3.2 Winboard engines.  These engines
  # have "analyze", but do not support "setboard" or "protover".
  if {[string match "*LordKing*" $engineOutput] } {
    logEngineNote $n {Seen "LordKing"; assuming analyze command.}
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "NEJMET" to detect use of the
  # Nejmet 2.6.0 Winboard engine, which supports "setboard"
  # and "analyze", but not "protover".
  if {[string match "*NEJMET*" $engineOutput] } {
    logEngineNote $n {Seen "Nejmet"; assuming analyze and setboard commands.}
    set analysis(has_setboard$n) 1
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "Nejmet" to detect use of the
  # Nejmet 3.0.1 and 3.0.2 Winboard engines, which send
  # "feature analyse=1" instead of "feature analyze=1".
  if {[string match "*Nejmet*" $engineOutput] } {
    logEngineNote $n {Seen "Nejmet"; assuming analyze and setboard commands.}
    set analysis(has_setboard$n) 1
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "Pharaon" to detect use of the
  # Pharaon 2.50 or Pharaon 2.61 Winboard engines.  These
  # engines display analysis time in whole seconds, rather than
  # in centiseconds, so I have added code to detect this.
  # Performance of these engines has been somewhat uneven, with
  # occasional crashes of the engine, but more stable and
  # predictable with this code in place.
  if {[string match "*Pharaon*" $engineOutput] } {
    logEngineNote $n {Seen "Pharaon"; assuming analyze, setboard, times in seconds.}
    set analysis(has_setboard$n) 1
    set analysis(has_analyze$n) 1
    set analysis(wholeSeconds$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "Skaki" to detect use of the
  # Skaki 1.19 Winboard engine.  This engine has "analyze",
  # but does not support "setboard" or "protover".
  if {[string match "*Skaki*" $engineOutput] } {
    logEngineNote $n {Seen "Skaki"; assuming analyze command.}
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "EngineControl-TCB" to detect use of the
  # TCB 0045 Winboard engine.  This engine has "analyze",
  # but does not support "setboard" or "protover".
  if {[string match "*EngineControl-TCB*" $engineOutput] } {
    logEngineNote $n {Seen "TCB"; assuming analyze and setboard commands.}
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "ZChess" to detect use of the
  # ZChess 2.22 Winboard engine.  ZChess is the predecessor
  # of the Pharaon series of Winboard engines and, as such,
  # displays analysis time in whole seconds, rather than
  # in centiseconds.
  if {[string match "*ZChess*" $engineOutput] } {
    logEngineNote $n {Seen "ZChess"; assuming analyze, setboard, times in seconds.}
    set analysis(has_analyze$n) 1
    set analysis(wholeSeconds$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "King of Kings" to detect use
  # of the King of Kings 2.02 Winboard engine.  KofK uses the
  # "protover" command, but seems to confuse previous code on
  # Win98SE. Setting analysis(has_setboard$n) and
  # analysis(has_analyze$n) explicitly seems to help.
  if {[string match "*King of Kings*" $engineOutput] } {
    logEngineNote $n {Seen "King of Kings"; assuming analyze and setboard commands.}
    set analysis(has_setboard$n) 1
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "EXchess" to detect use of the
  # EXchess 4.02 or 4.03 Winboard engine, which supports "setboard"
  # and "analyze", but not "protover".
  if {[string match "*EXchess*" $engineOutput] } {
    logEngineNote $n {Seen "EXchess"; assuming analyze and setboard commands.}
    set analysis(has_setboard$n) 1
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

  # Check for a line containing "WildCat version 2.61" to detect use of the
  # WildCat 2.61 Winboard engine, which supports "analyze"
  # but not "setboard" or "protover".
  if {[string match "*WildCat version 2.61*" $engineOutput] } {
    logEngineNote $n {Seen "WildCat 2.61"; assuming analyze and setboard commands.}
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }


  # Check for a line containing "Phalanx" to detect use of the
  # Phalanx Winboard engine, which supports "analyze"
  # but not "setboard" or "protover".
  if {[string match "*Phalanx*" $engineOutput] } {
    logEngineNote $n {Seen "Phalanx"; assuming analyze command.}
    set analysis(has_analyze$n) 1
    set analysis(wbEngineDetected$n) 1
    return
  }

}

###
### End of file: wbdetect.tcl
###
### reper.tcl:
### Repertoire editor functions for Scid.
### Copyright (C) 2001-2002 Shane Hudson.

# The heirarchical view used to display a repertoire in Scid was
# originally based on the  public domain Tcl/Tk tree widget written by
# D. Richard Hipp (available at: http://www.hwaci.com/sw/tk/tree.html)
# but the Scid code is completely rewritten and significantly improved.

namespace eval ::rep {}
array set ::rep::_data {}
set ::rep::Win 0

# ::rep::create
#   Create a new repertoire widget.  $args become the configuration
#   arguments to the canvas widget that is created.
#
proc ::rep::create {w args} {
  eval canvas $w -bg white -width 1 $args
  bind $w <Destroy> "catch {::rep::clear $w}"
  ::rep::_defaults $w /
  ::rep::_drawWhenIdle $w
  set ::rep::_data($w:selection) {}
  set ::rep::_data($w:selidx) {}
  set ::rep::_data($w:altered) 0
  set ::rep::_data($w:nlines) 0
  set ::rep::_data($w:ngroups) 0
  set ::rep::_data($w:filename) ""
  #set ::rep::_data($w:readonly) 0
}

# ::rep::_defaults
#   Used to initialize a new element of the tree.
#
proc ::rep::_defaults {w v} {
  set ::rep::_data($w:$v:children) {}
  set ::rep::_data($w:$v:shown) 1
  set ::rep::_data($w:$v:tags) {}
  set ::rep::_data($w:$v:comment) {}
  set ::rep::_data($w:$v:text) {}
  set ::rep::_data($w:$v:group) 0
  set ::rep::_data($w:$v:include) 1
}

# ::rep::_findGroup
#   Finds the parent group of a line or group that will be added.
#
proc ::rep::_findGroup {w v parent} {
  set p $parent
  if {$parent == ""} { set p "/" }
  foreach g $::rep::_data($w:$p:children) {
    set len [string length $g]
    set v2 [string range $v 0 [expr {$len - 1} ]]

    # If the next character in the line is a "-", it means we have a
    # situation with both the castling moves "O-O" and "O-O-O".
    # To avoid "O-O-O" looking like a child line of "O-O", we need to
    # deliberately ignore this possibility.
    if {[string length $v] > $len  &&  [string index $v $len] == "-"} { continue }

    regsub -all " " $v2 "," v2
    if {! [string compare $v2 $g]} {
      set v [string trim [string range $v $len end]]
      return [::rep::_findGroup $w $v $parent/$g]
    }
  }
  set v [string trim $v]
  regsub -all " " $v "," v
  return $parent/$v
}

# ::rep::AddCurrentBoard
#   Adds the line representing the current board position as a
#   group, included line or excluded line.
#
proc ::rep::AddCurrentBoard {w type} {
  switch -exact -- $type {
    group   { set grp 1; set inc 0; set cmd ::rep::newGroup }
    include { set grp 0; set inc 1; set cmd ::rep::newLine  }
    exclude { set grp 0; set inc 0; set cmd ::rep::newLine  }
    default { return }
  }
  # Verify that the current game began at the standard starting position:
  if {[sc_game startBoard]} {
    tk_messageBox -parent $w -type ok -icon info -title "Scid" \
      -message "The current game does not have the standard starting position, so its positions cannot be added to the repertoire."
    return
  }
  set moves [string trim [sc_game moves]]
  set err [catch {$cmd $w $moves -group $grp -include $inc} res]
  if {$err} {
    tk_messageBox -parent $w -type ok -icon info -title "Scid" -message $res
    return
  }
  ::rep::regroup $w
  ::rep::singleClick $w $res
}

# ::rep::newGroup
#   Adds a new group to the repertoire.
#
proc ::rep::newGroup {w v args} {
  if {$v == ""} {
    return -code error "The starting chess position cannot be a group."
  }
  set s [::rep::_findGroup $w $v ""]
  lappend args -group 1
  return [::rep::_newItem $w $s $args]
}

# ::rep::newLine
#   Adds a new group to the repertoire.
#
proc ::rep::newLine {w v args} {
  set s [::rep::_findGroup $w $v ""]
  lappend args -group 0
  return [::rep::_newItem $w "${s} ,LINE" $args]
}

# ::rep::_decode
#   Decodes a group or line path back to standard chess notation,
#   e.g. "/1.e4_c5/2.Nf3_d6" -> "1.e4 c5 2.Nf3 d6"
#
proc ::rep::_decode {m} {
  regsub -all "," $m " " moves
  regsub -all "/" $moves " " moves
  regsub "LINE" $moves "" moves
  set moves [string trim $moves]
  return $moves
}

# ::rep::_newItem
#   Called from newGroup or newLine to add a new element to the repertoire.
#
proc ::rep::_newItem {w v args} {
  regsub -all " " $v "," v
  set dir [file dirname $v]
  set n [file tail $v]
  if {[llength $args] == 1} {
    set args [lindex $args 0]
  }
  set image {}
  set tags {}
  set text {}
  set comment {}
  set group 0
  set include 1
  set shown 1

  foreach {op arg} $args {
    switch -exact -- $op {
      -image {set image $arg}
      -tags {set tags $arg}
      -text {set text $arg}
      -comment {set comment $arg}
      -group {set group $arg}
      -include {set include $arg}
      -shown {set shown $arg}
    }
  }
  if {![info exists ::rep::_data($w:$dir:shown)]} {
    return -code error "parent item \"$dir\" is missing"
  }
  set i [lsearch -exact $::rep::_data($w:$dir:children) $n]
  if {$i >= 0} {
    # Group or line already exists.
    if {! $group} {
      set ::rep::_data($w:$v:include) $include
      ::rep::updateStatus $w
    }
    return $v
    #set  type "line"
    #if {$group} { set type "group" }
    #return -code error "The $type \"[::rep::_decode $v]\" already exists in this repertoire."
  }
  if {$group} {
    incr ::rep::_data($w:ngroups)
  } else {
    incr ::rep::_data($w:nlines)
  }

  lappend ::rep::_data($w:$dir:children) $n
  set ::rep::_data($w:$dir:children) [lsort $::rep::_data($w:$dir:children)]
  ::rep::_defaults $w $v
  set ::rep::_data($w:$v:comment) $comment
  set ::rep::_data($w:$v:image) $image
  set ::rep::_data($w:$v:tags) $tags
  set ::rep::_data($w:$v:text) $text
  set ::rep::_data($w:$v:group) $group
  set ::rep::_data($w:$v:include) $include
  set ::rep::_data($w:$v:shown) $shown
  set ::rep::_data($w:altered) 1
  ::rep::updateStatus $w
  # ::rep::_drawWhenIdle $w
  return $v
}

# ::rep::updateStatus
#   Updates the status bar message for the repertoire window.
#
proc ::rep::updateStatus {w} {
  set s "  "
  if {$::rep::_data($w:altered)} { append s "XX" } else { append s "--" }
  append s "  "
  set f $::rep::_data($w:filename)
  if {$f == ""} {
    set f "(Untitled)"
  } else {
    set f [file tail $f]
  }
  append s "$f: $::rep::_data($w:nlines) lines"
  append s " in $::rep::_data($w:ngroups) groups"
  set ::rep::_data($w:status) $s
}

# ::rep::updateWinTitle
#   Updates the repertoire window title.
#
proc ::rep::updateWinTitle {w} {
  set f $::rep::_data($w:filename)
  if {$f == ""} {
    set f "(Untitled)"
  } else {
    set f [file tail $f]
  }
  wm title [winfo toplevel $w] "Scid: [tr WindowsRepertoire]: $f"
}

# ::rep::regroup
#   Calls ::rep::_extract to produce a set of commands for rebuilding
#   the repertoire heirarchy, then clears and rebuilds it.
#   Used to reorganise the repertoire whenever a group is added or
#   removed.
proc ::rep::regroup {w} {
  set list [::rep::_extract $w / {}]
  ::rep::clear $w
  foreach i $list {eval $i}
  ::rep::_drawWhenIdle $w
}

# ::rep::newFile
#   Clears the repertoire and reset the filename to be untitled.
#
proc ::rep::newFile {w} {
  ::rep::clear $w
  set ::rep::_data($w:filename) ""
  #set ::rep::_data($w:readonly) 0
  ::rep::updateWinTitle $w
  ::rep::_drawWhenIdle $w
}

# ::rep::clear
#   Clears the repertoire, but keeps its filename.
#
proc ::rep::clear {w} {
  set fname ""
  set fname $::rep::_data($w:filename)
  foreach t [array names ::rep::_data $w:*] {
    unset ::rep::_data($t)
  }
  set ::rep::_data($w:filename) $fname
  set ::rep::_data($w:selection) {}
  set ::rep::_data($w:selidx) {}
  set ::rep::_data($w:altered) 0
  set ::rep::_data($w:nlines) 0
  set ::rep::_data($w:ngroups) 0
  ::rep::_defaults $w /
}

# ::rep::deleteGroup
#   After verification from the user, this deletes the specified
#   group but keeps all subgroups and lines.
#
proc ::rep::deleteGroup {w v} {
  if {! [info exists ::rep::_data($w:$v:group)]} { return }
  if {! $::rep::_data($w:$v:group)} { return }
  set v2 [::rep::_decode $v]
  set msg "The group \"$v2\" contains [::rep::_numChildLines $w $v] lines "
  append msg "in [expr [::rep::_numChildGroups $w $v] - 1] subgroups.\n\n"
  append msg "Are you sure you want to delete this group, keeping all the groups and lines under it?"
  set answer [tk_messageBox -parent $w -title "Scid: Delete group?" \
                            -type yesno -icon question -message $msg]
  if {$answer != "yes"} { return }
  set ::rep::_data($w:$v:delete) 1
  ::rep::regroup $w
}

# ::rep::pruneGroup
#   After verification from the user, this deletes the specified
#   group AND all its subgroups and lines.
#
proc ::rep::pruneGroup {w v} {
  if {! [info exists ::rep::_data($w:$v:group)]} { return }
  if {! $::rep::_data($w:$v:group)} { return }
  set v2 [::rep::_decode $v]
  set msg "The group \"$v2\" contains [::rep::_numChildLines $w $v] lines "
  append msg "in [expr [::rep::_numChildGroups $w $v] - 1] subgroups.\n\n"
  append msg "Are you sure you want to delete this group AND ALL the groups and lines under it?"
  set answer [tk_messageBox -parent $w -title "Scid: Delete group?" \
                            -type yesno -icon question -message $msg]
  if {$answer != "yes"} { return }
  set ::rep::_data($w:$v:delete) 1
  set ::rep::_data($w:$v:prune) 1
  ::rep::regroup $w
}

# ::rep::deleteGroup
#   After verification from the user, this deletes the specified line.
#
proc ::rep::deleteLine {w v} {
  if {! [info exists ::rep::_data($w:$v:group)]} { return }
  if {$::rep::_data($w:$v:group)} { return }
  set v2 [::rep::_decode $v]
  set msg "Delete: $v2\n\n"
  append msg "Are you sure you want to delete this line?"
  set answer [tk_messageBox -parent $w -title "Scid: Delete line?" \
                            -type yesno -icon question -message $msg]
  if {$answer != "yes"} { return }
  set ::rep::_data($w:$v:delete) 1
  ::rep::regroup $w
}

# ::rep::showAll
#   Expands the specified group and all its subgroups.
#
proc ::rep::showAll {w {v ""}} {
  foreach i [array names ::rep::_data $w:$v*:shown] {
    set ::rep::_data($i) 1
  }
  ::rep::_drawWhenIdle $w
}

# ::rep::hideAll
#   Collapses the specified group and all its subgroups.
#
proc ::rep::hideAll {w {v ""}} {
  foreach i [array names ::rep::_data $w:$v*:shown] {
    set ::rep::_data($i) 0
  }
  ::rep::_drawWhenIdle $w
}

# ::rep::setSelection
#   Changes the selection to the specified group or line.
#
proc ::rep::setSelection {w v} {
  set ::rep::_data($w:selection) $v
  ::rep::_drawSelection $w
  ::rep::updateStatus $w
}
 
# ::rep::getSelection
#   Retrieves the current selection.
#
proc ::rep::getSelection {w} {
  return $::rep::_data($w:selection)
}

# ::rep::_numChildGroups
#   Returns the number of (direct and indirect) subgroups of a group.
#
proc ::rep::_numChildGroups {w v} {
  if {! $::rep::_data($w:$v:group)} { return 0 }
  set count 1
  if {[info exists ::rep::_data($w:$v:children)]} {
    foreach child $::rep::_data($w:$v:children) {
      incr count [::rep::_numChildGroups $w $v/$child]
    }
  }
  return $count
}


# ::rep::_numChildLines
#   Returns the number of (direct and indirect) child lines of a group.
#
proc ::rep::_numChildLines {w v} {
  if {! $::rep::_data($w:$v:group)} { return 1 }
  set count 0
  if {[info exists ::rep::_data($w:$v:children)]} {
    foreach child $::rep::_data($w:$v:children) {
      incr count [::rep::_numChildLines $w $v/$child]
    }
  }
  return $count
}

# ::rep::_draw
#   Draws the repertoire heirarchy.
#
proc ::rep::_draw {w} {
  catch {unset ::rep::_data($w:drawPending)}
  $w delete all
  set ::rep::_data($w:y) 30
  ::rep::_drawLevel $w "/" 10
  $w config -scrollregion [$w bbox all]
  ::rep::_drawSelection $w
  ::rep::updateStatus $w
  $w xview moveto 0.0
}

# ::rep::_drawLevel
#   Draws a single level of the heirarchy, indented by $in pixels.
#
proc ::rep::_drawLevel {w v in} {
  set p $v
  if {$v == "/"} { set p "" }
  set start [expr {$::rep::_data($w:y)-10} ]
  set y 0
  if {[llength $::rep::_data($w:$v:children)] == 0} {
    set y $::rep::_data($w:y)
    incr ::rep::_data($w:y) 17
    $w create line $in $y [expr {$in+10} ] $y -fill gray50 
    incr in 12
    $w create text $in $y -font font_Small -anchor w -text "(empty)"
    return
  }

  foreach c $::rep::_data($w:$v:children) {
    set y $::rep::_data($w:y)
    incr ::rep::_data($w:y) 17
    $w create line $in $y [expr {$in + 10} ] $y -fill gray50 
    set group $::rep::_data($w:$p/$c:group)
    set icon $::rep::_data($w:$p/$c:image)
    set taglist x
    foreach tag $::rep::_data($w:$p/$c:tags) { lappend taglist $tag }
    if {$group} {
      set icon ::rep::_closedgroup
      if {$::rep::_data($w:$p/$c:shown)} { set icon ::rep::_opengroup }
    } else {
      set icon ::rep::_cross
      if {$::rep::_data($w:$p/$c:include)} { set icon ::rep::_tick }
    }
    set x [expr {$in + 12} ]

    if {$icon != ""} {
      set tag [$w create image $x $y -image $icon -anchor w -tags $taglist]
      incr x 20
      set ::rep::_data($w:tag:$tag) $p/$c
      if {$group} {
        set s [expr {1 - $::rep::_data($w:$p/$c:shown)} ]
        $w bind $tag <1> "set ::rep::_data($w:$p/$c:shown) $s; ::rep::_draw $w"
      }
      $w bind $tag <3> "::rep::_popupMenu $w $p/$c %X %Y"
    }
    set moves [::rep::_decode $c]
    if {$moves == ""} { set moves "..." }
    if {$group} {
      append moves " ([::rep::_numChildLines $w $p/$c])"
    }
    set tag [$w create text $x $y -text $moves -font font_Small \
                                  -anchor w -tags $taglist]
    set ::rep::_data($w:tag:$tag) $p/$c
    set ::rep::_data($w:$p/$c:tag) $tag
    $w bind $tag <3> "::rep::_popupMenu $w $p/$c %X %Y"
    set comment ""
    if {[string length $::rep::_data($w:$p/$c:text)] > 0} {
      set comment "** "
    }
    if {[string length $::rep::_data($w:$p/$c:comment)] > 0} {
      append comment "$::rep::_data($w:$p/$c:comment)"
    }
    if {$comment != ""} {
      incr x [expr {3 + [lindex [$w bbox $tag] 2] - [lindex [$w bbox $tag] 0]} ]
      set tag [$w create text $x $y -text $comment -font font_Small \
                                  -fill red3 -anchor w -tags $taglist]
      $w bind $tag <3> "::rep::_popupMenu $w $p/$c %X %Y"
      set ::rep::_data($w:tag:$tag) $p/$c
    }

    if {[llength $::rep::_data($w:$p/$c:children)] > 0} {
      if {$::rep::_data($w:$p/$c:shown)} {
        set tag [$w create image $in $y -image ::rep::_shown]
        $w bind $tag <1> "set ::rep::_data($w:$p/$c:shown) 0; ::rep::_draw $w"
        ::rep::_drawLevel $w $p/$c [expr {$in + 18} ]
      } else {
        set tag [$w create image $in $y -image ::rep::_hidden]
        $w bind $tag <1> "set ::rep::_data($w:$p/$c:shown) 1; ::rep::_draw $w"
      }
      $w bind $tag <3> "::rep::_popupMenu $w $p/$c %X %Y"
    }
  }
  set tag [$w create line $in $start $in [expr {$y+1} ] -fill gray50 ]
  $w lower $tag
}

# ::rep::showGroup
#   Expand a single group.
#
proc ::rep::showGroup {w v} {
  if {[info exists ::rep::_data($w:$v:shown)]
      &&  $::rep::_data($w:$v:shown) == 0
      &&  [info exists ::rep::_data($w:$v:children)] 
      &&  [llength $::rep::_data($w:$v:children)] > 0} {
    set ::rep::_data($w:$v:shown) 1
    ::rep::_draw $w
  }
}

# ::rep::showGroup
#   Collapse a single group.
#
proc ::rep::hideGroup {w v} {
  if {[info exists ::rep::_data($w:$v:shown)]
      &&  $::rep::_data($w:$v:shown) == 1} {
    set ::rep::_data($w:$v:shown) 0
    ::rep::_draw $w
  }
}

# ::rep::toggleLineState
#   Change the state of a line (included vs excluded).
#
proc ::rep::toggleLineState {w v} {
  if {[info exists ::rep::_data($w:$v:group)]
      &&  $::rep::_data($w:$v:group) == 0} {
    set state $::rep::_data($w:$v:include)
    set state [expr {1 - $state} ]
    set ::rep::_data($w:$v:include) $state
    set ::rep::_data($w:altered) 1
    ::rep::_draw $w
  }
}

# ::rep::_drawSelection
#   Highlight the selected goupr or line.
#
proc ::rep::_drawSelection w {
  if {[string length $::rep::_data($w:selidx)]} {
    $w delete $::rep::_data($w:selidx)
  }
  set v $::rep::_data($w:selection)
  if {[string length $v]==0} { return }
  if {![info exists ::rep::_data($w:$v:tag)]} { return }
  set bbox [$w bbox $::rep::_data($w:$v:tag)]
  if {[llength $bbox]==4} {
    set i [eval $w create rectangle $bbox -fill yellow2 -outline {{}}]
    set ::rep::_data($w:selidx) $i
    $w lower $i
  } else {
    set ::rep::_data($w:selidx) {}
  }
}

# ::rep::_drawWhenIdle
#   Schedule a redraw event of the repertoire heirarchy.
#
proc ::rep::_drawWhenIdle w {
  if {![info exists ::rep::_data($w:drawPending)]} {
    set ::rep::_data($w:drawPending) 1
    after idle "::rep::_draw $w"
  }
}

# ::rep::labelAtXY
#   Return the group or line in the repertoire located at the
#   real coordinates ($x,$y).
#
proc ::rep::labelAtXY {w x y} {
  set x [$w canvasx $x]
  set y [$w canvasy $y]
  foreach m [$w find overlapping $x $y $x $y] {
    if {[info exists ::rep::_data($w:tag:$m)]} {
      return $::rep::_data($w:tag:$m)
    }
  }
  return ""
}

# ::rep::OpenCloseWindow
#   Open/close the repertoire editor.
#
proc ::rep::OpenCloseWindow {} {
  set w .repWin
  if {[winfo exists $w]} { 
    destroy $w 
    return
  }
  ::rep::makeWindow
}

# ::rep::closeWindow
#   Close the repertoire editor.
#
proc ::rep::closeWindow {} {
  set w .repWin
  if {! [winfo exists $w]} { return }
  if {$::rep::_data($w.f.w.rep:altered)} {
    set answer [tk_messageBox -parent .repWin \
                  -type yesno -icon question \
                  -title "Scid: [tr RepFileClose]" \
                  -message $::tr(RepCloseDialog)]
    if {$answer != "yes"} { return }
  }
  destroy $w
  set ::rep::Win 0
}

# ::rep::OpenWithFile
#   Open the repertoire editor and losd the specified file.
#
proc ::rep::OpenWithFile {fname} {
  ::rep::makeWindow
  ::rep::readFile .repWin.f.w.rep $fname
}

# ::rep::ConfigMenus
#   Called to set the window menus to a specified language.
proc ::rep::ConfigMenus {w {lang ""}} {
  if {! [winfo exists $w]} { return }
  if {$lang == ""} { set lang $::language }
  set m $w.m
  foreach menu {file edit view search help} tag {File Edit View Search Help} {
    configMenuName $m.$menu Rep$tag $lang
  }
  foreach idx {0 1 3 4 6} tag {New Open Save SaveAs Close} {
    configMenuText $m.file.menu $idx RepFile$tag $lang
  }
  foreach idx {0 1 2} tag {Group Include Exclude} {
    configMenuText $m.edit.menu $idx RepEdit$tag $lang
  }
  foreach idx {0 1} tag {Expand Collapse} {
    configMenuText $m.view.menu $idx RepView$tag $lang
  }
  foreach idx {0 1} tag {All Displayed} {
    configMenuText $m.search.menu $idx RepSearch$tag $lang
  }
  foreach idx {0 1} tag {Rep Index} {
    configMenuText $m.help.menu $idx RepHelp$tag $lang
  }
}

# ::rep::makeWindow
#   Create the repertoire editor window.
#
proc ::rep::makeWindow {} {
  set w .repWin
  if {[winfo exists $w]} { return }
  set ::rep::Win 1
  toplevel $w

  standardShortcuts $w
  wm protocol $w WM_DELETE_WINDOW ::rep::closeWindow

  frame $w.m -bd 1 -relief raised
  pack $w.m -side top -fill x 
  $w configure -menu $w.m
  menubutton $w.m.file -text RepFile -menu $w.m.file.menu
  menu $w.m.file.menu
  $w.m.file.menu add command -label RepFileNew -accelerator "Ctrl+N" \
    -command "::rep::newFile $w.f.w.rep"
  bind $w <Control-n> "$w.m.file.menu invoke 0"
  $w.m.file.menu add command -label RepFileOpen -accelerator "Ctrl+O" \
    -command "::rep::OpenFile $w.f.w.rep"
  bind $w <Control-o> "$w.m.file.menu invoke 1"
  $w.m.file.menu add separator
  $w.m.file.menu add command -label RepFileSave -accelerator "Ctrl+S" \
    -command "::rep::saveFile $w.f.w.rep"
  bind $w <Control-s> "$w.m.file.menu invoke 3"
  $w.m.file.menu add command -label RepFileSaveAs \
    -command "::rep::saveFile $w.f.w.rep new"
  $w.m.file.menu add separator
  $w.m.file.menu add command -label RepFileClose -accelerator "Ctrl+Q" \
    -command "destroy $w"
  bind $w <Control-q> "destroy $w"

  menubutton $w.m.edit -text RepEdit -menu $w.m.edit.menu
  menu $w.m.edit.menu
  $w.m.edit.menu add command -label RepEditGroup -accelerator "Ctrl+G" \
    -command "::rep::AddCurrentBoard $w.f.w.rep group"
  bind $w <Control-g> "$w.m.edit.menu invoke 0"
  $w.m.edit.menu add command -label RepEditInclude -accelerator "Ctrl+I" \
    -command "::rep::AddCurrentBoard $w.f.w.rep include"
  bind $w <Control-i> "$w.m.edit.menu invoke 1"
  $w.m.edit.menu add command -label RepEditExclude -accelerator "Ctrl+X" \
    -command "::rep::AddCurrentBoard $w.f.w.rep exclude"
  bind $w <Control-x> "$w.m.edit.menu invoke 2"

  menubutton $w.m.view -text RepView -menu $w.m.view.menu
  menu $w.m.view.menu
  $w.m.view.menu add command -label RepViewExpand \
    -command "::rep::showAll $w.f.w.rep"
  $w.m.view.menu add command -label RepViewCollapse \
    -command "::rep::hideAll $w.f.w.rep"

  menubutton $w.m.search -text RepSearch -menu $w.m.search.menu
  menu $w.m.search.menu
  $w.m.search.menu add command -label RepSearchAll \
    -command "::rep::search $w.f.w.rep all"
  $w.m.search.menu add command -label RepSearchDisplayed \
    -command "::rep::search $w.f.w.rep displayed"

  menubutton $w.m.help -text RepHelp -menu $w.m.help.menu
  menu $w.m.help.menu
  $w.m.help.menu add command -label RepHelpRep -command {helpWindow Repertoire}
  $w.m.help.menu add command -label RepHelpIndex -command {helpWindow Index}

  pack $w.m.file $w.m.edit $w.m.view $w.m.search $w.m.help -side left -padx 5

  # Toolbar:
  set f [frame $w.toolbar -relief raised -border 1]
  pack $f -side top -fill x
  button $f.new -image tb_new -command "::rep::newFile $w.f.w.rep"
  button $f.open -image tb_open -command "::rep::OpenFile $w.f.w.rep"
  button $f.save -image tb_save -command "::rep::saveFile $w.f.w.rep"
  button $f.close -image tb_close -command "destroy $w"
  frame $f.space1 -width 12
  button $f.group -image ::rep::_tb_group \
    -command "::rep::AddCurrentBoard $w.f.w.rep group"
  button $f.include -image ::rep::_tb_include \
    -command "::rep::AddCurrentBoard $w.f.w.rep include"
  button $f.exclude -image ::rep::_tb_exclude \
    -command "::rep::AddCurrentBoard $w.f.w.rep exclude"

  foreach i {new open save close group include exclude} {
    $f.$i configure -relief flat -border 1 -highlightthickness 0 -anchor n \
      -takefocus 0
    bind $f.$i <Any-Enter> "+$f.$i configure -relief groove"
    bind $f.$i <Any-Leave> "+$f.$i configure -relief flat"
  }
  foreach {b m} {
    new RepFileNew open RepFileOpen save RepFileSave
    group RepEditGroup include RepEditInclude exclude RepEditExclude
  } {
    set ::helpMessage($f.$b) [tr $m]
  }
  pack $f.new $f.open $f.save $f.close $f.space1 \
    $f.group $f.include $f.exclude \
    -side left -padx 0 -ipadx 0 -pady 0 -ipady 0

  label $w.status -relief sunken -width 1 -anchor w -font font_Small
  pack $w.status -side bottom -anchor w -fill x -expand yes

  set pane [::utils::pane::Create $w.f w text 600 300 0.5 h]
  ::utils::pane::SetRange $w.f 0.2 0.8
  #::pane::SetDrag $w.f 0
  pack $w.f -fill both -expand 1

  ::rep::create $w.f.w.rep -yscrollcommand "$w.f.w.sb set"
  scrollbar $w.f.w.sb -orient vertical -command "$w.f.w.rep yview"
  pack $w.f.w.sb -side right -fill y
  pack $w.f.w.rep -side left -fill both -expand 1 -padx 5 -pady 5
  text $w.f.text.moves -height 3 -fg darkBlue -bg white -font font_Small \
    -state disabled -cursor top_left_arrow -wrap word
  entry $w.f.text.entry -width 1 -fg black -bg white -font font_Small
  text $w.f.text.note -width 40 -height 10 -fg black -bg white -font font_Small
  pack $w.f.text.moves -side top -fill x
  pack $w.f.text.entry -side top -fill x
  pack $w.f.text.note -side top -expand 1 -fill both
  $w.status configure -textvar ::rep::_data($w.f.w.rep:status)

  bind $w <F1> {helpWindow Repertoire}
  bind $w <Down> "$w.f.w.rep yview scroll +1 units"
  bind $w <Up> "$w.f.w.rep yview scroll -1 units"
  bind $w <Prior> "$w.f.w.rep yview scroll -1 pages"
  bind $w <Next> "$w.f.w.rep yview scroll +1 pages"
  bind $w <Home> "$w.f.w.rep yview moveto 0.0"
  bind $w <End> "$w.f.w.rep yview moveto 0.99"
  $w.f.w.rep xview moveto 0.0
  $w.f.w.rep yview moveto 0.0

  $w.f.w.rep bind x <1> \
    "::rep::singleClick $w.f.w.rep \[::rep::labelAtXY %W %x %y\]"
  $w.f.w.rep bind x <Double-Button-1> \
    "::rep::doubleClick $w.f.w.rep \[::rep::labelAtXY %W %x %y\]"

  bind $w.f.text.moves <1> "if {\[string length \[$w.f.text.moves get 1.0 end\]\] > 1} { importMoveList \[$w.f.text.moves get 1.0 end\] }"

  bind $w.f.text.entry <KeyPress> {
    after idle {
      set label [::rep::getSelection .repWin.f.w.rep]
      if {$label != ""} {
        set ::rep::_data(.repWin.f.w.rep:$label:comment) \
          [string trim [.repWin.f.text.entry get]]
        ::rep::_draw .repWin.f.w.rep
      }
    }
  }

  bind $w.f.text.note <KeyPress> {
    after idle {
      set label [::rep::getSelection .repWin.f.w.rep]
      if {$label != ""} {
        set ::rep::_data(.repWin.f.w.rep:$label:text) \
          [string trim [.repWin.f.text.note get 1.0 end]]
      }
    }
  }

  ::rep::ConfigMenus $w
  ::rep::updateWinTitle $w.f.w.rep
  #wm minsize $w 300 200
}

# ::rep::singleClick
#   Updates the move list label, single-line comment entry widget
#   and multi-line comment text widget in the repertoire editor.
#   Called whenever the left mouse button is clicked on a group or
#   line in the repertoire.
#
proc ::rep::singleClick {w label} {
  ::rep::setSelection $w $label
  if {$label == ""} { return }
  set moves [::rep::_decode $label]
  set win [winfo toplevel $w]
  $win.f.text.moves configure -state normal
  $win.f.text.moves delete 1.0 end
  $win.f.text.moves insert end $moves
  $win.f.text.moves configure -state disabled
  set comment ""
  catch {set comment $::rep::_data($w:$label:comment)}
  $win.f.text.entry delete 0 end
  $win.f.text.entry insert end $comment
  set temptext ""
  catch {set temptext $::rep::_data($w:$label:text)}
  set temptext [string trim $temptext]
  $win.f.text.note delete 1.0 end
  $win.f.text.note insert end $temptext
}

# ::rep::doubleClick
#   Called whenever the left mouse button is double-clicked on a group or
#   line in the repertoire.
#
proc ::rep::doubleClick {w label} {
  ::rep::setSelection $w $label
  if {$label == ""} { return }
  set moves [::rep::_decode $label]
  catch {sc_game import $moves}
  updateBoard -pgn
}

# ::rep::_extract
#   Traverses the repertoire heirarchy, producing a list of
#   commands needed to reconstruct the entire repertoire.
#   If a line or group is marked deleted, it is not included in
#   the list. If a group is marked pruned, its children are not
#   included either.
#
proc ::rep::_extract {w v returnList} {
  set p $v
  if {$v == "/"} { set p "" }
  foreach c $::rep::_data($w:$v:children) {
    set text [string trim $::rep::_data($w:$p/$c:text)]
    set comment [string trim $::rep::_data($w:$p/$c:comment)]
    set moves [::rep::_decode $p/$c]

    set recurse 0
    if {$::rep::_data($w:$p/$c:group)} {
      if {! [info exists ::rep::_data($w:$p/$c:prune)]} { set recurse 1 }
      set cmd "::rep::newGroup $w [list $moves]"
      append cmd " -shown $::rep::_data($w:$p/$c:shown)"
    } else {
      set cmd "::rep::newLine $w [list $moves]"
      append cmd " -include $::rep::_data($w:$p/$c:include)"
    }
    append cmd " -comment [list $comment] -text [list $text]"
    if {! [info exists ::rep::_data($w:$p/$c:delete)]} {
      lappend returnList $cmd
    }

    if {$recurse  &&  [llength $::rep::_data($w:$p/$c:children)] > 0} {
      set returnList [::rep::_extract $w $p/$c $returnList]
    }
  }
  return $returnList
}

# ::rep::_searchLines
#   Traverses the repertoire heirarchy, producing a list of
#   lines to be searched. If type is "all", all lines in the
#   repertoire will appear. Otherwise, type should be "displayed"
#   and only currently displayed lines will appear.
#   Each include-line returned has "1 " prepended to its moves, and
#   each exclude-line returned has "0 " prepended to its moves.
#   
proc ::rep::_searchLines {w type v returnList} {
  set p $v
  if {$v == "/"} { set p "" }
  foreach c $::rep::_data($w:$v:children) {
    set text [string trim $::rep::_data($w:$p/$c:text)]
    set comment [string trim $::rep::_data($w:$p/$c:comment)]
    set moves [::rep::_decode $p/$c]

    set recurse 0
    if {$::rep::_data($w:$p/$c:group)} {
      if {$type == "all"  ||  $::rep::_data($w:$p/$c:shown)} {
        set recurse 1
      }
    } else {
      lappend returnList "$::rep::_data($w:$p/$c:include) $moves"
    }

    if {$recurse  &&  [llength $::rep::_data($w:$p/$c:children)] > 0} {
      set returnList [::rep::_searchLines $w $type $p/$c $returnList]
    }
  }
  return $returnList
}

# ::rep::readFile
#   Reads the specified repertoire file.
#
proc ::rep::readFile {w fname} {
  #set readonly 0
  #if {[catch {open $fname r+} f]} {
  #  set readonly 1
  #} else {
  #  close $f
  #}

  if {[catch {open $fname r} f]} {
    return -code error "Unable to open the file: $fname"
  }
  ::rep::clear $w
  set ::rep::_data($w:altered) 1
  #set ::rep::_data($w:readonly) 1
  set text ""
  set count 0
  set groups {}
  while {1} {
    set line [string trim [gets $f]]
    if {[eof $f]} { break }
    incr count
    set sep [string first ";" $line]
    if {$sep < 0} {
      set moves $line
      set comment ""
    } else {
      set moves [string trim [string range $line 0 [expr {$sep - 1} ]]]
      set comment [string trim [string range $line [expr {$sep + 1} ] end]]
    }
    set c [string index $line 0]

    switch -exact -- $c {
      "\#" {
        set line [string trim [string range $line 1 end]]
        append text "$line\n"
      }
      "\[" {
        set group [string trim [string range $moves 1 end]]
        set m [join $groups]
        append m " $group"
        if {[catch {::rep::newGroup $w $m -comment $comment -text $text} err]} {
            return -code error "Error: $fname: line $count: $err"
        }
        lappend groups $group
        set text ""
      }
      "\]" {
        set len [llength $groups]
        if {$len == 0} {
          return -code error "Error: $fname: line $count: extra \"\]\" symbol."
        } elseif {$len == 1} {
          set groups {}
        } else {
          set groups [lrange $groups 0 [expr {$len - 2} ]]
        }
      }
      "-" {
        set m [join $groups]
        append m " "
        append m [string trim [string range $moves 1 end]]
        if {[catch {::rep::newLine $w $m -include 0 -comment $comment -text $text} err]} {
            return -code error "Error: $fname: line $count: $err"
        }
        set text ""
      }
      "+" {
        set m [join $groups]
        append m " "
        append m [string trim [string range $moves 1 end]]
        if {[catch {::rep::newLine $w $m -include 1 -comment $comment -text $text} err]} {
            return -code error "Error: $fname: line $count: $err"
        }
        set text ""
      }
      "" -
      "@" {
        # do nothing
      }
      default {
        return -code error "Error in $fname at line $count: unexpected character: \"$c\""
      }
    }
  }
  close $f
  set ::rep::_data($w:altered) 0
  set ::rep::_data($w:filename) $fname
  ::rep::_drawWhenIdle $w
  ::rep::updateWinTitle $w
  return
}

# ::rep::writeFile
#   Writes the repertoire to the specified file.
#
proc ::rep::writeFile {w fname} {
  if {[catch {open $fname w} f]} {
    return -code error "Unable to open the file \"$fname\""
  }
  puts $f "@ Scid opening repertoire file.  Updated: [::utils::date::today]."
  if {[catch {::rep::_writeFileLevel $w $f "/" 0} err]} {
    return -code error "Error writing the file \"$fname\": $err"
  }
  close $f
  set ::rep::_data($w:altered) 0
  set ::rep::_data($w:filename) $fname
  ::rep::updateStatus $w
  ::rep::updateWinTitle $w
  return
}

# ::rep::_writeFileLevel
#   Writes a single level of the repertoire to the open
#   file channel "f", indented "in" spaces.
#
proc ::rep::_writeFileLevel {w f v in} {
  set p $v
  if {$v == "/"} { set p "" }
  if {[llength $::rep::_data($w:$v:children)] == 0} { return }

  foreach c $::rep::_data($w:$v:children) {
    if {$in == 0} { puts $f "" }
    set text [split [string trim $::rep::_data($w:$p/$c:text)] "\n"]
    foreach line $text {
      for {set i 0} {$i < $in} {incr i} { puts -nonewline $f " " }
      puts -nonewline $f "\# "
      puts $f [string trim $line]
    }

    for {set i 0} {$i < $in} {incr i} { puts -nonewline $f " " }
    if {$::rep::_data($w:$p/$c:group)} {
      puts -nonewline $f "\[ "
    } else {
      if {$::rep::_data($w:$p/$c:include)} {
        puts -nonewline $f "+ "
      } else {
        puts -nonewline $f "- "
      }
    }
    set moves [::rep::_decode $c]
    if {[string length $::rep::_data($w:$p/$c:comment)] > 0} {
      append moves " ; $::rep::_data($w:$p/$c:comment)"
    }
    puts $f $moves
    if {[llength $::rep::_data($w:$p/$c:children)] > 0} {
      ::rep::_writeFileLevel $w $f $p/$c [expr {$in + 4} ]
    }
    if {$::rep::_data($w:$p/$c:group)} {
      for {set i 0} {$i < $in} {incr i} { puts -nonewline $f " " }
      puts $f "\]"
    }
  }
}

# ::rep::OpenFile
#   Prompts the user to select a repertoire file, and reads it.
#
proc ::rep::OpenFile {w} {
  set ftype { {"Scid repertoire files" {".sor"}} }
  set fname [tk_getOpenFile -filetypes $ftype -title "Open a repertoire file"]
  if {$fname == ""} { return }
  ::rep::readFile $w $fname
}

# ::rep::saveFile
#   Prompts the user to select a repertoire file name if the file is
#   untitled or if the user type is "new", and then writes the file.
#
proc ::rep::saveFile {w {type current}} {
  set fname $::rep::_data($w:filename)
  if {$type == "new"  ||  $fname == ""} {
    set ftype { {"Scid repertoire files" {".sor"}} }
    set fname [tk_getSaveFile -filetypes $ftype \
                 -defaultextension ".sor" \
                 -title "Create a repertoire file"]
  }
  if {$fname == ""} { return }
  ::rep::writeFile $w $fname
}

# ::rep::_popupMenu
#   Creates and presents a right-mouse-button popup menu for a
#   group or line at the real coordinates ($x,$y).
#
proc ::rep::_popupMenu {w v x y} {
  if {! [info exists ::rep::_data($w:$v:group)]} { return }
  catch {destroy $w.popup}
  set group $::rep::_data($w:$v:group)
  menu $w.popup
  $w.popup add command -label "Paste moves as current game" \
    -command "catch {sc_game import \"[::rep::_decode $v]\"};
              updateBoard -pgn"
  $w.popup add separator
  if {$group} {
    $w.popup add command -label "Expand group and all subgroups" \
      -command "::rep::showAll $w $v"
    $w.popup add command -label "Collapse group and all subgroups" \
      -command "::rep::hideAll $w $v"
    $w.popup add separator
    $w.popup add command -label "Delete group, keeping subgroups..." \
      -command "::rep::deleteGroup $w $v"
    $w.popup add command -label "Delete group and subgroups..." \
      -command "::rep::pruneGroup $w $v"
  } else {
    $w.popup add command -label "Toggle included/excluded state" \
      -command "::rep::toggleLineState $w $v"
    $w.popup add separator
    $w.popup add command -label "Delete line..." \
      -command "::rep::deleteLine $w $v"
  }
  tk_popup $w.popup $x $y
}

# ::rep::search
#   Opens the repertoire search window. The parameter "type" should be
#   "all" or "displayed", indicating which lines to use in the search.
#
proc ::rep::search {repwin {type all}} {
  sc_search repertoire clear
  set lines [::rep::_searchLines $repwin $type / {}]
  set numIncluded 0
  set numExcluded 0
  foreach i $lines {
    set include [string index $i 0]
    set moves [string range $i 2 end]
    sc_game push
    if {[catch {eval "sc_move addSan $moves"} result]} {
      sc_game pop
      tk_messageBox -parent $repwin -type ok -icon warning -title "Scid" \
        -message "Error in line \"$moves\": $result"
      sc_search repertoire clear
      return
    }
    sc_search repertoire add $include
    sc_game pop
    if {$include} { incr numIncluded } else { incr numExcluded }
  }
  if {$numIncluded == 0} {
      tk_messageBox -parent $repwin -type ok -icon info -title "Scid" \
        -message "The repertoire you want to search for has no included lines, so it cannot possibly match any games."
    return
  }

  set w .searchRep
  toplevel $w
  wm title $w "Scid: $::tr(RepSearch)"
  bind $w <Escape> "$w.b.cancel invoke"
  bind $w <Return> "$w.b.search invoke"
  bind $w <F1> {helpWindow Repertoire Search}

  pack [label $w.l -anchor w] -side top -fill x
  set t "$::tr(RepSearch): $numIncluded $::tr(RepIncludedLines), "
  append t "$numExcluded $::tr(RepExcludedLines)"
  $w.l configure -text $t

  ::search::addFilterOpFrame $w
  addHorizontalRule $w

  canvas $w.progress -height 20 -width 300 -bg white -relief solid -border 1
  $w.progress create rectangle 0 0 0 0 -fill blue -outline blue -tags bar
  $w.progress create text 295 10 -anchor e -font font_Regular -tags time \
    -fill black -text "0:00 / 0:00"

  frame $w.b
  pack $w.b -side top -ipady 5 -fill x

  set ::_searchRep $repwin
  button $w.b.search -textvar ::tr(Search) -command {
    busyCursor .
    grab .searchRep.b.cancel
    sc_progressBar .searchRep.progress bar 301 21 time
    .searchRep.b.cancel configure -command sc_progressBar
    set err [catch {sc_search repertoire go $::search::filter::operation} result]
    sc_search repertoire clear
    unbusyCursor .
    grab release .searchRep.b.cancel
    grab release .searchRep
    focus .repWin
    destroy .searchRep
    if {$err} {
      tk_messageBox -parent $::_searchRep -type ok -icon info -title "Scid" \
        -message $result
    } else {
      set ::rep::_data($::_searchRep:status) "  $::tr(RepSearch): $result"
    }
    set glstart 1
    ::windows::gamelist::Refresh
    ::windows::stats::Refresh
  }
  button $w.b.cancel -textvar ::tr(Cancel) \
    -command "grab release $w; focus $repwin; destroy $w"
  pack $w.b.cancel $w.b.search -side right -pady 5 -padx 5
  pack $w.progress -side bottom
  wm resizable $w 0 0
  grab $w
}


# Images and bitmaps used in heirarchical repertoire view.
# I found the open and closed folder images used at the sourceforge.net
# website, but i hope to find or create nicer-looking ones...

image create photo ::rep::_closedgroup -data {
R0lGODdhDwANAIQAAP7+/AICBMa6la6ehJaJda6ihPbu6ubcwNbGtN7V2c7Dp97Opc66m8a1
lLaniu7q2Xp0cHJuW+7m1LaulKaYfL6zl25mWJ6ObYJ5a1pVTQAAAAAAAAAAAAAAAAAAAAAA
ACwAAAAADwANAAAFYSAgjmQ5BmhgkoEwuOoaDARdEGkqBsbR/wZE4qBQBQ6CBUO5EDQcAhwg
8GgynVAHxHhYLgWCbCFilDAbYUFhQiFPu4tK2uGgUCzlBRpaqF8IeG8QBBgUGIQRFhYZMTmO
OiEAOw==
}

#image create photo ::rep::_oldgroup -data {
#R0lGODdhEAAPAMIAAP////j4+Hh4eLi4uPj4AAAAAAAAAAAAACwAAAAAEAAPAAADPAi63BBB
#SAlrfWIQPYS92SZ2EwUIjiMUJzC+2tpy8CajNX0DdG+zOJ8OyMv9WsYYsMQssQKFqHQ6TVkV
#CQA7
#}

image create photo ::rep::_opengroup -data {
R0lGODdhDwANAKUAAP7+/O7u7M7OzDo6NN7e3PLy5J6enNbW1K6urH5+fDo2LIZ+bK6qnJaW
lGpqbFZSRF5eXG5ubG5mVLaunNLOxObm4HpyZGJiXA4ODBoWFJaOfHZuXI6GdObi3OLi5EpG
RJqOfMrKzNrWzPb27Pr69CIiHH52ZJqSfBoaFFpWT4J6ZN7azCoqLGZeVKqqrLq2pO7q5IaG
hKKahL6+vFZWVGpmVD4+PJKKdAYGBAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAADwANAAAG
kkCAcBgQCAYDwrBgOAAQhoRCsWA0BAaD4wGJQB6SCYVSsVwemIxmseF0PAUA5ONYgDIhhUY0
IhESJSYcICcnKAQpKisADSwtIBonGpMZAC4fLyMoJyCdkJMoAB0RGzAZhJKchJUAMS0yKJOy
HA8lM0M0JhmFnDU2BkNCBimnIDUPN8HBLCgWCgnAykMHODQCAdJBADs=
}

image create photo ::rep::_tick -data {
R0lGODdhEAAQAKEAAP///wAAAFFR+wAAACwAAAAAEAAQAAACMISPacHtvpQKUSIKsBQiV8V1
mIaEFWmYJ8Cl7TGynQpH4XtV9/ThuWepZR5ERtBSAAA7
}

image create photo ::rep::_cross -data {
R0lGODdhEAAQAKEAAP///wAAAPoTQAAAACwAAAAAEAAQAAACL4SPacHtvpQKUSIKsFA7V9EZ
YIUBoxliJXqSSeseIKzKXVujyJlbse/JPIYMoKQAADs=
}

image create photo ::rep::_tb_group -data {
R0lGODlhEQARAIQAANnZ2QICBMa6la6ehJaJda6ihPbu6ubcwNbGtN7V2c7Dp97Opc66m8a1
lLaniqmpqe7q2Xp0cHJuW+7m1LaulKaYfL6zl25mWJ6ObYJ5a1pVTScznicznicznicznicz
niwAAAAAEQARAAAFdiAgjmRpnigQrEE6BsIQt2kwEHdBsCwZGAeg0IBIHBQ01UGwYDQXgoZD
sHuIAhDoMzp1RAJWpdMpEHQLEvB18myYBQVKJR0OHJyWt8NRqVzUKmxuUwV8GAR/dQcRBBkV
GY0SFxcagCo8mCsPYSKbnp+eLqKjIyEAOw==
}

image create photo ::rep::_tb_include -data {
R0lGODlhEQARAKEAAP///9nZ2QAAAFFR+ywAAAAAEQARAAACOYyPecLtvoCcVIpY8zUizzEA
W9B5YDiW1WlhFNtyACjBMTmH9t2ddJWq7XifkMbl4T2WDIXzCVUUAAA7
}

image create photo ::rep::_tb_exclude -data {
R0lGODlhEQARAKEAANnZ2QAAAP////oTQCwAAAAAEQARAAACOoSPecHtvoScVIZY8zVBjvwJ
G9AJQ+iFY2mG57RS5wtjE11z8kzF6W/B4FpBXabiO+ZIjyZDAY1KFQUAOw==
}

set maskdata "#define solid_width 9\n#define solid_height 9"
append maskdata {
  static unsigned char solid_bits[] = {
   0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01,
   0xff, 0x01, 0xff, 0x01, 0xff, 0x01
  };
}

set data "#define open_width 9\n#define open_height 9"
append data {
  static unsigned char open_bits[] = {
   0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x7d, 0x01, 0x01, 0x01,
   0x01, 0x01, 0x01, 0x01, 0xff, 0x01
  };
}

image create bitmap ::rep::_shown -data $data -maskdata $maskdata \
  -foreground black -background white

set data "#define closed_width 9\n#define closed_height 9"
append data {
  static unsigned char closed_bits[] = {
   0xff, 0x01, 0x01, 0x01, 0x11, 0x01, 0x11, 0x01, 0x7d, 0x01, 0x11, 0x01,
   0x11, 0x01, 0x01, 0x01, 0xff, 0x01
  };
}

image create bitmap ::rep::_hidden -data $data -maskdata $maskdata \
  -foreground black -background white

###
### End of file: reper.tcl
###

# ::tools::graphs::Save
#
#   Saves a graph (e.g. tree graph, filter graph, rating graph) to a
#   color or greyscale Postscript file.
#
#   The mode should be "color" or "gray".
#
proc ::tools::graphs::Save {mode w} {
  if {! [winfo exists $w]} { return }
  set ftypes {{"PostScript files" {.eps .ps}} {"All files" *}}
  set fname [tk_getSaveFile -filetypes $ftypes -parent $w \
               -defaultextension ".eps" -title "Scid: Save Graph"]
  if {$fname == ""} { return }
  if {[catch {$w postscript -file $fname -colormode $mode} result]} {
    tk_messageBox -icon info -parent $w -title "Scid" -message $result
  }
}

#####################
# Filter graph window

# ::tools::graphs::filter::type
#   can be "decade", "year" or "elo"
#
set ::tools::graphs::filter::type decade

proc tools::graphs::filter::Open {} {
  global filterGraph
  set w .fgraph
  if {[winfo exists $w]} {
    focus .
    destroy $w
    set filterGraph 0
    return
  }
  toplevel $w
  wm title $w "Scid: Filter Graph"
  set filterGraph 1
  bind $w <Destroy> {set filterGraph 0}

  frame $w.b
  pack $w.b -side bottom -fill x
  label $w.b.status -width 1 -font font_Small -anchor w
  frame $w.sep -height 2 -borderwidth 2 -relief sunken -background white
  pack $w.sep -side bottom -fill x -pady 4

  canvas $w.c -width 500 -height 300
  $w.c create text 25 5 -tag title -justify center -width 1 \
    -font font_Small -anchor n
  $w.c create text 250 295 -tag type -justify center -width 1 \
    -font font_Small -anchor s
  pack $w.c -side top -expand yes -fill both
  ::utils::graph::create filter

  bind $w <F1> {helpWindow Graphs Filter}
  bind $w <Configure> {
    .fgraph.c itemconfigure title -width [expr {[winfo width .fgraph.c] - 50}]
    .fgraph.c coords title [expr {[winfo width .fgraph.c] / 2}] 10
    .fgraph.c itemconfigure type -width [expr {[winfo width .fgraph.c] - 50}]
    .fgraph.c coords type [expr {[winfo width .fgraph.c] / 2}] \
      [expr {[winfo height .fgraph.c] - 10}]
    ::utils::graph::configure filter -height [expr {[winfo height .fgraph.c] - 80}]
    ::utils::graph::configure filter -width [expr {[winfo width .fgraph.c] - 60}]
    ::utils::graph::redraw filter
  }
  bind $w.c <1> tools::graphs::filter::Switch
  bind $w.c <3> ::tools::graphs::filter::Refresh

  foreach {name text} {decade Decade year Year elo Rating} {
    radiobutton $w.b.$name -padx 4 -pady 3 -text $::tr($text) \
      -variable ::tools::graphs::filter::type -value $name \
      -command ::tools::graphs::filter::Refresh
    pack $w.b.$name -side left -padx 1 -pady 2
  }
  dialogbutton $w.b.close -text $::tr(Close) -command "destroy $w"
  pack $w.b.decade $w.b.elo -side left -padx 1 -pady 2
  pack $w.b.close -side right -padx 2 -pady 2
  pack $w.b.status -side left -padx 2 -pady 2 -fill x -expand yes

  ::tools::graphs::filter::Refresh
}

proc tools::graphs::filter::Switch {} {
  variable type
  switch $type {
    "decade" { set type "year" }
    "year" { set type "elo" }
    "elo" { set type "decade" }
  }
  ::tools::graphs::filter::Refresh
}

proc ::tools::graphs::filter::Refresh {} {
  set w .fgraph
  if {! [winfo exists $w]} { return }

  $w.c itemconfigure title -width [expr {[winfo width $w.c] - 50}]
  $w.c coords title [expr {[winfo width $w.c] / 2}] 10
  $w.c itemconfigure type -width [expr {[winfo width $w.c] - 50}]
  $w.c coords type [expr {[winfo width $w.c] / 2}] \
    [expr {[winfo height $w.c] - 10}]
  set height [expr {[winfo height $w.c] - 80}]
  set width [expr {[winfo width $w.c] - 60}]
  set vlines {}
  if {$::tools::graphs::filter::type == "elo"} {
    # Vertical lines for Elo-range graph:
    for {set i 1} {$i < 9} { incr i } {
      lappend vlines [list gray80 1 at $i.5]
    }
  } elseif {$::tools::graphs::filter::type == "year"} {
    # Vertical lines for Year-range graph:
    for {set i 1} {$i < 11} { incr i } {
      lappend vlines [list gray80 1 at $i.5]
    }
  } else {
    # Vertical lines for Decade graph: most are gray, but those
    # just before 1950s and 2000s are blue to make them stand out.
    for {set i 1} {$i < 10} {incr i} {
      set vlineColor gray80
      if {$i == 4  ||  $i == 9} { set vlineColor steelBlue }
      lappend vlines [list $vlineColor 1 at $i.5]
    }
  }
  ::utils::graph::create filter -width $width -height $height -xtop 40 -ytop 35 \
    -ytick 1 -xtick 1 -font font_Small -canvas $w.c -textcolor black \
    -vline $vlines -background lightYellow -tickcolor black -xmin 0 -xmax 1
  ::utils::graph::redraw filter
  busyCursor .
  update

  set count 0
  set dlist {}
  set xlabels {}
  set max 0.0

  # Generate plot values and labels:
  if {$::tools::graphs::filter::type == "decade"} {
    set ftype date
    set typeName $::tr(Decade)
    set rlist [list 0000 1919 -1919  1920 1929 20-29 \
                 1930 1939 30-39  1940 1949 40-49  1950 1959 50-59 \
                 1960 1969 60-69  1970 1979 70-79  1980 1989 80-89 \
                 1990 1999 90-99  2000 2009 2000+]
  } elseif {$::tools::graphs::filter::type == "year"} {
    set ftype date
    set typeName $::tr(Year)
    set endYear [::utils::date::today year]
    set startYear [expr {$endYear - 10}]
    set rlist {}
    for {set i $startYear} {$i <= $endYear} {incr i} {
      lappend rlist $i
      lappend rlist $i
      lappend rlist $i
    }
  } else {
    set ftype elo
    set typeName $::tr(Rating)
    set rlist [list 0 1999 0-1999  2000 2099 20xx  2100 2199 21xx  \
                 2200 2299 22xx  2300 2399 23xx  2400 2499 24xx  \
                 2500 2599 25xx  2600 2699 26xx  2700 3999 2700+]
  }

  foreach {start end label} $rlist {
    if {$ftype == "date"} { append end ".12.31" }
    set r [sc_filter freq $ftype $start $end]
    set filter [lindex $r 0]
    set all [lindex $r 1]
    if {$all == 0} {
      set freq 0.0
    } else {
      set freq [expr {double($filter) * 1000.0 / double($all)}]
    }
    if {$freq >= 1000.0} { set freq 999.99 }
    incr count
    lappend dlist $count
    lappend dlist $freq
    if {$freq > $max} { set max $freq }
    lappend xlabels [list $count $label]
  }

  # Find a suitable spacing of y-axis labels:
  set ytick 0.1
  if {$max > 1.0} { set ytick 0.2 }
  if {$max > 2.5} { set ytick 0.5 }
  if {$max >   5} { set ytick   1 }
  if {$max >  10} { set ytick   2 }
  if {$max >  25} { set ytick   5 }
  if {$max >  50} { set ytick  10 }
  if {$max > 100} { set ytick  20 }
  if {$max > 250} { set ytick  50 }
  if {$max > 500} { set ytick 100 }
  set hlines [list [list gray80 1 each $ytick]]
  # Add mean horizontal line:
  set filter [sc_filter count]
  set all [sc_base numGames]
  if {$all > 0} {
    set mean [expr {double($filter) * 1000.0 / double($all)}]
    if {$mean >= 1000.0} { set mean 999.9 }
    lappend hlines [list red 1 at $mean]
  }

  # Create fake dataset with bounds so we see 0.0::
  #::utils::graph::data decade bounds -points 0 -lines 0 -bars 0 -coords {1 0.0 1 0.0}

  ::utils::graph::data filter data -color darkBlue -points 1 -lines 1 -bars 0 \
    -linewidth 2 -radius 4 -outline darkBlue -coords $dlist
  ::utils::graph::configure filter -xlabels $xlabels -ytick $ytick \
    -hline $hlines -ymin 0 -xmin 0.5 -xmax [expr {$count + 0.5}]
  ::utils::graph::redraw filter
  $w.c itemconfigure title -text $::tr(GraphFilterTitle)
  $w.c itemconfigure type -text $typeName
  $w.b.status configure -text "  $::tr(Filter): [filterText]"
  unbusyCursor .
  update
}



####################
# Game score graph

proc ::tools::graphs::score::Refresh {} {
  set linecolor red
  set linewidth 2
  set psize 2

  set w .sgraph

  if {! [winfo exists $w]} {
    toplevel $w
    frame $w.menu -relief raised -borderwidth 2
    pack $w.menu -side top -fill x
    $w configure -menu $w.menu
    menubutton $w.menu.file -text GraphFile -menu $w.menu.file.m
    menu $w.menu.file.m
    $w.menu.file.m add command -label GraphFileColor \
      -command "::tools::graphs::Save color $w.c"
    $w.menu.file.m add command -label GraphFileGrey \
      -command "::tools::graphs::Save gray $w.c"
    $w.menu.file.m add separator
    $w.menu.file.m add command -label GraphFileClose -command "destroy $w"
    pack $w.menu.file -side left

    canvas $w.c -width 500 -height 300
    $w.c create text 25 5 -tag text -justify center -width 1 \
      -font font_Regular -anchor n
    pack $w.c -side top -expand yes -fill both
    bind $w <F1> {helpWindow Graphs Score}
    bind $w <Configure> {
      .sgraph.c itemconfigure text -width [expr {[winfo width .sgraph.c] - 50}]
      .sgraph.c coords text [expr {[winfo width .sgraph.c] / 2}] 10
      ::utils::graph::configure score -height [expr {[winfo height .sgraph.c] - 90}]
      ::utils::graph::configure score -width [expr {[winfo width .sgraph.c] - 100}]
      ::utils::graph::redraw score
    }
    bind $w.c <3> ::tools::graphs::score::Refresh
    bind $w.c <1> {::tools::graphs::score::Move %x}
    wm title $w "Scid: [tr ToolsScore]"
    ::tools::graphs::score::ConfigMenus
  }

  $w.c itemconfigure text -width [expr {[winfo width $w.c] - 50}]
  $w.c coords text [expr {[winfo width $w.c] / 2}] 10
  set height [expr {[winfo height $w.c] - 90} ]
  set width [expr {[winfo width $w.c] - 100} ]
  ::utils::graph::create score -width $width -height $height -xtop 50 -ytop 45 \
    -ytick 1 -xtick 5 -font font_Small -canvas $w.c -textcolor black \
    -hline {{gray80 1 each 1} {black 1 at 0}} \
    -vline {{gray80 1 each 1} {steelBlue 1 each 5}}

  # Create fake dataset with bounds so we see at least -1.0 to 1.0:
  ::utils::graph::data score bounds -points 0 -lines 0 -bars 0 -coords {1 -0.9 1 0.9}

  # Update the graph:
  $w.c itemconfigure text -text "[sc_game info white] - [sc_game info black]\n[sc_game info site]  [sc_game info date]"
  busyCursor $w
  update
  catch {::utils::graph::data score data -color $linecolor -points 1 -lines 1 \
             -linewidth $linewidth -radius $psize -outline $linecolor \
             -coords [sc_game scores]}
  ::utils::graph::redraw score
  unbusyCursor $w
  update
}

proc ::tools::graphs::score::ConfigMenus {{lang ""}} {
  if {! [winfo exists .sgraph]} { return }
  if {$lang == ""} { set lang $::language }
  set m .sgraph.menu
  foreach menu {file} tag {File} {
    configMenuName $m.$menu Graph$tag $lang
  }
  foreach idx {0 1 3} tag {Color Grey Close} {
    configMenuText $m.file.m $idx GraphFile$tag $lang
  }
}

proc ::tools::graphs::score::Move {xc} {
  set x [expr {round([::utils::graph::xunmap score $xc] * 2)} ]
  sc_move start
  sc_move forward $x
  updateBoard
}


####################
# Rating graph

set ::tools::graphs::rating::year 1900
set ::tools::graphs::rating::type both
set ::tools::graphs::rating::player ""

proc ::tools::graphs::rating::Refresh {{type ""} {player ""}} {
  set white [sc_game info white]
  set black [sc_game info black]
  set whiteColor red
  set blackColor blue
  set lwidth 2
  set psize 2

  if {$type == ""} { set type $::tools::graphs::rating::type }
  if {$player == ""} { set player $::tools::graphs::rating::player }
  set ::tools::graphs::rating::type $type
  set ::tools::graphs::rating::player $player

  set w .rgraph

  if {! [winfo exists $w]} {
    toplevel $w
    frame $w.menu -relief raised -borderwidth 2
    pack $w.menu -side top -fill x
    $w configure -menu $w.menu
    menubutton $w.menu.file -text GraphFile -menu $w.menu.file.m
    menu $w.menu.file.m
    $w.menu.file.m add command -label GraphFileColor \
      -command "::tools::graphs::Save color $w.c"
    $w.menu.file.m add command -label GraphFileGrey \
      -command "::tools::graphs::Save gray $w.c"
    $w.menu.file.m add separator
    $w.menu.file.m add command -label GraphFileClose -command "destroy $w"
    menubutton $w.menu.options -text GraphOptions -menu $w.menu.options.m
    menu $w.menu.options.m
    foreach i {White Black Both PInfo} j {white black both player} {
      $w.menu.options.m add radiobutton -label GraphOptions$i \
        -variable ::tools::graphs::rating::type -value $j \
        -command "::tools::graphs::rating::Refresh"
    }
    $w.menu.options.m add separator
    foreach i {1900 1980 1985 1990 1995 2000} {
      $w.menu.options.m add radiobutton -label "Since $i" \
        -variable ::tools::graphs::rating::year -value $i \
        -command "::tools::graphs::rating::Refresh"
    }
    pack $w.menu.file $w.menu.options -side left

    canvas $w.c -width 500 -height 300
    $w.c create text 25 10 -tag text -justify center -width 1 \
      -font font_Regular -anchor n
    pack $w.c -side top -expand yes -fill both
    bind $w <F1> {helpWindow Graphs Rating}
    bind $w <Configure> {
      .rgraph.c itemconfigure text -width [expr {[winfo width .rgraph.c] - 50} ]
      .rgraph.c coords text [expr {[winfo width .rgraph.c] / 2} ] 10
      ::utils::graph::configure ratings -height [expr {[winfo height .rgraph.c] - 70} ]
      ::utils::graph::configure ratings -width [expr {[winfo width .rgraph.c] - 100} ]
      ::utils::graph::configure ratings -logy 10
      ::utils::graph::redraw ratings
    }
    bind $w.c <Button-1> "::tools::graphs::rating::Refresh"
    bind $w.c <Button-3> "::tools::graphs::rating::Refresh"
    wm title $w "Scid: [tr ToolsRating]"
    ::tools::graphs::rating::ConfigMenus
  }

  $w.c itemconfigure text -width [expr {[winfo width $w.c] - 50} ]
  $w.c coords text [expr {[winfo width $w.c] / 2} ] 10
  set height [expr {[winfo height $w.c] - 70} ]
  set width [expr {[winfo width $w.c] - 100} ]
  ::utils::graph::create ratings -width $width -height $height -xtop 50 -ytop 35 \
    -ytick 50 -xtick 1 -font font_Small -canvas $w.c -textcolor black \
    -hline {{gray80 1 each 25} {steelBlue 1 each 100}} \
    -vline {{gray80 1 each 1} {steelBlue 1 each 5}}
  ::utils::graph::redraw ratings
  busyCursor $w
  update

  set title "[tr ToolsRating]: "
  set year $::tools::graphs::rating::year
  if {$type == "player"} {
    append title $player
    catch {::utils::graph::data ratings d -color $whiteColor -points 1 -lines 1 \
             -linewidth $lwidth -radius $psize -outline $whiteColor \
             -coords [sc_name info -ratings:$year $player]}
  }
  if {$type == "white"  ||  $type == "both"} {
    set key ""
    if {$type == "both"} { set key [::utils::string::Surname $white] }
    append title $white
    catch {::utils::graph::data ratings d -color $whiteColor -points 1 -lines 1 \
             -linewidth $lwidth -radius $psize -outline $whiteColor \
             -key $key -coords [sc_name info -ratings:$year $white]}
  }
  if {$type == "both"} { append title " - " }
  if {$type == "black"  ||  $type == "both"} {
    set key ""
    if {$type == "both"} { set key [::utils::string::Surname $black] }
    append title $black
    catch {::utils::graph::data ratings d2 -color $blackColor -points 1 -lines 1 \
             -linewidth $lwidth -radius $psize -outline $blackColor \
             -key $key -coords [sc_name info -ratings:$year $black]}
  }
  set minYear [expr {int([::utils::graph::cget ratings axmin])} ]
  set maxYear [expr {int([::utils::graph::cget ratings axmax])} ]
  ::utils::graph::configure ratings -xtick 1
  if {[expr {$maxYear - $minYear} ] > 10} {::utils::graph::configure ratings -xtick 5}
  ::utils::graph::redraw ratings
  $w.c itemconfigure text -text $title
  unbusyCursor $w
}

proc ::tools::graphs::rating::ConfigMenus {{lang ""}} {
  if {! [winfo exists .rgraph]} { return }
  if {$lang == ""} { set lang $::language }
  set m .rgraph.menu
  foreach menu {file options} tag {File Options} {
    configMenuName $m.$menu Graph$tag $lang
  }
  foreach idx {0 1 3} tag {Color Grey Close} {
    configMenuText $m.file.m $idx GraphFile$tag $lang
  }
  foreach idx {0 1 2 3} tag {White Black Both PInfo} {
    configMenuText $m.options.m $idx GraphOptions$tag $lang
  }
}

### tools/tablebase.tcl:
###   Tablebase display routines for Scid.

set ::tb::isOpen 0
set tbTraining 0
set tbBoard 0
set tbStatus ""

namespace eval ::tb {}

set tbInfo(section) 21
set tbInfo(material) "kpk"
set tbInfo(sections) [list 21 22 31 32 41]
foreach i $tbInfo(sections) { set tbInfo($i) [list] }

set tbInfo(21) [list kqk krk kbk knk kpk]

set tbInfo(22) [list \
  kqkq kqkr kqkb kqkn kqkp \
  -    krkr krkb krkn krkp \
  -    -    kbkb kbkn kbkp \
  -    -    -    knkn knkp \
  -    -    -    -    kpkp ]

set tbInfo(31) [list \
  kqqk kqrk kqbk kqnk kqpk \
  -    krrk krbk krnk krpk \
  -    -    kbbk kbnk kbpk \
  -    -    -    knnk knpk \
  -    -    -    -    kppk ]

set tbInfo(32) [list \
  kqqkq kqqkr kqqkb kqqkn kqqkp \
  kqrkq kqrkr kqrkb kqrkn kqrkp \
  kqbkq kqbkr kqbkb kqbkn kqbkp \
  kqnkq kqnkr kqnkb kqnkn kqnkp \
  kqpkq kqpkr kqpkb kqpkn kqpkp \
  -     -     -     -     -     \
  krrkq krrkr krrkb krrkn krrkp \
  krbkq krbkr krbkb krbkn krbkp \
  krnkq krnkr krnkb krnkn krnkp \
  krpkq krpkr krpkb krpkn krpkp \
  -     -     -     -     -     \
  kbbkq kbbkr kbbkb kbbkn kbbkp \
  kbnkq kbnkr kbnkb kbnkn kbnkp \
  kbpkq kbpkr kbpkb kbpkn kbpkp \
  -     -     -     -     -     \
  knnkq knnkr knnkb knnkn knnkp \
  knpkq knpkr knpkb knpkn knpkp \
  kppkq kppkr kppkb kppkn kppkp ]

set tbInfo(41) [list \
  kqqqk kqqrk kqqbk kqqnk kqqpk \
  -     kqrrk kqrbk kqrnk kqrpk \
  -     -     kqbbk kqbnk kqbpk \
  -     -     -     kqnnk kqnpk \
  -     -     -     -     kqppk \
  -     krrrk krrbk krrnk krrpk \
  -     -     krbbk krbnk krbpk \
  -     -     -     krnnk krnpk \
  -     -     -     -     krppk \
  -     -     kbbbk kbbnk kbbpk \
  -     -     -     kbnnk kbnpk \
  -     -     -     -     kbppk \
  -     -     -     knnnk knnpk \
  -     -     -     -     knppk \
  -     -     -     -     kpppk ]

set tbInfo(42) [list \
  kqqqkq kqqqkr kqqqkb kqqqkn kqqqkp \
  kqqrkq kqqrkr kqqrkb kqqrkn kqqrkp \
  kqqbkq kqqbkr kqqbkb kqqbkn kqqbkp \
  kqqnkq kqqnkr kqqnkb kqqnkn kqqnkp \
  kqqpkq kqqpkr kqqpkb kqqpkn kqqpkp \
  kqrrkq kqrrkr kqrrkb kqrrkn kqrrkp \
  kqrbkq kqrbkr kqrbkb kqrbkn kqrbkp \
  kqrnkq kqrnkr kqrnkb kqrnkn kqrnkp \
  kqrpkq kqrpkr kqrpkb kqrpkn kqrpkp \
  kqbbkq kqbbkr kqbbkb kqbbkn kqbbkp \
  kqbnkq kqbnkr kqbnkb kqbnkn kqbnkp \
  kqbpkq kqbpkr kqbpkb kqbpkn kqbpkp \
  kqnnkq kqnnkr kqnnkb kqnnkn kqnnkp \
  kqnpkq kqnpkr kqnpkb kqnpkn kqnpkp \
  kqppkq kqppkr kqppkb kqppkn kqppkp \
  krrrkq krrrkr krrrkb krrrkn krrrkp \
  krrbkq krrbkr krrbkb krrbkn krrbkp \
  krrnkq krrnkr krrnkb krrnkn krrnkp \
  krrpkq krrpkr krrpkb krrpkn krrpkp \
  krbbkq krbbkr krbbkb krbbkn krbbkp \
  krbnkq krbnkr krbnkb krbnkn krbnkp \
  krbpkq krbpkr krbpkb krbpkn krbpkp \
  krnnkq krnnkr krnnkb krnnkn krnnkp \
  krnpkq krnpkr krnpkb krnpkn krnpkp \
  krppkq krppkr krppkb krppkn krppkp \
  kbbbkq kbbbkr kbbbkb kbbbkn kbbbkp \
  kbbnkq kbbnkr kbbnkb kbbnkn kbbnkp \
  kbbpkq kbbpkr kbbpkb kbbpkn kbbpkp \
  kbnnkq kbnnkr kbnnkb kbnnkn kbnnkp \
  kbnpkq kbnpkr kbnpkb kbnpkn kbnpkp \
  kbppkq kbppkr kbppkb kbppkn kbppkp \
  knnnkq knnnkr knnnkb knnnkn knnnkp \
  knnpkq knnpkr knnpkb knnpkn knnpkp \
  knppkq knppkr knppkb knppkn knppkp \
  kpppkq kpppkr kpppkb kpppkn kpppkp ]

# ::tb::isopen
#   Returns boolean value of whether the tablebase window is open.
#
proc ::tb::isopen {} {
  return [winfo exists .tbWin]
}

# ::tb::Open
#   Open the tablebase window.
#
proc ::tb::Open {} {
  global tbInfo
  set w .tbWin
  if {[winfo exists $w]} { return }
  toplevel $w
  setWinLocation $w
  wm title $w "Scid: [tr WindowsTB]"
  pack [frame $w.b] -side bottom -fill x
  pack [frame $w.info] -side left -fill y
  addVerticalRule $w
  pack [frame $w.pos] -side right -fill both -expand yes

  # Left frame: tablebase browser and summary info

  set f $w.info
  pack [frame $f.sec] -side top -fill x
  foreach i $tbInfo(sections) {
    set name "[string index $i 0]-[string index $i 1]"
    radiobutton $f.sec.b$i -text " $name " \
      -variable tbInfo(section) -value $i \
      -indicatoron 0 -command "::tb::section $i"
    pack $f.sec.b$i -side left -pady 1 -padx 1
  }
  autoscrollframe $f.list text $f.list.text \
    -width 35 -height 7 -font font_Fixed -wrap none \
    -foreground black -background white -cursor top_left_arrow
  pack $f.list -side top
  pack [frame $f.separator -height 2]
  # addHorizontalRule $f

  autoscrollframe $f.data text $f.data.text \
    -width 35 -height 0 -font font_Fixed -wrap none \
    -foreground black -background white -cursor top_left_arrow
  pack $f.data -side top -fill y -expand yes

  $f.list.text tag configure avail -foreground blue
  $f.list.text tag configure unavail -foreground gray40
  $f.data.text tag configure fen -foreground blue

  # Right frame: tablebase results for current position

  set f $w.pos
  autoscrollframe $f text $f.text -width 30 -height 20 -font font_Small \
    -wrap word -foreground black -background white -setgrid 1
  $f.text tag configure indent -lmargin2 [font measure font_Fixed  "        "]

  ::board::new $f.board 25
  $f.board configure -relief solid -borderwidth 1
  for {set i 0} {$i < 64} {incr i} {
    ::board::bind $f.board $i <Button-1> [list ::tb::resultsBoard $i]
  }
  if {$::tbBoard} {
    grid $f.board -row 0 -column 2 -rowspan 2
  }

  checkbutton $w.b.training -text $::tr(Training) -variable tbTraining \
    -command ::tb::training -relief raised -padx 4 -pady 5
  button $w.b.random -text "Random" -command ::tb::random
  button $w.b.showboard -image tb_coords -command ::tb::showBoard
  dialogbutton $w.b.help -text $::tr(Help) -command { helpWindow TB }
  dialogbutton $w.b.close -text $::tr(Close) -command "destroy $w"
  label $w.b.status -width 1 -textvar tbStatus -font font_Small \
    -relief flat -anchor w -height 0
  packbuttons right $w.b.close $w.b.help
  pack $w.b.training $w.b.random $w.b.showboard -side left -padx 2 -pady 2
  pack $w.b.status -side left -fill x -expand yes
  bind $w <Destroy> { set ::tb::isOpen 0; set tbTraining 0 }
  bind $w <F1> { helpWindow TB }
  bind $w <Configure> "recordWinSize $w"
  wm minsize $w 15 20
  set ::tbTraining 0
  ::tb::section
  ::tb::summary
  ::tb::results
}

# ::tb::showBoard
#   Toggles the results board.
#
proc ::tb::showBoard {} {
  global tbBoard
  set f .tbWin.pos
  if {$tbBoard} {
    set tbBoard 0
    grid forget $f.board
  } else {
    set tbBoard 1
    grid $f.board -row 0 -column 2 -rowspan 2
  }
}

# ::tb::resultsBoard
#   Updates theresultsBoard board for a particular square.
#
proc ::tb::resultsBoard {sq} {
  set f .tbWin.pos
  set board [sc_pos board]
  # If selected square is empty, take no action:
  if {[string index $board $sq] == "."} { return }
  # Clear any previous results:
  ::board::recolor $f.board
  ::board::clearText $f.board
  # Highlight the selected square:
  ::board::colorSquare $f.board $sq $::highcolor
  # Retrieve tablebase scores:
  busyCursor .
  set scores [sc_pos probe board $sq]
  set text(X) X; set color(X) red
  set text(=) =; set color(=) blue
  set text(?) "?"; set color(?) red
  set text(+) "#"; set text(-) "#"
  if {[sc_pos side] == "white"} {
    set color(+) white; set color(-) black
  } else {
    set color(+) black; set color(-) white
  }
  for {set i 0} {$i < 64} {incr i} {
    # Skip squares that have a piece.
    if {[string index $board $i] != "."} { continue }
    # Draw the score on this square:
    set score [string index $scores $i]
    catch {::board::drawText $f.board $i $text($score) $color($score)}
  }
  unbusyCursor .
}

# ::tb::name
#   Converts a material string like "kqkr" or "KQKR" to "KQ-KR".
#
proc ::tb::name {s} {
  set s [string toupper $s]
  set idx [string last "K" $s]
  set new [string range $s 0 [expr $idx - 1]]
  append new "-"
  append new [string range $s $idx end]
  return $new
}

# ::tb::section
#   Updates the tablebase list for the specified section.
#
proc ::tb::section {{sec 0}} {
  global tbInfo
  set w .tbWin
  if {! [winfo exists $w]} { return }
  if {$sec == 0} { set sec $tbInfo(section)}
  set tbInfo(section) $sec
  if {! [info exists tbInfo($sec)]} { return }
  set t $w.info.list.text
  $t configure -state normal
  $t delete 1.0 end
  $t configure -height 10
  set count 0
  set linecount 1
  foreach tb $tbInfo($sec) {
    if {$tb == "-"} {
      $t insert end [format "%-7s" ""]
    } else {
      set avail [sc_info tb available $tb]
      if {$avail} {
        set taglist [list avail $tb]
      } else {
        set taglist [list unavail $tb]
      }
      $t insert end [format "%-6s" [::tb::name $tb]] $taglist
      $t insert end " "
      # Bind tags for enter/leave/buttonpress on this tb:
      $t tag bind $tb <Any-Enter> \
        [list $t tag configure $tb -foreground yellow -background darkBlue]
      $t tag bind $tb <Any-Leave> \
        [list $t tag configure $tb -foreground {} -background {}]
      $t tag bind $tb <ButtonPress-1> [list ::tb::summary $tb]
    }
    incr count
    if {$count == 5} { set count 0; incr linecount; $t insert end "\n" }
  }
  if {$linecount > 10} { set linecount 10 }
  $t configure -height $linecount
  $t configure -state disabled
}

# ::tb::summary
#   Shows the tablebase information for the specified tablebase.
#
proc ::tb::summary {{material ""}} {
  global tbInfo tbs
  set w .tbWin
  if {! [winfo exists $w]} { return }

  if {$material == ""} { set material $tbInfo(material) }
  set tbInfo(material) $material
  set t $w.info.data.text
  $t configure -state normal
  $t delete 1.0 end
  $t insert end [format "%-6s" [::tb::name $material]]
  if {! [info exists tbs($material)]} {
    $t insert end "\nNo summary for this tablebase."
    $t configure -state disabled
    return
  }
  set data $tbs($material)

  $t insert end [format "    %5u games per million\n\n" [lindex $data 0]]

  # Longest-mate and result-percentage stats:

  $t insert end "Side    Longest    %     %     %\n"
  $t insert end "to move   mate    Win  Draw  Loss\n"
  $t insert end "---------------------------------\n"

  # Stats for White:
  $t insert end "White     "
  set len [lindex $data 1]
  set fen [lindex $data 2]
  if {$len == "0"} { set len "-" }
  if {[string length $fen] > 2} {
    append fen " w"
    $t insert end [format "%3s" $len] [list fen $fen]
    $t tag bind $fen <Any-Enter> \
      [list $t tag configure $fen -foreground yellow -background darkBlue]
    $t tag bind $fen <Any-Leave> \
      [list $t tag configure $fen -foreground {} -background {}]
    $t tag bind $fen <ButtonPress-1> [list ::tb::setFEN $fen]
  } else {
    $t insert end [format "%3s" $len]
  }
  $t insert end "  "
  $t insert end [format " %5s" [lindex $data 5]]
  $t insert end [format " %5s" [lindex $data 6]]
  $t insert end [format " %5s" [lindex $data 7]]
  $t insert end "\n"

  # Stats for Black:
  $t insert end "Black     "
  set len [lindex $data 3]
  set fen [lindex $data 4]
  if {$len == "0"} { set len "-" }
  if {[string length $fen] > 2} {
    append fen " b"
    $t insert end [format "%3s" $len] [list fen $fen]
    $t tag bind $fen <Any-Enter> \
      [list $t tag configure $fen -foreground yellow -background darkBlue]
    $t tag bind $fen <Any-Leave> \
      [list $t tag configure $fen -foreground {} -background {}]
    $t tag bind $fen <ButtonPress-1> [list ::tb::setFEN $fen]
  } else {
    $t insert end [format "%3s" $len]
  }
  $t insert end "  "
  $t insert end [format " %5s" [lindex $data 8]]
  $t insert end [format " %5s" [lindex $data 9]]
  $t insert end [format " %5s" [lindex $data 10]]
  $t insert end "\n\n"

  set mzugs [lindex $data 11]
  $t insert end "Mutual zugzwangs: "
  if {$mzugs >= 0} { $t insert end "$mzugs\n" } else { $t insert end "?\n" }
  if {$mzugs <= 0} {
    $t configure -state disabled
    return
  }

  # Extra Zugzwang info:
  set nBtmLoses [lindex $data 12]
  set nWtmLoses [lindex $data 14]
  set nBothLose [lindex $data 16]
  set zugnames [list " White draws, Black loses: " \
                  " Black draws, White loses: " \
                  " Whoever moves loses:      "]
  if {$nBtmLoses > 0} {
    $t insert end [lindex $zugnames 0]
    $t insert end [format "%5d\n" $nBtmLoses]
  }
  if {$nWtmLoses > 0} {
    $t insert end [lindex $zugnames 1]
    $t insert end [format "%5d\n" $nWtmLoses]
  }
  if {$nBothLose > 0} {
    $t insert end [lindex $zugnames 2]
    $t insert end [format "%5d\n" $nBothLose]
  }

  # Selected zugzwang positions:
  set btmFens [lindex $data 13]
  set wtmFens [lindex $data 15]
  set bothFens [lindex $data 17]
  set nBtmFens [llength $btmFens]
  set nWtmFens [llength $wtmFens]
  set nBothFens [llength $bothFens]
  set nTotalFens [expr $nBtmFens + $nWtmFens + $nBothFens]
  if {$nTotalFens == 0} {
    $t configure -state disabled
    return
  }

  # Print the lists of selected zugzwang positions:
  $t insert end "\nSelected zugzwang positions:"
  foreach n [list $nBtmFens $nWtmFens $nBothFens] \
    fenlist [list $btmFens $wtmFens $bothFens] \
    name $zugnames tomove [list b w w] {
      if {$n == 0} { continue }
      $t insert end "\n [string trim $name]"
      set count 0
      for {set count 0} {$count < $n} {incr count} {
        set fen [lindex $fenlist $count]
        if {[expr $count % 10] == 0} {
          $t insert end "\n  "
        }
        $t insert end " "
        append fen " $tomove"
        $t insert end [format "%2d" [expr $count + 1]] [list fen $fen]
        $t tag bind $fen <Any-Enter> \
          [list $t tag configure $fen -foreground yellow -background darkBlue]
        $t tag bind $fen <Any-Leave> \
          [list $t tag configure $fen -foreground {} -background {}]
        $t tag bind $fen <ButtonPress-1> [list ::tb::setFEN $fen]
      }
    }

  $t configure -state disabled
}

# ::tb::results
#   Called when the main window board changes, to display tablebase
#   results for all moves from the current position.
#
proc ::tb::results {} {
  global tbTraining
  set w .tbWin
  if {! [winfo exists $w]} { return }

  # Reset results board:
  ::board::recolor $w.pos.board
  ::board::clearText $w.pos.board
  ::board::update $w.pos.board [sc_pos board]

  # Update results panel:
  set t $w.pos.text
  $t delete 1.0 end
  if {$tbTraining} {
    $t insert end "\n (Training mode; results are hidden)"
  } else {
    $t insert end [sc_pos probe report] indent
  }
}

# ::tb::random
#   Sets up a random position with the material of the tablebase
#   currently displayed in the info frame.
#
proc ::tb::random {} {
  global tbInfo
  if {[catch {sc_game startBoard "random:$tbInfo(material)"} err]} {
    tk_messageBox -title "Scid" -icon warning -type ok -message $err
    return
  }
  # The material is valid, so clear the game and regenerate a
  # random starting position:
  sc_game new
  sc_game startBoard "random:$tbInfo(material)"
  updateBoard -pgn
}

# ::tb::setFEN
#   Called when an item in the Tablebase info browser with an
#   associated FEN position is selected with the left mouse button,
#   causing the position to be set in the main window.
#
proc ::tb::setFEN {fen} {
  if {[catch {sc_game startBoard $fen} err]} {
    tk_messageBox -title "Scid" -icon info -type ok -message $err
    return
  }
  # The FEN is valid, so clear the game and reset the FEN:
  sc_game new
  sc_game startBoard $fen
  updateBoard -pgn
}

# ::tb::training
#   Toggle tablebase training mode.
#
proc ::tb::training {} {
  global tbTraining tbStatus gameInfo
  set w .tbWin
  set tbStatus ""
  if {$tbTraining} {
    set gameInfo(showTB_old) $gameInfo(showTB)
    set gameInfo(showTB) 0
  } else {
    if {$gameInfo(showTB) == 0} { set gameInfo(showTB) $gameInfo(showTB_old) }
  }
  updateBoard -pgn
  ::tb::results
}

# ::tb::move
#   Finds and executes the best move in the current position,
#   if one can be determined from the tablebases.
#
proc ::tb::move {} {
  global tbTraining tbStatus
  if {! $tbTraining} { return }
  set moves [split [sc_pos probe optimal]]
  set len [llength $moves]
  if {$len == 0} {
    set tbStatus "No optimal move was found."
    return
  }
  set i [expr int(rand() * $len)]
  set move [lindex $moves $i]
  if {[catch {sc_move addSan $move}]} {
    set tbStatus "Error playing $move."
  } else {
    set tbStatus "Played $move."
  }
  updateBoard -pgn
}


# tbs:
#   Summary data about tablebases.
#   Each list has the following elements:
#     (0) Frequency (per million games),
#     (1) Longest-wtm-mate length, (2) Longest-wtm-mate FEN,
#     (3) Longest-btm-mate length, (4) Longest-btm-mate FEN,
#     (5) wtm-win-%, (6) wtm-draw-%, (7) wtm-loss-%,
#     (8) btm-win-%, (9) btm-draw-%, (10) btm-loss-%,
#     (11) number of mutual zugzwangs (-1 if unknown).
#  The longest-mate FENs have a board field only; no side to move, etc.
#
#   There are three types of mutual zugzwang:
#     wtm draws / btm loses, wtm loses / btm draws, wtm loses / btm loses.
#   The first two are "half-point" zugzwangs, the last is "full-point".
#
#   If the number of mutual zugzwangs is known and nonzero,
#   six more items should follow in the list:
#     (12) number of wtm-draws-btm-loses zugzwangs,
#     (13) list of selected wtm-draws-btm-loses zugzwang FENs,
#     (14) number of wtm-loses-btm-draws zugzwangs,
#     (15) list of selected wtm-loses-btm-draws zugzwang FENs,
#     (16) number of whoever-moves-loses (full-point) zugzwangs,
#     (17) list of selected whoever-moves-loses zugzwang FENs.
#   These zugzwang FENs board field only; no side to move, etc.

set tbs(kqk) {
  257 10 {7K/6Q1/8/8/2k5/8/8/8} 0 -
  100.0 0.0 0.0 0.0 10.3 89.7
  0
}

set tbs(krk) {
  542 16 {8/8/2R5/3k4/8/8/8/1K6} 0 -
  100.0 0.0 0.0 0.0 9.9 90.1
  0
}

set tbs(kbk) {
  194 0 - 0 -
  0.0 100.0 0.0 0.0 100.0 0.0
  0
}

set tbs(knk) {
  224 0 - 0 -
  0.0 100.0 0.0 0.0 100.0 0.0
  0
}

set tbs(kpk) {
  2352 28 {8/8/8/1k6/8/8/K5P1/8} 0 -
  76.5 23.5 0.0 0.0 41.9 58.1
  80 80 {} 0 {} 0 {}
}

set tbs(kqkq) {
  222 13 {8/8/8/8/8/8/8/qk1K2Q1} 13 {8/8/8/8/8/8/8/QK1k2q1}
  41.7 57.8 0.5 41.7 57.8 0.5
  0
}

set tbs(kqkr) {
  400 35 {K3r3/8/5k2/Q7/8/8/8/8} 19 {k7/5r2/K7/8/8/8/1Q6/8}
  99.0 0.8 0.2 28.7 5.8 65.5
  0
}

set tbs(kqkb) {
  25 17 {K7/8/8/3k4/4b3/8/8/7Q} 0 -
  99.7 0.3 0.0 0.0 23.1 76.9
  0
}

set tbs(kqkn) {
  74 21 {8/KQ6/2n5/2k5/8/8/8/8} 0 -
  99.3 0.7 0.0 0.0 19.5 80.5
  0
}

set tbs(kqkp) {
  937 28 {3KQ3/8/8/8/8/8/3kp3/8} 29 {8/1p4k1/7Q/8/7K/8/8/8}
  99.4 0.6 0.0 7.7 12.1 80.2
  0
}

set tbs(krkr) {
  423 19 {8/3R4/8/8/5k2/6r1/7K/8} 19 {1k6/2R5/3K4/8/8/8/6r1/8}
  29.1 70.2 0.7 29.1 70.2 0.7
  0
}

set tbs(krkb) {
  322 29 {k7/8/b7/8/K7/R7/8/8} 0 -
  35.2 64.8 0.0 0.0 96.8 3.2
  5  5 {
    4R3/8/8/8/8/b1K5/8/3k4 8/5R2/7b/8/8/2K5/8/1k6 8/8/1b6/5R2/8/3K4/8/2k5
    8/8/8/8/8/1k6/b7/R1K5 8/8/8/8/8/2K5/4k3/R2b4
  } 0 {} 0 {}
}

set tbs(krkn) {
  397 40 {8/8/6R1/2K5/n7/8/8/3k4} 1 {8/8/8/8/1n6/k7/8/KR6}
  48.4 51.6 0.0 0.0 89.0 11.0
  18 18 {
    8/2n5/8/4R3/3K1k2/8/8/8 8/8/5k2/4R3/3K4/2n5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7/N7/8/8/8/5k2/Q7/8} 0 -
  100.0 0.0 0.0 0.0 9.7 90.3
  0
}

set tbs(kqpk) {
  156 10 {8/8/8/2k5/8/8/4P1Q1/7K} 0 -
  100.0 0.0 0.0 0.0 2.8 97.2
  0
}

set tbs(krrk) {
  8 7 {4R3/3k4/8/8/5R1K/8/8/8} 0 -
  100.0 0.0 0.0 0.0 0.3 99.7
  0
}

set tbs(krbk) {
  46 16 {8/8/3R4/4k3/4B3/8/8/K7} 0 -
  100.0 0.0 0.0 0.0 8.8 91.2
  0
}

set tbs(krnk) {
  15 16 {K7/2R5/3k4/3N4/8/8/8/8} 0 -
  100.0 0.0 0.0 0.0 9.2 90.8
  0
}

set tbs(krpk) {
  333 16 {K7/8/3R4/4kP2/8/8/8/8} 0 -
  100.0 0.0 0.0 0.0 2.5 97.5
  0
}

set tbs(kbbk) {
  31 19 {K7/8/3B4/3k4/8/8/4B3/8} 0 -
  49.3 50.7 0.0 0.0 58.8 41.2
  0
}

set tbs(kbnk) {
  206 33 {7K/4B3/4k3/8/8/8/8/2N5} 0 -
  99.5 0.5 0.0 0.0 18.1 81.9
  0
}

set tbs(kbpk) {
  453 31 {8/3P4/KBk5/8/8/8/8/8} 0 -
  96.0 4.0 0.0 0.0 16.8 83.2
  6 6 {
    1B1K4/8/8/k7/8/P7/8/8 1B6/3K4/8/1k6/8/P7/8/8 1BK5/8/1k6/8/8/P7/8/8
    8/B1k5/K7/P7/8/8/8/8 kB6/8/1PK5/8/8/8/8/8 kB6/8/KP6/8/8/8/8/8
  } 0 {} 0 {}
}

set tbs(knnk) {
  20 1 {k7/3N4/K1N5/8/8/8/8/8} 0 -
  0.0 100.0 0.0 0.0 100.0 0.0
  0
}

set tbs(knpk) {
  426 27 {1N6/8/8/8/8/2k3P1/8/2K5} 0 -
  96.3 3.7 0.0 0.0 18.5 81.5
  75 75 {} 0 {} 0 {}
}

set tbs(kppk) {
  563 32 {8/8/8/8/2k5/6P1/K5P1/8} 0 -
  98.4 1.6 0.0 0.0 7.9 92.1
  43 43 {} 0 {} 0 {}
}

set tbs(kqqkq) {
  51 30 {2K5/8/1k6/5q2/8/8/6Q1/7Q} 13 {7Q/7K/8/6Qk/8/8/7q/8}
  99.1 0.8 0.1 0.6 32.8 66.6
  0
}

set tbs(kqqkr) {
  0 35 {Kr6/8/8/8/8/3Q4/4Q3/2k5} 19 {6Q1/8/8/8/8/7K/2r4Q/7k}
  100.0 0.0 0.0 0.1 0.2 99.7
  0
}

set tbs(kqqkb) {
  0 15 {8/8/7Q/5k1K/7Q/5b2/8/8} 0 -
  100.0 0.0 0.0 0.0 0.1 99.9
  0
}

set tbs(kqqkn) {
  0 19 {5K2/3n4/4k3/2Q5/8/8/8/1Q6} 0 -
  100.0 0.0 0.0 0.0 0.1 99.9
  0
}

set tbs(kqqkp) {
  7 22 {8/8/8/3Q4/7Q/2k5/1p6/K7} 13 ?
  100.0 0.0 0.0 0.0 0.7 99.3
  0
}

set tbs(kqrkq) {
  36 67 {8/8/8/8/q7/6k1/8/KR5Q} 38 {8/8/q7/8/8/6R1/2K4Q/k7}
  97.0 2.8 0.2 24.4 21.2 54.4
  1 1 {8/8/8/8/1R6/k4q2/8/1K2Q3} 0 {} 0 {}
}

set tbs(kqrkr) {
  132 34 {1K2Q3/8/3k4/1r2R3/8/8/8/8} 20 {6rQ/8/8/8/8/7K/5R2/6k1}
  99.8 0.1 0.0 0.3 17.1 82.1
  0
}

set tbs(kqrkb) {
  12 29 {2k5/5b2/8/8/2K5/8/Q7/6R1} 0 -
  100.0 0.0 0.0 0.0 11.6 88.4
  0
}

set tbs(kqrkn) {
  2 40 ? 1 {8/8/8/8/1n6/k7/8/KR5Q}
  99.9 0.1 0.0 0.0 7.7 92.3
  0
}

set tbs(kqrkp) {
  25 40 ? 43 ?
  100.0 0.0 0.0 0.3 1.4 98.3
  0
}

set tbs(kqbkq) {
  28 33 {5q2/8/8/5B2/k1K4Q/8/8/8} 24 {6KQ/8/1B6/6k1/8/6q1/8/8}
  55.7 44.0 0.3 30.5 62.3 7.2
  25 25 {} 0 {} 0 {}
}

set tbs(kqbkr) {
  21 40 ? 30 ?
  99.3 0.6 0.0 0.7 27.5 71.8
  0
}

set tbs(kqbkb) {
  2 17 ? 2 ?
  99.7 0.3 0.0 0.0 19.8 80.2
  0
}

set tbs(kqbkn) {
  2 21 ? 1 ?
  99.5 0.5 0.0 0.0 16.7 83.3
  0
}

set tbs(kqbkp) {
  25 32 ? 24 ?
  100.0 0.0 0.0 1.0 14.1 84.9
  0
}

set tbs(kqnkq) {
  74 41 {8/7q/8/k7/2K5/2N5/8/4Q3} 24 {7K/8/1N6/Q5k1/8/8/6q1/8}
  50.1 49.6 0.3 33.5 62.2 4.3
  38 38 {} 0 {} 0 {}
}

set tbs(kqnkr) {
  12 38 ? 41 ?
  99.2 0.7 0.0 3.0 27.2 69.8
  0
}

set tbs(kqnkb) {
  7 17 ? 1 ?
  99.8 0.2 0.0 0.0 20.9 79.1
  0
}

set tbs(kqnkn) {
  13 21 ? 1 ?
  99.4 0.6 0.0 0.0 17.8 82.2
  0
}

set tbs(kqnkp) {
  46 30 ? 29 ?
  99.9 0.1 0.0 1.9 15.0 83.1
  0
}

set tbs(kqpkq) {
  1179 124 {4q3/K7/8/8/8/4P3/6Q1/k7} 29 {8/7q/3PK3/8/8/8/Q7/3k4}
  68.4 31.2 0.4 35.2 51.2 13.6
  640 640 {} 0 {} 0 {}
}

set tbs(kqpkr) {
  216 38 ? 33 ?
  99.6 0.3 0.1 19.7 6.1 74.1
  1 1 {k7/8/KQ1r4/P7/8/8/8/8} 0 {} 0 {}
}

set tbs(kqpkb) {
  16 28 ? 2 ?
  99.9 0.1 0.0 0.0 16.7 83.3
  0
}

set tbs(kqpkn) {
  41 30 ? 8 ?
  99.7 0.3 0.0 0.0 12.5 87.5
  0
}

set tbs(kqpkp) {
  622 105 {8/8/8/8/3P2Q1/8/1p6/K1k5} 34 ?
  100.0 0.0 0.0 3.3 7.3 89.4
  0
}

set tbs(krrkq) {
  8 29 {3R4/1R6/8/8/q7/7K/8/k7} 49 {7R/1q6/3K4/8/k7/8/2R5/8}
  58.2 36.8 5.1 52.0 37.0 11.0
  10 10 {
    6R1/8/8/8/6R1/7q/1K5k/8 6R1/8/8/8/8/6R1/7q/K6k  8/6R1/8/8/8/3K2R1/7q/7k
    8/6R1/8/8/8/6R1/7q/1K5k 8/8/1R6/8/8/1R1K4/q7/k7 8/8/6R1/8/8/6R1/7q/2K4k
    8/8/8/3R4/8/k7/2KR4/4q3 8/8/8/6R1/8/6R1/7q/3K3k 8/8/8/8/1R6/1R6/q7/k2K4
    8/8/8/8/8/2K5/2R1R3/kq6
  } 0 {} 0 {}
}

set tbs(krrkr) {
  38 31 {8/1R6/8/8/8/5r1K/4R3/k7} 20 {1k6/2R5/7r/3K3R/8/8/8/8}
  99.2 0.7 0.0 0.4 33.4 66.2
  0
}

set tbs(krrkb) {
  8 29 {8/8/8/2b5/8/4KR2/1k6/6R1} 0 -
  99.3 0.7 0.0 0.0 22.4 77.6
  1 1 {8/8/8/8/8/b1k5/1R6/1RK5} 0 {} 0 {}
}

set tbs(krrkn) {
  8 40 {4k3/6R1/8/7n/5K2/1R6/8/8} 1 {8/8/8/8/1n6/k7/8/KR1R4}
  99.7 0.3 0.0 0.0 15.0 85.0
  0
}

set tbs(krrkp) {
  3 33 ? 50 ?
  100.0 0.0 0.0 1.0 5.7 93.3
  0
}

set tbs(krbkq) {
  23 21 ? 70 ?
  38.7 48.0 13.4 71.2 25.6 3.2
  372 0 {} 372 {3Kn3/8/8/8/8/4r3/7Q/3k4} 0 {}
}

set tbs(krbkr) {
  649 65 {k7/7r/3K4/8/6B1/8/4R3/8} 30 {8/4R2K/8/5k2/8/8/7B/4r3}
  41.3 58.7 0.0 0.8 94.1 5.1
  17 17 {
    8/8/8/8/8/1R1K4/2B5/r1k5 8/8/8/8/8/2KB4/2R5/kr6   8/8/8/8/7B/4r3/5R2/2K1k3
    8/8/8/8/rB6/8/1R6/1K1k4  7k/6R1/7r/8/8/8/1B6/1K6  8/8/8/8/8/2K4B/6R1/3r1k2
    8/8/8/8/4R3/k7/2K1B3/4r3 8/8/8/8/8/2R3Br/k1K5/8   8/8/8/3B1r2/3K4/8/6R1/3k4
    8/8/8/8/8/R2K4/5B2/1r1k4 8/8/8/8/8/3K2R1/8/4k1Br  8/8/8/2B5/8/6r1/k1K4R/8
    8/5r2/8/8/1R4B1/8/3K4/k7 8/8/3B4/1r6/8/2K5/4R3/1k6 8/8/8/8/3KB2r/8/5R2/k7
    8/8/3B4/8/8/5r2/k1K1R3/8 5R2/8/8/8/8/3K4/5Br1/2k5
  } 0 {} 0 {}
}

set tbs(krbkb) {
  20 30 ? 2 ?
  98.2 1.8 0.0 0.0 31.1 68.9
  0
}

set tbs(krbkn) {
  5 40 ? 1 ?
  98.9 1.1 0.0 0.0 24.0 76.0
  0
}

set tbs(krbkp) {
  33 28 ? 70 ?
  99.1 0.9 0.0 2.4 17.1 80.5
  1 1 {1k1K4/7R/8/8/8/8/6p1/7B} 0 {} 0 {}
}

set tbs(krnkq) {
  15 20 ? 69 ?
  35.4 41.1 23.4 78.2 19.7 2.1
  455 0 {} 455 {} 0 {}
}

set tbs(krnkr) {
  430 37 {2k1r3/8/R7/N2K4/8/8/8/8} 41 {4K3/8/1r6/8/5k2/1R4N1/8/8}
  36.7 63.3 0.1 3.2 93.6 3.2
  10 10 {
    2R5/8/8/8/8/k2K4/8/r1N5  8/8/8/8/3N4/1R1K4/8/r1k5 8/8/8/8/3N4/2KR4/8/2k1r3
    8/8/8/8/4N3/7R/k1K5/5r2  8/8/8/8/8/2KRN3/8/2k1r3  8/8/8/8/8/3KN3/3R4/2k1r3
    8/8/8/8/8/5RN1/8/2K1k1r1 8/8/8/8/8/6RN/8/3K1k1r   8/8/8/8/8/NR1K4/8/r1k5
    8/8/8/8/r1N5/2R5/k1K5/8
  } 0 {} 0 {}
}

set tbs(krnkb) {
  7 31 ? 1 ?
  97.7 2.3 0.0 0.0 32.4 67.6
  0
}

set tbs(krnkn) {
  12 37 ? 1 ?
  99.0 1.0 0.0 0.0 24.6 75.4
  3 3 {
    8/8/8/8/4n3/1k6/N7/R1K5 8/8/8/8/8/3n4/N2k4/RK6 8/8/8/8/8/n7/1k6/N1RK4
  } 0 {} 0 {}
}

set tbs(krnkp) {
  32 29 ? 68 ?
  98.5 1.5 0.0 4.5 17.1 78.4
  0
}

set tbs(krpkq) {
  367 68 ? 104 ?
  37.7 11.8 50.5 91.0 7.1 1.8
  243 2 {} 241 {} 0 {}
}

set tbs(krpkr) {
  9184 74 {8/1k6/4R3/8/8/8/6Pr/4K3} 33 {8/1P6/2k5/8/K7/8/8/1r5R}
  66.6 33.0 0.4 20.1 54.4 25.5
  209 209 {} 0 {} 0 {}
}

set tbs(krpkb) {
  626 73 ? 2 ?
  96.4 3.6 0.0 0.0 32.6 67.4
  225 225 {} 0 {} 0 {}
}

set tbs(krpkn) {
  397 54 ? 8 ?
  97.5 2.5 0.0 0.0 24.7 75.3
  413 413 {} 0 {} 0 {} 0 {}
}

set tbs(krpkp) {
  1092 56 ? 103 ?
  99.4 0.4 0.3 10.0 6.6 83.5
  3 0 {} 2 {
    8/8/8/8/8/1p6/kP6/1RK5 8/8/8/8/8/k7/Pp6/RK6
  } 1 {8/8/8/8/8/2p5/1kP5/2RK4}
}

set tbs(kbbkq) {
  3 21 ? 81 ?
  15.3 20.2 64.5 96.5 2.9 0.6
  1 0 {} 1 {8/8/8/8/q7/2BB4/1K6/3k4} 0 {}
}

set tbs(kbbkr) {
  13 23 {4r3/8/8/8/8/4B3/8/k1K4B} 31 {1K4B1/8/3k4/8/B5r1/8/8/8}
  16.5 83.4 0.1 1.3 97.2 1.5
  3 3 {
    8/8/8/8/8/3K1k2/6r1/4B2B 8/8/8/8/8/5k2/6r1/3KB2B 8/8/8/B7/8/3k4/2r5/KB6
  } 0 {} 0 {}
}

set tbs(kbbkb) {
  35 22 {6B1/8/7B/8/b7/2K5/8/k7} 2 {1B5K/5k1B/8/8/8/4b3/8/8}
  15.6 84.3 0.0 0.0 98.6 1.4
  0
}

set tbs(kbbkn) {
  28 78 {8/K7/8/8/8/5k2/6n1/2B4B} 1 ?
  48.2 51.8 0.0 0.0 66.1 33.9
  1 1 {8/8/8/8/8/6n1/2K4B/kB6} 0 {} 0 {}
}

set tbs(kbbkp) {
  23 74 ? 83 ?
  48.0 50.2 1.8 11.4 54.1 34.5
  1 1 {B1k5/1pB5/3K4/8/8/8/8/8} 0 {} 0 {}
}

set tbs(kbnkq) {
  13 36 ? 53 ?
  25.0 6.4 68.6 97.6 1.7 0.7
  1 0 {} 1 {8/8/q7/8/3K4/2N5/8/k1B5} 0 {}
}

set tbs(kbnkr) {
  64 36 {8/8/8/2N5/8/8/B6K/5kr1} 41 {8/8/1B4N1/5k2/8/1r6/8/4K3}
  26.0 73.8 0.2 3.8 94.6 1.6
  8 6 {
    3r4/8/2B5/8/1N6/8/8/k1K5 8/8/8/8/8/2k5/1r6/B1NK4  8/8/8/8/8/2k5/3r4/1KN1B3
    8/8/8/8/8/3k4/4r3/2KN1B2 8/8/8/8/8/4k3/5r2/3KN1B1 8/8/8/8/B7/1r6/N1k5/K7
  } 2 {8/8/8/8/8/1k3r2/8/1KB4N 8/r7/8/B7/8/8/N1k5/K7} 0 {}
}

set tbs(kbnkb) {
  54 39 {8/7B/8/8/6N1/8/3k4/1Kb5} 2 {KB6/8/k4N2/8/6b1/8/8/8}
  25.5 74.5 0.0 0.0 98.8 1.2
  45 45 {} 0 {} 0 {}
}

set tbs(kbnkn) {
  36 107 {6Bk/8/8/7N/8/7K/6n1/8} 1 {8/8/3N4/8/3n4/8/B7/K1k5}
  32.2 67.8 0.0 0.0 96.1 3.9
  922 922 {} 0 {} 0 {}
}

set tbs(kbnkp) {
  165 104 ? 55 ?
  91.4 5.5 3.2 14.7 23.0 62.4
  62 61 {} 1 {8/8/8/1N6/3K4/B7/5p2/k7} 0 {}
}

set tbs(kbpkq) {
  117 35 ? 50 ?
  21.3 11.5 67.2 96.8 2.8 0.4
  16 0 {} 16 {
    3K4/2P5/B3qk2/8/8/8/8/8   8/1KP1q3/1B1k4/8/8/8/8/8 8/qPK5/8/3k4/1B6/8/8/8
    2q5/2B2P2/3K4/1k6/8/8/8/8 8/2P5/4q3/KB6/8/k7/8/8   8/3P4/5q2/1KB5/8/1k6/8/8
    8/1KP1q3/4k3/B7/8/8/8/8   3K4/q1P5/B4k2/8/8/8/8/8  8/5P2/3K4/8/4k2B/7q/8/8
    8/4P3/6q1/k1K5/2B5/8/8/8  3k4/KP1q4/3B4/8/8/8/8/8  8/3K1P2/1k2Bq2/8/8/8/8/8
    3K4/2P5/2B2k2/8/1q6/8/8/8 8/1P1K4/1qB2k2/8/8/8/8/8 1k6/3K1P2/4Bq2/8/8/8/8/8
    5k2/1P1K4/1qB5/8/8/8/8/8
  } 0 {}
}

set tbs(kbpkr) {
  451 45 ? 39 ?
  30.9 67.3 1.8 23.4 73.1 3.5
  306 4 {} 302 {} 0 {}
}

set tbs(kbpkb) {
  570 51 ? 3 ?
  41.3 58.7 0.0 0.0 86.9 13.1
  160 160 {} 0 {} 0 {}
}

set tbs(kbpkn) {
  497 105 ? 8 ?
  53.7 46.3 0.0 0.0 76.4 23.6
  2125 2112 {} 13 {} 0 {}
}

set tbs(kbpkp) {
  1443 67 ? 51 ?
  86.4 9.5 4.1 16.7 24.1 59.2
  406 403 {} 2 {} 1 {8/8/8/8/8/k1p5/2P5/1BK5}
}

set tbs(knnkq) {
  5 1 {k1N5/2K5/8/3N4/8/5q2/8/8} 72 ?
  0.0 42.8 57.1 94.0 6.0 0.0
  229 0 {} 229 {} 0 {}
}

set tbs(knnkr) {
  15 3 {5r1k/8/7K/4N3/5N2/8/8/8} 41 {8/8/1r4N1/4kN2/8/8/8/4K3}
  0.0 99.6 0.4 6.3 93.7 0.0
  25 0 {} 25 {} 0 {}
}

set tbs(knnkb) {
  2 4 {7k/5K2/8/8/5NN1/8/8/2b5} 1 {8/8/8/8/8/8/N1k5/K1b4N}
  0.0 100.0 0.0 0.0 100.0 0.0
  0
}

set tbs(knnkn) {
  8 7 {7n/8/8/8/1N1KN3/8/8/k7} 1 {K7/N1k5/8/3n4/3N4/8/8/8}
  0.1 99.9 0.0 0.0 100.0 0.0
  362 362 {} 0 {} 0 {}
}

set tbs(knnkp) {
  71 115 ? 74 ?
  31.3 66.4 2.3 12.8 73.6 13.6
  3143 3124 {} 19 {} 0 {}
}

set tbs(knpkq) {
  130 41 ? 55 ?
  17.9 11.9 70.2 97.2 2.3 0.5
  52 0 {} 52 {} 0 {}
}

set tbs(knpkr) {
  433 44 ? 67 ?
  26.7 69.3 4.0 29.3 68.5 2.2
  1181 23 {} 1158 {} 0 {}
}

set tbs(knpkb) {
  728 43 ? 9 ?
  38.8 61.2 0.0 0.0 88.1 11.9
  642 640 {} 2 {} 0 {}
}

set tbs(knpkn) {
  781 97 ? 7 ?
  49.2 50.8 0.0 0.0 77.2 22.8
  4191 4128 {} 63 {} 0 {}
}

set tbs(knpkp) {
  1410 57 ? 58 ?
  78.3 13.6 8.1 21.8 27.6 50.6
  2303 2281 {} 14 {} 8 {
    8/8/8/8/3K4/NkpP4/8/8   8/8/8/8/3K4/3PpkN1/8/8 8/8/8/8/8/1k2p3/4P3/KN6
    8/8/8/8/8/2K5/2PpkN2/8  8/8/8/8/8/3K4/3PpkN1/8 8/8/8/8/8/3K4/NkpP4/8
    8/8/8/8/1p6/1P6/K7/N1k5 8/8/8/8/8/1K6/1PpkN3/8
  }
}

set tbs(kppkq) {
  726 124 {8/5P2/8/8/3K4/3P3q/7k/8} 41 {8/2KP2q1/8/2P5/5k2/8/8/8}
  16.0 12.6 71.4 98.4 1.5 0.1
  2 0 {} 2 {8/2KP3q/2P2k2/8/8/8/8/8 8/2KP3q/8/2P3k1/8/8/8/8} 0 {}
}

set tbs(kppkr) {
  1652 54 {3K4/8/8/4P3/8/2r5/5P2/2k5} 40 {8/8/8/7K/5P2/3Pr3/8/2k5}
  35.4 20.1 44.5 75.2 18.2 6.6
  119 18 {} 99 {} 2 {1r1k4/1P6/1PK5/8/8/8/8/8 8/8/8/8/k7/r1P5/1KP5/8}
}

set tbs(kppkb) {
  519 43 {8/6P1/7k/8/6P1/1K6/8/1b6} 4 {K5b1/P7/1k6/8/8/8/2P5/8}
  54.4 45.6 0.0 0.0 75.4 24.6
  212 211 {} 1 {8/8/8/8/8/b2k4/P2P4/1K6} 0 {}
}

set tbs(kppkn) {
  705 50 {3n4/5P2/8/8/3K2P1/8/k7/8} 17 {7K/8/4k2P/8/8/8/5P2/5n2}
  64.7 35.3 0.0 0.0 62.4 37.6
  1077 920 {} 157 {} 0 {}
}

set tbs(kppkp) {
  5080 127 {8/8/8/8/1p2P3/1k1KP3/8/8} 43 {7K/8/4P3/5P2/3k4/7p/8/8}
  77.1 10.3 12.6 27.7 19.1 53.2
  4237 4179 {} 52 {} 6 {
    8/8/8/8/2k5/K1p5/P3P3/8   8/8/8/8/3k4/1K1p4/1P3P2/8
    8/8/8/8/4k3/2K1p3/2P3P1/8 8/8/8/2k5/K1p5/P3P3/8/8
    8/8/8/8/5k2/3K1p2/3P3P/8  8/8/8/k7/p1K5/2P5/2P5/8
  }
}

set tbs(kqqqk) {
  0 3 ? 0 -
  100.0 0.0 0.0 0.0 4.0 96.0
  0
}

set tbs(kqqrk) {
  0 4 ? 0 -
  100.0 0.0 0.0 0.0 3.1 96.9
  0
}

set tbs(kqqbk) {
  3 4 ? 0 -
  100.0 0.0 0.0 0.0 2.7 97.3
  0
}

set tbs(kqqnk) {
  2 4 ? 0 -
  100.0 0.0 0.0 0.0 2.4 97.6
  0
}

set tbs(kqqpk) {
  12 4 ? 0 -
  100.0 0.0 0.0 0.0 2.1 97.9
  0
}

set tbs(kqrrk) {
  0 4 ? 0 -
  100.0 0.0 0.0 0.0 2.0 98.0
  0
}

set tbs(kqrbk) {
  3 5 ? 0 -
  100.0 0.0 0.0 0.0 1.7 98.3
  0
}

set tbs(kqrnk) {
  3 5 ? 0 -
  100.0 0.0 0.0 0.0 1.4 98.6
  0
}

set tbs(kqrpk) {
  26 7 ? 0 -
  100.0 0.0 0.0 0.0 1.1 98.9
  0
}

set tbs(kqbbk) {
  3 6 ? 0 -
  100.0 0.0 0.0 0.0 5.0 95.0
  0
}

set tbs(kqbnk) {
  5 7 ? 0 -
  100.0 0.0 0.0 0.0 1.1 98.9
  0
}

set tbs(kqbpk) {
  31 9 ? 0 -
  100.0 0.0 0.0 0.0 1.2 98.8
  0
}

set tbs(kqnnk) {
  0 8 ? 0 -
  100.0 0.0 0.0 0.0 9.1 90.9
  0
}

set tbs(kqnpk) {
  10 9 ? 0 -
  100.0 0.0 0.0 0.0 1.0 99.0
  0
}

set tbs(kqppk) {
  64 9 ? 0 -
  100.0 0.0 0.0 0.0 0.7 99.3
}

set tbs(krrrk) {
  2 5 ? 0 -
  100.0 0.0 0.0 0.0 0.9 99.1
  0
}

set tbs(krrbk) {
  0 10 ? 0 -
  100.0 0.0 0.0 0.0 0.8 99.2
  0
}

set tbs(krrnk) {
  0 10 ? 0 -
  100.0 0.0 0.0 0.0 0.6 99.4
  0
}

set tbs(krrpk) {
  7 14 ? 0 -
  100.0 0.0 0.0 0.0 0.3 99.7
  0
}

set tbs(krbbk) {
  0 12 ? 0 -
  100.0 0.0 0.0 0.0 4.3 95.7
  0
}

set tbs(krbnk) {
  3 29 ? 0 -
  100.0 0.0 0.0 0.0 0.5 99.5
  0
}

set tbs(krbpk) {
  23 16 ? 0 -
  100.0 0.0 0.0 0.0 0.6 99.4
  0
}

set tbs(krnnk) {
  0 15 ? 0 -
  100.0 0.0 0.0 0.0 8.5 91.5
  0
}

set tbs(krnpk) {
  16 17 ? 0 -
  100.0 0.0 0.0 0.0 0.5 99.5
  0
}

set tbs(krppk) {
  119 15 {8/8/4k3/8/8/3P4/3P4/5R1K} 0 -
  100.0 0.0 0.0 0.0 0.2 98.8
  0
}

set tbs(kbbbk) {
  0 16 ? 0 -
  74.0 26.0 0.0 0.0 31.6 68.4
  0
}

set tbs(kbbnk) {
  3 33 ? 0 -
  100.0 0.0 0.0 0.0 4.1 95.9
  0
}

set tbs(kbbpk) {
  5 30 ? 0 -
  98.3 1.7 0.0 0.0 6.8 93.2
  0
}

set tbs(kbnnk) {
  0 34 ? 0 -
  100.0 0.0 0.0 0.0 8.4 91.6
  0
}

set tbs(kbnpk) {
  26 33 ? 0 -
  100.0 0.0 0.0 0.0 0.8 99.2
  0
}

set tbs(kbppk) {
  100 25 ? 0 -
  99.8 0.2 0.0 0.0 1.3 98.7
  6 6 {
    8/B1k5/K7/P7/P7/8/8/8 K7/8/1k6/1P6/BP6/8/8/8 K7/8/Bk6/1P6/1P6/8/8/8
    KBk5/P1P5/8/8/8/8/8/8 kB6/8/1PK5/1P6/8/8/8/8 kB6/8/KP6/1P6/8/8/8/8
  } 0 {} 0 {}
}

set tbs(knnnk) {
  0 21 ? 0 -
  98.7 1.3 0.0 0.0 25.0 75.0
  0
}

set tbs(knnpk) {
  7 28 ? 0 -
  98.4 1.6 0.0 0.0 12.0 88.0
  0
}

set tbs(knppk) {
  96 32 ? 0 -
  100.0 0.0 0.0 0.0 1.0 99.0
  93 93 {} 0 {} 0 {}
}

set tbs(kpppk) {
  97 33 {7K/5k2/8/8/1P6/1P6/1P6/8} 0 -
  99.9 0.1 0.0 0.0 0.6 99.4
  11 11 {
    1k6/1P6/K7/P7/P7/8/8/8  1k6/1P6/K7/PP6/8/8/8/8  2k5/2P5/3K4/P7/P7/8/8/8
    8/1k6/1P6/KP6/1P6/8/8/8 8/8/1k6/1P6/KP6/1P6/8/8 8/8/8/1k1P4/8/PK6/P7/8
    8/8/8/1k6/1P6/KP6/1P6/8 8/K1k5/P1P5/P7/8/8/8/8  K1k5/2P5/P1P5/8/8/8/8/8
    K1k5/8/P1P5/P7/8/8/8/8  k7/8/KP6/PP6/8/8/8/8
  } 0 {} 0 {}
}

# End of file: tb.tcl


####################
# Piece tracker window

namespace eval ::ptrack {}

set ::ptrack::psize 35
set ::ptrack::select d1
set ::ptrack::moves(start) 1
set ::ptrack::moves(end) 20
set ::ptrack::mode "-games"
set ::ptrack::color blue
set ::ptrack::colors [list black red yellow cyan blue xblack xred xyellow xcyan xblue]

trace variable ::ptrack::moves(start) w {::utils::validate::Integer 999 0}
trace variable ::ptrack::moves(end) w {::utils::validate::Integer 999 0}

# ::ptrack::sq
#   Given a square number (0=a1 to 63=h8), returns the square name.
#
proc ::ptrack::sq {n} {
  set sq [lindex [list a b c d e f g h] [expr {$n % 8} ]]
  append sq [expr {int($n/8) + 1} ]
  return $sq
}

# ::ptrack::unselect
#   Unselects all pieces in the Piece Tracker window.
#
proc ::ptrack::unselect {} {
  set w .ptracker
  set ::ptrack::select {}
  foreach i {a1 c1 e1 g1 b2 d2 f2 h2 a7 c7 e7 g7 b8 d8 f8 h8} {
    $w.bd.p$i configure -background $::dark
  }
  foreach i {b1 d1 f1 h1 a2 c2 e2 g2 b7 d7 f7 h7 a8 c8 e8 g8} {
    $w.bd.p$i configure -background $::lite
  }
}

# ::ptrack::select
#   Selects all the listed pieces the Piece Tracker window.
#
proc ::ptrack::select {plist} {
  ::ptrack::unselect
  foreach p $plist {
    lappend ::ptrack::select $p
    .ptracker.bd.p$p configure -background $::highcolor
  }
}

# ::ptrack::status
#   Sets the Piece Tracker window status bar.
#
proc ::ptrack::status {{text ""}} {
  set t .ptracker.status
  if {$text == ""} {
    $t configure -text "$::tr(Filter): [filterText]"
  } else {
    $t configure -text $text
  }
}

# ::ptrack::recolor
#   Changes the color scheme for track values.
#
proc ::ptrack::recolor {color} {
  set ::ptrack::color $color
  .ptracker.t.color.b configure -image ptrack_$::ptrack::color
  ::ptrack::refresh color
}

# ::ptrack::color
#   Given a real value between 0.0 and 100.0, returns
#   the corresponding Piece Tracker color value.
#
proc ::ptrack::color {pct {col ""}} {
  if {$col == ""} {
    set col $::ptrack::color
  }
  set x $pct
  if {$x > 100.0} { set x 100.0}
  if {$x < 0.01} { set x 0.01 }
  set y [expr {255 - round($x * 0.5 + 10 * log($x))} ]
  set yb [expr {255 - round($x * 2.0 + 10 * log($x))} ]
  if {$y > 255} { set y 255}
  if {$yb > 255} { set yb 255}
  if {$yb < 0} { set yb 0}
  if {$y < 0} { set y 0}
  if {$pct > 0.0  &&  $y == 0} { set y 1 }
  if {$pct > 0.0  &&  $yb == 0} { set yb 1 }
  set xy [expr {255 - $y} ]
  set xyb [expr {255 - $yb} ]
  switch $col {
    black   { set color [format "\#%02X%02X%02X" $yb $yb $yb] }
    red     { set color [format "\#%02X%02X%02X" $y $yb $yb] }
    yellow  { set color [format "\#%02X%02X%02X" $y $y $yb] }
    cyan    { set color [format "\#%02X%02X%02X" $yb $y $y] }
    blue    { set color [format "\#%02X%02X%02X" $yb $yb $y] }
    xblack  { set color [format "\#%02X%02X%02X" $xyb $xyb $xyb] }
    xred    { set color [format "\#%02X%02X%02X" $xyb $xy $xy] }
    xyellow { set color [format "\#%02X%02X%02X" $xyb $xyb $xy] }
    xcyan   { set color [format "\#%02X%02X%02X" $xy $xyb $xyb] }
    xblue   { set color [format "\#%02X%02X%02X" $xy $xy $xyb] }
  }
  return $color
}

# ::ptrack::make
#   Creates the Piece Tracker window
#
proc ::ptrack::make {} {
  set w .ptracker
  if {[winfo exists $w]} { return }

  toplevel $w
  wm title $w "Scid: [tr ToolsTracker]"
  setWinLocation $w
  bind $w <Escape> "destroy $w"
  bind $w <F1> {helpWindow PTracker}
  image create photo ptrack -width $::ptrack::psize -height $::ptrack::psize
  label $w.status -width 1 -anchor w -relief sunken -font font_Small
  pack $w.status -side bottom -fill x

  canvas $w.progress -height 20 -width 400 -bg white -relief solid -border 1
  $w.progress create rectangle 0 0 0 0 -fill blue -outline blue -tags bar
  $w.progress create text 395 10 -anchor e -font font_Regular -tags time \
    -fill black -text "0:00 / 0:00"
  pack $w.progress -side bottom -pady 2

  frame $w.bd
  pack $w.bd -side left -padx 2 -pady 4

  frame $w.t
  pack $w.t -side right -fill y -expand yes
  pack [frame $w.gap -width 5] -side left

  frame $w.t.color
  frame $w.t.mode
  frame $w.t.moves
  frame $w.t.buttons
  pack $w.t.buttons -side bottom -fill x
  pack $w.t.moves -side bottom
  pack $w.t.mode -side bottom
  pack $w.t.color -side bottom

  set ::ptrack::shade {}
  for {set i 0} {$i < 64} {incr i} {
    label $w.bd.sq$i -image ptrack -background white -border 1 -relief raised
    set rank [expr {$i / 8}]
    set file [expr {$i % 8} ]
    grid $w.bd.sq$i -row [expr {7 - $rank} ] -column [expr {$file + 1} ]
    lappend ::ptrack::shade 0.0
  }

  foreach rank {1 2 3 4 5 6 7 8} {
    label $w.bd.r$rank -text $rank -width 2
    grid $w.bd.r$rank -column 0 -row [expr {8 - $rank} ]
  }

  foreach column {1 2 3 4 5 6 7 8} file {a b c d e f g h} {
    label $w.bd.f$file -text $file
    grid $w.bd.f$file -row 8 -column $column
  }

  grid [frame $w.bd.gap1 -height 5] -row 9 -column 0

  foreach file {a b c d e f g h} c {1 2 3 4 5 6 7 8} p {r n b q k b n r} {
    set sq ${file}8
    set b $w.bd.p$sq
    label $b -image b$p$::ptrack::psize -border 1 -relief raised
    grid $b -row 10 -column $c
    bind $b <1> "::ptrack::select $sq"
  }
  foreach file {a b c d e f g h} c {1 2 3 4 5 6 7 8} p {p p p p p p p p} {
    set sq ${file}7
    set b $w.bd.p$sq
    label $b -image b$p$::ptrack::psize -border 1 -relief raised
    grid $b -row 11 -column $c
    bind $b <1> "::ptrack::select $sq"
    bind $b <3> "::ptrack::select {a7 b7 c7 d7 e7 f7 g7 h7}"
  }
  grid [frame $w.bd.gap2 -height 5] -row 12 -column 0
  foreach file {a b c d e f g h} c {1 2 3 4 5 6 7 8} p {p p p p p p p p} {
    set sq ${file}2
    set b $w.bd.p$sq
    label $b -image w$p$::ptrack::psize -border 1 -relief raised
    grid $b -row 13 -column $c
    bind $b <ButtonPress-1> "::ptrack::select $sq"
    bind $b <3> "::ptrack::select {a2 b2 c2 d2 e2 f2 g2 h2}"
  }
  foreach file {a b c d e f g h} c {1 2 3 4 5 6 7 8} p {r n b q k b n r} {
    set sq ${file}1
    set b $w.bd.p$sq
    label $b -image w$p$::ptrack::psize -border 1 -relief raised
    grid $b -row 14 -column $c
    bind $b <Button-1> "::ptrack::select $sq"
  }

  # Both-piece bindings:
  foreach sq {d1 e1 d8 e8} {
    bind $w.bd.p$sq <3> [list ::ptrack::select $sq]
  }
  foreach left {a b c} right {h g f} {
    set cmd [list ::ptrack::select [list ${left}1 ${right}1]]
    bind $w.bd.p${left}1 <ButtonPress-3> $cmd
    bind $w.bd.p${right}1 <ButtonPress-3> $cmd
    set cmd [list ::ptrack::select [list ${left}8 ${right}8]]
    bind $w.bd.p${left}8 <ButtonPress-3> $cmd
    bind $w.bd.p${right}8 <ButtonPress-3> $cmd
  }

  # Status-bar help:
  foreach sq {d1 e1 d8 e8} {
    bind $w.bd.p$sq <Any-Enter> {
      ::ptrack::status $::tr(TrackerSelectSingle)
    }
    bind $w.bd.p$sq <Any-Leave> ::ptrack::status
  }

  foreach sq {a1 b1 c1 f1 g1 h1 a8 b8 c8 f8 g8 h8} {
    bind $w.bd.p$sq <Any-Enter> {
      ::ptrack::status $::tr(TrackerSelectPair)
    }
    bind $w.bd.p$sq <Any-Leave> ::ptrack::status
  }
  foreach sq {a2 b2 c2 d2 e2 f2 g2 h2 a7 b7 c7 d7 e7 f7 g7 h7} {
    bind $w.bd.p$sq <Any-Enter> {
      ::ptrack::status $::tr(TrackerSelectPawn)
    }
    bind $w.bd.p$sq <Any-Leave> ::ptrack::status
  }
  set plist $::ptrack::select
  ::ptrack::unselect
  ::ptrack::select $plist

  set f $w.t.text
  pack [frame $f] -side top -fill both -expand yes -padx 2 -pady 2
  text $f.text -width 28 -height 1 -foreground black -background white \
    -yscrollcommand "$f.ybar set" -relief sunken -takefocus 0 \
    -wrap none -font font_Small
  set xwidth [font measure [$f.text cget -font] "x"]
  foreach {tab justify} {3 r 5 l 19 r 29 r} {
    set tabwidth [expr {$xwidth * $tab} ]
    lappend tablist $tabwidth $justify
  }
  $f.text configure -tabs $tablist
  scrollbar $f.ybar -takefocus 0 -command "$f.text yview"
  pack $f.ybar -side right -fill y
  pack $f.text -side left -fill y -expand yes

  set f $w.t.color

  menubutton $f.b -menu $f.b.menu -indicatoron 0 -relief raised
  menu $f.b.menu
  foreach col $::ptrack::colors {
    image create photo ptrack_$col -width 101 -height 20
    for {set i 0} {$i <= 100} {incr i} {
      set color [::ptrack::color $i $col]
      ptrack_$col put $color -to $i 0 [expr {$i+1} ] 19
    }
    $f.b.menu add command -image ptrack_$col \
      -command "::ptrack::recolor $col"
  }
  $f.b configure -image ptrack_$::ptrack::color
  label $f.label -text $::tr(GlistColor:) -font font_Bold
  pack $f.label $f.b -side left -pady 5

  set f $w.t.mode
  label $f.mode -text $::tr(TrackerStat:) -font font_Bold
  grid $f.mode -row 0 -column 0
  radiobutton $f.games -text $::tr(TrackerGames) -anchor w \
    -variable ::ptrack::mode -value "-games"
  radiobutton $f.time -text $::tr(TrackerTime) -anchor w \
    -variable ::ptrack::mode -value "-time"
  grid $f.games -row 1 -column 0 -sticky we
  grid $f.time -row 2 -column 0 -sticky we

  set f $w.t.moves
  label $f.lfrom -text $::tr(TrackerMoves:) -font font_Bold
  entry $f.from -width 3 -justify right -textvariable ::ptrack::moves(start)
  label $f.lto -text "-"
  entry $f.to -width 3 -justify right -textvariable ::ptrack::moves(end)
  pack $f.lfrom $f.from $f.lto $f.to -side left -pady 5
  bindFocusColors $f.from
  bindFocusColors $f.to
  bind $f.from <FocusIn> [list +::ptrack::status $::tr(TrackerMovesStart)]
  bind $f.from <FocusOut> +::ptrack::status
  bind $f.to <FocusIn> [list +::ptrack::status $::tr(TrackerMovesStop)]
  bind $f.to <FocusOut> +::ptrack::status

  set f $w.t.buttons
  button $f.stop -text $::tr(Stop) -command sc_progressBar -state disabled
  button $f.update -text $::tr(Update) -command ::ptrack::refresh
  button $f.close -text $::tr(Close) -command "destroy $w"
  pack $f.close $f.update $f.stop -side right -padx 3 -pady 5
  ::ptrack::status
  bind $w <Configure> "recordWinSize $w"
  wm resizable $w 0 0
  focus $w.t.buttons.update
}

# ::ptrack::refresh
#   Regenerates Piece Tracker statistics and updates the window
#
proc ::ptrack::refresh {{type "all"}} {
  set w .ptracker
  if {! [winfo exists $w]} { return }

  # Check if only the color needs refreshing:
  if {$type == "color"} {
    for {set i 0} {$i < 64} {incr i} {
      set x [lindex $::ptrack::shade $i]
      $w.bd.sq$i configure -background [::ptrack::color $x]
    }
    return
  }

  busyCursor .
  $w.t.buttons.update configure -state disabled
  $w.t.buttons.close configure -state disabled
  $w.t.buttons.stop configure -state normal
  catch {grab $w.t.buttons.stop}

  if {$::ptrack::moves(end) < $::ptrack::moves(start)} {
    set ::ptrack::moves(end) $::ptrack::moves(start)
  }

  set timeMode 0
  if {$::ptrack::mode == "-time"} { set timeMode 1 }

  sc_progressBar $w.progress bar 401 21 time
  set data [eval sc_base piecetrack $::ptrack::mode \
              $::ptrack::moves(start) $::ptrack::moves(end) \
              $::ptrack::select]
  set ::ptrack::data $data

  catch {grab release $w.t.buttons.stop}
  $w.t.buttons.stop configure -state disabled
  $w.t.buttons.update configure -state normal
  $w.t.buttons.close configure -state normal
  unbusyCursor .

  set dfilter [sc_filter count]
  if {$timeMode} {
    set nmoves [expr {$::ptrack::moves(end) + 1 - $::ptrack::moves(start)} ]
    set dfilter [expr {$dfilter * $nmoves} ]
  }
  if {$dfilter == 0} { set dfilter 1 } ;# to avoid divide-by-zero

  set max 1
  for {set i 0} {$i < 64} {incr i} {
    set freq [lindex $data $i]
    if {$freq > $max} {set max $freq}
  }

  set ::ptrack::shade {}
  for {set i 0} {$i < 64} {incr i} {
    set freq [lindex $data $i]
    set x [expr {$freq * 100.0 / $max} ]
    set color [::ptrack::color $x]
    lappend ::ptrack::shade $x
    $w.bd.sq$i configure -background $color
  }

  # Update text frame:
  set text $w.t.text.text
  $text delete 1.0 end
  array set printed {}
  for {set top 1} {$top <= 64} {incr top} {
    set best -1
    set idx -1
    for {set i 0} {$i < 64} {incr i} {
      set n [lindex $data $i]
      if {$n > $best  &&  ![info exists printed($i)]} {
        set idx $i
        set best $n
      }
    }

    set printed($idx) 1
    set pct [expr {round(double($best) * 10000.0 / double($dfilter)) / 100.0} ]
    set line [format "\t%2d.\t%s\t%7s\t%6.2f %%" $top \
                [::ptrack::sq $idx] [::utils::thousands $best] $pct]
    $text insert end "$line\n"
    set status "  [::ptrack::sq $idx]: [::utils::thousands $best] ($pct%%)  $top/64"
    bind $w.bd.sq$idx <Any-Enter> [list ::ptrack::status $status]
    bind $w.bd.sq$idx <Any-Leave> ::ptrack::status
  }
}
### help.tcl: Help pages for Scid.

#################################################

set helpTitle(Contents) "Contents"
set helpText(Contents) {<h1>Scid Help Contents</h1>

<h4>Starting out and general help</h4>
<ul>
<li><a Guide><b>Quick Guide</b> to using Scid</a> <red>(Read this first)</red></li>
<li><a Hints><b>Hints</b> for getting more out of Scid</a></li>
<li><a MainWindow>The Scid <b>main window</b></a></li>
<li><a Menus>Scid <b>menus</b></a> <red>(updated!)</red></li>
<li><a Moves>Entering <b>chess moves</b></a></li>
<li><a Searches><b>Searches</b> in Scid</a></li>
<li><a Clipbase>Using the <b>Clipbase</b> database</a></li>
<li><a Annotating><b>Annotating games</b></a></li>
</ul>

<h4>Other Scid windows</h4>
<ul>
<li><a Analysis><b>Analysis</b> window</a></li>
<li><a Comment><b>Comment editor</b> window</a></li>
<li><a Crosstable><b>Crosstable</b> window</a></li>
<li><a Switcher><b>Database Switcher</b> window</a></li>
<li><a Email><b>Email</b> chess manager window</a></li>
<li><a Finder><b>File Finder</b> window</a></li>
<li><a GameList><b>Game List</b> window</a></li>
<li><a Import><b>Import game</b> window</a></li>
<li><a Reports><b>Reports</b></a> <red>(updated!)</red></li>
<li><a PGN><b>PGN</b> (game text) window</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <a PGN>PGN window</a> displays the text of the current game in
PGN format.
</p>
<p>
You can use Scid to add chess games to a database, using the keyboard or
mouse to enter moves. See the help page on <a Moves>entering chess moves</a>
for more details.
</p>
<p>
You can also use Scid as a <a PGN>PGN</a> file browser, by pasting
PGN text into Scids <a Import>Import</a> window or by opening a PGN file
in Scid.
However, PGN files cannot be edited by Scid (it opens them read-only) and
they use more memory and are slower to load, so for large PGN files it
is recommended that you create a Scid database from them first with the
<a Pgnscid>pgnscid</a> utility.
</p>
<p>
The <a MainWindow>main window</a>
of Scid (with the graphical chess board) shows details of
the active game and database. At any time, you can have up to four
databases open (five including the <a Clipbase>clipbase</a>),
and each will have its own active game.
(A game numbered 0 indicates a scratch game that is not part of the
actual database).
You can switch between the open databases with the
<a Menus File>File menu</a>.
</p>
<p>
For more information, please read the other help pages listed in the
<a Index>Help Index</a>.
</p>
<p>
See the <a Author>contact information</a> page if you need to contact the
author of Scid.
</p>

<p><footer>(Updated: Scid 3.1, December 2001)</footer></p>
}


####################
### Hints page:
set helpTitle(Hints) "Scid Hints"
set helpText(Hints) {<h1>Scid Hints</h1>
<p>
This page contains useful hints in question and answer format to help you
use Scid better. If you are new to Scid, please read the
<a Guide>quick guide</a> first.
Most of the information on this page is available in more detail on the
other help pages listed in the <a Index>index</a>.
If you think of a useful hint to add to this page, please send it
to the <a Author>author of Scid</a>.
</p>

<h4>Can I get Scid to load a database when it starts?</h4>
<p>
Yes, you can add databases, PGN files or <a EPD>EPD files</a>
to the command line. For example:s very com</a></li>
<li><a PTracker><b>Piece Tracker</b></a></li>
<li><a PList><b>Player Finder</b> window</a></li>
<li><a PInfo><b>Player Info</b> window</a></li>
<li><a Repertoire><b>Repertoire editor</b> window</a></li>
<li><a Tmt><b>Tournament Finder</b> window</a></li>
<li><a Tree><b>Tree</b> window</a></li>
<li><a Graphs><b>Graph</b> windows</a></li>
<li><a TB>Using <b>Tablebases</b> in Scid</a> <red>(updated!)</red></li>
</ul>

<h4>Other utilities and information</h4>
<ul>
<li><a Bookmarks><b>Bookmarks</b></a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Compact><b>Compacting</b> a database</a></li>
<li><a Maintenance><b>Database maintenance</b> tools</a></li>
<li><a ECO><b>ECO</b> openings classification</a></li>
<li><a EPD><b>EPD</b> files</a></li>
<li><a Export><b>Exporting</b> games to text files</a> <red>(updated!)</red></li>
<li><a Flags>Game <b>Flags</b></a></li>
<li><a LaTeX>Using <b>LaTeX</b> with Scid</a></li>
<li><a Options><b>Options</b> and preferences</a> <red>(updated!)</red></li>
<li><a Sorting><b>Sorting</b> a database</a></li>
<li><a Pgnscid><b>Pgnscid</b>: converting PGN files</a></li>
<li><a NAGs>Standard <b>NAG</b> annotation values</a></li>
<li><a Formats>Scid database <b>file formats</b></a></li>
<li><a Author>Contact information</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, December 2003)</footer></p>
}

###############
### Topic Index

set helpTitle(Index) "Scid Help Topic Index"
set helpText(Index) {<h1>Scid Help Topic Index</h1>

<h3>A</h3>
<ul>
<li><a Analysis>Analysis</a> window</li>
<li><a Annotating>Annotating games</a></li>
<li><a NAGs>Annotation symbols</a></li>
<li><a Author>Author, contacting</a></li>
<li><a MainWindow Autoplay>Autoplay mode</a></li>
</ul>

<h3>B</h3>
<ul>
<li><a Tree Best>Best games</a> window</li>
<li><a Searches Board>Board searches</a></li>
<li><a Bookmarks>Bookmarks</a></li>
<li><a GameList Browsing>Browsing games</a></li>
</ul>

<h3>C</h3>
<ul>
<li><a Maintenance Cleaner>Cleaner</a></li>
<li><a Clipbase>Clipbase</a></li>
<li><a Cmdline>Command-line options</a></li>
<li><a Comment>Comment editor</a></li>
<li><a Compact>Compacting a database</a></li>
<li><a Author>Contact information</a></li>
<li><a Contents>Contents</a></li>
<li><a Crosstable>Crosstable</a> window</li>
</ul>

<h3>D</h3>
<ul>
<li><a Compact>Database compaction</a></li>
<li><a Formats>Database file formats</a></li>
<li><a Maintenance>Database maintenance</a></li>
<li><a Sorting>Database sorting</a></li>
<li><a Switcher>Database switcher</a> window</li>
<li><a Maintenance Twins>Deleting twin games</a></li>
</ul>

<h3>E</h3>
<ul>
<li><a ECO Browser>ECO Browser</a> window</li>
<li><a ECO Codes>ECO code system</a></li>
<li><a ECO>ECO openings classification</a></li>
<li><a Menus Edit>Edit menu</a></li>
<li><a Email>Email manager</a> window</li>
<li><a Analysis List>Engines list</a></li>
<li><a Moves>Entering chess moves</a></li>
<li><a EPD>EPD files</a></li>
<li><a Export>Exporting games to text files</a></li>
</ul>

<h3>F</h3>
<ul>
<li><a Finder>File Finder</a></li>
<li><a Formats>File formats</a></li>
<li><a Menus File>File menu</a></li>
<li><a Searches Filter>Filter</a></li>
<li><a Export>Filter, exporting</a></li>
<li><a Graphs Filter>Filter graph</a></li>
<li><a Flags>Flags</a></li>
<li><a Options Fonts>Fonts</a></li>
</ul>

<h3>G</h3>
<ul>
<li><a Flags>Game flags</a></li>
<li><a GameList>Game List</a> window</li>
<li><a Menus Game>Game menu</a></li>
<li><a Graphs>Graph windows</a></li>
</ul>

<h3>H</h3>
<ul>
<li><a Searches Header>Header searches</a></li>
<li><a Menus Help>Help menu</a></li>
<li><a Hints>Hints</a></li>
</ul>

<h3>I</h3>
<ul>
<li><a Import>Import</a> window</li>
</ul>

<h3>L</h3>
<ul>
<li><a LaTeX>LaTeX</a> output format</li>
</ul>

<h3>M</h3>
<ul>
<li><a MainWindow>Main Window</a></li>
<li><a Maintenance>Maintenance tools</a></li>
<li><a Searches Material>Material/pattern searches</a></li>
<li><a Menus>Menus</a></li>
<li><a GameList Browsing>Merging games</a></li>
<li><a Moves>Move entry</a></li>
</ul>

<h3>N</h3>
<ul>
<li><a Maintenance Editing>Names, editing</a></li>
<li><a Maintenance Spellcheck>Names, spellchecking</a></li>
<li><a NAGs>NAG annotation values</a></li>
<li><a Annotating Null>Null moves</a></li>
</ul>

<h3>O</h3>
<ul>
<li><a ECO>Opening classification (ECO)</a></li>
<li><a Repertoire>Opening repertoires</a></li>
<li><a Reports Opening>Opening report</a> window</li>
<li><a Options>Options</a></li>
</ul>

<h3>P</h3>
<ul>
<li><a PGN>PGN</a> window</li>
<li><a Pgnscid>Pgnscid</a></li>
<li><a PTracker>Piece Tracker</a> window</li>
<li><a PList>Player Finder</a> window</li>
<li><a PInfo>Player Info</a> window</li>
<li><a Reports Player>Player report</a> window</li>
</ul>

<h3>Q</h3>
<ul>
<li><a Guide>Quick guide to using Scid</a></li>
</ul>

<h3>R</h3>
<ul>
<li><a Graphs Rating>Rating graph</a></li>
<li><a Repertoire>Repertoire editor</a></li>
</ul>

<h3>S</h3>
<ul>
<li><a Searches Filter>Search filter</a></li>
<li><a Menus Search>Search menu</a></li>
<li><a Searches>Searches</a></li>
<li><a Sorting>Sorting a database</a></li>
<li><a Maintenance Spellcheck>Spellchecking names</a></li>
<li><a Switcher>Switcher</a> window</li>
</ul>

<h3>T</h3>
<ul>
<li><a TB>Tablebases</a></li>
<li><a Menus Tools>Tools menu</a></li>
<li><a Tmt>Tournament finder</a></li>
<li><a Tree>Tree window</a></li>
<li><a Moves Trial>Trial mode</a></li>
<li><a Maintenance Twins>Twin (duplicate) games</a></li>
</ul>

<h3>V</h3>
<ul>
<li><a Annotating Vars>Variations</a></li>
</ul>

<h3>W</h3>
<ul>
<li><a Menus Windows>Windows menu</a></li>
</ul>

<p><footer>(Updated: Scid 3.5, February 2003)</footer></p>
}


####################
### Quick Guide help:

set helpTitle(Guide) "Quick Guide to using Scid"
set helpText(Guide) {<h1>Quick Guide to using Scid</h1>
<p>
Scid is a chess database application; with it you can browse
databases of chess games, edit games and <a Searches>search</a>
for games by various criteria.
</p>
<p>
Scid uses its own special three-file <a Formats>database format</a>
which is very compact and fast, but it can convert to and from
the standard PGN (Portable Game Notation) format.
Scids <