Telling SILAS where to break section headings

1 view
Skip to first unread message

JimH

unread,
Mar 19, 2009, 7:01:12 PM3/19/09
to silas-talk
A SILAS user has asked:

> I would like to locate all section headings
> that are longer than one line
> so I can decide one by one .(like FindNext)
> where I want to insert a ^l break.
> I don't want of course to put two \s lines in Paratext
> because of the line spacing.
>
> Or would you suggest to use right away in PT
> fields like \s3 (first line) and \s4 (second line) for those headings,
> so that I can easily adapt the styles in Word?
>
What I have done in the past is to attach SILAS to the document and
format for printing, then search for all the section headings, and for
those that are long enough for the line to break, I put in a manual
line break (Shift-Enter). Of course, this has to be done each time I
export a file from Paratext for printing.

USFM supports a discretionary line break code (//), as described in
the USFM manual version 2.2 that you can download from the SILAS web
page;
http://code.google.com/p/silas/downloads/list

You could put those in long section headings in the Paratext files,
and when they come through into the RTF file and you format the file
with SILAS, search for the "// " sequence and replace each one with
the manual line break code, ^l.

Word doesn't support any discretionary line break, so there's no way
for SILAS to convert // into what you want.

The user didn't want to put a \s code in the middle of a long section
heading, because that causes the spacing that usually occurs above and
below a section heading to occur between the two lines. But in my copy
of SILAS, I have just changed the style "_Heading_Base" and turned on
the property:
"Don't add space between paragraphs of the same style"
The change to the base style flows through to all styles based on it,
and the style coming from \s is one of those. So I can put \s in the
middle of a long section heading and there is no space between the two
lines once SILAS is attached.

We could add that to the style in SILAS, but it doesn't exist in
versions of Word before 2002 (ie. Word XP), so I don't want to do
that.

I've just found out (with a little help from google) a way for a Word
macro to find out how many lines a paragraph occupies,
(Selection.Information()), so I am planning to make SILAS convert //
into ^l if the paragraph occupies more than one line in the current
formatting.

Your thoughts?
Jim

Kim Blewett (gm)

unread,
Mar 19, 2009, 8:46:12 PM3/19/09
to silas...@googlegroups.com
A couple of thoughts:


JimH wrote:
A SILAS user has asked:

  
I would like to locate all section headings
that are longer than one line
so I can decide one by one .(like FindNext)
where I want to insert a ^l break.
I don't want of course to put two \s lines in Paratext
because of the line spacing.

Or would you suggest to use right away in PT
fields like \s3 (first line) and \s4 (second line) for those headings,
so that I can easily adapt the styles in Word?
    
What about using \s as normal for the first line, and \s3 for the second line of these headings (no space above--is it possible to set a negative space above if the \s style has space after?)? But it's probably harder for Silas to join paragraphs if the result will occupy one line than your suggestion below...
I like this idea. Remember to delete the // if the paragraph is only one line!

Or have Word do as you state, but pause/stop to let the user decide what to do if a // is not present. Then people don't need to put the discretionary mark into PT to have some control in Silas. The macro would possibly need to quit if it doesn't find a //;  the user would do whatever, and then run it again to find the next long paragraph. Good candidate for a button, for those who don't like keyboard shortcuts.

Kim


Your thoughts?
   Jim



  
Reply all
Reply to author
Forward
0 new messages