Jump to content


Photo

Index Problems in RTF Files Revisited


  • Please log in to reply
24 replies to this topic

#21 Renee Zamora

Renee Zamora

    Advanced Member

  • Support
  • PipPipPip
  • 8470 posts

Posted 30 September 2010 - 09:40 AM

Renee, if I click Print and then Properties, I have no duplex option. That's for the simple reason that my printer will not do duplex printing. I print a master report one-sided and take it to a print shop to get the double sided copies made.

But duplex printing really isn't the issue. The issue is gutter control. In order to bind the reports properly after they are printed as double sided copies, the inside margin has to be larger than the outside margin. For the odd pages, the inside margin is the left margin and the outside margin is the right margin. For the even pages, the inside margin is the right margin and the outside margin is the left margin. That's what gutter control does.

I print with a 0.75 inch margin plus a 0.5 inch gutter. That makes the inside margin really be 1.25 inches and the outside margin really be 0.75 inches. Gutter control adjusts the right and left margins to be appropriate for even and odd pages. That's one of several reasons I print from Word rather than from RM4. Word supports gutter control and RM4 does not. But even if RM4 had gutter control, I would still want to print from Word rather than from RM4 for other reasons.

Jerry

Sorry, I failed to mention earlier that I included the need for gutter control in our tracking system.
Renee
RootsMagic

#22 Renee Zamora

Renee Zamora

    Advanced Member

  • Support
  • PipPipPip
  • 8470 posts

Posted 30 September 2010 - 09:51 AM

Renee, here's one more thing about being able to reproduce the problem. Even after creating the RTF file and opening it with Microsoft Word, the problem may not really be visible immediately. To make it visible, you probably have to do a CTL-A to select all the text in the document and then do an F9 to rebuild the indexes.

Thanks Jerry, I forgot to rebuild the indexes. I am now able to reproduce the issue.
Renee
RootsMagic

#23 Don Newcomb

Don Newcomb

    Advanced Member

  • Members
  • PipPipPip
  • 1045 posts

Posted 04 October 2010 - 08:32 AM

I'd just like to mention that, for me, this is a rather happy problem. Back in the FO days, the RTF versions of reports were just text. The superscript reference numbers were just superscript numbers. The endnotes were just more text. The formating was just character formating, there were no paragraphs, sections, etc. That was one issue I complained about.

#24 fbumann

fbumann

    New Member

  • Members
  • Pip
  • 2 posts

Posted 06 October 2010 - 12:01 AM

Thanks Jerry, I forgot to rebuild the indexes. I am now able to reproduce the issue.


I can't get the index to generate. I did the ctrl-A and it did select everything, but F9 did nothing. I've written so many books successfully in RM3 that this has me puzzled.

#25 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3589 posts

Posted 12 October 2010 - 09:32 PM

It is two weeks from the main family reunion for which I produce a narrative report each year, and I am having my annual battle with RM with respect to getting the report to look the way I want it to look.


Here's a little post mortem on my family reunion project. For the most part, I ended up being a happy camper.

1. With respect to the problem of blanks at the beginning of fact sentences that followed another fact with a note terminated by two hard returns, I edited the RTF file with a text editor. It was necessary to make such changes prior to doing any processing of the file at all with Microsoft Word.

I didn't really want to use a text editor. I really just wanted to use Word itself. It would seem natural in Word just to do a global Replace of a "paragraph mark followed by blank" with "paragraph mark". And indeed, you can do a Find on "paragraph mark followed by blank", but the replace doesn't work. The problem seems to be that there is a lot of invisible metadata between the paragraph mark and the subsequent blank. Indeed, that's where a lot of the {XE} index entries are stored.

