Jump to content


Photo

Formatting of RTF


  • Please log in to reply
10 replies to this topic

#1 Dick-TMG

Dick-TMG

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 19 December 2014 - 01:52 PM

I am currently converting all TMG data to RM7. I am trying to port an RM7 narrative to word using the RTF format. When I do I find that all paragraphs are started with a line-feed character and not the Paragraph feed that word is looking for. The report does have the correct Para line feed after the title. Can I get the same Para line feed after each paragraph instead of the Line feed.? Word does  not work well in formatting with the line feed. I cannot indent the first line in a paragraph currently.



#2 Renee Zamora

Renee Zamora

    Advanced Member

  • Support
  • PipPipPip
  • 8316 posts

Posted 22 December 2014 - 10:40 AM

I don't know what the difference is between a line-feed character and a paragraph feed. Seems like no one else did either. It's probably best to open a support ticket and submit a backup of your database and the narrative report. If you could give screen shots of where you feel the errors are then that would be helpful.

 

http://support.roots...us_requests/new


Renee
RootsMagic

#3 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3410 posts

Posted 22 December 2014 - 12:18 PM

I don't know what the difference is between a line-feed character and a paragraph feed. Seems like no one else did either. 

 

Well, I understand the issue at least a little bit, but I was hoping somebody more knowledgeable would respond first.
 
When RM produces an RTF file, it can use either the \par tag or the \vertalt tag in the RTF file to go to a new line. Generally speaking, RM uses the \par tag to go to a new line when it "knows" it is going to a new paragraph. But when RM is rendering a user's note and the note includes a carriage return return to force a new paragraph, RM doesn't "know" that it's a new paragraph and only knows it's a new line. So RM converts the user's carriage return into the \vertalt tag.
 
The behavior of the \par tag and the \vertalt tag are very different. The \vertalt tag just blindly goes to a new line. The \par tag very intelligently goes to a new paragraph depending on the paragraph settings in the user's current style. For example, paragraphs can have varying amounts of indentation, including no indentation or "reverse" or hanging indentation. Also, paragraphs can have varying amounts of white space between paragraphs including blank lines, half blank lines, and no blank lines.
 
It sounds like the request is to have the user's carriage return in a note be output as the \par tag in the RTF file rather than as the \vertalt tag. I'm not quite sure what the consequences would be. It might work great, or there might be some unfortunate side effects. It should be possible to experiment by editing the RTF file with a simple text editor such as Notepad before opening it with Microsoft Word, and using Notepad or other text editor to replace all the \vertalt tags with \par tags. There is no guarantee that the results will be desirable, but it would be an easy test to try. When I have played with this in the past, the results were not the best because you really sort of need to replace some but not all of the \vertalt tags with \par tags to make the output look nice. The trick is knowing which ones to replace and which ones not to replace.
 
This business of formatting paragraphs gets caught up in the whole notion of styles. It used to be that you made a paragraph by hitting the carriage return key a couple of times, and that was that. But proper paragraphing can be much more complicated than that. I'm very fluent with how styles work in things like HTML and TeX. TeX is a rather old fashioned publishing tool that is used to format mathematical and scientific text (including equations) for publication in journals. Nearly every journal has a different style (fonts, paragraphing, etc.), and they will take your TeX file and apply their style file to it. Similarly, with HTML and styles, you don't format text in terms of fonts and new lines and bold and italics and colors and things like that. Rather, you format text in terms of heading and normal text, emphasized or not emphasized text, the beginning and ending of divisions and paragraphs, etc., and there is a style library that maps these more abstract concepts into the actual fonts, colors, bold, italics, etc. You can change the entire look and feel of a Web site by changing its style library without changing any of its HTML.
 
I confess that even though I am fluent with styles in HTML and TeX, the way Microsoft Word implements styles has always defeated me. Microsoft tries to make things really simple and idiot proof for the user. But for me, when they do so they simply make the software incomprehensible and unusable because it so untransparent how it works. So these \vertalt and \par tag things that RM puts into RTF files get caught up in the Microsoft world of styles. And indeed, starting with RM4, RM also includes a style library at the beginning of the RTF file that I totally can't figure out. I could understand the RTF files from Family Origins and from RM1, RM2, and RM3. But no more.
 
You will never see the \vertalt and \par tag things in an RTF file unless you open it with a text editor. Within Microsoft Word itself, you can see the results of the \vertalt and \par tag things by doing the Microsoft Word version of "reveal codes" (click the backwards paragraph symbol in the tool bar), which is a pitiful substitute for the excellent "reveal codes" that's available in WordPerfect. But sadly, Word has largely replaced WordPefect and nearly everybody now uses Word instead (including me).
 
Jerry


#4 Dick-TMG

Dick-TMG

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 22 December 2014 - 02:38 PM

