mvnForum Homepage

Print at Oct 31, 2014 10:58:25 AM
Posted by Ingo at Dec 1, 2003 2:00:15 AM
Tags for italics/color font in modules?
I am preparing SWORD module with daily devotionals in polish. We use imp2ld and it's OK, but - is it possible to have a part of the text displayed in italics and/or in other color? What tags should I use?

Now I have sth like that:

$$$01.12
In the beginning God created the heaven and the earth (Gen 1:1). \par \par
And here goes commentary.

I'd like to have Bible verse in red and it's description (Gen 1:1) in italics.


And thanks a lot for answer concerning Strong tags!
----------------------------------------
Ps 1:1-2

Posted by Osk at Dec 1, 2003 12:38:17 PM
Re: Tags for italics/color font in modules?
I am preparing SWORD module with daily devotionals in polish. We use imp2ld and it's OK, but - is it possible to have a part of the text displayed in italics and/or in other color? What tags should I use?

Now I have sth like that:

$$$01.12
In the beginning God created the heaven and the earth (Gen 1:1). \par \par
And here goes commentary.

I'd like to have Bible verse in red and it's description (Gen 1:1) in italics.


And thanks a lot for answer concerning Strong tags!


All markup should be based on semantics. All rendering should be controlled by style-sheets. (Style sheets in Sword generally means hard-coded markup filters that are part of the library.)

You should stick with a supported markup format, such as OSIS, even if you are using the imp format for import. The "\par" tags will only be understood by frontends that use RTF for rendering (which is only the Windows front-end, currently).

The way I would mark this up is:

$$$01.12
<div type="annotant" osisRef="Gen.1.1"><p>In the beginning God created the heaven and the earth (<reference osisRef="Gen.1.1">Gen 1:1</reference>).</p></div>
<div type="commentary" osisRef="Gen.1.1"><p>And here goes commentary.</p></div>

In order for the first <div> to be rendered red, the markup filters in Sword would have to look for <div>s with type="annotant" and apply a red color style to them. Italicizing the second <div> would happen through a similar method.

I know this doesn't really answer your question, but it explain what you should do (since what you want to do isn't really allowed by the markup standards).

--Chris

Posted by Ingo at Dec 1, 2003 4:21:23 PM
cool   Re: Tags for italics/color font in modules?
Thanks a lot.

I've never expected that Sword will be such a learning-stimulating experience:)
I will start with "thinking in C+".

Brgds.
----------------------------------------
Ps 1:1-2

Posted by hermeneutes at Feb 13, 2004 6:38:32 AM
Re: Tags for italics/color font in modules?
I've tried making a devotional using the OSIS markup shown above. I did the tagging then converted the txt file to UTF-8 file and used imp2ld utility to convert it to a module.

Unfortunately I can't get the devotional to display correctly. The entry for 0.1.01 is displayed correctly but the list of entries to the right of the devodional is not correct. Sometimes it contains dates, sometimes pieces of text.

I even tried Ingo's \par \par markup which you discouraged - to the same (unsuccessful) effect.

Ingo's devotional (which he sent me) is displayed correctly, and the Daily devotional I've downloaded from the server is also displayed correctly.

Must the devotional have entries for all days of the year to display correctly?

I only have entries for the first three months of the year.

Will appreciate your help.


Piotr

Posted by hermeneutes at Feb 14, 2004 12:31:43 AM
Re: Tags for italics/color font in modules?
Replying to myself again :)

I managed to make it display correctly when I set the ModDrv in the conf file to RawLD4. Still don't know why Ingo's devotional module displayed correctly with ModDrv set to RawLD (with out 4 at the end).

Piotr

Posted by cyberwolf at Feb 15, 2004 4:52:58 AM
Re: Tags for italics/color font in modules?

I managed to make it display correctly when I set the ModDrv in the conf file to RawLD4. Still don't know why Ingo's devotional module displayed correctly with ModDrv set to RawLD (with out 4 at the end).

Piotr


usage:
imp2ld <filename> [modname] [ 4 (default) | 2 | z - module driver]

When using imp2ld you can choose between 3 formats for building the module, i.e. RawLD (2), RawLD4 (4), zLD (z). The irritating thing about this tool is that its default is set to 4 and addld has its default set to 2, and RawLD corresponds to 2. This is something I also had problems with until I read the usage;-).

Posted by Osk at Feb 16, 2004 10:52:34 AM
Re: Tags for italics/color font in modules?
addld uses RawLD (2) as its default because neither of the other two formats existed at the time addld was written (and zLD wouldn't work very well anyway). addld is now deprecated. There's really no good reason to use it. Just use imp2ld, or if you need more flexibility than it allows, write a util from scratch.

In practice, I would just avoid RawLD anyway. RawLD4 is less error-prone. zLD (assuming it works well and is implemented widely) should be even better.

Posted by hermeneutes at Feb 18, 2004 2:52:42 PM
Re: Tags for italics/color font in modules?
So RawLD4 appears to be the default for imp2ld when I don't choose any parameters.

Everything is difficult until it becomes easy :)

Piotr

Posted by Ingo at Jun 29, 2004 9:11:40 AM
Re: Tags for italics/color font in modules?
I have just got permission from the copyright holder to use Polish version of Good Seed 2004 calendar (Bible verses + commentary for every day) as the Sword module (daily devotional). This calendar is quite popular in polish christian homes and well known for at least several years. It is prepared by evangelical christians and stricly focused on the Bible and Jesus Christ (examples in polish: http://www.dobrenasienie.own.pl/DN.htm).

I 've received very nice pdf file and (after conversion to txt) I will try to make a module using imp (I don't use linux and tools to import from OSIS format).

