Table of Contents

Syntax #

p.note(type)
s.note(type)
t.note(type)

type

the type of note being annotated; acceptable types are note, tip, fastpath, restriction, important, remember, attention, caution, notice, danger, warning, and other

Purpose #

Note annotations are used to mark up text in your document that is set apart from the main text and expands on a specific point. There are many different types of notes, and the parameter you include indicates to Migrate what type of note you are creating.

The annotation p.note is used to create a note from an entire paragraph. The text will usually have the note type used to begin the paragraph, such as “Note:”, “TIP:”, “Caution:”, and so on. The Migrate conversion will automatically take the note type you enter as a parameter and apply it to the output; this means that, if you do not remove the text from the original, you will have the note type written two times in the output. Most of the time, the note type text will be a listmarker in the original document, and can be easily removed with a rule. If the note type text is not a listmarker, then it must be removed either using a pattern matching condition or by post-conversion cleanup.

The annotation p.note is also used inside table cells when part of the content of that cell is a paragraph styled as a note. This is not the same situation as a note that is placed inside a table of its own for layout purposes only; that is covered by the annotation t.note.

The annotation s.note is used to create a note from a span inside a paragraph, rather than from the entire paragraph. You provide the note type as a parameter, just as with the p.note annotation.

The annotation t.note is used to turn a note that is inside a table (often for layout purposes only) into a note without the table markup. You provide the note type as a parameter with this annotation as well. Migrate will strip the table markup, place the text that was inside the table into the note tags, and will use the type parameter to specify the note type. These tables are often one row with two cells, one for the note type and one for the note text. Again, you will need to delete the note type information from the table or it will be duplicated in the output. If there is an image in the cell containing the note type , that can either be deleted or left in place, depending on preference.

Example: Creating a note from a paragraph

The following image is an example of what a note may look like in your original document.

Image of a note as a paragraph in an original document

The following image is an example of what your rule may look like to create a note from a paragraph. In this example, the note type text has been removed.

Example rule for creating a note from a paragraph

The following XML is an example of what the note would look like in your output. This is with the note type text removed with the rule.

<steps>
  <step>
    <cmd> See instructions below.</cmd>
  </step>
  <step>
    <cmd> Install the Hex Coupler Guard as follows:</cmd>
    <choices>
      <choice>
        Spread the inner guard and place it over the coupler.
        <note type="note">
          Do not spread the inner and outer guards more than necessary
          for guard installation. Over spreading the guards may alter 
          their fit and appearance.
        </note>
      </choice>

The following image is a published view of this note as the code above could look.

DITA output as it looks with note type text from original stripped

Example: Creating a note from a span

The following image is an example of what a note span may look like in your original document.

span-note-original-document

The following image is an example of what your rule may look like to create a note from a span. The note type has been removed in this example.

span-note-annotation-type-deleted

The following XML is an example of what the note could look like in your output. The note type is not present in this example, as it was removed using the rule.

<choice>
  With the inner guard straddling the support bracket, install a cap 
  screw through the hole in the support bracket and guard located 
  closest to the pump.
  <note type="warning">Do not tighten the capscrew.</note>
</choice>

The following image is an example of what the note could look like in your published output. The note type is not present in this example, as it was removed using the rule.

 

Example: Creating a note from a table

The following image is an example of what a note table may look like in your original document.

Image of a note table in an original document

The following image is an example of what your rule may look like to create a note from a note table. In this example, the note type text has not been removed, so we can show you the result when this is not done.

Example rule for creating a note from a table

The following XML is an example of what the note could look like in your output. This is with the note type text not removed with the rule.

<note type="warning">Warning:
  <p>This is the contents of the warning
  </p>
</note>

The following image is a published view of this warning type note as the code above could look.

DITA output as it looks without note type text from original stripped

The following image is an example of the same rule, this time with the note type text removed.

Example rule for creating a note from a table and deleting the type text

The following XML example has the note type text removed with the rule.

<note type="warning">
  <p>This is the contents of the warning
  </p>
</note>

The following image is a published view of this warning type note as the code above could look (without the type text).

DITA output as it looks with note type text from original stripped