Module Tools
  1. Module Tools
  2. MODTOOLS-29

diatheke does not include the font color table when output format is RTF, yet this is required to support option x (Red Words of Christ)

    Details

    • Type: Bug Bug
    • Status: Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      Windows 7 x64

      Description

      Here is what I entered at the Windows cmd line:

      utils\diatheke -b ESV -o x -f RTF -k "Gen - Rev">Export\ESV\ESV.diatheke.ox.rtf

      The Words of Jesus are marked in the RTF file using font color 6 like this: \cf6 ...\cf0

      Examples can be found throughout the Gospels, the first being in

      Matthew 3:15:

      {\f1 But Jesus answered him, \cf6 "Let it be so now, for thus it is fitting for us to fulfill all righteousness."\cf0 Then he consented.}

      \par

      For this to display correctly, the RTF file should include a font color table near the start of the file. It doesn't.

      The first output line begins:
      {\rtf1\ansi{\fonttbl

      {\f0\froman\fcharset0\fprq2 Times New Roman;} {\f1\fdecor\fprq2 Times New Roman;}

      {\f7\froman\fcharset2\fprq2 Symbol;}}

      and is immediately followed by Genesis 1:1:

      So three fonts are defined, but font colors are not defined. They should be!
      i.e. cf6 should be red, cf0 should be black.

      No attachment is added, as the issue is readily reproducible.

      David Haslam

        Activity

        Hide
        David Haslam added a comment -

        Please ignore the line which read:
        NB. The 2 unrecognized characters above are left & right double quotes - the problem is merely that of JIRA.
        It appertained only to the appearance of those two chars in the edit box.

        Show
        David Haslam added a comment - Please ignore the line which read: NB. The 2 unrecognized characters above are left & right double quotes - the problem is merely that of JIRA. It appertained only to the appearance of those two chars in the edit box.
        Hide
        David Haslam added a comment -

        Just moved this issue from SWORD to Module Tools.

        The issue appertains to diatheke when RTF is specified as the output format.

        Show
        David Haslam added a comment - Just moved this issue from SWORD to Module Tools. The issue appertains to diatheke when RTF is specified as the output format.
        Hide
        David Haslam added a comment -

        Simple RTF file to illustrate what a colortbl looks like.

        Show
        David Haslam added a comment - Simple RTF file to illustrate what a colortbl looks like.
        Hide
        David Haslam added a comment - - edited

        An RTF color table can have as many entries as required.
        The one shown in the attachment has extra line breaks inserted to show the structure more clearly.
        Open it with Notepad to see lines 3 to 8.
        As it happens, here I chose \cf5 for red color, but I could just as readily have used \cf6

        To solve this issue, all that needs to be done is to insert the following line before the text proper starts.

        {\colortbl {\cf0;\cf1;\cf2;\cf3;\cf4;\cf5;\cf6\red255\green0\blue0;}}

        It should be a simple enough task to update and test the diatheke source code.

        Within the RTF text ...
        \cf0 restores the default color (black).
        \cf6 is used for the Words of Christ.

        Show
        David Haslam added a comment - - edited An RTF color table can have as many entries as required. The one shown in the attachment has extra line breaks inserted to show the structure more clearly. Open it with Notepad to see lines 3 to 8. As it happens, here I chose \cf5 for red color, but I could just as readily have used \cf6 To solve this issue, all that needs to be done is to insert the following line before the text proper starts. {\colortbl {\cf0;\cf1;\cf2;\cf3;\cf4;\cf5;\cf6\red255\green0\blue0;}} It should be a simple enough task to update and test the diatheke source code. Within the RTF text ... \cf0 restores the default color (black). \cf6 is used for the Words of Christ.
        Hide
        David Haslam added a comment -

        I just inserted the color table as line 2, and tested the result in KJV.diatheke.colortbl.rtf

        Here's proof that it works.

        Show
        David Haslam added a comment - I just inserted the color table as line 2, and tested the result in KJV.diatheke.colortbl.rtf Here's proof that it works.
        Hide
        Chris Little added a comment -

        Diatheke currently outputs document segments, not documents. Generating full, valid, well-formed documents is a possible future feature, but not currently planned. Peter is doing a bit of work on this matter, specifically in regards to LaTeX output, but generating full documents was explicitly never the domain of diatheke proper. (This was the domain of the now deprecated & quite intentionally unsupported Diaspora application.)

        Show
        Chris Little added a comment - Diatheke currently outputs document segments, not documents. Generating full, valid, well-formed documents is a possible future feature, but not currently planned. Peter is doing a bit of work on this matter, specifically in regards to LaTeX output, but generating full documents was explicitly never the domain of diatheke proper. (This was the domain of the now deprecated & quite intentionally unsupported Diaspora application.)

          People

          • Assignee:
            Chris Little
            Reporter:
            David Haslam
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: