Crystal Impact Home  
  About version 5 New functions Feature tour Download  

Diamond Version 5 User Manual: Display of structure picture

Adding text to structure picture

Previous article: Labelling atoms and bonds
Next article: Legend of atom groups


This article deals with the use of text in the structure picture and will tell you:

- how to add a new text string to the structure picture,

- what the text may contain and how to access bibliographic text,

- how to make use of text fields,

- about control characters in text strings,

- how to define the size, position, and style of the text,

- how to shift the text with the mouse,

- how to change the contents, size, position, and style of an existing label text,

- how to delete text.

 


Adding Text

To enter a new text, use the "hotkey" Shift+Ctrl+T. This opens the Add Text dialog. If you make use of the main menu, assure that no existing text has been selected, and choose the Text command from the Objects menu. (Otherwise the Edit Text dialog would be called to edit the selected text.)

You can enter a new text in the Text combobox or access an existing text from the combobox list. Furthermore you can select from bibliographic data and insert the text directly or as text field. Read "Contents of Text String" and "Using Text Fields" about the contents of a text string or the use of text fields.

Size, position and styles of the text can be defined in the Style group of the Add Text dialog.

 


Contents of Text String

A user-defined text can have any arbitrary contents, including special characters for text formatting (bold, super/subscript, etc.). You can access pre-defined text from bibliographic data either as copy or as text field.

To enter a new text or to edit an existing text, use the input field of the Text combobox in the Add/Edit Text dialog. You can access text strings that have previously been defined from the list of the combobox. (Diamond stores all texts that have been entered during a session.)

To copy a text from the bibliographic data of the current structure, push the Get button, which opens the Get Text dialog, where you select from several bibliographic data, such as title, structural formula, authors' names, etc. as well as from generated data, such as formula sum, Pearson code, etc. The selected text can either be inserted into the Text combobox of the Add/Edit Text dialog directly as copy, or as text field. A text field has the advantage that the text is automatically updated if the corresponding bibliographic data has changed.

 


Using Text Fields

A text field has the form "{FIELD=<FIELDNAME>}", e.g. "{FIELD=FORMULA_SUM}" for the formula sum. The following field names are available:

<FIELDNAME>

Description

TITLE

the title of the publication or of the compound,

AUTHORS

the name(s) of the author(s),

NAME_COMMON

the common (usual, trivial) name of the compound,

NAME_SYSTEMATIC

the systematic (IUPAC) name of the compound,

NAME_MINERAL

the mineral name of the compound,

NAME_STRUCTURETYPE

the name of the structure type,

FORMULA_SUM

the formula sum, which has been generated from the atomic parameter list,

FORMULA_STRUCTURAL

the structural formula, which is defined as bibliographic data,

FORMULA_ANALYTICAL

the analytical formula, which is defined as bibliographic data,

FORMULA_TYPE

the formula type, which has been generated from the atomic parameter list,

PEARSONCODE

the Pearson symbol, which has been generated from the atomic parameter list and the current space group,

WYCKOFFSEQUENCE

the Wyckoff sequence, which has been generated from the atomic parameter list.

Text fields have the advantage that they will be updated automatically when the structural data have been changed, whereas invidual text is not updated.

Individual text and text fields may be mixed together, e.g. "Formula: {FIELD=FORMULA_STRUCTURAL}"

 


Control characters in text strings

The character strings you use for user-defined text in the structure picture may contain several control characters for formatting. DIAMOND works with control characters using CIF as well as ICSD nomenclature.:

Superscript and subscript
The "^" character switches the superscription on or off rsp. There may be multiple characters between the "^" characters, e.g. "Na^+^" or "Fe^2+^". In ICSD format the character combination "$%" leads to the superscription of the one following character. For each superscripted character the character combination "$%" must be repeated.
The corresponding characters for subscription are "~" and "$/" rsp.

