verse rules toogle hot keys

Ask here any questions regarding program functionality
keyuhui
Posts: 43
Joined: Tue Feb 03, 2015 5:33 pm

verse rules toogle hot keys

Post by keyuhui »

I have a bible module that I created which contains two versions, English and Chinese. The content is separated by a line break. But recently I want to try to make it possible to “turn off” one of the languages, similar to an interlinear function, the difference being, I have one toggle key for English and another for Chinese, which are defined in verse.rules. The function words fine except for one thing, the line break. I only need the line break when both versions are toggled on, otherwise the line break produces an unneeded blank line. So far the only way I have found to fix this is to make another verse.rule for line break, but I need to choose one of the two hot keys to assign to that line break toggle as well. So the blank line can be eliminated when one version is turned off, but not the other. Is it possible to have a toggle that is activated by more than one hot key? Perhaps separated by a comma, e.g. toggle=e, z
User avatar
JG
Posts: 4604
Joined: Wed Jun 04, 2008 8:34 pm

Re: verse rules toogle hot keys

Post by JG »

Hi,
Can you please post the file cut down to just a few lines and the verse.rules to I can see what you have.
Jon
the
Word 6 Bible Software
OS for testing; Windows 10
Beta Download ------Beta Setup Guide------On-line Manual------Tech doc's and Utilities------Copyright Factsheet
keyuhui
Posts: 43
Joined: Tue Feb 03, 2015 5:33 pm

Re: verse rules toogle hot keys

Post by keyuhui »

<eng>In the beginning<WH7225> God<WH430> created<WH1254><WH853> the heaven<WH8064> and<WH853> the earth<WH776>. </eng><sv><chi>起初<WH7225>,神<WH430>创造<WH1254>天<WH8064>地<WH776>。</chi><CM>
<eng>And the earth<WH776> was<WH1961> without form<WH8414>, and void<WH922>; and darkness<WH2822> <FI>was<Fi> upon the face<WH6440> of the deep<WH8415>. And the Spirit<WH7307> of God<WH430> moved<WH7363> upon<WH5921> the face<WH6440> of the waters<WH4325>. </eng><sv><chi>地<WH776>是<WH1961>空虚<WH8414>混沌<WH922>,渊<WH8415>面<WH6440>黑暗<WH2822>;神<WH430>的灵<WH7307>运行<WH7363>在水<WH4325>面<WH6440>上<WH5921>。</chi>

verse.rule="<eng>(.*?)</eng>" "<ST toggle=e>$1<St>"
verse.rule="<chi>(.*?)</chi>" "<ST toggle=z>$1<St>"
verse.rule="<sv>" "<NB toggle=z><CM><Nb>"
User avatar
JG
Posts: 4604
Joined: Wed Jun 04, 2008 8:34 pm

Re: verse rules toogle hot keys

Post by JG »

Just one change on a toggle used should fix this. Change the z to e

verse.rule="<eng>(.*?)</eng>" "<ST toggle=e>$1<St>"
verse.rule="<chi>(.*?)</chi>" "<ST toggle=z>$1<St>"
verse.rule="<sv>" "<NB toggle=z><CM><Nb>"




verse.rule="<eng>(.*?)</eng>" "<ST toggle=e>$1<St>"
verse.rule="<chi>(.*?)</chi>" "<ST toggle=z>$1<St>"
verse.rule="<sv>" "<NB toggle=e><CM><Nb>"
Jon
the
Word 6 Bible Software
OS for testing; Windows 10
Beta Download ------Beta Setup Guide------On-line Manual------Tech doc's and Utilities------Copyright Factsheet
keyuhui
Posts: 43
Joined: Tue Feb 03, 2015 5:33 pm

Re: verse rules toogle hot keys

Post by keyuhui »

That’s my point. With the verse rules in the current configuration, when I english on and Chinese off, there’s no blank line problem. But when I toggle Chinese on and English off, each verse starts with a blank line. But If I change the “z” to “e” as you suggested, I have the opposite problem. (when I toggle English on and Chinese off, every verse is followed by a blank line.). I feel like there’s probably a simple solution but I can’t figure it out.
User avatar
JG
Posts: 4604
Joined: Wed Jun 04, 2008 8:34 pm

Re: verse rules toogle hot keys

Post by JG »

Sorry I did not pay attention to the toggle, it looked ok at a glance.
Also to the above change move the <sv> after the <chi>
Jon
the
Word 6 Bible Software
OS for testing; Windows 10
Beta Download ------Beta Setup Guide------On-line Manual------Tech doc's and Utilities------Copyright Factsheet
keyuhui
Posts: 43
Joined: Tue Feb 03, 2015 5:33 pm

Re: verse rules toogle hot keys

Post by keyuhui »

tried that too (moving <sv>, but it didn’t work.
User avatar
JG
Posts: 4604
Joined: Wed Jun 04, 2008 8:34 pm

Re: verse rules toogle hot keys

Post by JG »

It works for me.
Can you send me a DM with a link to your file.
You are in verse per line mode?
Jon
the
Word 6 Bible Software
OS for testing; Windows 10
Beta Download ------Beta Setup Guide------On-line Manual------Tech doc's and Utilities------Copyright Factsheet
keyuhui
Posts: 43
Joined: Tue Feb 03, 2015 5:33 pm

Re: verse rules toogle hot keys

Post by keyuhui »

that did it. When I tried putting the <sv> inside the <chi> tag the first time, my <sv> toggle wa set to “z” not “e”. Changing it to “e” did trick.

Thanks for the help
Post Reply