Jump to content


Photo

Index

How to remove \f A

  • Please log in to reply
13 replies to this topic

#1 Wally

Wally

    New Member

  • Members
  • Pip
  • 2 posts

Posted 10 February 2015 - 09:43 AM

I'm the new boy in town, just gone from TMG (8 years) and into Roots Magic 7 ok. I have done a Narrative Report - generate report - Save -Rich-text-file (RTF), from here into Microsoft word (insert text from file), that's ok

 

I will move the index away - and have a new page (mt) at the top have a break - then make 2 column pages, then and the info, ok

 

I will go to the index and click ok, my info is ok but Roots Magic index is gone.

 

I had a look at the background  {xe "SMITH:John " \f A} and found that if I take \f A off, the index is ok. I want to known how to take the \f A from Roots Magic

 

 

Thankyou



#2 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6214 posts

Posted 10 February 2015 - 10:22 AM

This older discussion may have some interest for you. There is no control within RootsMagic over the RTF syntax. You could use a text editor on the RTF file to delete all occurrences of "\f A".


Tom user of RM7550 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.


#3 Wally

Wally

    New Member

  • Members
  • Pip
  • 2 posts

Posted 10 February 2015 - 11:23 AM

Hi

 

TomH

 

Thankyou

 

I look around and found Find & Relace on Microsoft - \f A - replace all - ok, then did the index, ok.

 

It's called learning

 

 

Thanks



#4 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3531 posts

Posted 10 February 2015 - 02:23 PM

The bigger picture is that Microsoft Word supports multiple indexes, and the RTF file that RM is creating is taking advantage of that fact.

 

Suppose you were creating indexes totally manually in a Word document. In a totally manual world, you have to insert the XE entries manually. And if you want to create multiple indexes, you have to include in each XE entry the identifier for which index the XE entry goes with - such as "this text goes into the name index", "this text goes into the place index", etc. I have seen documents created totally in Word which have five or six indexes. These identifiers I'm talking about are totally internal to Microsoft Word. You do have to type them in to the XE entries when doing manual entry, but you do not see the identifiers in the final camera ready document.

 

In the case of RM, it is RM that produces the XE entries for you. RM produces an identifier of A in the XE entries for the Name Index and an identifier of B in the index entries for the Place Index. That's why you were seeing the A things in your XE entries.

 

I have to admit to being very confused about what it was about what didn't work in your index and why removing the A identifiers fixed it. I nearly always have to regenerate my indexes in Word after editing the file. But that's just a pagination issue that doesn't explain your problem. That is, when I edit an RTF file produced by RM it is usually the case that some text gets moved from one page to another. Also, there is a bug in all XE entries produced by RM wherein there is an extra blank after the XE identifier that shouldn't be there. The bug of the extra blank usually doesn't cause any problems in the Name index. It produces horrible  problems in the Place index, and I solve the problem by removing the extra blank from all the XE entries in both indexes using a text editor.

 

Jerry

 

 



#5 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6214 posts

Posted 10 February 2015 - 03:20 PM

I'm confused, too. I deleted "\\f A" from a narrative report RTF file and Word had an error in place of the Index. But updating the fields of the original Index also produced a very undesirable result - double columns instead of one, much repetition and gross spacing. That was with MS Word 2010 in Compatibility Mode.  


Tom user of RM7550 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.


#6 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3531 posts

Posted 10 February 2015 - 07:12 PM

When I regenerate indexes in an RTF file produced by RM, I first have to change the style to 2003 style. Otherwise, the columns and spacing of the index are all wrong. Having changed the style, the indexes regenerate just fine.

 

As I have mentioned on these forums before, styles in Microsoft Word are a great mystery to me even though I understand styles in HTML extremely well. The concepts should be very similar, but Microsoft hides what's going on so thoroughly that it can be very hard for a simple country boy like me to figure it out.

 

Jerry



#7 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6214 posts

Posted 10 February 2015 - 10:18 PM

I selected the whole doc in Word 2010, set the style to Word 2003 and it still blows up:

 

From:

Wellington Co.

Palmerston . . . 16

Palmerston Cemetery

