[www.theword.net]

Twitter live feed  
View unanswered posts | View active topics It is currently Sat Dec 04, 2021 11:21 pm



Reply to topic  [ 9 posts ] 
 Questions Re Commentary and Notes RTF Codes 
Author Message

Joined: Thu Sep 21, 2017 6:27 am
Posts: 8
Post Questions Re Commentary and Notes RTF Codes
I am having another look at converting a commentary file and notes files that I set up around 20 years ago for a Bible program that now has totally incompatible file structures, and is nowhere near as good as TheWord.

There was a commentary file, and a number of reference documents, sections of which were linked to from the commentary. Within TheWord, the resulting reference documents could be individual files or a composite file; either would be practical.

I plan to convert the files programmatically, and will be converting the former control codes to those required in TheWord. I have experimented with the manual verse-by-verse setup, to get some idea, including book comments and chapter comments, but I could not ascertain the codes required by looking at the resulting files. I also looked at a twm file in Notepad, but that didn’t help either.

My proposed method is to work with txt files, then read them into Wordpad and save them as RTF files ready for importing.

I have the following questions with respect to the converted txt/RTF files to be imported into TheWord.

1. How are overall Bible book comments delimited/defined in a commentary file?

2. How are overall Bible chapter comments delimited/defined in a commentary file?

3. How are individual Bible verse comments delimited/defined in a commentary file?

4. How are links to targets (bookmarks?) in the same file delimited/defined in a commentary file?

5. How are links to targets (bookmarks?) in notes files delimited/defined in a commentary file?

6. How are links to targets (bookmarks?) in the same file delimited/defined in a notes file?

7. How are links to targets (bookmarks?) in other files delimited/defined in a notes file?

8. How are links to scripture verses delimited/defined from within:
- Commentaries?
- Books?

9. What should I have asked, that I didn’t even know to ask?

Also, how does one get the book comments and chapter comments to actually display?
- When I set them up manually within TheWord, I could find no way to actually display them.
- I set up book, chapter and verse comments in the Matthew 1:1 area.
- I set up a verse comment for Matthew 1:12.
- The verse comments display for both.
- The book and chapter comments are hiding somewhere.


Thanks.


Thu Jul 01, 2021 3:07 pm
Profile
User avatar

Joined: Wed Jun 04, 2008 7:34 pm
Posts: 4243
Post Re: Questions Re Commentary and Notes RTF Codes
If you could give a link to one of your files you would like to convert it might help in going forward with some suggestions.

_________________
Jon
the
Word 5 Bible Software
OS for testing; Windows 10
Beta Download ------Beta Setup Guide------On-line Manual------Tech doc's and Utilities------Copyright Factsheet


Fri Jul 02, 2021 9:39 am
Profile

Joined: Thu Sep 21, 2017 6:27 am
Posts: 8
Post Re: Questions Re Commentary and Notes RTF Codes
Hello Jon,

Thanks for your response.

Examples of linking between the commentary file and a composite file of reference material (books), together with hopefully helpful explanations, follow.

What I hope to do is programmatically convert the existing codes in each file type to TheWord equivalents.

Hopefully I have not been burdensome.

====================================================================

An example from within the commentary file.

00016-Mt1.16
\\Matthew 1:16\\

