|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 9 |
|
| Author |
|
|
Regular Joined: Jan 29, 2009 Post Count: 26 Status: Offline |
Hello again. I think MacSword is unable to show a header which is placed as the first text of a chapter. Chapter headers are shown only when more than one chapter is displayed, and book headers are displayed only when more than one book is displayed. But when a header is placed before the first verse of a chapter, it is never shown. Although the windows SWORD does display it. Is there something wrong with the module, or with MacSword? (I still really like the software and the project and all...) Simon |
||
|
|
Developer Joined: Sep 17, 2003 Post Count: 209 Status: Offline |
Hi Simon, Are you saying that the same module works fine in Windows, but not in MacSword? That suggests that there might not be a problem with the module itself. Which module(s) had a problem in MacSword? |
||
|
|
Regular Joined: Jan 29, 2009 Post Count: 26 Status: Offline |
Hello! I am currently working on a module for Sword. The module is in swedish and the translated text makes much use of headers to make the text easier to overview. I use MacSword myself, so that is the program I have been checking the module with (while I am also learning to write OSIS). The module isn't finished, so I don't want to share it yet. However, the KJV I've downloaded from the Sword homepage has chapter headings. Before every chapter it says "CHAPTER 1" or "PSALM 1". That can be shown with The Sword Project for Windows. In MacSword it is shown only if there is any text displayed before the beginning of the chapter. For example: if I am viewing chapter 1 and 2 of Matthew, there is no header above chapter one, but between the two chapters is written "CHAPTER 2". In the module I am working on I have used the following OSIS code (after the header). It is the beginning of the gospel of Mark: <div type="book" osisID="Mark" canonical="true"> <title type="main" placement="centerHead">Evangeliet enligt Markus</title> <chapter osisID="Mark.1"> <p/><div type="section"><title>Johannes döparen</title></div> <verse osisID="Mark.1.1"> [...the text of the first part (8 verses)...] </verse> <p/><div type="section"><title><p/>Jesu dop</title></div> <verse osisID="Mark.1.9"> [...the text of the second part (3 verses)...] </verse> <p/> In The Sword project for Windows, it is returned like this, including all the blank lines. The green parts are those that can be removed by hiding the headers: Chapter 1 Evangeliet enligt Markus Johannes döparen [... the text of part 1 (8 verses) ... ] Jesu dop Jesu dop [ ... the text of part 2 (3 verses) ... ] In MacSword, it is shown like this. Markus 1 [ ... the text of part 1 (8 verses) ... ] Jesu dop [ ... the text of part 2 (3 verses) ... ] So, MacSword doesn't show the first header of the text. Apart from that, everything is as I would like it. But the Sword project for Windows shows the headers in the text twice. Why? Except the first header, which is only showed once. That's good, but why? And, most important: How should I write the module so that it looks good in both MacSword and the Windows sword? As I wrote above, I am trying to learn OSIS at the same time. Thank you! Simon |
||
|
|
Inventory Germany Joined: Jun 12, 2008 Post Count: 637 Status: Offline |
Hi Simon. And, most important: How should I write the module so that it looks good in both MacSword and the Windows sword? Both programs use the same HTML output to display the text. But in MacSword special formating and colours are applied from CSS. Manfred |
||
|
|
Regular USA Joined: Aug 25, 2004 Post Count: 79 Status: Offline |
I think that perhaps MacSword is not displaying book and chapter titles. The following is held in the module by the verse Mark.0.0: <div type="book" osisID="Mark" canonical="true"> <title type="main" placement="centerHead">Evangeliet enligt Markus</title> And this is held by the verse Mark.1.0: <chapter osisID="Mark.1"><p/><div type="section"><title>Johannes döparen</title></div> For MacSword to show/hide these verses, it has to get them. On another note, <p/> is allowable, but not proper OSIS. This is a container element and should have content. If you want to insert line breaks, use <lb/> instead. Even this should be avoided as the SWORD engine and MacSword will insert whitespace in appropriate locations. |
||
|
|
Regular Joined: Jan 29, 2009 Post Count: 26 Status: Offline |
I think that perhaps MacSword is not displaying book and chapter titles. Well, actually I am fine with that. The book's name and the chapter's number are still displayed, which I care more about. And this is held by the verse Mark.1.0: "<chapter osisID="Mark.1"><p/><div type="section"><title>Johannes döparen</title></div>" But I don't want that title to be the title of the chapter (which I suppose it is, if it is connected to verse Mk 1.0). I want it to be the title of the first part of the text, verses 1-8. For MacSword to show/hide these verses, it has to get them. Yes... I suppose it has to... but why isn't the header above the text visible, when the other headers are? On another note, <p/> is allowable, but not proper OSIS. This is a container element and should have content. If you want to insert line breaks, use <lb/> instead. Even this should be avoided as the SWORD engine and MacSword will insert whitespace in appropriate locations. "Even this should be avoided"? So what is the really proper way to make linebreaks? What is meant by "whitespace" here? The SWORD engine inserts blank lines (one or two, I'm not sure) where I have used the <p/> tag, but not after <lb/>. MacSword inserts no extra blank lines. And what are the "appropriate locations"? Thank you for your patience with me. Simon |
||
|
|
Regular USA Joined: Aug 25, 2004 Post Count: 79 Status: Offline |
I think that perhaps MacSword is not displaying book and chapter titles. Well, actually I am fine with that. The book's name and the chapter's number are still displayed, which I care more about. And this is held by the verse Mark.1.0: "<chapter osisID="Mark.1"><p/><div type="section"><title>Johannes döparen</title></div>" But I don't want that title to be the title of the chapter (which I suppose it is, if it is connected to verse Mk 1.0). I want it to be the title of the first part of the text, verses 1-8. Today, osis2mod is finicky. Sometimes it will attach the title to the first verse, sometimes it will make it a chapter title. While I am the current maintainer for osis2mod, I can't say for sure when it decides to attach it to the verse. But more often than not, it will make titles standing before the first verse to be chapter titles. While it is not part of the problem, the <div type="section">...</div> should go around the entire 8 verses. For MacSword to show/hide these verses, it has to get them. Yes... I suppose it has to... but why isn't the header above the text visible, when the other headers are? On another note, <p/> is allowable, but not proper OSIS. This is a container element and should have content. If you want to insert line breaks, use <lb/> instead. Even this should be avoided as the SWORD engine and MacSword will insert whitespace in appropriate locations. "Even this should be avoided"? So what is the really proper way to make linebreaks? What is meant by "whitespace" here? The SWORD engine inserts blank lines (one or two, I'm not sure) where I have used the <p/> tag, but not after <lb/>. MacSword inserts no extra blank lines. And what are the "appropriate locations"? OSIS markup should be structural. That is use <div type="section">...</div> to mark sections. Use <lg><l>...</l><l>...</l>......</lg> to mark poetic stanzas. Use <p>...</p> to mark paragraphs. The front-ends will decide when to add space between paragraphs, around titles, between divs, etc. Each front-end does it differently. When you add <lb/> to add a line break or <p/> to add 2 line breaks, you are assuming that these lines will interact well with all front-ends. One place where that this creates problems is when the user shows one verse per line. It results in all kinds of unintended whitespace. For more on the OSIS best practices, see the wiki for OSIS Bibles. Also, questions like this are best served on the sword-devel mailing list. More people respond to that. Hope this helps. In Christ's Service, DM |
||
|
|
Regular Joined: Jan 29, 2009 Post Count: 26 Status: Offline |
But more often than not, it [osis2mod] will make titles standing before the first verse to be chapter titles. So, at the moment, the best way to place a title just before the first text of a chapter is to make it the chapter title? Could this have some other effect, apart from pure layout, like making someone believe that the whole chapter is dedicated to the subject of the first verses? While it is not part of the problem, the <div type="section">...</div> should go around the entire 8 verses. But then the title never shows in MacSword. Writing the way I do was the only way I could find to make titles appear in MacSword. And on the other hand, writing it the way I do it now makes the title appear twice in Windows Sword, plus inserts extra white space. The front-ends will decide when to add space between paragraphs, around titles, between divs, etc. Each front-end does it differently. So I can't really decide how I want the text to look? Also, questions like this are best served on the sword-devel mailing list. So I've understood. I have subscribed to the mailing list but not been approved yet. Thank you for your help. I suppose it can be annoying with new-comers who don't know anything about the work you have done so far, and want everything to work perfectly right away. God's peace! Simon |
||
|
|
Regular USA Joined: Aug 25, 2004 Post Count: 79 Status: Offline |
But more often than not, it [osis2mod] will make titles standing before the first verse to be chapter titles. So, at the moment, the best way to place a title just before the first text of a chapter is to make it the chapter title? Could this have some other effect, apart from pure layout, like making someone believe that the whole chapter is dedicated to the subject of the first verses? As far as I know all the front ends only fetch a verse number 0 when the entire chapter is grabbed, if they get it at all. Given that, I don't think a reader would be confused. While it is not part of the problem, the <div type="section">...</div> should go around the entire 8 verses. But then the title never shows in MacSword. Writing the way I do was the only way I could find to make titles appear in MacSword. And on the other hand, writing it the way I do it now makes the title appear twice in Windows Sword, plus inserts extra white space. At this point in time, osis2mod does not deal well with inter-verse material except titles. My recommendation is to write the OSIS file correctly and use xslt to convert it into a form that osis2mod handles well. In this case, use xslt to remove the <div type="section">, but not it's content. The front-ends will decide when to add space between paragraphs, around titles, between divs, etc. Each front-end does it differently. So I can't really decide how I want the text to look? The only way to decide is to understand the various SWORD engine filters that transform the OSIS into the rendered view. While most of this is part of the engine, some of the frontends do things differently. JSword, used by Bible Desktop, AlKitab and FireBible, does it differently. Also, questions like this are best served on the sword-devel mailing list. So I've understood. I have subscribed to the mailing list but not been approved yet. I didn't think it took approval. Try sending an email to sword-devel and see if you are in. You'll get a reply if you are not. Thank you for your help. I suppose it can be annoying with new-comers who don't know anything about the work you have done so far, and want everything to work perfectly right away. God's peace! Simon Not annoyed at all! You're welcomed. God bless you in your work! In Him, DM |
||
|
|
|
|
Current timezone is GMT May 21, 2013 5:29:03 AM |