Jerry and Renee,

 

I just looked at an RM7 rtf file in notepad. The information is buried in there somewhere but it would be like looking for a needle in a haystack.

 

If I understand your codes a \vertalt would just move to the next line left justified whereas the \par would actually indicate the end of a paragraph. The way it looks in word is everything about a person is considered one paragraph and many formatting options are therefore negated in word

 

The example I am looking at is:

 

New paragraph after notes was selected, Include private facts.

 

The result opened in word is:

 

 

 

First Generation

 

 

1.  Phoebe Britton was born on 25 Jan 1778 in Cambridge, Middlesex, Massachusetts.13 could also be Springfield Vt  newline arrow

She was also known as Phoebe Adams on 3 Jun 1793.
She died on 20 May 1847 at the age of 69 in Springfield, Vermont.13  newline arrow

 

 . Her place of death could also be Cambridge, Mass.  newline arrow

 Phoebe has reference number 36.

 

There is a new paragraph just after the 36 above but could not seem to get the paragraph marker to stay there in the forum. I was assuming that if I requested a new paragraph after every event that the new paragraph symbol would appear after every event and not just at the end of a person or generation.

 

The new lines caused by the new line character may go on for pages until a new generation is found or a new subject is found. Only then do I see the new paragraph marker. I was thinking that if I request a new paragraph at the end of an event with the notes then it should be possible to insert the same character that is used by RM7 at the end of the main subjects line and use the new line character elsewhere so that I can get a new paragraph in word at the end of every fact, in this case.

 

I have not been looking at raw data in quite awhile so I hope I haven't confused you.

 

If there is another word processor that interprets the codes correctly I would be willing to start over with a new word processor.



#5 Renee Zamora

Renee Zamora

    Advanced Member

  • Support
  • PipPipPip
  • 8316 posts

Posted 22 December 2014 - 03:44 PM

Confirming issue noted in tracking system.


Renee
RootsMagic

#6 Nettie

Nettie

    Advanced Member

  • Members
  • PipPipPip
  • 1618 posts

Posted 23 December 2014 - 08:34 AM

I use replacement items in Word like control + H and down at the bottom of the extended box  is Special. I use manual line break = ^| [the curve arrow] and non breaking space = ^s usually a in a .rtf format to correct those. You can use Replace all or Replace with Next . I use keyboard shortcuts to make it go quicker.  I have found it easier to use Replace All and then check the rest of the document to see what needs to be fixed further.  

 

I am not a techie, just found a way to make it work for me. 


Genealogy:
"I work on genealogy only on days that end in "Y"." [Grin!!!]
from www.GenealogyDaily.com.
"Documentation....The hardest part of genealogy"
"Genealogy is like Hide & Seek: They Hide & I Seek!"
" Genealogists: People helping people.....that's what it's all about!"
from http://www.rootsweb....nry/gentags.htm
Using FO and RM since FO2.0 


#7 Dick-TMG

Dick-TMG

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 23 December 2014 - 11:24 AM

Nettie,

 

I thought of this but the task looked too large. I am producing about 250 pages. If I changed all to a paragraph break I would need to go back and edit about 50% of the lines to change them back to  a line break. The reverse would also be true. I am hoping that RM can add a little code to the report and if I check a "new paragraph after every fact" then the new paragraph symbol would be inserted instead of the line feed. Or maybe in the setup of RM you could select whichever type of break you wanted so RM would accommodate current usage and a new paragraph break.

 

I am also looking for repeatability. If I did change all the characters and then found I had made an error in my report generation or added new data then I would need to repeat the process.

 

Whatever happens I will adjust. RM7 is my choice at this time to replace TMG.



#8 Klectica

Klectica

    New Member

  • Members
  • Pip
  • 4 posts

Posted 13 January 2015 - 08:53 PM

Newbie to RM7 here - so don't laugh - I can't figure out how to Italicize those elements in sources and/or citations that need to be in italics when I export to RTF.  Any suggestions?



#9 Jerry Bryan

Jerry Bryan

    Advanced Member

  • Members
  • PipPipPip
  • 3410 posts

Posted 14 January 2015 - 08:55 AM

Surround the text in question with <i> and </i> tags. These are the same tags that are used for italics in HTML.

 

I had meant to respond earlier to Nettie's comments about using Word itself to make needed edits to white space in an RTF file produced by RM. She is absolutely correct that with Word's version of "reveal codes" turned on, you can do replacements for all kinds of special characters, and the replacements can be individual or global. For example, you can see in Word the difference between the RTF \vertalt and \par tags. You can do all your work in Word without being a techie and without having to learn anything at all about RTF tags.

 