\\And Jacob --\\ The real father of Joseph, not Heli, who was his
father-in-law. (\\#Lu 3:23\\) X129 208922
U791:2 211060

The 00016-Mt1.16 structure linked the text following it, to the Bible verse Matthew 1:16, down to but excluding 00017-Mt1.17.

For the program user, the X (in X129) and the U (in U791) were codes identifying individual books (all public domain or used with permission) being linked to. The 129 and the 791 were the published page numbers in the particular books, and the :2 pointed to a published reference point within that particular page. The book codes (X, U, etc.) were explained in a comment for the whole Bible at the start of (first verse in) the commentary file.

Apparently each lookup page number (208922 and 211060 above) had to appear on a separate line from all others. Clicking on the lookup page number resulted in a pop-up window appearing, containing the relevant page. (More detail regarding the pop-up window, below.)

The \\...\\ structure defined bolding. The # in front of Lu 3:23 let the Bible program know that a Scripture reference to be linked to (maybe as another pop-up – I’ve forgotten), followed.

====================================================================

Examples from the composite file of reference books.

08922 and 11060 were manually allocated "bookmark" page numbers within a combined text file containing all the reference books being accessed. The page numbering was continuous, starting with the first component book, and ending with the last component book.

Each lookup page number (as in the commentary section above) pointed to a "bookmark" page number in the composite file; that “bookmark” page number was on a line by itself before the start of the logical page (it was a continuous text file with no special characters to denote page breaks), and consisted of the digits following the initial “2”.

That was the way that particular Bible program worked.

The pop-up window was permanent until dismissed. It itself contained clickable page numbers (2nnnnn) corresponding to the previous and next pages in the file, and thus navigation was possible within that pop-up window. Navigation from one component book to another was therefore also possible, but was not a requirement in this case.

====================================================================

Once I am aware of the conversions required, I hope to create converted text files, convert them to RTF files via Wordpad, and import those into TheWord.

I appreciate your offer of help.

Thanks heaps (as we say “down under”).

Gungadout


Sun Jul 04, 2021 11:34 am
Profile
User avatar

Joined: Wed Jun 04, 2008 7:34 pm
Posts: 4243
Post Re: Questions Re Commentary and Notes RTF Codes
Thanks for the example. We will have to wait to see what Jonathan has to say on this as regards the linking.

_________________
Jon
the
Word 5 Bible Software
OS for testing; Windows 10
Beta Download ------Beta Setup Guide------On-line Manual------Tech doc's and Utilities------Copyright Factsheet


Sun Jul 04, 2021 1:37 pm
Profile
User avatar

Joined: Wed Sep 29, 2010 10:04 pm
Posts: 956
Location: Colorado, United States
Post Re: Questions Re Commentary and Notes RTF Codes
Greetings gungadout,
If you start with this post: https://forum.theword.net/viewtopic.php?f=7&t=7949&hilit=rtf this should help with RTF linking.
However in regards to building a commentary: Please see this resource https://www.theword.net/docs/tw3-book-module-spec.doc
Also it is a good idea to look at a pre-existing unencrypted commentary for ideas on how they work along with the above documentation.
There is another resource that I have messaged you in regards to that does not come with a help manual but is very powerful. However, help is not provided for it. I just don't have the time sorry.
I have put it in its own thread here in the forum but note there will not be help provided for it unless it is from another user.
TotheWord a tool useful for building books, commentaries, etc. https://forum.theword.net/viewtopic.php?f=4&t=10735

_________________
Jonathan Koehn @ http://www.thewordbooks.com
2 Timothy 2:15 “Make every effort to present yourself before God as a proven worker who does not need to be ashamed, teaching the message of truth accurately.” (NET2)


Wed Jul 07, 2021 6:20 pm
Profile WWW

Joined: Thu Sep 21, 2017 6:27 am
Posts: 8
Post Re: Questions Re Commentary and Notes RTF Codes
Thanks, Jonathan. Much appreciated. Especially since your time is limited.

I now know how to link to Scripture verses and topics.

The knowledge I lack is:
1. How do I define a target topic (bookmark?) within the a source txt file for a book or commentary;
2. What form does the header information required by TheWord take, within a source txt file for a commentary, and for a book (dictionary)?

The only sample file I have found is in SQL format.

Were there a template txt file available for each of a commentary and a book, that would be all I would need. Apart from how to define a target topic within a book, if the template did not include that.

Are such templates available?

Thanks,

Gungadout.


Thu Jul 15, 2021 4:25 pm
Profile
User avatar

Joined: Wed Sep 29, 2010 10:04 pm
Posts: 956
Location: Colorado, United States
Post Re: Questions Re Commentary and Notes RTF Codes
Greetings Gungabout,
Please start here: https://www.theword.net/docs/tw3-book-module-spec.doc
Here is a portion copied:
Topics that act as anchors/links – link-topics (version 3.2.1+)
It is possible to have a topic that does not have its own content but instead ‘links’ to another topic. In order to support this, a new content.type has been added called ‘meta’. Topics of this type must:
1. Have the content.type column (in topics table) set to the value ‘meta’.
2. The data in the content table should be a meta record. A meta record is defined as follows:
a. A set of name=value properties, each on a new line (separate by CR+LF)
b. The first line must be meta=_twmgc_ (exactly like that)

For a meta record that points to another topic, the following name/value pairs are used: type=link
id=<linked topic id>
anchor=<bookmark/anchor in linked topic, optional>
Notice: both conditions 1 and 2 above must be true for link-topics to work properly. Inconsistencies in the db will lead to unexpected results.
For example, the data column of the content table for a link-topic should look like this:
meta=_twmgc_
type=link
id=3
anchor=bkm1
In the above example, 3 is the id of the topic this one links to, and anchor an (optional) bookmark/anchor defined in this target topic.
The following rules apply for link-topics:
1. They cannot be created from within theWord: they must be created with direct sql manipulation. This implies that they should be mostly used for non-user modules.
2. All operations that are made to link-topic (e.g. highlighting, content update, verse-ref detection) are internally applied to the linked topic instead. So, in normal conditions, a link-topic (having been created with direct sql manipulation) cannot be changed at all from within theWord (except for 3, see below).
3. When copying link-topics from one module to another (using drag-n-drop) from within theWord, the link-topics are not really copied, instead the actual linked copied content is. Be very careful with this operation since it is the only case in which link-topics are not preserved.
4. When searching, link-topics do not appear in the search results for content-search: instead, their linked topics appear. When searching topic-subjects, then link-topics can/will appear
5. When displaying a link-topic in the Book view, the display is not updated if the current topic is the same with the linked-to topic. If an anchor is defined in the link-topic, the display scrolls appropriately.
6. A bookmark icon appears in the topics-tree for link-topics.
7. Changing module content-type (from rvf to rtf, etc) should have no effect on link-topics.

_________________
Jonathan Koehn @ http://www.thewordbooks.com
2 Timothy 2:15 “Make every effort to present yourself before God as a proven worker who does not need to be ashamed, teaching the message of truth accurately.” (NET2)


Wed Jul 21, 2021 7:03 pm
Profile WWW
User avatar

Joined: Wed Sep 29, 2010 10:04 pm
Posts: 956
Location: Colorado, United States
Post Re: Questions Re Commentary and Notes RTF Codes
That is how to point to a bookmark, now as to make one in the rtf
One of the quicker ways is go into theWord make a user module put in a bit of text and give it a book mark using theWord.
Then export that topic using RTF.

And you will get rtf code like this

{\*\bkmkstart bkm1}{\*\bkmkend bkm1}This is a bookmark in RTF

This should get you started but that document and TotheWord will help you more.

_________________
Jonathan Koehn @ http://www.thewordbooks.com
2 Timothy 2:15 “Make every effort to present yourself before God as a proven worker who does not need to be ashamed, teaching the message of truth accurately.” (NET2)


Wed Jul 21, 2021 7:08 pm
Profile WWW

Joined: Thu Sep 21, 2017 6:27 am
Posts: 8
Post Re: Questions Re Commentary and Notes RTF Codes
Thanks, Jonathan.
I'll give it a go.


Mon Jul 26, 2021 4:06 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 1.188s | 13 Queries | GZIP : Off ]