Jump to content

Please read the Forum Rules before posting.

Photo
- - - - -

Format for creating a dictionary


  • Please log in to reply
38 replies to this topic

#21 BH.

BH.

    Utility Developer

  • Contributors
  • PipPipPipPipPip
  • 1,205 posts
  • LocationCalifornia
Offline

Posted 02 April 2012 - 11:34 AM

I drove it around the block again and the superscripts look great... but the greek font isn't displaying as the e-sword default TITUS. I expanded the sample file so it was easier to see. I have all the greek tagged with \f1, everything else is \f0.

I do not know how you are entering your Greek text, but it is not being entered with the correct character set. That fact that it is "\f1| is irrelavent. I know there has been a lot of talk on the forums about the proper tags for e-Sword. And that is all fine and good, except it is not relevant to what you see in T4. Your Greek text may be \f34! T4 will switch font based on character specifications at the time it creates a module, and if it sees a font that is fcharset161, then it become \f1 for greek. In the file you posted, the greek is indeed \f1 (but again - that is irrelavent), the problem is the fcharset if 0. This is one time where editing the RTF may help. Change it to fcharset161, then build your module. But note!!! Other characters may be tagged \f1. In your file. the second mark changed after editing the RTF and had to be deleted and re-entered.

The T4 Greek Keyboard, enters Greek character with the correct fcharset. Copying and pasting from some documents will not always have the correct fcharset. I do not have any hard and fast rules to say when copy and paste from other documents works.

#22 BH.

BH.

    Utility Developer

  • Contributors
  • PipPipPipPipPip
  • 1,205 posts
  • LocationCalifornia
Offline

Posted 02 April 2012 - 11:37 AM

Bump on the previous post. Also, I've noticed for some time that with these greek files if only the last bit of a verse (with superscript) wraps to the next line then the top of it gets cut off. I've experimented with formatting a space at the end with the greek font in an attempt to force the height up but it didn't work. Any ideas of something we can add at the end of each verse so that no matter what resizing of the window a user does that last bit will fully display? Here is a pic of what I mean.

Again - post a sample RTF file, and I'll look at it.

#23 Josh Bond

Josh Bond

    Administrator

  • Administrators
  • PipPipPipPipPip
  • 2,881 posts
  • LocationGallatin, TN
Offline

Posted 02 April 2012 - 12:26 PM

I do not know how you are entering your Greek text, but it is not being entered with the correct character set. That fact that it is "\f1| is irrelavent. I know there has been a lot of talk on the forums about the proper tags for e-Sword. And that is all fine and good, except it is not relevant to what you see in T4. Your Greek text may be \f34! T4 will switch font based on character specifications at the time it creates a module, and if it sees a font that is fcharset161, then it become \f1 for greek. In the file you posted, the greek is indeed \f1 (but again - that is irrelavent), the problem is the fcharset if 0. This is one time where editing the RTF may help. Change it to fcharset161, then build your module. But note!!! Other characters may be tagged \f1. In your file. the second mark changed after editing the RTF and had to be deleted and re-entered.

The T4 Greek Keyboard, enters Greek character with the correct fcharset. Copying and pasting from some documents will not always have the correct fcharset. I do not have any hard and fast rules to say when copy and paste from other documents works.


Anytime I have Greek text in a commentary or dictionary or Bible, I color the text blue. After T4 generates the module, I find all the blue tags in the RTF and force the font to \f1.

I wish T4 would let ME the module maker decide what text is Greek. The current, automatic detection of character sets just doesn't work for any commentary or dictionary module I make with Greek text.

If I assign the text Titus Cyberbit Basic (or a specific color, or a specific something), then forget character sets and render the final module text as \f1. Let me decide. But that is a large undertaking for T4 and what seems simple to us can be complicated in the code.

So I run behind T4 to correct the \f1 designations. It's not hard to do at all. But explaining this to a non-technical module maker is all but impossible. But I think you could do this, yvehill. You would dump the database to sql text using SQLite Browser. Then load the text in a word processor and insert a \f1 behind the \cf2 (or whatever color) to force all blue colored text to use the default e-Sword greek font. You can also use the new regexer by Ray to correct the font designations.

#24 BH.