Greek letters
Letters of the greek alphabet are introduced by a back slash, followed by an uppercase or lowercase letter, e.g. "\g" for a lowercase "gamma", "\G" for an uppercase "Gamma". This table (from: Acta Cryst. (1991), A47, 655-685) gives you a survey:

 Lowercase   Uppercase   Description 
\a \A alpha
\b \B beta
\c \C chi
\d \D delta
\e \E epsilon
\f \F phi
\g \G gamma
\h \H eta
\i \I iota
\k \K kappa
\l \L lambda
\m \M my
\n \N ny
\o \O omikron
\p \P pi
\q \Q theta
\r \R rho
\s \S sigma
\t \T tau
\u \U ypsilon
\w \W omega
\x \X xi
\y \Y psi
\z \Z zeta

In ICSD format the sequence "$+" introduces an uppercase, but "$-" a lowercase greek letter. The greek letter itself is written out, e.g. "$-gamma".

Special characters
You may use special characters, i.e. characters not belonging to the ASCII code set, without circumscribing, e.g. "ê", "Ç", "Å" etc. These special characters will be stored in the Diamond structure file (DSF) in ANSI format, but converted for CIF and vice versa, e.g. the Angstroem symbol is written as "\%A" in CIF format.

 


Style, Size, and Position

The position of a text refers to the center of the structure window (or structure picture rsp.). That means text does not move if the structure is shifted or rotated. Both position and size use centimeters dimension. Thus the size of the text does not vary with the enlargement factor.

Text position

You define the horizontal (left input field of Position...) and vertical (right input field) distance of the reference point of the text string from the center of the picture (or from the center of the structure window, rsp.), in centimeters. Positive values mean shift to the right and top rsp. The reference point of the text string is the left edge of the first character and the baseline of the text.

Text size

Define the text size in centimeters in the input field Text size. The size is the height of a character cell of the text in centimeters. This is the vertical distance between bottom and top line of the font.

Text color

Select the color for the text from the color select box.

Text font and other attributes

Use the Font button to calls the MS Windows standard font dialog to define the font and attributes like bold and/or italics. If the Underline checkbox is checked, the label text will be underlined. If the Strike out checkbox is checked, the label text will be struck out.

 


Shifting Text Position With Mouse or Cursor

You can shift the position of a text with the mouse. If you select multiple texts, you can shift these texts simultaneously. Shifting the position means here changing the horizontal and vertical position of the text(s) relative to the center of the structure window or picture.

To shift a single text, move the mouse cursor into the rectangle that surrounds the text, then press down the left mouse button and shift the text with left mouse button down to the desired position. When you have reached the desired position, release the left mouse button.

To shift multiple texts simultaneously, first select the texts, then move the mouse cursor into one the text markers, and continue like for a single text.

You can create a copy of an existing text at the target position, that means you copy a text instead of moving it. For that, hold down the Ctrl key when you press down the left mouse button and continue like for a single text.

 


Changing Text, Style, or Size After Creation

To edit the properties of one or more existing texts, do the following:

If you want to edit one text, the easiest way is to double-click into the rectangle that surrounds the text. Or click with the right mouse button into that rectangle, and then choose the Text command from the Edit submenu of the context menu, or choose the Text command from the Objects menu.

If you want to edit more than one text at a time, first select the texts, then either double-click into one of the markers or click with the right mouse button into one of the markers and choose the Text command from the Edit submenu of the context menu, or choose the Text command from the Objects menu.

All methods open the Edit Text dialog.

If you edit one text only, change the settings you want to alter, and confirm with OK. If multiple texts have been defined, those settings keep blank that are not unique. If for example two texts have been selected with identical settings, but at different positions, the input fields for the position will be empty.

See the articles "Contents of Text String", "Using Text Fields", and "Style, Size, and Position" about contents, size, position, and style of a text.

 


Removing Text

To delete one or more texts, select the texts, and then either press the Delete key, or click with the right mouse button into one of the markers, and choose the Text command from the Destroy sub-menu of the context menu.

 


Previous article: Labelling atoms and bonds
Next article: Legend of atom groups