With a text editor processing the RTF file, I discovered that the last metadata before the blank that I needed to delete was an RTF \vertalt tag. The \vertalt tag was always followed by two blanks, the first of which was metadata to terminate the \vertalt flag and the second of which was the evil blank to be squashed. So I replaced \vertaltbb with \vertaltb. Many hundreds of evil blanks at the beginning of the line were squashed. The only problem was that there were a few cases, maybe a dozen or so where \vertalt appeared at the end of some metadata and the metadata did not include a paragraph mark. These blanks should not have been replaced, but there were few enough of them that I could easily fix them by hand after the global replace. By the way, the \vertalt tag has nothing whatsoever to do with going to a new line or a new paragraph. It's just that the \vertalt tag was the last RTF tag before the blank that needed to be deleted.

2. All remaining editing was done in Word itself. Here I used global replace to get rid of much excessive vertical white space: a) Replace manual line break, manual line break, paragraph mark with manual line break, paragraph mark, b) Replace paragraph mark, paragraph mark with paragraph mark. Repeat until all double paragraph marks are gone. This cut about 10 pages out of my report, and made it look a lot better. With further study and a little more time, I could have gotten rid of a little more excessive vertical white space.

3. I fixed the erroneous trailing blanks in all the [XE} index entries. a) Click the paragraph symbol in the ribbon to display the {XE} entries. b) replace all instances of b"b\fb with "b\fb c) Click the paragraph symbol in the ribbon again to hide the {XE} entries.

4. I regenerated the indexes according to the Rootsmagic knowledge base as described below. Once steps #1 through #4 are completed, steps #5 and #6 can be repeated as many times as you wish if you make additional changes to the document. But I wanted to comment on what steps #2 through #4 actually do. The best I can tell, they correct for one of the most irrational software design decisions that Microsoft has ever made. As a matter of background, the software world is moving away from explicitly marking text text as bold or as italics or as 14 point size etc. and it's moving away from concepts such as hard returns. Rather, the software world is moving to style sheets. I love style sheets on the Web, and my own personal Web site is 100% controlled with style sheets. But it's a different way of thinking. You mark text as section heading or as emphasized or as a new paragraph etc. Then, your style sheet might say that section headings are 14 point bold and that emphasized text is bold with a yellow background and that new paragraphs always double spaced etc. You can change the whole look of your document by changing your style sheet, and nothing in your actual text actually has to have changed. It's pretty slick if you really embrace it. What steps #2 through #4 seem to be doing is to set the indexes into a style known as Simple. Microsoft provided styles have names such as Manuscript, Fancy, Formal, Modern, Traditional, Word 2003, Word 2007, etc. The evil one happens to be the Word 2007 style, and it's also the default style if you are using Word 2007. It's evil because it turns hard returns into paragraph marks, and it turns paragraph marks into double spacing. The problem is that I almost nearly need to do both double and single spacing within the same document, and I've never figured out how to get single spacing within the Word 2007 style. In addition, Microsoft Outlook uses Microsoft Word as its editor. I've done everything I know how to do to turn off the Word 2007 style in Outlook, but the darn thing keeps turning itself back on from time to time. The problem with the Word 2007 style and RTF files created by RM4 is that the Word 2007 style causes every line of indexes to be double spaced. Hence, the knowledge base article is providing instructions on how to turn off the Word 2007 style and replace it by the Simple style. Yeah! The only problem I still have is that the Simple style puts the index into Calibri font, no matter what font the rest of the document is in and no matter what font I specified for the indexes in RM4. Trying to fix the font in the index just seems to destroy my document, so for now I've learned to accept Calibri in the indexes and be a happy camper.




Knowledge base article

1. Create the RTF file from RM4 (RM4 opens the RTF file in your default editor for that file type - mine is set to Word.)
2. Click on Reference tab, Insert indexes.
2.a. Click the Format drop list and select Simple
2.b. Click Right align page numbers and select Tab leader type dots.
2.c. Confirm type (Indented), and number of columns which should match settings in RM4.
2.d. Click OK.
3. In the "Do you want to replace the selected index?" dialog, click No.
4. Remove text string "No index entries found." that was added to the document.
5. Press Ctrl+A to select all the text in the document.
6. Press F9 to refresh/update the indexes, with right-aligned page numbers.


Jerry Bryan