* Source Template Format Definitions
Source Template Format Definitions
Hi everyone
I’m having a few issues with random spaces appearing (and occasionally not appearing) in text generated by my custom source definition templates.
here's the footnote definition:
Deaths index (CR) Australia. <{town}, >South Australia. {date}. {name}. <Registration district: {Registration_district}. ><Registration number: {Registration_number}. ><{Volume_book_etc}. >Collection: South Australia Deaths Index 1842-1928. <u>www.findmypast.com.au</u> : accessed {accessed}.
Here’s the output:
Deaths index (CR) Australia. Buckingham, South Australia. 17 May 1898. JONES, Lydia. Registration district: Wellington. Registration number: 252/275. Collection: South Australia Deaths Index 1842 - 1928.www. findmypast. com. au: accessed 2 February 2022.
There are random spaces in the URL, and in the year range; 1842-1928 (it becomes 1842 – 1928). I can’t get a space to appear between the URL and the colon, nor between ‘…1928.’ and the URL despite them appearing in the template. Any thoughts?
Thanks
Wayne
I’m having a few issues with random spaces appearing (and occasionally not appearing) in text generated by my custom source definition templates.
here's the footnote definition:
Deaths index (CR) Australia. <{town}, >South Australia. {date}. {name}. <Registration district: {Registration_district}. ><Registration number: {Registration_number}. ><{Volume_book_etc}. >Collection: South Australia Deaths Index 1842-1928. <u>www.findmypast.com.au</u> : accessed {accessed}.
Here’s the output:
Deaths index (CR) Australia. Buckingham, South Australia. 17 May 1898. JONES, Lydia. Registration district: Wellington. Registration number: 252/275. Collection: South Australia Deaths Index 1842 - 1928.www. findmypast. com. au: accessed 2 February 2022.
There are random spaces in the URL, and in the year range; 1842-1928 (it becomes 1842 – 1928). I can’t get a space to appear between the URL and the colon, nor between ‘…1928.’ and the URL despite them appearing in the template. Any thoughts?
Thanks
Wayne
Last edited by tatewise on 11 May 2022 11:27, edited 4 times in total.
Reason: Removed reference to v7 and improved the Subject
Reason: Removed reference to v7 and improved the Subject
- tatewise
- Megastar
- Posts: 28414
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Source Template Format Definitions
Hi Wayne, I've removed your v7 references from your posting.
I can reproduce those symptoms and have a solution for them.
The hyphen (-) and dot (.) characters have a special significance and result in the spacing you have noticed.
To inhibit that effect, put an escape backslash (\) in front of each one.
See FH Help page Source Template Formats under The Escape Character and Special-Handling for Top-Level Text.
The Style Codes such as <u> & </u> or <i> & </i> appear to remove spaces adjacent to the codes.
That can be fixed by putting an escape backslash (\) in front of each space but should not be needed.
So the Footnote Format template code below fixes the layout problems:
South Australia Deaths Index 1842\-1928.\ <u>www\.findmypast\.com\.au</u>\ : accessed {accessed}.
However, the Style Codes removal of spaces should be reported to CP via http://www.calico-pie.com/osticket/open.php.
I can reproduce those symptoms and have a solution for them.
The hyphen (-) and dot (.) characters have a special significance and result in the spacing you have noticed.
To inhibit that effect, put an escape backslash (\) in front of each one.
See FH Help page Source Template Formats under The Escape Character and Special-Handling for Top-Level Text.
The Style Codes such as <u> & </u> or <i> & </i> appear to remove spaces adjacent to the codes.
That can be fixed by putting an escape backslash (\) in front of each space but should not be needed.
So the Footnote Format template code below fixes the layout problems:
South Australia Deaths Index 1842\-1928.\ <u>www\.findmypast\.com\.au</u>\ : accessed {accessed}.
However, the Style Codes removal of spaces should be reported to CP via http://www.calico-pie.com/osticket/open.php.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Source Template Format Definitions
Hi Mike
Firstly, tanks for tidying up the potential confusion in my post. Most importantly, thanks for your quick and knowledgeable reply (as usual)! Thanks for pointing out the issues around the hyphen and full stop characters, and I'll lodge the support ticket with Calico Pie around the other issue later today.
Cheers
Wayne
Firstly, tanks for tidying up the potential confusion in my post. Most importantly, thanks for your quick and knowledgeable reply (as usual)! Thanks for pointing out the issues around the hyphen and full stop characters, and I'll lodge the support ticket with Calico Pie around the other issue later today.
Cheers
Wayne
Re: Source Template Format Definitions
I have a similar issue regarding spacing in source template definitions (which I must say in general are actually quite frustrating to understand and revise quickly on the fly!).
I am trying to write a source template definition wherein I can have two fields - one for the root URL of a website (eg, www.familysearch.org) which remains with the source record, and then a second field for the citation which contains the specific URL identifier for the record I'm citing (eg, /ark:/61903/1:1:J8L5-WPD).
However, I'm only getting one of two results when creating a source/citation using the template definition, either:
I am trying to write a source template definition wherein I can have two fields - one for the root URL of a website (eg, www.familysearch.org) which remains with the source record, and then a second field for the citation which contains the specific URL identifier for the record I'm citing (eg, /ark:/61903/1:1:J8L5-WPD).
However, I'm only getting one of two results when creating a source/citation using the template definition, either:
- there is a space between the URL root and identifier (rendering the complete URL invalid); or
- by putting an escaping backslash between the two fields (which are {URL} and {URL_Identifier}), but this simply prints the name of the second field.
Sarah Bell – Australia
- tatewise
- Megastar
- Posts: 28414
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Source Template Format Definitions
It seems that Footnote Format metafield codes are unconditionally separated by a space character.
The workaround that I have found uses the =Text(...) concatenation function:
{=Text( %SOUR.~UL-URL% . %CUR~CITN.~UL-URL_IDENTIFIER% )}
That employs the data reference shortcut technique to refer to the metafields.
However, the introduction of a space separator could be reported to CP via http://www.calico-pie.com/osticket/open.php.
It seems reasonable that the Footnote Format should be followed explicitly with any actual space characters preserved, but none should be inserted where there are none.
The workaround that I have found uses the =Text(...) concatenation function:
{=Text( %SOUR.~UL-URL% . %CUR~CITN.~UL-URL_IDENTIFIER% )}
That employs the data reference shortcut technique to refer to the metafields.
However, the introduction of a space separator could be reported to CP via http://www.calico-pie.com/osticket/open.php.
It seems reasonable that the Footnote Format should be followed explicitly with any actual space characters preserved, but none should be inserted where there are none.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Source Template Format Definitions
Writing from a pre V7 perspective ...
I have never thought of:
a full URL (https;//www.fhug.org.uk/forum/viewtopic.php?p=124851#p124850) as being
source (https;//www.fhug.org.uk/forum/) plus separate
specific citation (viewtopic.php?p=124851#p124850)
- following the source is
book (Edmonds, 1923, The Borsetshire Regiment in WW1, Nib & Canon, London),
citation is page (Edmunds, p45)
format that as a lumper seems most natural to me.
However my "full" citation is not "(p45)", but "(Edmunds, p45)". Your split of the URL is a bit like trying to make "(p45)" on its own the "citation" - it still needs the link to the source. In academic book citation that is often given by stating the author in the citation (Edmunds, p45), unless they authored more than one source, when you include the year of publication (Edmunds 1923, p45) to give a specific link to the list of references (with 1923a, 1923b etc. if the author was very prolific!).
I would never make "(p45)" a citation on its own, so why would you make "URL identifier" a citation on its own? (Or have I "over read" your post?) It needs the pointer back to the source.
So (/viewtopic.php?p=124851#p124850) fails as a citation - and is not very human readable or on its own usable, whilst (https://www.fhug.org.uk/forum/, viewtopic.php?p=124851#p124850) would not "fail" on grounds of specificity - it still remains not very human readable. But then for URL citations why put in the comma and the space - and break the full link - which is surely the only way a reader is going to use it?
(Family Historian User Group Forum, Topic 124851 Posting 124850) "works" as a citation (source pointer, Where within) but in these days of "internet savvy" readers, I think there is a place for the full URL in the citation - possibly as a hyper link on (Family Historian User Group Forum, Topic 124851 Posting 124850)?
I have never thought of:
a full URL (https;//www.fhug.org.uk/forum/viewtopic.php?p=124851#p124850) as being
source (https;//www.fhug.org.uk/forum/) plus separate
specific citation (viewtopic.php?p=124851#p124850)
- following the source is
book (Edmonds, 1923, The Borsetshire Regiment in WW1, Nib & Canon, London),
citation is page (Edmunds, p45)
format that as a lumper seems most natural to me.
However my "full" citation is not "(p45)", but "(Edmunds, p45)". Your split of the URL is a bit like trying to make "(p45)" on its own the "citation" - it still needs the link to the source. In academic book citation that is often given by stating the author in the citation (Edmunds, p45), unless they authored more than one source, when you include the year of publication (Edmunds 1923, p45) to give a specific link to the list of references (with 1923a, 1923b etc. if the author was very prolific!).
I would never make "(p45)" a citation on its own, so why would you make "URL identifier" a citation on its own? (Or have I "over read" your post?) It needs the pointer back to the source.
So (/viewtopic.php?p=124851#p124850) fails as a citation - and is not very human readable or on its own usable, whilst (https://www.fhug.org.uk/forum/, viewtopic.php?p=124851#p124850) would not "fail" on grounds of specificity - it still remains not very human readable. But then for URL citations why put in the comma and the space - and break the full link - which is surely the only way a reader is going to use it?
(Family Historian User Group Forum, Topic 124851 Posting 124850) "works" as a citation (source pointer, Where within) but in these days of "internet savvy" readers, I think there is a place for the full URL in the citation - possibly as a hyper link on (Family Historian User Group Forum, Topic 124851 Posting 124850)?
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)
- AdrianBruce
- Megastar
- Posts: 2107
- Joined: 09 Aug 2003 21:02
- Family Historian: V7
- Location: South Cheshire
- Contact:
Re: Source Template Format Definitions
My concern about that proposed format is less about its style than about its robustness. I retain a healthy scepticism about the ability of organisations like FamilySearch to keep ARK type etc URLs as permanent as they would like to claim. (Apologies to those who understand this already but URLs containing ARK are supposed to be permanent, and to always point towards the page in question, whereas most other URLs are at risk of failing at some point sooner or later. Often sooner...)sbell95 wrote: ↑11 May 2022 08:25... I am trying to write a source template definition wherein I can have two fields - one for the root URL of a website (eg, www.familysearch.org) which remains with the source record, and then a second field for the citation which contains the specific URL identifier for the record I'm citing (eg, /ark:/61903/1:1:J8L5-WPD). ...
It seems to me that an ARK URL on FamilySearch etc is going to be more robust if the whole URL is quoted, whereas just using the part after .org is less robust because if the bit after .org depends on the bit before, then things might go awry if you alter the URL for the bit before.
I can't describe an exact failure mode because this is just me working from the instincts developed in supporting IT systems over my career. But, if it was me, I'd have www.familysearch.org in the Source Record and the full www.familysearch.org./ark:/61903/1:1:J8L5-WPD in the citation bit.
Adrian
Re: Source Template Format Definitions
Well, I think you're right to be sceptical about it, but in fairness to Family Search, they don't promise it will be permanent. They state: "A persistent identifier is an identifier that is intended to be long-lived", and later, "While FamilySearch commits to maintaining the identifier, there are no promises made about the state of the resource. Clients accessing the resource using the persistent identifier may find that the resource has been moved, deleted or restricted." (Source: https://www.familysearch.org/developers ... dentifiers)AdrianBruce wrote: ↑11 May 2022 10:22 I retain a healthy scepticism about the ability of organisations like FamilySearch to keep ARK type etc URLs as permanent as they would like to claim.
Adrian Cook
Researching Cook, Summers, Phipps and Bradford, mainly in Wales and the South West of England
Researching Cook, Summers, Phipps and Bradford, mainly in Wales and the South West of England
- tatewise
- Megastar
- Posts: 28414
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Source Template Format Definitions
Interesting though it is, I think this discussion is diverging from the problem being investigated.
The problem is the space being forcibly inserted between adjacent metafields in the Format expressions.
It is largely irrelevant that the example happens to use two component metafields of a URL.
The problem afflicts any types of metafield. I've 'improved' the Subject to reflect the topic better.
The problem is the space being forcibly inserted between adjacent metafields in the Format expressions.
It is largely irrelevant that the example happens to use two component metafields of a URL.
The problem afflicts any types of metafield. I've 'improved' the Subject to reflect the topic better.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Source Template Format Definitions
Thanks for your solution @tatewise, and everyone else's thoughts.
URL semantics aside, the only reason I had thought to split it in this fashion is that the resulting footnote/short footnote/bibliography entry is all that is going to be seen in the end (as opposed to my fields in each source record). But I take the point that it is probably safest to keep a whole URL together and not split it into its host and path components. And that also resolves my issue with source template definition spacing (in this instance, anyway!).
Hopefully not continuing down this tangent too far... but is there a FH7 style/other code to apply URL formatting in source templates? I am loath to use <u> tags, but that may be the only solution if hyperlink/<a> tags aren't available?
URL semantics aside, the only reason I had thought to split it in this fashion is that the resulting footnote/short footnote/bibliography entry is all that is going to be seen in the end (as opposed to my fields in each source record). But I take the point that it is probably safest to keep a whole URL together and not split it into its host and path components. And that also resolves my issue with source template definition spacing (in this instance, anyway!).
Hopefully not continuing down this tangent too far... but is there a FH7 style/other code to apply URL formatting in source templates? I am loath to use <u> tags, but that may be the only solution if hyperlink/<a> tags aren't available?
Sarah Bell – Australia
- tatewise
- Megastar
- Posts: 28414
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Source Template Format Definitions
I'm not entirely sure what you mean by URL formatting and where you want it to appear.
Since you mention the HTML <a> anchor tag, I guess you want it to become an active hyperlink.
Then it would have an underline and coloured depending on whether the cursor hovers over it, etc.
These formatted Citation texts appear in Reports, so is that where you want the clickable hyperlinks?
Why would you want them in the FH Report displays?
Perhaps you are printing to PDF, in which case the URL will usually become hyperlinks automatically.
Since you mention the HTML <a> anchor tag, I guess you want it to become an active hyperlink.
Then it would have an underline and coloured depending on whether the cursor hovers over it, etc.
These formatted Citation texts appear in Reports, so is that where you want the clickable hyperlinks?
Why would you want them in the FH Report displays?
Perhaps you are printing to PDF, in which case the URL will usually become hyperlinks automatically.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- cwhermann
- Famous
- Posts: 155
- Joined: 20 Mar 2021 22:04
- Family Historian: V7
- Location: New Hampshire, US
Re: Source Template Format Definitions
I have a Citation level Field in many of my templates called Credit Line where I enter the source of the source in database, this portion of the template reads ; citing {Credit Line}. In most instances this works great, but I have an instance where a portion of the entry in the field should be italicized. I looked through the help and KB and the both provide info on applying style codes to the entire field, but I did not see anything on using the codes on just a potion of the field.
I would like it to read
; citing Social Security Death Index, Master File, Social Security Administration, Washington, D.C.
I entered the field as <i>Social Security Death Index, Master File<i/>, Social Security Administration, Washington, D.C and the <i> and <i/> operators showed up in the sentence. I also tried <<i>Social Security Death Index, Mast File<i/>> and the same thing happened.
Is there a way to italicize inside the field itself?
I would like it to read
; citing Social Security Death Index, Master File, Social Security Administration, Washington, D.C.
I entered the field as <i>Social Security Death Index, Master File<i/>, Social Security Administration, Washington, D.C and the <i> and <i/> operators showed up in the sentence. I also tried <<i>Social Security Death Index, Mast File<i/>> and the same thing happened.
Is there a way to italicize inside the field itself?
Curtis Hermann
FH 7.0.15
FH 7.0.15
Re: Source Template Format Definitions
Is this what you are looking for: There is a missing . in the above - finger slipped on the mouse.sbell95 wrote: ↑11 May 2022 08:25
I am trying to write a source template definition wherein I can have two fields - one for the root URL of a website (eg, www.familysearch.org) which remains with the source record, and then a second field for the citation which contains the specific URL identifier for the record I'm citing (eg, /ark:/61903/1:1:J8L5-WPD).
For Mike and interested parties:
The important bit is the outer pairing <...> i.e. not just in the specific concatenation:
<... Your Fields ...>
This will remove the spaces wherever they occur in your template statement.
Dave
Last edited by dhwalt on 20 May 2022 11:12, edited 3 times in total.
- tatewise
- Megastar
- Posts: 28414
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Source Template Format Definitions
@Curtis: No, it is not possible to apply formatting such as italics to a portion of a field.
@Dave: That is a neat trick using < chevrons > to remove the space between fields.
However, only one set of chevrons is needed, i.e. <{URL}{URL_Identifier}>
Also, it does not resolve any of the other issues involving dot, hyphen, and space characters.
@Dave: That is a neat trick using < chevrons > to remove the space between fields.
However, only one set of chevrons is needed, i.e. <{URL}{URL_Identifier}>
Also, it does not resolve any of the other issues involving dot, hyphen, and space characters.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry