Document 477

The LaTeX comma package

Version: 3.x, 4.x, 5.x - Scientific WorkPlace & Scientific Word

The comma package formats LaTeX counter values so that they print with a separator (such as a comma) every three digits. That is, the package prints a counter value of 1374 as 1,374 when the comma package is added to the document. The default separator is a comma, but you can customize it to use a period, thin space, or any other symbol that can be represented by a TeX command. LaTeX uses the same separator for all counters.

To use the package, you must add TeX commands to the document preamble or insert TeX fields containing those commands in the body of your document. To place the separator in all counters of more than three digits, place the command at the start of the body of the document. LaTeX applies the command from that point forward.

How to insert separators in printed LaTeX counters

  1. Add the comma package to your document.
  2. Add the package commands to the preamble of your document:
    1. From the Typeset menu, choose Preamble.
    2. Click the mouse in the entry area and scroll to the end of the entries.
    3. Type \renewcommand\thecounter{\commaform{counter}} where counter is the LaTeX counter you want to print with a separator, such as the counter for section or theorem numbers.
    4. If you want to change the separator from a comma to some other symbol, add \renewcommand\commaformtoken{x} where x is any TeX command.
    5. Choose OK.

    or

    Add the commands in the body of the document:
    1. Place the insertion point at the start of the text.
    2. Enter an encapsulated TeX field.
    3. Type the package commands you need.
    4. Choose OK.

No package options are available. The package is installed in the TCITeX/TeX/LaTeX/contrib/carlisle directory.

Last revised 01/20/06

This document was created with Scientific WorkPlace.