detect and enumerate notes?
detect and enumerate notes?
Which way is the best to enumerate notes and to detect if a text has notes?
My application consists of a lot oft textfiles, listed in a treeview. I need a list, in which text are notes, how many and with which content. I could not find an easy way for this problem. Can you give me a hint please?
My application consists of a lot oft textfiles, listed in a treeview. I need a list, in which text are notes, how many and with which content. I could not find an easy way for this problem. Can you give me a hint please?
-
- Posts: 75
- Joined: Fri Jan 06, 2012 8:13 pm
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
This code work only for notes outside table cells. I complete enumeration procedure should also call similar code for each table cell recursively.
But for notes, there is a simpler and faster solution:
http://www.trichview.com/help/idh_fun_r ... dnote.html
The most universal function is not listed there. It is
function GetNextNote(RVData: TCustomRVData; Note: TCustomRVNoteItemInfo;
NoteClass: TCustomRVNoteItemInfoClass; AllowHidden: Boolean): TCustomRVNoteItemInfo;
PS: in the new version (available for registered users) two new types of items will be listed (in addition to foonotes and endnotes): sidenotes and textbox items.
But for notes, there is a simpler and faster solution:
http://www.trichview.com/help/idh_fun_r ... dnote.html
The most universal function is not listed there. It is
function GetNextNote(RVData: TCustomRVData; Note: TCustomRVNoteItemInfo;
NoteClass: TCustomRVNoteItemInfoClass; AllowHidden: Boolean): TCustomRVNoteItemInfo;
Code: Select all
Note: TCustomRVNoteItemInfo;
Note := GetNextNote(RV.RVData, nil, TCustomRVNoteItemInfo, True);
while Note<>nil do begin
NoteText := GetRVDataText(Note.Document);
...
Note := GetNextNote(RV.RVData, Note, TCustomRVNoteItemInfo, True);
end;
-
- Posts: 75
- Joined: Fri Jan 06, 2012 8:13 pm
Re: detect and enumerate notes?
Hi again
How can change text style of a note text !?
for example change color of number of footnotes( note text)
How can change text style of a note text !?
for example change color of number of footnotes( note text)
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: detect and enumerate notes?
Do you want to change color of number of footnotes inserted by RichViewActions (TrvActionInsertFootnote for TRichViewEdit, or TsrvActionInsertFootnote for ScaleRichView)? It is only possible if you use StyleTemplates. In this case, you need to define properties of the style template named 'footnote reference'.
In the style dialog (Format | Styles), if UI is English, you can see this style as "Footnote Reference (Standard)". Click "Edit" next to font properties of this style, and define color. If this style is not defined, you can add it in this dialog (button "Add", "Standard style").
If you want to define this style for new documents, add it in to StyleTemplates property of TrvActionNew at design time (it must be named exactly as 'footnote reference', case sensitive).
Or maybe you insert it without RichViewActions? Or do you want to change text of a note number that was already inserted?
In the style dialog (Format | Styles), if UI is English, you can see this style as "Footnote Reference (Standard)". Click "Edit" next to font properties of this style, and define color. If this style is not defined, you can add it in this dialog (button "Add", "Standard style").
If you want to define this style for new documents, add it in to StyleTemplates property of TrvActionNew at design time (it must be named exactly as 'footnote reference', case sensitive).
Or maybe you insert it without RichViewActions? Or do you want to change text of a note number that was already inserted?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: detect and enumerate notes?
For endnotes and sidenotes, the solution is the same, the styles have names "endnote reference" and "Sidenote Reference".
You can also define properties of text in their documents, the styles have names "footnote text", "endnote text", "Sidenote Text".
You can also define properties of text in their documents, the styles have names "footnote text", "endnote text", "Sidenote Text".
-
- Posts: 75
- Joined: Fri Jan 06, 2012 8:13 pm
Re: detect and enumerate notes?
yes, I want to change color or font of a note number that was already inserted.Sergey Tkachenko wrote: ↑Fri Dec 21, 2018 12:30 pm Or maybe you insert it without RichViewActions? Or do you want to change text of a note number that was already inserted?
when i select context that contain a footnote number and use ApplyTextStyle, footnote number (note text) style change to current style
This text contains <sup>1</sup> text => This text contains 1 text.