BH.

    Utility Developer

  • Contributors
  • PipPipPipPipPip
  • 1,205 posts
  • LocationCalifornia
Offline

Posted 02 April 2012 - 03:36 PM

Anytime I have Greek text in a commentary or dictionary or Bible, I color the text blue. After T4 generates the module, I find all the blue tags in the RTF and force the font to \f1. I wish T4 would let ME the module maker decide what text is Greek.

You can and you do. However, there are several ways Greek gets encoded, and there is one way that e-Sword wants it encoded. Back in T3, I could easily set the fcharset of the RTF. There is no API in T4 that I have found to do this. I have see Greek encoded with fcharset0 and fcharset161. e-Sword wants the latter. Entering Greek using the T4 keyboard comes in fcharset161. But no true with all copy and paste operations. A real programmer might know how to solve this issue. I'm open for suggestions!

#25 Josh Bond

Josh Bond

    Administrator

  • Administrators
  • PipPipPipPipPip
  • 2,881 posts
  • LocationGallatin, TN
Offline

Posted 02 April 2012 - 04:18 PM

You can and you do. However, there are several ways Greek gets encoded, and there is one way that e-Sword wants it encoded. Back in T3, I could easily set the fcharset of the RTF. There is no API in T4 that I have found to do this. I have see Greek encoded with fcharset0 and fcharset161. e-Sword wants the latter. Entering Greek using the T4 keyboard comes in fcharset161. But no true with all copy and paste operations. A real programmer might know how to solve this issue. I'm open for suggestions!


Sorry, suggestions are well beyond my expertise. When I first started this site, I knew nothing about RTF. I'd never worked with it, other than converting the Pulpit Commentary. Now i know more, but the charset stuff is still a little foreign to me. And the way e-Sword handles RTF is rather unusual in several ways.

#26 BH.

BH.

    Utility Developer

  • Contributors
  • PipPipPipPipPip
  • 1,205 posts
  • LocationCalifornia
Offline

Posted 02 April 2012 - 05:01 PM

Sorry, it's well beyond my expertise. When I first started this site, I knew nothing about RTF. I'd never worked with it, other than converting the Pulpit Commentary. Now i know more, but the charset stuff is still a little foreign to me. And the way e-Sword handles RTF is rather unusual in several ways.

I also knew nothing about RTF when I started doing my e-Sword projects. I'm better with numbers that text. So this all have been a learning experience for me too. And programming? Ha - I'm not a professional! So - - understand that T4 is a moving target. I try to make it work as well as I can.

#27 DSaw

DSaw

    Resource Builder

  • Members (T)
  • PipPipPipPipPip
  • 1,124 posts
  • LocationEast Coast
Offline

Posted 02 April 2012 - 08:19 PM

I'm Dumber than both of you are smart so bare with me

I'm currently working on a Project which includes allot of Greek and every time I read about someone having problems with Greek I always run a test page and never have a problem with Greek displaying

If I have no problems and use T4 and other have problems would the problem then be in how the Greek is entered into the original document

I create modules from PDF using omnipage pro when i need to enter greek I use babelmap I also since we are no longer hard encoding font types I use Cyber bit basic for everything I save it s a doc in omnpage pro open in word for clean it up find and replace etc. save as doc open in T4 tweak the file even more scripture tool tips etc. and make the module its only one page of the book but the Greek displays correctly

Don't know if any of this Is relevant or not

May God change our hearts to what the truth is

2Ti_2:15 Study to shew thyself approved unto God, a workman that needeth not to be ashamed, rightly dividing the word of truth.

Rom_9:16 So then it is not of him that willeth, nor of him that runneth, but of God that sheweth mercy.

2Ti 2:24-25  And the servant of the Lord must not strive; but be gentle unto all men, apt to teach, patient, In meekness instructing those that oppose themselves; if God peradventure will give them repentance to the acknowledging of the truth; 
 

 

 


#28 yvehill

yvehill

    Liking e-Sword

  • Veterans
  • PipPip
  • 21 posts
Offline

Posted 02 April 2012 - 08:59 PM

I also knew nothing about RTF when I started doing my e-Sword projects. I'm better with numbers that text. So this all have been a learning experience for me too. And programming? Ha - I'm not a professional! So - - understand that T4 is a moving target. I try to make it work as well as I can.