Does anybody know:
How to mark the text to get "new verse" & line breaks (now I only have plain text with no line breaks) - using imp tools under windoze?

Is it possible to get different text size and/or italics?

If somebody would like to prepare the module using OSIS import tools, I am ready to mark text with osis tags.

In Christ,

Ingo
----------------------------------------
Ps 1:1-2

Posted by hermeneutes at Jun 29, 2004 2:51:17 PM
Re: Tags for italics/color font in modules?

Does anybody know:
How to mark the text to get "new verse" & line breaks (now I only have plain text with no line breaks) - using imp tools under windoze?


Use the markup given above:
$$$01.12

This is the date heading without OSIS tags.
<div type="annotant" osisRef="Gen.1.1"><p>In the beginning God created the heaven and the earth (<reference osisRef="Gen.1.1">Gen 1:1</reference>).</p></div>
<div type="commentary" osisRef="Gen.1.1"><p>And here goes commentary.</p></div>


The verse goes into the div type annotant and the commentary goes into div type commentary. It works for me.

If somebody would like to prepare the module using OSIS import tools, I am ready to mark text with osis tags.


Importing is actually the easiest part, while tagging is the benedictine task. Would you like to try NoteTab Light (free, for Windows, www.notetab.com ) with my clips for doing the devotional?

Regards,

Piotr

Posted by Ingo at Jun 30, 2004 3:04:02 AM
Re: Tags for italics/color font in modules?
Using markup $$$01.01. etc is OK, but how to break the line?
When mark the line break with \par, it's displayed correctly in the dictionary window only - while in the daily dev. window I have the plain text, like this:


Nie da si powin nodze naszej. Psalm 66:8-9. Bogu niech bd dziki za to, e aska Jego ochronia nas


I'd like to have the display like this:


Nie da si powin nodze naszej.
Psalm 66:8-9.

Bogu niech bd dziki za to, e aska Jego ochronia nas


or - it would be the best

Nie da si powin nodze naszej.
Psalm 66:8-9.


Bogu niech bd dziki za to, e aska Jego ochronia nas


Using OSIS tags gives no effect - they are invisible for imp2ld tool.

So my problem is - how to force line breaks under windows? Is there any special tag which I should place in the source text file(I've been trying some, but with no result)?

Brgds.
Ingo
----------------------------------------
Ps 1:1-2

Posted by Ingo at Jun 30, 2004 3:21:54 AM
sorry for my self-response:) hope this may be of use for others...
I got it!
Enough to change "SourceType" in the ".conf" file.
I changed from "imp" to "ThML" and now to break the line I just put <br />.

I bet they have the possibility to use bold, italics (this I've already checked) etc. So now I can make my module more nice for eyes:)

In Christ,

Ingo
----------------------------------------
Ps 1:1-2

Posted by Ingo at Jun 30, 2004 9:35:12 AM
Re: sorry for my self-response:) hope this may be of use for others...
Adding color is possible (/tf tags), but tagged part of the text will be displayed in the same color as for the verse numbers.

We smoothed devotionals module using "manna" for it's simplicity. Text is copyrighted (holders clearly expressed they will to have this text published as Project Sword module - so there is no other need to hesitate if to use it as the module, but the author's name;).

For anybody interested, some files are located at http://sword.strona.pl/downloads/:

- manna.txt - this is source,
typing "imp2ld manna.txt manna 2" we got module (2 files) which /together with .conf file/ is packed as:
- manna.tar.gz.

If anyone wants to work under windows (Notatnik), it's good to remember that .conf file should be saved as ansi - and module files as UTF-8, to have polish characters displayed correctly.

I'll follow this way preparing new devotionals module in the next lunchbreak.

In Christ,

Ingo
----------------------------------------
Ps 1:1-2

Posted by hermeneutes at Jun 30, 2004 2:35:33 PM
Re: sorry for my self-response:) hope this may be of use for others...
I guess that in OSIS markup you could insert an empty paragraph to break the line:

<p></p> or <p/>

Caveat: I have not tried this myself.

On the other hand, how does ThML handle "clickable" verse references, which in OSIS are rendered for example as:

<reference osisRef="Matt.13.35">Mat. 13:35</reference>

?

Regards,

Piotr

Posted by Ingo at Jul 8, 2004 10:02:05 AM
"don't use any other markup than OSIS": my friends advise
I was being encouraged by some people to use only OSIS markup... Only OSIS markup enables nice handling of the "clickable" verse references.
So I think I shall have to say "sorry" to my old linux distribution.

Meantimes we've prepared daily devotionals in polish, we are currently checking it; it is very popular in Poland (ehm... i.e. I'll better admit: among polish evangelical christians) "Good Seed Christian Calendar". We hope to send it "officially" to CrossWire within several days.

If anybody likes to test it, it is located at
http://sword.strona.pl/downloads/dn.zip (900 kB with windows installer) or /dn.raw.zip (only necessary files).

I wonder if it works under linux (so far I didn't have time to fight with the installation of Bible Time... ;).

In His service,

Ingo
----------------------------------------
Ps 1:1-2