Add Punctuation and Capitalization to Sentences

Sometimes you need answers in the assembled document to be capitalized and punctuated correctly, but you can't anticipate how users will enter the answer. To ensure text in the document is correct, you can use dot codes to merge the correct capitalization and punctuation.

For example, say the user enters a description but doesn't include the end punctuation in the answer. Using a dot code, you can merge the punctuation in the document if the user doesn't. (If the user does include the punctuation, the dot code won't merge anything.) The following script demonstrates this:

The property, which is located at «Property Address», is described as «Property Description»«.»

To add punctuation and capitalization dot codes

  1. Either edit a Computation variable (See Customize a Computation Variable), or insert your cursor in the template text where you want to insert the dot code.
  2. To insert a punctuation mark, right-click to display the shortcut menu and choose Sentence Punctuation > Punctuation Mark (where Punctuation Mark represents one of the dot codes described in the following table. (WordPerfect users: To insert the dot codes, manually type the codes as you see them in the table below.)
Dot Code What It Does
«.» Inserts a period if no other punctuation precedes it.
«,» Inserts a comma if no other punctuation precedes it.
«;» Inserts a semicolon if no other punctuation precedes it.
«:» Inserts a colon if no other punctuation precedes it.
«!» Inserts an exclamation point if no other punctuation precedes it.
«?» Inserts a question mark if no other punctuation precedes it.
  1. To change the capitalization of text, right-click to display the shortcut menu and choose Character Format > Capitalization (where Capitalization represents one of the dot codes described in the following table:
Dot Code What It Does
«.a» (All Caps)

«.ae» (All Caps End)

Capitalizes every letter in the selected text.
«.c» (Capitalize Letter) Capitalizes the first letter of the word immediately following the code.
«.l» (Leading Caps)

«.le» (Leading Caps End)

Capitalizes the first letter of each word in the selected text.
«.s» (Small Caps)

«.se» (Small Caps End)

Capitalizes each letter in the selected text and displays the text at a smaller font size.

When you type double angle brackets (<< >>), HotDocs converts them to chevrons (« »). You can manually enter the dot code by typing the brackets with the format code between them.