Programming Custom Templates

Citavi offers a number of default templates, for example "Custom Field 1 contains data". You can simply customize the template to make it do the opposite, for example "Custom field 1 does not contain data."

  1. Select a template, for example Footnote - Book - (Default template).
  2. On the Template menu, click New.
  3. Click the green plus sign next to Programmed custom conditions available in current citation style.
  4. Click Program a custom condition.
  5. Type the following under the code line //add macro code here:
    return !BuiltInTemplateCondition.
  6. After you type the period, a selection menu will open containing all the built-in teamplates. Select the one you want, for example CustomField1NotEmpty.
  7. Add a period and type the following after the period:
    IsMet(template,citation);

The template should now look like this:

cse_creating_custom_templates-01

Background: The exclamation mark in front of BuiltInTemplateCondition ensures that the opposite of the default condition will happen.