* Suppress abbreviation 'USA' from Publish/Books any report

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
Taterbug
Gold
Posts: 19
Joined: 01 May 2018 00:56
Family Historian: V6.2

Suppress abbreviation 'USA' from Publish/Books any report

Post by Taterbug »

I would like to suppress the "USA" from any report in the Publish-Books since in my trees 90% of individuals are from the USA, but still leave the Country present when in a country Not in USA, I can't see anything in Tools, perhaps there is a plug-in, or a 'script' elsewhere unknown to me. Didn't find anyone else ask for this, and no specific topics in Help.
Most of us here know when a state is referenced, it already IS in the US, so this makes a cleaner output with less Superfluous wording.
Thanks
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Suppress abbreviation 'USA' from Publish/Books any report

Post by tatewise »

Specifically what type of Report are you interested in?

Narrative Reports have Report > Options > Main tab Use Short Form for Repeated Place Names checked by default so that "place names are only given in full the first time they are mentioned within each section. Thereafter, only the first part of the place name is given". I know that is not exactly what you requested, but is it good enough?

Unfortunately, you cannot even use Edit > Find and Replace to temporarily replace , USA with nothing in Place names, because that would seriously upset Place records. For similar reasons, you cannot use the Search and Replace Plugin.

The only remaining option is to save the Book/Report as a Word-Processor Document (RTF) file and edit out the , USA text using a word-processor.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Taterbug
Gold
Posts: 19
Joined: 01 May 2018 00:56
Family Historian: V6.2

Re: Suppress abbreviation 'USA' from Publish/Books any report

Post by Taterbug »

I will Try the RTF format, but I'm thinking RTF when print output is used will uncover other subtle formatting changes that will be adverse to the final output. However I will try it and see what happens. thanks for that idea. Also thanks for the clue on not changing my record format, I was thinking of editing USA out of a few records to see results, I will not do that now.
Most of the reports of interest will be Ancestor Diagram and Descendant Diagram reports, so I thought I might be able to get at the script behind the report and use something like Instructions or statements "-USA" [minus Usa] depending on the imbibed programming language.
Regards
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Suppress abbreviation 'USA' from Publish/Books any report

Post by tatewise »

AaaaaH!
You are talking about Diagrams, and NOT Reports at all then!

In that case you can customise them to remove USA.
To get started don't use Publish > Books but open the Diagram via the View menu.
With the Diagram open, use Diagram > Options and select the Text tab.
If your current Text Scheme is a standard scheme then click Clone to create an editable copy.
Then click Edit to open the Edit Text Scheme dialogue.
In the right hand Used Items column, select each fact in turn such as Birth, Marriage, Death, etc.
Click the Edit button below, and edit the Template as follows.
Typically the Template will be like:
Born: %INDI.BIRT.DATE:COMPACT% in %INDI.BIRT.PLAC:TIDY%
You need to edit the %INDI.BIRT.PLAC:TIDY% script to remove the USA text.
The concept is to test if , USA exists, and if so, only show the leading parts, else show original full Place.
e.g.
=TextIf(ContainsText(%INDI.BIRT.PLAC%,", USA",STD), TextPart(%INDI.BIRT.PLAC%,1,2,TIDY), %INDI.BIRT.PLAC:TIDY%)

=TextIf(...) has three parameters: 1: condition, 2: text if true, 3: text if false
The condition is ContainsText(%INDI.BIRT.PLAC%,", USA",STD) i.e. does Birth Place contain , USA?
The text if true is TextPart(%INDI.BIRT.PLAC%,1,2,TIDY) i.e. starting at part 1, show 2 further parts, tidied.
The text if false is %INDI.BIRT.PLAC:TIDY% i.e. the original full Birth Place tidied.

Click the Test button to check the Template is valid, and finally click OK.

That must be repeated for each fact substituting the correct tag instead of BIRT, such as MARR or DEAT, etc.

It will take a deal of editing, but once complete use Diagram > Save Diagram As > Custom Diagram Type and give it a memorable name that you can call up when compiling your Book.

That same customised Text Scheme can be selected in different core Diagram types, such as Ancestor Diagram and Descendant Diagram without any more editing.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Taterbug
Gold
Posts: 19
Joined: 01 May 2018 00:56
Family Historian: V6.2

Re: Suppress abbreviation 'USA' from Publish/Books any report

Post by Taterbug »

Ohhh, wow, Many thanks, I'll copy past that answer, or print to PDF and keep on the desktop for rapid referral.
Your answer is the perfect solution to this Book publishing Task.
For shortcut, I'll still call it "Suppress USA text"
The backstory is I'm creating a Family Book for 90 yr old Mom, and the "picture" [Diagram] is worth a thousand words to a person like her, and the fewer distractions, even in verbage helps her understand her family & extended family better.
Thanks Mate
TA
Cheers
User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Re: Suppress abbreviation 'USA' from Publish/Books any report

Post by rodit »

Could you just NOT include USA in the Place description for your US places, but include the other countries as and when they occur.
I have a similar situation where the biggest majority are English, with some US, Australian and Canadian, as well as the rest of the UK. These countries ARE included in the Place name, whereas England is not.
I think that you would have to use the Tools>Work with Data>Places to edit USA out whenever it occurs.
Guess it depends on how many Place names you have.
Hope that helps.
Roger
User avatar
Taterbug
Gold
Posts: 19
Joined: 01 May 2018 00:56
Family Historian: V6.2

Re: Suppress abbreviation 'USA' from Publish/Books any report

Post by Taterbug »

That is a good idea, and I'll look into that, Thanks to Tatewise I have manipulated the script and edited it out with script language the word USA, in the record at output, which may not be a good choice for those that have not programmed s/w.
Post Reply