Again, a question that is not really about XMLmind, but rather about a 
converter: in this case the conversion process to RTF.  If this isn't 
the right forum, can you please direct me where to ask or find out.

I've modified our local style sheet (that converts from DocBook to FO, 
if I understand the process correctly) to use a different font as follows:
   <xsl:param name="body.font.family" select="'Doulos SIL'"/>
A side effect of this is that after the conversion, Word is using a 
rather large spacing between lines.  I suspect it's doing this because 
the SIL font is for IPA characters, and some of these are extra-high, so 
the font tells Word to reserve some extra vertical space just in case. 
But we're not using any of those tall characters, so the spacing just 
makes the paragraphs look odd.

I can fix the spacing problem in Word if I change the line spacing in 
the paragraphs from "single" to "exactly 15 points".

But I says to myself, "Now that's the sort of thing you should be able 
to set in a style sheet", says I.  So I goes in and edits our style 
sheet some more, adding:

<xsl:attribute-set name="root.properties">
   <xsl:attribute name="line-height">15pt</xsl:attribute>
</xsl:attribute-set>

(The "normal" font is 12 points, and I know I should set the height to a 
multiple of the current font size, but so far I'm just experimenting.)

This doesn't work.  Word no longer uses "single" spacing, to be sure, 
but instead of "exactly 15 points" it chooses "at least 15 points."  The 
result is exactly the same as if I had chosen "single" for spacing.  And 
of course there's nothing in the style sheet that makes the same 
distinction as Word's "exactly" vs. "at least" (at least, I don't think 
there's anything there).

My guess is that this choice of "at least" happens in the conversion 
from FO to RTF.  But I didn't find any documentation about any way to 
adjust the FO to RTF converter at the XMLmind site (one of the things I 
checked was the User's guide to the XMLmind FO Converter).

Suggestions?  Is there some flag for the converter from FO to RTF that I 
can set, or something in our style sheet?

OK, Microsoft actually tells how to do this: the RTF code for inter-line 
distance is \sl.  With a positive number following it, this is 
interpreted as "at least N", whereas with a negative number following it 
means "exactly |N|" (the absolute value of N, measured in some units 
that appear to be 1/20th of a point).  So I guess I could send the RTF 
file that XML mind produces through the Unix 'sed' command and insert a 
minus sign.  That is called a kludge, but it would work.  Is there a 
better way?

(Incidentally, I'm using the DocBook style sheet from 
docbook.sourceforge.net, rather than the one that comes with XMLmind. 
That seems to be necessitated by the fact that we're using some 
extensions for Literate Programming that also come from sourceforge.  I 
suspect I could work around those problems, but I'm trying to limit 
myself to one problem at a time...)
-- 
        Mike Maxwell
        maxwell at umiacs.umd.edu
        "Theorists...have merely to lock themselves in a room
        with a blackboard and coffee maker to conduct their business."
        --Bruce A. Schumm, Deep Down Things

Reply via email to