Solved

Add Comments In RTF

Posted on 2003-11-20
5
384 Views
Last Modified: 2010-04-17
hi,
    I am working with a RichTextbox control that doesnot support stylesheets.I
wanted to distinguish the styles by adding comments describing the style before the text with that particular style appears.Is there any control word which specifies comments in RTF. Thanks n advance
0
Comment
Question by:divyap
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
cookre earned 250 total points
ID: 9787728
From: http://www.biblioscape.com/rtf15_spec.htm#Heading58

RTF comments (annotations) have two parts; the author ID (introduced by the control word \atnid) and the annotation text (introduced by the control word \annotation); there is no group enclosing both parts. No Microsoft product supports comments (annotations) within headers, footers, or footnotes. Placing an annotation within headers, footers, or footnotes will often result in a corrupted document. Each part of the annotation is an RTF destination. Comments (annotations) are anchored to the character that immediately precedes the annotation.

If an annotation is associated with an annotation bookmark, the following two destination control words precede and follow the bookmark. The alphanumeric string N, such as a long integer, represents the bookmark name. <atrfstart> '{\*' \atrfstart N '}'
<atrfend> '{\*' \atrfend N '}'



Comments (annotations) have the following syntax: <annot> <annotid> <atnauthor> <atntime>? \chatn <atnicn>? <annotdef>
<annotid> '{\*' \atnid #PCDATA '}'
<atnauthor> '{\*' \atnauthor #PCDATA '}'
<annotdef> '{\*' \annotation <atnref> <para>+ '}'
<atnref> '{\*' \atnref N '}'
<atntime> '{\*' \atntime <time> '}'
<atnicn> '{\*' \atnicn <pict> '}'


An example of annotation text follows:


An example of a paradigm might be Newtonian physics or
Darwinian biology.{\v\fs16 {\atnid bz}\chatn{\*\annotation
\pard\plain \s224 \fs20 {\field{\fldinst page \\#'"Page:
'#'\line'"}{\fldrslt}}{\fs16 \chatn }
How about some examples that deal with social science?
That's what this paper is about.}}

Comments (annotations) may have optional time stamps (contained in the \atntime destination) or icons (contained in the \atnicn destination).

0
 
LVL 22

Expert Comment

by:cookre
ID: 9889015
Is that working for you?
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now