WW4341 Section L . . . 12, 4

To:

Wellington Co.

Palmerston

Palmerston Cemetery

WW4341 Section L................ 1, 2, 4

Palmerston............................................ 1

Palmerston............................................ 1

Palmerston............................................ 1

Palmerston............................................ 2

Palmerston............................................ 2

Palmerston............................................ 2

Palmerston............................................ 2

Palmerston............................................ 2

Palmerston............................................ 3

Palmerston............................................ 4

Palmerston............................................ 4

Palmerston............................................ 4

Palmerston............................................ 4

Palmerston............................................ 4

Palmerston............................................ 4

Palmerston............................................ 6

Palmerston............................................ 6

 

Indentation for the second set was lost in the copy/paste to this message but you get the idea. The original grouped all the references to Palmerston under one entry; the update by Word ungrouped them.

 

Maybe I'm missing something in the procedure...


Tom user of RM7550 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.


#8 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3531 posts

Posted 11 February 2015 - 12:11 AM

I think you got bit by the "blank character after the B in the XE entry" bug that I have talked about so much.

 

Try the following. Recreate the RTF file. Don't open it just yet in Word, or if you do, don't save it from Word just yet  (even if you are just using Word to look at the document). Instead, open the RTF file in a powerful text editor of your choice (e.g., Notepad++). Change all occurrences of "\xef66 " (without the quotes) to "\xef66" (without the quotes). In other words, delete the blank after the \xe66. That will take care of the Place Index. You can do the same thing with the Name Index if you wish. The equivalent string for the Name Index is \xe65. However, the Name Index is not likely to blow up on you whether you fix it or not, but the Place Index generally will blow up on you if you don't fix it.

 

The "f65" thing is RTF's quaint way of denoting the capital letter A as the identifier of the first index (the Name Index in this case), and the "f66" thing is RTF's quaint way of denoting the capital letter B as the identifier of the second index (the Place Index in this case). That's because 65 and 66 are the decimal codes in ASCII and UTF8 for the capital letters A and B, respectively.

 

In your example, the Place Index is blowing up on Palmerston because there is indentation below Palmerston and then it returns to Palmerston for more indexing. I don't know what another town in Wellington County would be, but let's pretend it's the town of Quincy. If the next entry in the index after WW4341 Section L were Quincy instead of Palmerston again, all would be well and you would never know that there is a bug. But because the next index in the index is Palmerston again (this time without a further subdivision), Word gets confused and the index blows up.

 

The eternal finger pointing question is whether the bug is in Word or if the bug is in RM's RTF file. I have no idea where the bug is. Maybe it should be considered to be in both places. All I know is that I can't do anything about Word, and I can get rid of that hateful blank after the \xe66. So that's what I do. Both the problem and the fix were reported in RM4 and never have been addressed. The bug did not exist in any version of FO, nor in RM1, RM2, or RM3. The bug has been there in RM4, RM5, RM6, and RM7.

 

I'm not sure this is the only order which will work, but I always get rid of the blank in the XE entries first, apply the Word 2003 style second, and rebuild the indexes last. Well, I may rebuild the indexes multiple times depending on how much editing I do, but the indexes are always rebuilt last.

 

Jerry



#9 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3531 posts

Posted 13 February 2015 - 02:04 PM

Normally, I wouldn't follow up with this question. But I was just curious if TomH tried getting rid of the blank after the index identifier to see if that took care of his RM Place Index that was formatted incorrectly. In my experience, that's the most critical item that has to be taken care of.

 

As I indicated in my previous message, the blanks are only one of several items that have to be taken care of in order for RM's Place Index to be formatted correctly by Microsoft Word. I truly believe that Microsoft Word's support for indexes is deeply flawed. It can only be made to work by taking enormous care and attending to extraordinary levels of detail. Rabbit's feet and other such talismans have also been known to help. It often seems that results simply aren't repeatable. So I was curious of TomH had gotten it to work.

 

Jerry



#10 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6214 posts

Posted 13 February 2015 - 09:52 PM

