Version 3 (modified by jowik, 16 years ago)

--

Drawing ISO 15926 diagrams using LaTeX macros

This page describes how content in ISO 15926 format can be represented in diagrams, using LaTeX, the xy-pic extension, and macros defined in the templatediagram.sty style.

The diagrams described here use the graph feature of xy-pic (see the xy-pic reference manual, section 26). The full xy-pic language is very expressive, and not exactly easy to understand for people with only finite time on their hands. However, to get started with ISO 15926 diagrams all that is needed is a tiny number of commands. This page will teach you how to draw diagrams with very little effort.

Getting started

There are two main options.

  1. Enter diagrams into a page in this Trac, as described below. For experimentation, consider the SandBox.
  2. For adding diagrams to your own LaTeX documents, download templatediagram.sty. (If you are just starting out with LaTeX, see http://www.tug.org/begin.html for some useful pointers to software and documentation.)

Creating diagrams on Trac pages

1. The diagram container

The first thing you need to do is to add a section to your Trac page that looks as follows.

{{{
#!LatexEquation
\TemplateDiagram{

         The diagram goes here!  

 }
}}}

2. Adding a class

A diagram of ISO 15926 content should always show the entity type of each element. This means the macro for adding a class has one argument for the element name, and one for the type name. In addition, we usually need to assign a name to each element in the diagram, so that we can refer to them later.

To enter a Class of Individual named Person, add !c{person}{Person}{Class of Individual}:

{{{
#!LatexEquation
\TemplateDiagram{
  !c{person}{Person}{Class of Individual}
 }
}}}

This input produces the following graph.

Home
About PCA
Reference Data Services
Projects
Workgroups