int usage(int retval, bool brief) {
  if (brief)
    ( retval ? std::cerr : std::cout ) << "Usage:\n"
"    TransverseMercatorProj [ -s | -t ] [ -l lon0 ] [ -k k0 ] [ -r ] [ -e a\n"
"    f ] [ -w ] [ -p prec ] [ --comment-delimiter commentdelim ] [ --version\n"
"    | -h | --help ] [ --input-file infile | --input-string instring ] [\n"
"    --line-separator linesep ] [ --output-file outfile ]\n"
"\n"
"For full documentation type:\n"
"    TransverseMercatorProj --help\n"
"or visit:\n"
"    https://geographiclib.sourceforge.io/C++/2.1.1/TransverseMercatorProj.1.html\n";
  else
    ( retval ? std::cerr : std::cout ) << "Man page:\n"
"NAME\n"
"       TransverseMercatorProj -- perform transverse Mercator projection\n"
"\n"
"SYNOPSIS\n"
"       TransverseMercatorProj [ -s | -t ] [ -l lon0 ] [ -k k0 ] [ -r ] [ -e a\n"
"       f ] [ -w ] [ -p prec ] [ --comment-delimiter commentdelim ] [ --version\n"
"       | -h | --help ] [ --input-file infile | --input-string instring ] [\n"
"       --line-separator linesep ] [ --output-file outfile ]\n"
"\n"
"DESCRIPTION\n"
"       Perform the transverse Mercator projections.  Convert geodetic\n"
"       coordinates to transverse Mercator coordinates.  The central meridian\n"
"       is given by lon0.  The longitude of origin is the equator.  The scale\n"
"       on the central meridian is k0.  By default an implementation of the\n"
"       exact transverse Mercator projection is used.\n"
"\n"
"       Geodetic coordinates are provided on standard input as a set of lines\n"
"       containing (blank separated) latitude and longitude (decimal degrees or\n"
"       degrees, minutes, seconds); for detils on the allowed formats for\n"
"       latitude and longitude, see the \"GEOGRAPHIC COORDINATES\" section of\n"
"       GeoConvert(1).  For each set of geodetic coordinates, the corresponding\n"
"       projected easting, x, and northing, y, (meters) are printed on standard\n"
"       output together with the meridian convergence gamma (degrees) and scale\n"
"       k.  The meridian convergence is the bearing of grid north (the y axis)\n"
"       measured clockwise from true north.\n"
"\n"
"OPTIONS\n"
"       -s  use the sixth-order Krueger series approximation to the transverse\n"
"           Mercator projection instead of the exact projection.\n"
"\n"
"       -t  use the exact algorithm with the \"EXTENDED DOMAIN\"; this is the\n"
"           default.\n"
"\n"
"       -l lon0\n"
"           specify the longitude of origin lon0 (degrees, default 0).\n"
"\n"
"       -k k0\n"
"           specify the scale k0 on the central meridian (default 0.9996).\n"
"\n"
"       -r  perform the reverse projection.  x and y are given on standard\n"
"           input and each line of standard output gives latitude, longitude,\n"
"           gamma, and k.\n"
"\n"
"       -e a f\n"
"           specify the ellipsoid via the equatorial radius, a and the\n"
"           flattening, f.  Setting f = 0 results in a sphere.  Specify f < 0\n"
"           for a prolate ellipsoid.  A simple fraction, e.g., 1/297, is\n"
"           allowed for f.  By default, the WGS84 ellipsoid is used, a =\n"
"           6378137 m, f = 1/298.257223563.  If the exact algorithm is used, f\n"
"           must be positive.\n"
"\n"
"       -w  on input and output, longitude precedes latitude (except that on\n"
"           input this can be overridden by a hemisphere designator, N, S, E,\n"
"           W).\n"
"\n"
"       -p prec\n"
"           set the output precision to prec (default 6).  prec is the number\n"
"           of digits after the decimal point for lengths (in meters).  For\n"
"           latitudes and longitudes (in degrees), the number of digits after\n"
"           the decimal point is prec + 5.  For the convergence (in degrees)\n"
"           and scale, the number of digits after the decimal point is prec +\n"
"           6.\n"
"\n"
"       --comment-delimiter commentdelim\n"
"           set the comment delimiter to commentdelim (e.g., \"#\" or \"//\").  If\n"
"           set, the input lines will be scanned for this delimiter and, if\n"
"           found, the delimiter and the rest of the line will be removed prior\n"
"           to processing and subsequently appended to the output line\n"
"           (separated by a space).\n"
"\n"
"       --version\n"
"           print version and exit.\n"
"\n"
"       -h  print usage and exit.\n"
"\n"
"       --help\n"
"           print full documentation and exit.\n"
"\n"
"       --input-file infile\n"
"           read input from the file infile instead of from standard input; a\n"
"           file name of \"-\" stands for standard input.\n"
"\n"
"       --input-string instring\n"
"           read input from the string instring instead of from standard input.\n"
"           All occurrences of the line separator character (default is a\n"
"           semicolon) in instring are converted to newlines before the reading\n"
"           begins.\n"
"\n"
"       --line-separator linesep\n"
"           set the line separator character to linesep.  By default this is a\n"
"           semicolon.\n"
"\n"
"       --output-file outfile\n"
"           write output to the file outfile instead of to standard output; a\n"
"           file name of \"-\" stands for standard output.\n"
"\n"
"EXTENDED DOMAIN\n"
"       The exact transverse Mercator projection has a branch point on the\n"
"       equator at longitudes (relative to lon0) of +/- (1 - e) 90 = 82.636...,\n"
"       where e is the eccentricity of the ellipsoid.  The standard convention\n"
"       for handling this branch point is to map positive (negative) latitudes\n"
"       into positive (negative) northings y; i.e., a branch cut is placed on\n"
"       the equator.  With the extended domain, the northern sheet of the\n"
"       projection is extended into the south hemisphere by pushing the branch\n"
"       cut south from the branch points.  See the reference below for details.\n"
"\n"
"EXAMPLES\n"
"          echo 0 90 | TransverseMercatorProj\n"
"          => 25953592.84 9997964.94 90 18.40\n"
"          echo 260e5 100e5 | TransverseMercatorProj -r\n"
"          => -0.02 90.00 90.01 18.48\n"
"\n"
"ERRORS\n"
"       An illegal line of input will print an error message to standard output\n"
"       beginning with \"ERROR:\" and causes TransverseMercatorProj to return an\n"
"       exit code of 1.  However, an error does not cause\n"
"       TransverseMercatorProj to terminate; following lines will be converted.\n"
"\n"
"AUTHOR\n"
"       TransverseMercatorProj was written by Charles Karney.\n"
"\n"
"SEE ALSO\n"
"       The algorithms for the transverse Mercator projection are described in\n"
"       C. F. F. Karney, Transverse Mercator with an accuracy of a few\n"
"       nanometers, J. Geodesy 85(8), 475-485 (Aug. 2011); DOI\n"
"       <https://doi.org/10.1007/s00190-011-0445-3>; preprint\n"
"       <https://arxiv.org/abs/1002.1417>.  The explanation of the extended\n"
"       domain of the projection with the -t option is given in Section 5 of\n"
"       this paper.\n"
"\n"
"HISTORY\n"
"       TransverseMercatorProj was added to GeographicLib,\n"
"       <https://geographiclib.sourceforge.io>, in 2009-01.  Prior to version\n"
"       1.9 it was called TransverseMercatorTest (and its interface was\n"
"       slightly different).\n"
;
  return retval;
}
