(
    disp("XML Text"),
    printf(true,"Text enclosed by equations"),
    disp("XML Text")
);

printf(true,"Text followed by equations")$
x=2;

(
    printf(true,"Text followed by equations"),
    disp("XML Text")
);

(
    disp("XML Text"),
    printf(true,"Text following equations")
);

printf(true,"Ordinary text");

(
    disp("XML Text"),
    printf(true,"Text enclosed by equations"),
    disp("XML Text")
);

printf(true,"Text followed by equations")$
x=2;

(
    printf(true,"Text followed by equations"),
    disp("XML Text")
);

(
    disp("XML Text"),
    printf(true,"Text following equations")
)$