Pathway 1.3.5 sprint release

Here is a summary of the changes in this release: Added reference format topic to help, In Linux, fix icon on menu, associate epub type, create registry key, Fix error boxes, Improve picture formatting, hard page break, quote indents 1-4, end note reference format, caption format, embedded quote conversion, picture removal on epub, Java search, page size

  • Help
    • Added draft of Reference Format topic
    • Added link to the blog page on website.
  • InDesign
    • TD-3194 footnote and cross references
    • TD-3398 Page break before reversal
    • TD-3399 Guide words in header of reversal section
  • Linux build
    • TD-3259 Show Pathway icon on Menu
    • TD-3260 Associate epub type with a viewer
    • TD-3262 create registry keys for pathway
    • Alternate Internet based install for XeLaTeX on 64-bit Linux
  • Logos
    • TD-3190 Error box is appeared When I exporting Logos Alpha in Linux.
  • Open Office Writer
    • TD-1599 space after verse #
    • TD-2046 Picture formatting
    • TD-2623 No reference header information
    • TD-3295 Handle hard page break
    • TD-3296 Handle quote indents levels 1-4
    • TD-3340 Add Endnotes to table of contents
    • TD-3342 Use \toc2 field for book name in end notes
    • TD-3279 Maintain aspect ration on cover image
    • TD-3281 ipi size same as ip
    • TD-3282 Drop cap should remove paragraph indentation
    • TD-3286 book names in headers
    • TD-3288 Space between caption and caption reference
    • TD-3289 New books should start
    • TD-3290 Convert >>> as single quote followed by a double
    • TD-3291 Table code processing
    • TD-3299 list items should be same size as running text
    • TD-3311 Scripture Fixed line height not fixed.
    • TD-3314 Header should contain \h
    • TD-3315 Header text size should be base font size
    • TD-3316 Footnote reference font size too large
    • TD-3318 Chapters at start of page should reflect in header
    • TD-3327 Guide word handling on mirrored pages.
    • TD-3328 Paratext picture export broken
    • TD-3331 Guide word references for every page.
    • TD-3333 Apply filter for pagenumber for Dictionary
    • TD-3345 fix bug causing computer to hang
    • TD-3349 right header contains part of a line
    • TD-3351 Fix apply of fixed line spacing
    • TD-3358 extra page breaks removed
    • TD-3359 Move the publisher
    • TD-3365 Putting page number at bottom leads to hang
    • TD-3367 Libre office hangs for two entries
    • TD-3370 Need to migrate the settings
    • TD-3372 Second copyright removed
    • TD-3373 Picture missing
    • Td-3376 use vertical-pos from-top to avoid hanging
    • TD-3377 Space in before text blocked running header
    • TD-3378 Page set to A4 but came out letter
    • TD-3379 Table of contents not created
    • TD-3380 Picture alignment
    • TD-3381 Header on page 6 didn’t reflect page content
    • TD-3386 Information box wording
    • TD-3387 Use thin space when no caller should be used.
    • TD-3396 Fix left header bug
    • TD-3397 Add Publisher name and logo to Title page
    • TD-3405 Fix picture placement to right of column
    • TD-3407 fqa shows as italic
    • TD-3409 Fix front matter issues
    • TD-3435 Words are broken instead of breaking the line at a space
    • TD-3436 Use Black and white 12mm x 15mm SIL International logo
    • Allow for 2 character language code.
  • Paratext Plugin
    • TD-3276 Trying GoBible option from Paratext
    • TD-3283 Handle discretionary line break (// )
    • TD-3284 Underline Name of diety (\nd )
    • TD-3285 Handle custom styles (such as color)
    • TD-3428 Null Reference if no default font.
  • E-Books and Phones
    • TD-1868 XslProcess improves Epub memory management
    • TD-3321 Pictures not removed
    • TD-3322 Format of Scripture reference in picture caption
    • TD-3324 Use toc1 as book name in TOC
    • TD-3330 Go Bible – Words of Jesus style breaks conversion
    • TD-3335 look for Java in 32 bit and 64 bit locations
    • TD-3338 Exporting Codes project crashes
    • TD-3340 Add Endnotes to toc
    • TD-3341 Link from main text to Endnotes is broken.
    • TD-3342 Put the toc2 field in the End note book reference
    • TD-3390 Epub links to end notes broken
    • TD-3391 Epub Missing Copyright logo image
    • TD-3394 Dictionary for Mids add method to create jar file.
    • TD-3402 Add FixEpub and EpubCheck to installer
    • TD-3433 On Linux Error opening epub
    • TD-3434 Fix error in Linux epub
    • TD-3439 Fix broken Epub links
  • Stylesheet
    • TD-3246 Index error Message
    • TD-3302 Fix One Column Preview
    • TD-3302a UI changes
    • TD-3336 Page numbers do not appear in Libreoffice
    • TD-3393 give Letter and A4 default for Scripture too.
    • TD-3422 Drop cap given 3 lines instead of 2
    • TD-3423 Fix guide words that end with colon
    • TD-3425 Fix footnote markers
    • TD-3426 references used instead of daggers for xref
    • TD-3403 mt, mt1, mt2 all cause page break
    • TD-3427 Keep pictures within the column margins
    • TD-3437 License missing from intended for sale option
    • TD-3442 Indents wrong for entries with pictures
    • TD-3443 Indents of entries with pictures
    • Fix Copyright css
    • Make a best guess for Paratext color values.
    • Update style sheet to handle case where style name is a unit
  • User Interface
    • TD-3266 allow writing to a LocalMachine registry key
    • TD-3326 Add Running Header Dropdown and apply filter
    • TD-3339 ConfigurationTool Display controls on top
    • TD-3350 Descenders are cut off in Configuration Tool
    • TD-3368 Adding a page size
    • TD-3388 ConfigurationTool creates invalid settings
    • TD-3393 move FieldWorks export options to top of the list
    • TD-3431 Linux Custom styles issues fixed
    • TD-3448 Linux set A5 page size
    • added blurb about new preprocessing option
  • XeTeX
    • TD-1283 Xetex page size incorrect
    • TD-2090 font-size: x-small, small, medium, large, x-large, xx-large
    • TD-3352 Copyright Statement Missing
    • TD-3353 Title page is missing publisher
    • TD-3354 Remove extra page number
    • TD-3355 Reversal section has box chars
    • TD-3369 Escape tilde character
    • TD-3406 Reversal guide words not correct
    • TD-3410 Add lettrine package to XeLaTeX making 1.7 build
    • TD-3411 Table of contents empty
    • TD-3412 Page 4 – space above Copyright Information header and left align
    • TD-3413 Guideword content and style
    • TD-3417 Have each book start on a new page
    • TD-3420 picture is too small. Should fit better in column
    • Minor Issue fixed for Xelatex header.

You can use the Download link at pathway.sil.org to get the latest sprint release

Headers not working in Libre Office 4.0.0.3

there is an issue getting the words in the headers to come out with the latest version of Libre Office. Apparently they broke the variables feature of Libre Office. (See: https://bugs.freedesktop.org/show_bug.cgi?id=60886 and http://ask.libreoffice.org/en/question/12160/libreoffice-4003-show-variable-not-working-in/). According to the conversation, the bug is fixed in version from 4.0.2 and they are available on the daily build site.

In any case if you have already installed version 4.0.0 and want to go back, you can uninstall it and install the 3.6.5 version using this link: http://www.oldapps.com/libreoffice.php?old_libreoffice=11815?download

Making header guide words the first entry headword in Libre Office

I have finished a tool that can be used to put the first entry headword on the page into the header guide word when exporting using Libre Office. You will need to download and install OdtXslt from http://code.google.com/p/pathway/downloads/list It will put a batch file on your desktop called ApplyFirstHeadword. The steps to use it are:
1. Run the Pathway export normally
2. When the document loads in Libre Office, insert a space and delete it (so the file will show it needs to be saved).
3. Use File, Preview pages (to force soft page breaks to be inserted).
4. Use File Save and Exit Libre Office
5. Drag the odt onto ApplyFirstHeadword
6. Re-open the odt in Libre Office
This should make the first headword on the page the guide word for that page. Libre Office doesn’t handle this well. This process allows Libre office to insert soft page breaks. Then it uses their locations to help decide which headword needs to be the guide word for that page. Let me know if you have trouble.

Currently this only works for one file. It can be used if both the main and reversal sections are exported but the process would need to be done for the main.odt and the flexrev.odt and in my experience, the flexrev.odt breaks the pages differently when it is loaded separately and when it is loaded as part of main.odm so this process doesn’t work well for that.

Customizing styles

1 Rationale
There are different reasons for wanting to customize the styles used by Pathway. Although some of the Pathway exports allow the styles to be customized after export, it can be tedious to remember for each export to customize the styles. Sometimes multiple styles have to be customized to achieve the desired results. This list is not intended to be comprehensive but rather representative of reasons you may want to customize Pathway styles.

1.1 Use a different style from Flex
On some occasions you may want to see one style on the screen in Flex and another style when exported from Pathway. This can be because the font size for the screen needs to be larger or perhaps you want color for the Flex editing and plan to print using black and white.

1.2 Overcome an export problem
In Flex 7.2.7, the margins of minor entries are not exported from Flex. So even though they look correct on the display in Flex, Pathway is not given the style information needed to make them look the same way on the print export. Similar, many of the default styles in Flex are not exported and don’t appear as you see them on the Flex screen when you output them from Pathway.

1.3 Use a style not supported by Flex
Flex 7.2.7 doesn’t support small capitals but it is supported by Pathway. If you want an abbreviation to appear as a small capital, you would need to add this style as a custom style.

2 Process
There are a number of steps involved. None of these steps take long necessarily but they may not be intuitive.

2.1 Creating a custom style
Pathway installs style files in sub folders of the executable. It is not recommended to the user modify these files. If they are modified, it may block your computer from upgrading your software to a later version.

Rather, create a custom style sheet and insert your custom styles in the custom sheet. To do this you will launch the Configuration Tool and select a style like the one you will want to use and then click the Save As tool bar item to make a copy of it. You can then modify it’s name and adjust any settings that you are allowed to adjust with the user interface.

2.2 Finding custom style
When you close and exit the Configuration Tool the custom style sheet will have been saved. If you are on a Windows Vista, Windows 7 or later, you will find this custom style sheet in a folder in the user profile: C:\Users\<username>\AppData\Local\SIL\Pathway\Dictionary where <username> is replaced with your user name. I sometimes find this folder by typing %tmp%\..\sil\dictionary into the address bar of an explorer window. On Windows XP you will find it in C:\Documents and Settings\<username>\Local Settings\Application Data\SIL\Pathway\Dictionary. On Linux they will be stored in ~/.local/share/SIL/Pathway/Dictionary

2.3 Editing file
As with all css files, this css file can be edited with a common text editor. The @import commands load the css  file given as an argument. If they are available locally they will be loaded first. If not it will look for them in executable folder tree. On Windows 7 64-bit it would load them from C:\Program Files (x86)\SIL\Pathway7\Styles\Dictionary if they are not present in the custom directory.

When the copy is made using Configuration Tool, the file is given a name like: Copy of FieldWorksA4Styles.css Even if you rename it on the info tab of Configuration Tool, the file name is not changed. The DictionaryStyleSettings.xml file in the same folder has the name you gave and the corresponding original css name. Often there is only one css file in this folder so finding the right file is not a problem.

2.4 Identifying location
I recommend inserting your new commands after all the @import specifications and before the other commands. For example, I would insert the custom declarations before the line that begins .letData {

2.5 Selector
The basic format of a declaration in the css file is the selector an open curly brace, the properties and a closing curly brace. You can learn more about css files from http://www.w3schools.com/css In our case, we will normally be including selectors for classes. Selectors for classes begin with a dot (like .letData which is the selector for the letData class.

In order to find out what the class name is, it is helpful to look at the xhtml file with the data. Normally this file is called main.xhtml. So the process is from within Flex put a filter on the data (perhaps all words beginning with the letter a) and then File, Export, Pathway. This will create a smallish main.xhtml and allow you to look at the class names that have been used for the field whose style’s you would like to change.

It can happen that you want to change the style of text with the class name but not all the time. You can do this by specifying a context for the class. The context is a class that contains the class whose style is to be adjusted. So for example, you may want to change the xsensenumber class when it is used in a lexical references but not when it is used for an actual sense. This can be done by giving the lexical reference class followed by the sense number class. (see examples).

2.6 Properties
The property declarations in a css file are the property name followed by a colon followed by the value and finally a semicolon to end the declaration. A list of the css properties can be found at http://www.w3schools.com/cssref/default.asp As you can probably imagine, not all properties apply to Pathway output. Those that don’t apply will generate a warning and be ignored. You can often get a good sense of what Pathway is trying to achieve by opening the main.xhtml with a browser program like Firefox. You will note that there is a meta element at the top of the file that specifies the stylesheet (css) file for Firefox to use when formatting it’s output. Pathway allows the user to specify a stylesheet so you can customize its styles without editing the main.xhtml file.

3 Example(s)

3.1 Minor entry margins
When you realize that a style in Flex has not come out in Pathway, the first thing to do is to look into the main.xhtml to determine its class name. The xhtml file is located in a sub folder of the My Documents folder. On my Windows 7 64 bit computer, the path would follow the pattern: C:\Users\<username>\Documents\Publications\<projectname>\Dictionary\<stylesheet>_<export time>. In this file, I see the minor entry is output using this structure: minor entry format

Note that the headword is tagged with the class name headword-minor. This is a span element which means that it is a sequence of characters. This element is contained in a div element tagged with the minorentries class name. The div tag is used for paragraphs. A property like margins would need to be applied to the paragraph.
Looking at the actual output, we see that the minor entry is indeed exported with the wrong margins. Pressing F11 we can get the style pane to appear. On the style pane we can use the tool bar item with the a to see the character (or span) level styles created by Pathway. Clicking into any location will show the style name used for that sequence of characters.

minor entry LOIf we look back into the folder that contains the main.xhtml, we can find the style sheet (css) file that Pathway generated from the custom style sheet. In looking into that file, we can see the style properties used to format an entry. Note that the declarations later in the file will override those earlier in the file. We will want the same properties to be used for minor entries.

minor entry cssScrolling down a bit in this file would show us that indeed the properties for minor entries are different. But we don’t want to edit this file since it will be generated with a different name the next time a Pathway export is run. Rather we want to modify the custom style sheet in the user’s profile folder. On my Windows 7 64 bit computer it is contained in a folder whose location follows this pattern: C:\Users\<username>\AppData\Local\SIL\Pathway\Dictionary. Inserting the declaration for a minor entry will give a result like this:

minor entry adjusted cssNote the location where the declaration has been inserted as well as how the selector is given with a dot. The curly braces surround the properties. Each property declaration ends with a semicolon. The names or the properties must be valid css property names. The values can use other units. Look up the names and value possibilities using Google if necessary.

3.2 Complex Reference sense number
A careful study of the preview in Flex and the output of Pathway may lead to the observation that the style used on the preview in Flex is not the same as the style used for the Pathway output. For example:

sense ref flexCircled in red is the sense number for a sense of dub; circled in green is the sense number for a lexical relation reference. When these come out of Pathway, the results are not what is expected:

sense ref odtThe first thing to do is to look into the main.xhtml to see what class name is being used. This file is located in the My Documents folder. On my Windows 7 64 bit computer, the path would follow the pattern: C:\Users\<username>\Documents\Publications\<projectname>\Dictionary\<stylesheet>_<export time>.

sense ref xhtmlIn this file, I see the minor entry is output using the following structure. You will note that the xsensenumber that is part of the generic reference doesn’t actually have the parenthesis after it in the output data. This parenthesis is in the css. Since it is following punctuation, it is being inserted by the .xsensereference :after { content “) ”; } declaration. Unfortunately this is being applied to all locations where xsensereference class is used and when it is used as part of a reference, it should not have the parenthesis after it. To remove it we will add a declaration to the custom style sheet. The custom style sheet will be created just as has already been described.

The resulting style file will need to look something like this:

sense ref css

The highlighted declaration will change the punctuation after a sense reference number when it occurs in the context of a lexical reference target to nothing.

User vs. Admin installation problems.

D> Hmm. It appears to be. Odd. Never saw this before. I’ll report that. Other issue: Pathway 1.3.5 pops up the type of export dialog AFTER the various settings dialog, so it fails. Also I can’t set the destination folder because to install the program I had to give the admin user password (I keep myself as non-admin for safety sake). So apparently the installer set Pathway to point to a folder under that admin user account.

G> We had a similar problem on another computer in the FieldWorks lab. What they found there was that if Pathway is run while the computer is in admin mode, then the settings folders are created in a way that doesn’t allow the local user to modify them. The solution was to uninstall Pathway, Then use the Windows explorer to check the C:\Program Files (x86)\SIL\Pathway7 folder. This whole folder tree should have been removed. But if it has been edited or in some other way changed since the install, uninstalling doesn’t remove everything. So Completely remove it by deleting the Pathway7 folder and all sub folder and file. Then make sure the setting files have been removed or renamed. These files are stored in C:\Users\\AppData\Local\SIL\Pathway either rename or delete this pathway folder too so there are no latent settings. Then to be absolutely sure you won’t have any problems check the virtual store at: C:\Users\\AppData\Local\VirtualStore. In this folder tree you should not have Program Files (x86)\SIL\Pathway if you have anything like that there you should delete that too. Once you have a completely clean system, you re-run the installer. It should take care of asking when it needs to go to admin mode. Then make sure you are logged on as a user before running Pathway the first time. Using this process the lab computer was “sanitized” against all the bad problems of admin vs. user files and folder.

D> So if I follow this procedure, and am ready to reinstall Pathway, I install it as a standard user, it will ask for the admin permission. I believe it then installs it as that user. But when I start Paratext and run Pathway the first time, I will be doing it as me. So you are saying the above procedure will solve that?

G> I am not sure it matters whether you run the installer as admin or user. I think what matters is if you run Pathway (after it is installed) as admin. This creates settings files as an admin user that the normal user can’t change.

D> That seemed to install much better this time. (I did not see a virtual path in either my appdata path or the admin’s appdata path.) But I did see a Pathway folder it both. So I took it out of both places.