begin capitalCity name
  # Draw a labelled dot marking a capital city.
  #
  color "red"
  box -1, -1, 1, 1
  fill

  clearpath
  move 2, 0
  font "Helvetica", 2.5
  color "black"
  label name
end

# Plot the geographic data in text file tutorialdatasets1.txt
# in an Encapsulated PostScript file.
#
newpage "eps", "tutorialdatasets1.eps", 85, 85

dataset "textfile", "tutorialdatasets1.txt", "comment=#"
worlds 150, -45, 180, -5
while Mapyrus.fetch.more
do
  # Draw label at each position read from text file.
  #
  fetch
  print "DEBUG:", $0
  clearpath
  move parsegeo($2), parsegeo($1)
  let cityAndCountryArray = split(substr($0, 16), "/")
  capitalCity cityAndCountryArray[1] . "\n(" . cityAndCountryArray[2] . ")"
done