I think I understand what you were saying about fonts now and my module output correct the greek so, yeah! Ok, so here is what I did. In my TEST file, in text view, I used T4's greek keyboard and inserted some text. I then shifted over to View RTF. A new line in the top definition section had been created - {\f1\fnil\fcharset161\fprq0 TITUS Cyberbit Basic;}. I then did a find and replace to make my greek (which had been renumbered as \f3) \f1 (which is what T4 had assigned to the new font) and deleted the junk greek I had entered. I guess the main question then is what should be in that top definition section so that our output is right? I really appreciate the banter between you two, I learn a lot.

Just for fun I opened a blank RTF in T4, put in the Module Define Variables for a Dictionary, typed some text then opened the keyboard and typed some in greek too. Then I went to e-sword and copied some greek and non-greek content and pasted it into T4. When I looked at the RTF it only had the charset161 TITUS greek in the definitions.

On the other topic, I replaced the spaces between the greek, the strong's number and the part of speech with a non-breaking spaces (\~). Now the whole word and it's descriptors move to the next line together and nothing gets cut off.

#29 APsit190

APsit190

    e-Sword Tools Developer

  • Members (T)
  • PipPipPipPipPip
  • 1,924 posts
  • LocationThe Land of the Long White Cloud
Offline

Posted 02 April 2012 - 10:31 PM

Sorry, suggestions are well beyond my expertise. When I first started this site, I knew nothing about RTF. I'd never worked with it, other than converting the Pulpit Commentary. Now i know more, but the charset stuff is still a little foreign to me. And the way e-Sword handles RTF is rather unusual in several ways.


I also knew nothing about RTF when I started doing my e-Sword projects. I'm better with numbers that text. So this all have been a learning experience for me too. And programming? Ha - I'm not a professional! So - - understand that T4 is a moving target. I try to make it work as well as I can.


Josh & Brent,
Let me join in the chorus here too. RTF code and what to put in and what not to put in is all new to me as well. But what I like about it is that its exciting stuff because it makes me have to learn it in order to be able to achieve the desired result I want.

Now, here is the beaut stuff, the way that e-Sword reads rtf in all its views (windows) and editors is exactly as what Microsoft has put out, and there is no difference. So what you see in the database files of the rtf specifications that needs to be displayed in e-Sword is exactly the same that is used in MS Word 2007 (I think off the top of my head), and I guess that is the same with MS Word 2010 (I still have MS Word 2003, so I'm lagging, but that's fine with me as I'm still using XP).

So, rtf code like \b, \i, \u and etc that is used in e-Sword, is what MS Word uses, and how you see stuff put in braces { } is just the same as in Word (behind the scenes). So when in rtf code style you see {\b I am very bold} the output is I am very bold.

To Brent...
I dunno how you programmably did it in T4 to get the rtf code to work in e-Sword, but from what I've experienced with it, it does give me the desired result.

Well children, that's it on this one from me.

Blessings,
Autograph.png

Edited by APsit190, 02 April 2012 - 10:33 PM.


#30 BH.

BH.

    Utility Developer

  • Contributors
  • PipPipPipPipPip
  • 1,205 posts
  • LocationCalifornia
Offline

Posted 02 April 2012 - 11:03 PM

Stephen - Topic file and Note files are very straight forward. If you Hand code CMTX/DCTX files, then it is "straight forward" also. But it might take you years to get a large project out. T4 is an attempts to simplify module creation, shielding the end user from having to know much about RTF code. If you stick to English, then it pretty well does that. The trick to Greek and Hebrew is identifying those characters in the RTF. And that is not always straight forward. And perhaps that is due to my lack of understanding. T4 works like T3 in that it keys off of \fcharset. Looking at RTF which does not conform to the \fcharset, the characters are coded in Unicode. That may be a way to set the proper \f tag as these characters are pointing to a particular codepoint in unicode which would correlate to Greek or Hebrew. And that may be what I might need to do.... Understand that in TOPX/NOTX, one does not need to worry about character encoding as it is all defined in the RTF header. But in CMTX/DCTX (and others) files there is no header in e-Sword. Thus, all the RTF code much comply with e-Sword's expectations.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users




Similar Topics



Latest Blogs