Sorry to say, Jerry, that I have no trailing blanks, only the "}" character after "\xef65" and "\xef66". That is with an Ancestor narrative. The Indexes were set to two columns, that is what is seen in the Report Viewer but MS Word shows them single column. If I "update field", Word 2010 converts them to two column but ungroups per your indent thingy description and blows up the format (larger fonts and spacing) and loses colour coding; same thing when style set to Word 2003.

 

So why do you get trailing blanks and me not?

 

Fixing the ungrouping problem requires a different solution...


Tom user of RM7550 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.


#11 kbens0n

kbens0n

    Advanced Member

  • Members
  • PipPipPip
  • 3449 posts

Posted 14 February 2015 - 03:55 AM

So why do you get trailing blanks and me not?


He ~may~ have meant "blank before the trailing double quote in the XE entry" (ie. leading space)

http://forums.rootsm...orting/?p=48951

---
--- "GENEALOGY, n. An account of one's descent from an ancestor who did not particularly care to trace his own." - Ambrose Bierce
--- "The trouble ain't what people don't know, it's what they know that ain't so." - Josh Billings
---Ô¿Ô---
K e V i N


#12 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3531 posts

Posted 14 February 2015 - 08:11 AM

He ~may~ have meant "blank before the trailing double quote in the XE entry" (ie. leading space)

http://forums.rootsm...orting/?p=48951

 

Well, don't I feel like an idiot, Kevin is correct. To double check myself, I just now went back to the script I use to clean things up. The blank it deletes is before, not after. Sorry. Could you try again?

 

If you look in the RTF file, you need to replace b\xef65 with \xef65, and you need to replace b\xef66 with \xef66. If you prefer to do the work in Word, this is a case where you can fix it in Word. However, some global replaces with Word will not work if special characters are involved. That's because when you click on the backwards P thing to be able to see the special characters, a string of special characters you wish to find sometimes will no longer be adjacent because of intervening XE entries and that sort of thing. In Word, you need to replace b\fbA with \fbA and b\fbB with \fbB

 

Jerry



#13 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6214 posts

Posted 14 February 2015 - 09:36 AM

Coincidentally, I theorized that you might have got it backwards and had deleted the leading blank using PSPad. On opening with Word, it reported a "cannot complete - not enough memory" error. Where the index was to begin was a block of hex data.

 

Edit 1: I just now did the global search/replace using MS Word. The indexes behave the same as if I had done nothing. Unclear why the PSPad operations resulted in a problem - same numbers of A and B phrases were replaced.

 

So I still have these issue of ungrouping of places and format follies that don't respond to the treatment that Jerry found was successful with his reports. 

 

Edit 2: Success! Using Notepad++, while the format does change, places remain grouped. Repeated with Word 2010 and places became ungrouped. And it appears that PSPad corrupts the RTF file somehow.  


Edited by TomH, 14 February 2015 - 02:39 PM.

Tom user of RM7550 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.


#14 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3531 posts

Posted 14 February 2015 - 05:33 PM

Now that I feel like a complete idiot, I might as well go whole hog and correct my other mistake. From within Word itself (and in Word's version of Reveal Codes), the global replacement to fix the index entries is as follows.  For the Name Index (usually not critical to fix), replace b"b\fbA with "b\fbA, and for the Place Index (usually critical to fix) replace b"b\fbB with "b\fbB. I'm using b to represent the blank character. The quote mark is a part of the search and replace strings, so this is not a "without the quotes" situation.

 

The blank is being removed from the front of the replace string. But in fact, the reason the blank can be a problem when Word is trying to format an index is that the blank is at the end of the name or place being indexed. So if the index is for John Doe and if the name is reversed in the index, then the character string being indexed is Doe,bJohnb. It's that trailing blank that shouldn't be there and that is causing the index to be formatted incorrectly by Word. And it's the trailing blank that's the bug, either in RM or in Word or both.

 

The way I have constructed the search and replace strings both for the RTF file and for Word is a trick to avoid having to know the character strings for all the items being indexed. Which is to say, the character strings being indexed are all followed immediately by the \f code and the ID for the index - A for the name index and B for the place index. So the \f code and the index names can be used to construct the necessary search and replace strings.

 

Jerry