Document 456

The LaTeX acronym package

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

The acronym package helps you manage acronyms and acronym lists in your documents. You can define each acronym within a special acronym environment and then use macros in the text to define how each occurrence of the acronym will appear when you typeset the document. If you define the list in the document preamble, it appears before the body of the document. If you define the list in the body of the document, it appears where you place it. You may want to add a heading to designate the list. You can use the package to ensure that all acronyms are spelled out at least once in your document. The acronym package requires that you typeset your document with two LaTeX passes to resolve properly any acronyms in use.

The program doesn't understand the macros used by the acronym package, but you can successfully use the macros in your document if you place them inside encapsulated TeX fields.

How to define acronyms in the text

  1. Add the acronym package to your document.
  2. Begin the acronym environment:
    1. Place the insertion point where you want the list to appear in your document.
    2. Enter a TeX field.
    3. In the entry area, type \begin{acronym} and choose OK.
  3. For each acronym,
    1. Enter an encapsulated TeX field.
    2. To define the acronym and include it in the list of acronyms, type \acro{acronym}{definition} and choose OK.
      or
      To define the acronym and exclude it from the list of acronyms, type \acrodef{acronym}{definition} and choose OK.
  4. Following the last definition, end the environment:
    1. Enter an encapsulated TeX field.
    2. In the entry area, type \end{acronym} and choose OK.

How to define acronyms in the preamble

  1. Add the acronym package to your document.
  2. From the Typeset menu, choose Preamble.
  3. Click the mouse in the entry area.
  4. On a new line, type \begin{acronym} and press Enter.
  5. For each acronym,
    • To define the acronym and include it in the list of acronyms, type \acro{acronym}{definition} and press Enter.
      or
    • To define the acronym and exclude it from the list of acronyms, type \acrodef{acronym}{definition} and press Enter.
  6. Type \end{acronym} and choose OK.

How to use acronyms

  1. Place the insertion point where you want an acronym to appear.
  2. Enter an encapsulated TeX field.
  3. In the entry area, type the command to insert the acronym formatted to your preferences:
    Command Effect
    \ac{acronym} Expand and identify the acronym the first time; use only the acronym thereafter
    \acf{acronym} Use the full name of the acronym.
    \acs{acronym} Use the acronym, even before the first corresponding \ac command
    \acl{acronym} Expand the acronym without using the acronym itself.

    Suppose you've defined the acronym SW as Scientific Word. Now you want to use it in the sentence (acronym) documents are beautifully typeset.
    These examples show the result of using the four available acronym commands, assuming that the acronym has already been used once in the document:
    Command Effect
    \ac{SW} SW documents are beautifully typeset.
    \acf{SW} Scientific Word (SW) documents are beautifully typeset.
    \acs{SW} SW documents are beautifully typeset.
    \acl{SW} Scientific Word documents are beautifully typeset.

  4. Choose OK.

In addition to using the available commands, you can change the package option to place expanded acronyms in the body of the document or at the foot of the page as footnotes. The option is available through the Options and Packages command on the Typeset menu.

See the example of the package in use in the PackageSample-acronym.tex file in the SWSamples directory of your program installation. The package is installed in the TCITeX/TeX/LaTeX/contrib/acronym directory.

Last revised 01/20/06

This document was created with Scientific WorkPlace.