Citation Master Basic Mod
|Citation Master Basic|
|Summary||Customize the format and content of citations (individual pages) and sources (browsing page).|
|Homepage||Citation Master Basic Mod|
|Mod Support||Email me.|
|Latest Mod||184.108.40.206 for TNG v9.2.2 and 10.0.2.0 for TNG v10.0.2|
|Min TNG V||9.2.2|
|Max TNG V||10.0.2|
For TNG v10, Citation Master Basic does not attempt to preserve the new intra-source hyperlinks that are new to the release.
Have you ever wanted to to display your citations and sources in a bibliographic format--something more in line with contemporary publishing standards? Do you have lots of custom source tags or do you use source tags that aren't supported directly in the tng_sources table (...and consequently don't get displayed)? Then Citation Master Basic can help by allowing you to define the format and content of citations.
- A working TNG installation
- An installed current version of the Mod Manager (is already included in TNG v9)
- Shell-level access to your TNG host (for editing the configuration file)
- Download the .zip file to your mods directory and unpack it.
- Inside the the sub-directory, egenea_cite_master, edit the configuration file egenea_cfg_citation.php to add format instruction sets for your own source types.
- Install the mod using the TNG Mod Manager
- Disable the mod through the Mod Manager
- Back up your copy of mods/egenea_cite_master/egenea_cfg_citation.php
- Install the new version of the mod
- Restore your copy of ''mods/egenea_cite_master/egenea_cfg_citation.php
- Enable the mod through the Mod Manager
- Define the fields, order, typeface, surrounding punctuation, and separators that go into a displayed citation or source
- Create different format instruction sets for different sources (e.g., Census vs. Will)
- Override TNG's formatting behavior for individual citations and source browsing.
Citation Master Basic supports changes to the typeface of a source field, the punctuation that surrounds the field, the separator that follows the field, and the punctuation that follows the citation. (Typeface, surround, and separator are referred to later as categories.)
Four typefaces are supported: 'plain', 'bold', 'italic', and 'uline' (i.e., underline).
Five types of surrounding punctuation are supported: 'parens' (i.e., parenthesis), 'quotes', 'brackets' (i.e., square brackets), 'braces' (i.e., curly braces), and 'angles' (i.e., angle brackets).
The supported field separators are: 'space', 'comma', 'colon', 'period', 'semi' (i.e., semi-colon), and 'dash'. With the exception of dashes, that have spaces both before and after, all other punctuation marks have a single appended space.
Notes and Caveats
- The format instructions and source specifications are valid PHP code. So if you make a mistake you'll probably encounter a syntax error when PHP attempts to render your page.
- Multiple typeface instructions are supported per source tag. (See the 'Examples' for the syntax of such an instruction.)
- No instruction is ever required. There is always a default behavior.
- Instruction order is important. Do you want your comma inside your quoted title? Then your separator instruction should come before your surround instruction.
- You must have a source specification named "_default". If no other specification matches the source type, this specification is used.
- The '_default' specification supplied in the example configuration file corresponds to the requirements of the Chicago Manual of Style, book format.
- For TNG v10.0.2 Citation Master Basic does not attempt to preserve intra-citation hyperlinks (a new feature).
This is a PHP array that associates GEDCOM tags with formatting instructions. So, for example, the TITL (title) tag might be associated with the typeface 'bold'and be followed by a 'comma' (a 'separator' instruction).
These are PHP arrays that define source types (such as 'Census') and identify the format instruction sets that get applied. Source type names are usually specific to the genealogy program you use for your data and how that program exports that data to GEDCOM. My software, Reunion for Macintosh uses names like 'Census', 'Will', and 'Compilation'. Yours will almost certainly do something different. The '_default' specification must exist in the configuration file to handle any source types that don't have their own specifications. Don't delete it.
The following is an example from the source browsing page on Lindell-Herndon Genealogy:
(The format approximates the IEEE citation style):
The next image depicts citations on a individual's page:
Format Instructions and Source Specifications
Format instructions associate things like typefaces with the GEDCOM tags that represent particular source fields. For example:
... "TITL" => array( "typeface" => "italics", "separator" => "comma", "surround" => "quotes" ), "PUBL" => array( "typeface" => array("bold", "italics"), "surround" => "parens", "separator" => "space" ), ...
...instructs Citation Master to display a source's title field (GEDCOM tag TITL) in italics, append a comma, and then surround the whole thing in quotes. A PUBL (publisher) field should be displayed in bold-italics, surrounded by parenthesis, and followed by a space.
Source specifications define what set of format instructions go with what source, and whether that source should have any leading or trailing punctuation. For example:
$egenea_source_fmt['Census'] = array( "name" => "", "comment" => "Citation Master format for type 'Census' (IEEE style).", "context" => "all", "trailer" => "period", "tags" => $census_fmt_ins );
...associates the format instructions contained in $census_fmt_ins with the source type Census and instructs Citation Master to add a period after all such sources.
Frequently Asked Questions
Q: Why GEDCOM tags?
A: It was the only real way to level the playing field between all types of genealogy software while, at the same time, dealing with the fact that TNG stores some information in the sources table (I assign the expected GEDCOM tags to these pieces of data) and some data as custom events. It also helps me deal with the fact that genealogists sometimes define their own tags. For example, I use a custom "EREF" tag that stands for "endnote reference" (a shorthand that I use to refer to sources in notes and for naming source files). I have one of these assigned to every source in my database and wanted them printed on the browsesource.php and individual pages. TNG, of course, has no idea what this source field is because from it's perspective it's just a custom source event.
Q: What's the variable $egenea_srctype_tag mean and how should I set it?
A: Most genealogy software, like Reunion (my software), assigns a GEDCOM style tag to the type of source (e.g., "census", "compilation, "vital record", etc...), and that shows up in TNG as a custom event when your source get imported. I need to find the field that corresponds to your source type in the database in order to decide which of your defined formats to use. So, for my software, there is a custom event in the TNG database with tag "TYPE" and value "Vital Record", and I know to look for an entry in the $egenea_source_fmt variable called "Vital Record" containing all the formatting instructions for vital records.
Q: What happens if one of my source fields, one that I specified format instructions for, is empty or missing?
A: Don't worry about it. Citation Master treats an empty or missing source field as it simply doesn't exist in the output. In other words, data, surrounds and separators are simply omitted.
Q: What if I don't import source information but define it in TNG? In other words, TNG is my primary genealogy database.
A: This is tricky because it means that there may be no custom event to define your source type names, and unless you create such an event...for each source...you won't be able to define different format instructions for different source types. I don't have a good solution for this, but the default type, '_default', will still work for your sources. You'll just have to do your best to make sure it works for all your sources.
Q: Where are the admin interfaces so I don't have to deal with all this PHP configuration stuff?
A: :-) All in good time.
|10.0.2.0||24 Aug 2014||Updated for compatibility with TNG v10.0.2.|
|220.127.116.11||17 Aug 2014||Now supporting multiple typeface instructions per tag. (See the examples for additional information.) The custom event tag that represents source type can now be set as a Mod parameter.|
|18.104.22.168||09 Aug 2014||Initial release.|
Sites Using Citation Master Basic
If you download and install this mod, please add your TNG site to the table below.
|Lindell-Herndon Genealogy||Bill Herndon||Mod developer||10.0.2.0||10.0.2|