Difference between revisions of "Display formatting"

From Gramps
Jump to: navigation, search
 
(18 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
{{man note|Display formatting|This page is intended for users of the [[Addon:Graphical Reports]].}}
 +
 
Many of the graphical reports allow you to customize the information on the display. Variable substitutions are used to substitute personal or marriage information for a particular symbol.
 
Many of the graphical reports allow you to customize the information on the display. Variable substitutions are used to substitute personal or marriage information for a particular symbol.
  
{| cellpadding="4" cellspacing="0" border="1"
+
==The Substitution Keys==
 +
{| {{prettytable}}
 
|-
 
|-
 
|$n
 
|$n
Line 24: Line 27:
 
|Displays the person's place of death
 
|Displays the person's place of death
 
|-
 
|-
|*s
+
|$s
 
|Displays the name of the person's spouse in the form of FirstName LastName
 
|Displays the name of the person's spouse in the form of FirstName LastName
 
|-
 
|-
Line 36: Line 39:
 
|Displays the place associated with the marriage of the person and the spouse.
 
|Displays the place associated with the marriage of the person and the spouse.
 
|-
 
|-
| $$
+
|$v
 +
|Displays the marriage divorce date of the person and the spouse.
 +
|-
 +
|$V
 +
|Displays the place associated with the divorce of the person and the spouse.
 +
|-
 +
|colspan="2"|
 +
|-
 +
| \$
 
| $
 
| $
 
|-
 
|-
| }}
+
| \}
 
| }
 
| }
 
|-
 
|-
| {{
+
| \{
 
| {
 
| {
 
|-
 
|-
| --
+
| \\
| - (only at the start of a line.  See below)
+
| \
 +
|-
 +
|colspan="2"|
 +
|-
 +
| {
 +
|Starts a conditional printing section.
 +
|-
 +
| }
 +
|Ends a conditional printing section.
 +
 
 +
|-
 +
| {
 +
|(only at the start of a line)
 +
This is a line that is NOT to print if all variables are unknown
 
|}
 
|}
  
  
 
=== Conditional printing ===
 
=== Conditional printing ===
'{' and '}' have been added to help define what prints on a line and '-' at the start of a line defines if the line prints at all.  These two are based on these rules:
+
'{' and '}' have been added to help define what prints on a line and '{' at the start of a line defines if the line prints at all.  These two are based on these rules:
{| cellpadding="2" cellspacing="0" border="1"
+
{| {{prettytable}}
 
|-
 
|-
 
|no variables within closing
 
|no variables within closing
Line 64: Line 88:
 
ie. '{b. $b $B}' and the date is known
 
ie. '{b. $b $B}' and the date is known
 
|prints everything
 
|prints everything
|-
 
| - (at the start of a line)
 
when none of the variables have information to print
 
|Line is removed from the display
 
|-
 
| - (at the start of a line)
 
when at least one has information in the database.
 
|Line is printed
 
 
|}
 
|}
  
Line 79: Line 95:
 
## 'd. $d{ $D} is the same as 'd. $d{ $D'
 
## 'd. $d{ $D} is the same as 'd. $d{ $D'
 
# Brackets are read from left to right
 
# Brackets are read from left to right
## '{{{' is '{{'(print a single '{') and '{'(start a conditional printing section) together
 
  
 
==== Examples ====
 
==== Examples ====
 
  $i $n
 
  $i $n
  born on $b{ at $B
+
  Born on $b{ at $B}
  -d. $d $D
+
  {d. $d $D {($v)
 +
* The first and second lines always prints. 
 +
* The second line always prints 'Born on '
 +
* The second line may or may not print ' at ' and the place depending on whether the place is known.
 +
* The third line will not be displayed if the person is alive or if BOTH the date and place of death is not known.
 +
 
 +
 
 +
{Born{ on $b}{ at $B
 +
If either the date or place (or both) of birth is known 'Born ' will print with what information is known.  If neither is known a blank line will print. You can replace the first '{' with a '-' to remove the line all together from what displays (for this person)
 +
 
 +
=== Replace missing places/dates with: ===
 +
All reports come with this option to either:
 +
# print nothing at all.  ie ''
 +
# print '_____' (A space to fill in information)
 +
when a place or a date is not known.
 +
 
 +
ie. The first example may display 'Born on _____' if both the date and place are unknown.
  
The first and second lines always prints.  The second line may or may not print ' at ' and the place depending on whether the place is known. and the third line will not be displayed if the person is alive or if BOTH the date and place of death is not known.
+
== See also ==
 +
* [[Addon:Graphical_Reports]]
 +
* [[Gramps_{{man version}}_Wiki_Manual_-_Reports_-_part_2#Substitution_Values]]
  
{born{ on $b}{ at $B
+
[[Category:Plugins]]
 +
[[Category:Developers/General]]
 +
[[Category:Reports]]

Latest revision as of 04:55, 15 May 2020

Gramps-notes.png
Display formatting

This page is intended for users of the Addon:Graphical Reports.

Many of the graphical reports allow you to customize the information on the display. Variable substitutions are used to substitute personal or marriage information for a particular symbol.

The Substitution Keys

$n Displays the person's name in the form of FirstName LastName
$N Displays the person's name in the form of LastName, FirstName
$i Displays the GRAMPS ID associated with the person.
$b Displays the person's date of birth
$B Displays the person's place of birth
$d Displays the person's date of death
$D Displays the person's place of death
$s Displays the name of the person's spouse in the form of FirstName LastName
$S Displays the name of the person's spouse in the form of LastName, FirstName.
$m Displays the marriage date of the person and the spouse.
$M Displays the place associated with the marriage of the person and the spouse.
$v Displays the marriage divorce date of the person and the spouse.
$V Displays the place associated with the divorce of the person and the spouse.
\$ $
\} }
\{ {
\\ \
{ Starts a conditional printing section.
} Ends a conditional printing section.
{ (only at the start of a line)

This is a line that is NOT to print if all variables are unknown


Conditional printing

'{' and '}' have been added to help define what prints on a line and '{' at the start of a line defines if the line prints at all. These two are based on these rules:

no variables within closing prints everything.
variables inside and none have information in the database.

ie. '{d. $d $D}' when the person is alive

prints Nothing
variables inside and at least one has information in the database.

ie. '{b. $b $B}' and the date is known

prints everything


Other Notes:

  1. The end of a line is the same as a closing '}'
    1. 'd. $d{ $D} is the same as 'd. $d{ $D'
  2. Brackets are read from left to right

Examples

$i $n
Born on $b{ at $B}
{d. $d $D {($v)
  • The first and second lines always prints.
  • The second line always prints 'Born on '
  • The second line may or may not print ' at ' and the place depending on whether the place is known.
  • The third line will not be displayed if the person is alive or if BOTH the date and place of death is not known.


{Born{ on $b}{ at $B

If either the date or place (or both) of birth is known 'Born ' will print with what information is known. If neither is known a blank line will print. You can replace the first '{' with a '-' to remove the line all together from what displays (for this person)

Replace missing places/dates with:

All reports come with this option to either:

  1. print nothing at all. ie
  2. print '_____' (A space to fill in information)

when a place or a date is not known.

ie. The first example may display 'Born on _____' if both the date and place are unknown.

See also