Whether you wish to clean up white space in the RTF file with a text editor or whether you wish to cleanup white space in Word itself is somewhat of a personal preference. I have done it both ways through the years. But I have found that either way the problem is that you can't really just do a single global replace and be done. You really have to look at a lot of the white space issues on a case by case basis to get your document to looking professional.

 

This can be very time consuming. Also, if you have to regenerate the RTF file for any reason, all your manual work in cleaning up the white space has to be completely repeated. For that reason, I have spent lots of extra time in RM itself trying to make the results of producing an RTF file as nearly camera ready as possible without any subsequent post-processing of the RTF file or any subsequent processing in Word.

 

To that end, I still control white space in reports primarily with carriage returns at the end of notes. The recently added support in RM to control paragraphing a little better still doesn't quite do what I need. I still do have to do a tiny bit of post processing of any RTF file I produce with RM, but I have automated the process as much as possible. As far as the RTF file, I only have to fix two things. One is that any new paragraph I force with a carriage return in a note starts with a single space at the beginning of the line. So I have a script to identify and remove these unwanted spaces. I view the presence of these spaces at the beginning of a line as a bug, but I'm sure they are not viewed as a bug by RM.

 

Second (and this really has nothing to do with white space issues), there absolutely is a bug in the index entries in the RTF file. Namely, they are all followed by a space that shouldn't be there. The bug doesn't manifest itself and does no harm in the Name Index. But it can manifest itself and do huge harm in the Place Index because the Place Index can go completely wacko. The bug manifests itself only when there are multiple references to the same general places but with different levels of names. For example, if you have county, state and also city, county, state and also cemetery, city, county, state and also cemetery, county, state and that sort of thing (i.e., there are cemeteries in the city but also cemeteries in the same county but outside the city). This might be viewed as a bug in Word rather than in RM. But in any case, it's fixed by removing the space that shouldn't be there at the end of each index entry, and my same script that fixes the extra space at the beginning of paragraphs also fixes the extra space at the end of the index entries. Running the script is virtually instantaneous and is very easy to do.

 

Having done that, The pagination of the file might have changes, so I have to rebuild the indexes from within Word itself to make sure the indexes reflect any new page numbers. Doing so is extremely easy once you know how to do it, but the documentation on how to do so is terrible and and it can take somewhere between many hours and forever to figure out how to do it the first time.

 

Also, there is a style library problem in rebuilding the indexes. Which is to say, after you rebuild them they will look awful because each entry in the index will be followed by a blank line. I'm not sure of the exact details of the problem, but it's surely all Word's fault with its incomprehensible implementation of style libraries. The only way I have found to solve the problem is to set the whole document to "2003 style" before rebuilding the indexes. With "2003 style", entering a carriage return into Word does not enter a blank line before the new line. With "2007 style" or "2010 style" or "2013 style" it does. I hate and despise that blank line because it always appears, even in unformatted or unparagraphed text where all you want is a new line. So I always use "2003 style" in Word. But that's a personal problem of mine, I guess, and nothing to do with RM.  :)   Except that the Index entries created by RM seem to have the problem and the only way I found around the problem is to apply the "2003 style" to RTF documents produced by RM. Well, the indexes created by RM look fine in Word as long as you don't have to rebuild them after editing the document. It's only after rebuilding the indexes that they develop the disease of an extra blank line after each index entry. That's the problem that is fixed by applying the "2003 style" to the whole document.

 

Jerry



#10 Nettie

Nettie

    Advanced Member

  • Members
  • PipPipPip
  • 1618 posts

Posted 14 January 2015 - 11:14 PM

I do a little more changing of the format after I transfer to an .rtf format.  In MSWorld, I change all Paragrah/line returns from 3 to 1 ^p^p^p to ^p.  using control +h,  Then ^p^p to ^p.  I try to keep family lines together.  There is always 2 returns just before listing of children.  I change that to 1 return. [^p^p to ^p].  When there is too much white space your report does not look right in my opinion. 


Genealogy:
"I work on genealogy only on days that end in "Y"." [Grin!!!]
from www.GenealogyDaily.com.
"Documentation....The hardest part of genealogy"
"Genealogy is like Hide & Seek: They Hide & I Seek!"
" Genealogists: People helping people.....that's what it's all about!"
from http://www.rootsweb....nry/gentags.htm
Using FO and RM since FO2.0 


#11 Don Newcomb

Don Newcomb

    Advanced Member

  • Members
  • PipPipPip
  • 1033 posts

Posted 15 January 2015 - 08:45 AM

Many years ago I had a serious complaint with RM's RTF output, as it was actually just text with just enough RTF to do formatting for fonts, etc. In other words, there were no paragraphs, no blocks and, as I recall, each line ended with a CR-LF. If you opened it in a word processor it was a mess. Sort of what you see when someone tries to use a word processor as if it were a typewriter. It's much better now.