Skip to content

Conversation

Preeticp
Copy link

Guidance for explaining a command or elements in a code block

Issue:
#540

Additional information:
TLDR: Stop using callouts in code blocks, use simple sentences, bulleted/unordered lists, Distribution lists or Note style as appropriate. This needs to be done before we migrate to the new tool.

Problem statement:

  • Callouts are not supported in DITA: Unlike AsciiDoc, DITA does not support callouts as a method to add annotations to specific lines in verbatim blocks.
  • Callouts do not work for AI: Because callouts are not supported in DITA, (and we're not making changes to DITA-OT) there isn't semantic markup for an AI agent to understand what is happening or to output that semantic markup properly.
  • Callouts are not used by our competitors: See: Competitor analysis on callouts and code blocks

Current usage and recommended changes:

  • Use Case 1: Add relevant additional information about a single line of code, element, or variable.
    -- Current usage: Callouts
    -- Suggested change:
    --- Use a simple sentence.
  • Use Case 2: Add relevant additional information about multiple lines of code, elements, or explain the structure of a sample YAML file.
    -- Current usage: Callouts
    -- Suggested change:
    --- Use a bulleted list
    ---- List the explanations in the order in which they appear in the code block.
  • Use Case 3: Provide information on placeholders/variables.
    -- Current usage: Callouts
    --Suggested change:
    --- Use a definition list
    ---- List the parameters/variables in the order in which they appear in the code block.
    ---- Introduce definition lists with "where:" and begin each variable description with "Specifies.”
  • Use Case 4: Notes about a particular line in the code.
    -- Current usage: Callouts
    -- Suggested change:
    --- Use the appropriate admonition style to add notes pertaining to a code block

Copy link
Collaborator

@IngridT1 IngridT1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few small changes. Otherwise, LGTM

@Preeticp
Copy link
Author

@IngridT1, I have updated the PR as per your suggestions. Also provided explanation and examples from our docs for the usage of dot notification. PTAL and merge if this looks good to you.

@Preeticp Preeticp requested a review from IngridT1 September 18, 2025 13:00
Copy link
Collaborator

@IngridT1 IngridT1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@IngridT1 IngridT1 merged commit 8d6ec56 into redhat-documentation:main Sep 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants