Printing Dictionaries With WeSay

There are many ways to make a print dictionary using WeSay. Below, they are ordered from most powerful/flexible down to the most simple. You might end up using a combination of methods. For example, you might use the “Make PDF Dictionary” for regular printouts used to include a wider group of people in the process of spell checking, example checking, etc., using paper. Later, when you want to actually publish a dictionary, you’re likely to want to import the WeSay dictionary into our Linguist-oriented power tool, FLEx.

FLEx+PathWay (most powerful)

This has many steps, but it is best path for serious dictionary layout. You’ll be using two other free programs from SIL International: FLEx and PathWay. You may also need some supported word processor, depending on how you want to publish.

1) Install FieldWorks Language Explorer (FLEx)

2) Install the Pathway add-on to FLEx.

3) Create a new project (Note: in FLEx 7.3 you will be able to do steps 3 & 4 together.

4) Do a Send/Receive to synchronize your WeSay dictionary with FLEx. (You can also just do an import, but then any changes you make in FLEx won’t get back to WeSay).

5) In the Dictionary area of the FLEx lexicon, configure to your heart’s desire. At this point you can do some printing if you want.

6) Choose File: Export…

7) Select “Dictionary, Reversal Index”, and click “Export…”.

This will open Pathway, which will let you create files for Adobe In Design, Word, Open/Libre Office, PDF, and E-Book.

Make OpenOffice Document

One advantage of using OpenOffice/LibreOffice is that you can add a cover page and make other changes. Another is that it supports a wide range of scripts, including those in South East Asia. The downside is that the code that does this was contributed to us, and tends to not get much attention from the WeSay programmers. To use it, just make the the “Make OpenOffice Document” button visible in WeSay, using the WeSay Configuration Tool : Actions tab.

Lexique Pro via SFM

Lexique Pro is a separate free program (Windows Only) which can export to word processing programs, and also to make static web pages. In this method you use WeSay’s “Export a SFM (Toolbox) file” button, and then open the the SFM file it produces in Lexique Pro.

The “Open in Lexique Pro” Button

This is a simple, one-button way to get into LP. Unfortunately, as of writing this in Jan 2013, several of LP’s features have not yet been upgraded to work with LIFT dictionaries (the xml format used by WeSay).

The “Make PDF Dictionary” Button (most simple)

The advantage of this approach is that it is fast, easy, and fairly good looking. Disadvantages include:

  • Because it is PDF, you can’t make changes, add title pages, etc.
  • Making even small tweaks requires someone proficient in the style-sheet language of the Web, Cascading Style Sheets (css).
  • This feature uses a fantastic pdf-creation engine which you can install freely. This engine, PrinceXml, (as of version 8.1) cannot render Burmese, Khmer, or Lanna. It does support Arabic, Chinese, Japanese, Cyrillic, Hebrew, Devanagari/Hindi, Bengali, Gurmukhi/Punjabi, Gujarati, Oriya, Tamil, Telugu, Kannada, and Malayalam.

Image:PrintFromDashboard.png

“Under the hood”, WeSay uses an engine called “Prince Xml” for creating pdf documents. You can download it for free, but if you use this feature for any commercial purposes, you’ll need to get a license from the authors of PrinceXml. Here’s what the output looks like:

Note: while PrinceXml itself is extremely flexible and powerful, WeSay only uses it for printouts using just the most common fields. If you need more power, you need to go the FLEx+PathWay route described previously.

To enable this feature,

  1. Quit WeSay
  2. Go to princexml.com, get PrinceXml, and install it
  3. In the WeSay Configuration Tool, go to Actions, and enable the “Make PDF Dictionary” button.

Multigraphs

Starting with version 1.1, if you have digraphs (or trigraphs) that you would like to group together, do this:

  1. Ensure that the sort order you’ve set up accounts for the multigraphs
  2. Create a text file named “multigraphs.txt” in the export folder.
  3. In that file, list your multigraphs, one per line, like this:
ch
th
ng

Customizing

If you like what comes out, great. If you want to do some tweaking, then look in the Export folder of your WeSay project. There, you’ll see two files which you can edit: “customLayout.css” and “customFonts.css”. These are simply “Cascading Stylesheet” (CSS3) files. The web is full of free references and tutorials on CSS. The way this works is that WeSay first generates a “plift” xml file (also in this exports directory). It then converts that to xhtml. Finally, asks PrinceXML to create the PDF, using the four stylesheets. The precedence of these is such that the “custom” ones overrule the “auto” ones.

If you have custom fields you want to print, you’ll need to add those to the customLayout.css. TODO: show how.

Note, if you find that you need extensive customizations, you’re probably better off using FLEx+PathWay to do your actual printing. Again, this built-in printing is only intended to be good enough for quick printouts that you can hand out for checking in the community.

PrinceXml Version

The most recent version of PrinceXml with which we have tested WeSay is 8.1.