By genome - Saturday, March 22, 2008
|
Options for customising the reports generated from GenoPro have been developed and extended over some considerable time. It has been difficult for the average user to find all the information required to enable them to customise their reports as they require. I am therefore attempting to put all the information in one place, namely the attached .gno file.
There are four basic mechanisms to help you customise your report without resorting to editing the scripts in a custom version of the Report skin.
- General appearance of HTML Narrative report. e..g changing background, fonts and colours. This is achieved using a custom HTML CSS 'stylesheet'. Knowledge of HTML styling is required here. The additional stylesheet is specified using a config parameter (see 4 below).
- Adding extra HTML code to the report pages. This can be achieved using 'Custom Markup tags' - a series of special codes and text you can add to data fields in your .gno file.
This is perhaps the most powerful way to customise your report. For example add an extra collapse/expand section to your report, adding Flash or mp4 video clips, extra images, directly inject HTML code, add new narrative phrases etc. See attached ,gno for full list and documentation. The '4. Examples' GenoMap in the report generated from this file illustrates most of the available tags. see http://familytrees.genopro.com/genome/CustomMarkupExample/default.htm
- Using Custom Tags in your .gno file to add extra detail and modify the behaviour of the script generating the report. You can group the tags into one or more 'Custom Tag Layouts'
All Custom Tags will be included in the Narrative and Descendants Reports unless the name starts with an underscore '_'. Alternatively you can exclude all Custom Tags in a particular Custom Tag Layout by prefixing the Layout Description with an underscore '_'. By default your custom tag data items will be shown in a table in the Narrative Report, with a separate table for each layout. Column 1 holds the Tag display names and Column 2 the tag contents with one tag per row. Alternatively you can create a phrase template for each of your Custom Tag Layouts so that the data items are reported as a narrative phrase. These 'phrase templates' are constructed using GenoPro's phrase generator syntax and can be created and tested using the Phrase Editor on GenoPro's Tools menu. The parameters 0-9 for the phrase are fixed as follows: 0=name, 1=Personal pronoun, 2=Relative Pronoun, 3=Objective pronoun, 4=Is Alive?/Is Extant/Are Together? 5=<, 6=>, 7=&, 8=', 9=" (params 5-9 allow html tags, attributes and entities within the phrase Whilst parameters 10 onwards are the Custom Tag values in the order they are defined in the layout.
An example will make this clearer. The HarryPotter sample .gno included with GenoPro (under Help/Sample Files) has the following Custom Tags definition for Individuals
We can construct a sample phrase template:
{\U}[[{!2} blood purity [{?4}is][{!}was] {10h}[{?11} and ]][{!1} held allegiance to {11h}].][[{?10|11} ]{!0} was in {13h} house at Hogwarts.][[{?10|11|13} ]{12h} played {!0} in the films.] N.B. The 'h' suffix is used on the custom tag arguments (e.g. 10h, 11h etc.) because their content is already HTML encoded. This template could be stored in the Dictionary but an alternative is to store it in a Document Custom Tag. In either case the template is assigned a name consisting of the prefix PhCT_ followed by the layout name with spaces removed. So in this case the name is PhCT_CustomTags because the layout Name is Custom Tags. To store in a Document Custom Tag first create a layout to hold all such tags. i.e. click Tools, Tag Editor and then click the Document tab. Add a new layout called say Custom Phrases and add a tag named PhCT_CustomTags. Enter a description of your choice. Click OK to close the dialog. Now click File/Properties and you should see a new Custom Phrases tab. Click it and enter the template into the PhCT_CustomTags field.
We can then paste this phrase template into the phrase editor and test it by supplying values for each of the parameters (See Phrase Arguments). Note how the phrase editor tests every combination of optional parameters.
If we then generate the Report we see the phrase under Additional Information
- Amending configuration parameters. This can be done at the time the report is generated by displaying the 'View and Amend Configuration Parameters' dialog when prompted. Alternatively the required values can be preset in the Document Custom Tags in your .gno file.
The attached file has more documentation plus examples and all the Custom Tags used in the reports already defined and described and grouped into a 'Report Options' tab for each object type. Download the .gno file and use GenoPro 'Tools/Tag Editor' menu option to explore these. The Document Custom Tags are also defined and grouped under a separate tab for each report type. All Custom Tag definitions can be easily copied to your own .gno files. Open the attached .gno file for more information.
Update 2008/03/25 attached .gno updated Update 2008/04/06 info re custom tag phrases added Update 2008/04/18 attached .gno updated with JC's recommendations. Update 2008/06/09 included Custom Msrkup documentation. Update 2009/02/28 major revision of documentation in attached file and added moexamplesUpdate 2015/04/02 added movie mp4 to custom markup tags and minor edits to this post and documentation
|
By jcguasp - Sunday, March 23, 2008
|
This feature looks interesting. However, brings me to these questions and observations: 1) Except <ChangeParameters>, all fields are blank. Does it mean that default values are still picked up from config.xml? if yes, which param list is taking precedence: config or Custo Tags in .gno? Further questions, in future GenoPro releases: a- will these params still be provided in config.xml? b- will these params (or some of them) be provided/present when starting a new blank .gno file? 2) What about translation to other Lang? 3) Some tooltips Help should be provided when hovering fields because not that explicit in pannels: _Narrative ? For a newcomer User, the meaning is not evident! 4) Please correct 'Langauage' in the Label object. JCUpdate: 5) The fields are too long as some titles are truncated (Doc Prop panel new tabs).
|
By genome - Monday, March 24, 2008
|
Perhaps I should have mentioned that this is 'work in progress' :: I agree I need to improve the tag descriptions and display names, I am currently working on this. I also want to add some examples of tag usage and custom markup. Having the tag description appear as a tooltip on the GenoPro dialog when entering Custom Tag values would certainly be a great help to users. So a request to Dan: please add this if at all possible! The content of all tags is initially blank, including ChangeParameters. These are just tag definitions and no default value can be associated with the definition. GenoPro only creates an actual instance of a tag once you set it to a value. For Configuration Parameters (i.e. Document Custom Tags matching Config.xml Parameter definitions) then initial defaults are taken from the Config.xml but are then overridden by any non-blank value in the Document Custom Tag. The 'View and Change Parameters' dialog should show this situation, i.e. Custom Tags taking precedence. I cannot speak for Dan and Jean-Claude of GenoPro but I can not see parameters being removed from Config.xml. I have merely used some Document Custom Tags, a standard feature of GenoPro, to simplify changing or presetting Configuration parameters for your report, with needing a custom skin, which many users find daunting. The 'Change Parameters' dialog extends this idea. The only way 'Custom tags' can be available in a new .gno is for them to become standard rather than custom tags. I for one would like to see the non 'Config Param' custom tags used incorporated as GenoPro standard tags. Several would be better represented as boolean data types (true/false) instead of text Y/N values e.g. Extant, HideLabel and Place.Name.Plural. Regarding 'Config Param' Document Custom Tags, it would be nice if GenoPro itself could process the Config.xml of a Report, extracting the Parameters and storing them in the users .gno file with their default values and provide a facility to amend these and save in the .gno. I.e. automate the Config Params dialog and associated custom tag creation. Unfortunately I can offer no easy solution for translation. Perhaps we just have to rely on users such as yourself to translate the text in this .gno sample, once a little more stable, in the same way as Dictionary.xml, Config.xml and GenoPro dialogs, menus etc.
|
By jcguasp - Monday, March 24, 2008
|
Thanks Ron, yes I guessed this feature is still under development and that GenoPro may have some kind of 'incorporation' to do. I'll start the FR translation in a wee while, upon definite setup. In the meantime for your info, I'd like to pinpoint some noticed differences (in bold) in tag names. You may be aware of:on the Left: params tag names from CustomReport\Data.xml on the right: from the 3 config.xml files 1) Narrative Rep: fJoinSourceNames fJoinSourceCitationNames fUsePictureThumbnalis fUsePictureThumbnails GoogleMapsLink fGoogleMapsLink fSvfZoomExtent fSvgZoomExtent 2) Descendants Rep: fJoinPlacesNames fJoinPlaceNames MSWordSavePages1 MSWordSavePages FontName Font 3) Export to Gedcom UseGedcom551Draft ??? IsLivingAction LivingAction IsYoungsterAction YoungsterAction XrefPictures ??? Note on the tooltips (if implemented): Please make sure the display timing is long enough, if adjustable, as we don't have enough time to read a multi-line tooltip. JC
|
By GenoProSupport - Tuesday, March 25, 2008
|
I added the tooltip to display the custom tag description in the custom tag dialog. This feature was a bit more work than anticipated, as the static control had to change its behavior to handle mouse mouvement and display the data tip when the mouse was idle. My experience tells me to be careful because the change in the static control may have side effects. The change will be available in the Gamma version. I agree there is a strong need for a better way to integrate the report parameters in GenoPro. Modifying the file Config.xml is not the long term solution.
|
By Frank1 - Tuesday, April 1, 2008
|
I would like to take advantage or Ron's good work but find it difficult to follow. In Ron's previous post #21120 there is an attached CustomReport.gno file and the text talks about a gno file, but the CustomReport.gno is actually a .zip file that contains only a Data.xml file. Since jcguasp has used it and works, I must have misunderstood how it is to be used. Can someone please explain how to use the Data.xml file. Thanks Frank1
|
By appleshaw - Tuesday, April 1, 2008
|
.gno files, now, are xml files saved using zip compression (I think that is correct). The result is that when downloaded, Windows tries to be helpful by identifying it as a zip file.
Ignore Windows and just open the file with GenoPro
|
By Frank1 - Wednesday, April 2, 2008
|
Thank you appleshaw I have it working now Thanks Frank1
|
By genome - Saturday, February 28, 2009
|
The documentation in the .gno attached to my first post has at long last been updated with changes since that time. I have also added more examples and found a novel use for GenoPro hyperlinks! If you do end up with a .zip file when you download it simply rename it to .gno
|
By layosh1 - Tuesday, November 1, 2011
|
I try to create my own phrases in Narrative Reportusing PhCT_ ... on Individuals with CustomTags - I try to add some links but it doesn't support HTML: Phrase looks like: <?html?>{\br}{\U}{!0}[{?2} has][{?!2} had] profile on <a href="{10}">facebook</a>.{\br}" and output is: <?html?>Pavel has profile on <a href="http://www.facebook.com/pavel.polak">facebook</a>.
but I'd like to have it as link:
Pavel has profile on facebook. Is it possible to add own phrases to places and other subjects or it works only with individuals? Thanks :-)
|
By genome - Tuesday, November 1, 2011
|
You are almost there with your phrase. I think what you need is {\br}{\U}{!0}[{?2} has][{?!2} had] profile on <a href="{10h}">facebook</a>.{\br} |
The 'h' in {10h} tells the Report Generator that the input argument is already html encoded. <?html?> is only used in text fields with the property dialogs of the objects. It cannot be used and is not required in phrase templates.
And yes, the same technique can be used for custom phrases for other objects as well as Individuals.
|
By layosh1 - Tuesday, November 1, 2011
|
It doesn't work - html link was not created:
|
By genome - Tuesday, November 1, 2011
|
sorry, must have forgotten to engage my brain today!
To make this work you would need to set Individual custom tag to <a href="http://www.facebook.com/pavel.polak" >facebook</a>
and the phrase to
{\br}{\U}{!0}[{?2} has][{?!2} had] profile on {10h}.{\br} Alternatively create a custom tag _Narrative and set it to the required text:
Pavel has a page on <?html?><a href="http://www.facebook.com/pavel.polak" >facebook</a>
|
By genome - Tuesday, November 1, 2011
|
Further to my last post I have 'engaged my brain' to find a more satisfactory solution. The result is a modified Code/Util.vbs file (see attached) that adds extra functionality ot the Custom Phrase feature.
This version adds extra preset arguments {5}=< {6)=> and {7}=& to such phrases, allowing you to substitute {5h} for < and {6h} for > in Custom Phrases. If you use this file in a custom skin you can now write say {\br}{\U}{!0}[{?2} has][{?!2} had] profile on {5h}a href="http://www.facebook.com/{10}"{6h}facebook{5h}/a{6h}.{\br} as the phrase template and just set the custom tag to the relative page within facebook e.g. pavel.polak
I will include this revised Util.vbs at the next skin update.
|
By layosh1 - Tuesday, November 1, 2011
|
It looks much better, but... :-)
Phrase is {\br}{\U}{!0}[{?2} has][{?!2} had] profile on {5h}a href=" http://www.facebook.com/{10}"{6h}Facebook{5h}/a{6h}.{\br} {10}=pavel.polak it results in Chrome to: There are two characters " in the begining and in the end of href param And when I look into source of generated page, there it looks as this: |
By genome - Tuesday, November 1, 2011
|
You are right of course, brain not fully engaged No substitute for a bit of testing. Just because it looks right does not mean it is right.
Hopefully this one will work. I have added {8}=' and {9}=" to the list of fixed arguments. so now we can write {\br}{\U}{!0}[{?2} has][{?!2} had] profile on {5h}a href={9h}http://www.facebook.com/{10}{9h} target={9h}_blank{9h}{6h}facebook{5h}/a{6h}.{\br} |
I added target="_blank" as Facebook does not seem to like opening its pages in a frame.
Moral of this thread: Things are never quite as simple as they appear to be.
|
By layosh1 - Tuesday, November 1, 2011
|
Now it works perfect, good job Thanks
|
By vlepore - Wednesday, November 2, 2011
|
From what I understand, the custom tags are valid only in file.gno in which they were created. Must always be recreated? Or is there a way to make them permanent in GenoPro? A sort of option: Persistent = Yes / No, to be set when creating the tag.
|
By genome - Thursday, November 3, 2011
|
You can transfer all Custom Tags from one .gno to another by simply copying and pasting an object, such as a label, from one to the other as this drags over the custom tag definitions as well. You can then delete the label from the target .gno, leaving the Custom Tags in place. An 'Undo' action will remove the tags.
|
By genome - Sunday, October 25, 2020
|
I have made some improvements to the Custom Markup facility. Most noteable is the 'container' or 'c' tag', an rework of the 'subsection' tag that now nested tags within it. Details are documented on the home page of the sample report at https://familytrees.genopro.com/genome/CustomMarkupExample/default.htm and each of the individuals in that report has an example of Custom Markup.
|
By BuckWheatus - Tuesday, January 12, 2021
|
How do you add HTML in the Description Section of the Document Tab when generating a narrative report. Your current video on customization of a generated report does not work. Thank you.
|
By genome - Wednesday, January 13, 2021
|
You simply need to prefix your own html in the Description field with the custom markup tag <?html?> and then the report generator script will add it to the home page of the report without any further encoding.
You can of course use any of the other custom markup tags described in this thread as well.
|