Spine Labels, Customizing

This documentation explains how to customize Spine Labels with Print Templates.


Table of Contents

Explanation

Spine labels, referred to as Monographic Labels in Sierra, are descriptive tags added to the spines of items that commonly include the call number, title, and author of the work. Spine labels allow staff to identify where the item should be shelved in the library and provide helpful information to the patron when looking at items on the shelf.

These are sometimes also paired with what is called a pocket label. This is a much larger label with more information from the record that is sometimes attached to the inside cover of books, or used elsewhere depending on the library’s procedures.

The Sierra print template system is capable of creating either or both of these from an item record in Sierra, assuming you have a printer and label stock with the right configuration.

Top of page

Export a template

From settings you can select a template and export the file to your computer with the Export button.

Top of page

Creating and Editing Templates

Sierra does not have any internal system to create or edit print templates. You have to do that in software outside of Sierra. The files are .jrxml files. Jrxml stands for JasperReports eXtensible Markup Language.

III recommends software called JasperSoft for editing jrxml files. You can also edit them in a simple text editor like Notepad++. This tutorial will show a template in Notepad++ so you can see everything that is going on.

Sierra is not compatible with the most current version of JasperSoft available online. Sierra is compatible with version 6.0.0. As of this writing JasperSoft is on version 6.20.6.

You can download version 6.0.0 from CSDirect here https://csdirect.iii.com/downloads/ireport.php.

The file extension needs to be .jrxml for them to work in Sierra. If you use a text editor, I recommend turning on your ability to see file extensions in Windows because it is easy to get the extension wrong and cause it to fail. Be careful to change the extensions when you save. The text editor will probably try to set them to .txt all the time.

When they are exported they can have a completely different file name from the label in Sierra. It is a good idea to use the same name in both places, just so you can keep track of things.

Top of page

Parts of a Template

When creating a template it is easiest to copy a working template and edit it. You can ask other Marmot members for templates that might already do what you need. Such as if you want to do a pocket label, find an example of a working pocket label template and copy that as a starting point.

You will probably have to edit the template at least some what. You might have 2 inch labels and the one you are copying is made for 1.5 inch, for example.

These examples show a template in Notepad++.

The header is where you can define the overall characteristics of the label.

  • name: This is a name you can give the template. JasperSoft will use this to set the file name when you save, but Notepad++ will ignore it and you can set the file name to whatever you want. It is required and should be unique to this template.

  • columnCount: you can have multiple columns in your label

    • Usually there is only one, but you could use more for pocket labels for example

  • printOrder: whether the text should be vertical or horizontal

  • orientation: portrait or landscape

  • pageWidth and pageHeight: define the size of the label. If these are too large it may try to add extra space on each label and push them out of aliment, or it may just fail.

  • columnWidth: how wide will the column be. This needs to fit in the page width you already defined. If it is larger than the pageWidth it will cause an error. If there is more than one column, the widths of all columns need to be less than or equal to the width of the whole page.

  • columnSpacing: defines the space between multiple columns.

  • leftMargin, rightMargin, topMargin, bottomMargin: These define the number of printer’s points in the page margin.

  • There may be other fields in the template you copied.

Top of page

Declarations

The next long section is where the data elements you can use are declared so the system can use them. These are required. They very rarely change. They may change with a Sierra upgrade. In that case the new declarations will be in the new default print template and can be copied into old templates. If you copy from an old template, it is possible it doesn’t have the same declarations as the current system expects. This can cause it to fail.

Top of page

Body

This is where you define what will go on the label

  • <band>: Each section has a band. This defines the vertical space for that section in the column.

    • The band takes the entire width of the column, so it only has a height characteristic.

    • If you aren’t using a section, like <title>, set the band for that section to 0 and it won’t effect the label.

    • The heights of all the bands need to add up to less than or equal to the total label height defined in the header (including the margins).

  • <textField>: This is where you will define your label.

    • <reportElement>: this is where you can define characteristics of the textField

      • x: this can be used to move the printing up this number of printer's points

      • y: this can be used to move the printing right by this number of printer's points

      • width: this is the width of the space where the label will print. It must be less than or equal to the width of the column.

      • height: this is the height of the space where the label will print. It must be less than or equal to the band.

      • key: a name for this text field

    • <box>: This allows you to print a box around the <textField>. This can be useful if you are having trouble figuring out where are the boundaries of the <textField> on the printed label. If you create a box you can see what’s going on. Then remove the box before you go into production.

    • <textElement>: Here is where you can define the characteristics of the text, such as font.

    • <textFieldExpression>: This is where you will actually define what will print on the label.

      • This is in Java programing language. (Not JavaScript)

Let’s look at this expression that prints this label:

<![CDATA[ $F{callSubf} + ($F{callSubf}.equals("") ? "" : "\n") + $F{callNumericAll} + " " + $F{callSubbCR} + ($F{callSubbCR}.equals("") ? "" : "\n") + $F{callSubk} + ($F{callSubk}.equals("") ? "" : "\n") + $F{itemv} ]]>

Spaces and line breaks don’t make any difference, so you can add them to the template to help you understand what’s going on.

  • $F{callSubf} This says to print whatever is in data element callSubf, which is defined in Data Elements below. It is call number prestamp. If there is no call number prestamp, then it does nothing.

  • + This means do the next thing

  • ($F{callSubf}.equals("") ? "" : "\n") This means if callSubf is blank, i.e. it “equals(““),” then print nothing. Otherwise, i.e. there was something there, then print a line break. So this will print a line break after the prestamp if there is one, and it will do nothing if there is not.

  • $F{callNumericAll} Print whatever is in data element callNumericAll.

  • " " Print a space

  • $F{callSubbCR} Print whatever is in the data element callSubbCR.

  • ($F{callSubbCR}.equals("") ? "" : "\n") If there was a callSubbCR, then print a line break after it. Otherwise do nothing.

  • $F{callSubk} Print whatever is in the data element callSubk.

  • ($F{callSubk}.equals("") ? "" : "\n") If there was a callSubk, then print a line break after it. Otherwise do nothing.

  • $F{itemv} Print whatever is in data element itemv.

Top of page

Importing a Template

Once you have a template complete, save it as a .jrxml file, and you can import it in Settings.

Data Elements

The data elements are the components it is possible to extract from an item record into a spine label.

 

Element Number

Element Name

Description

Data Source

Element Number

Element Name

Description

Data Source

1

callAlphaStart

Call number component

Alpha content up to the first number in subfield a or h (first occurrence only) of the c-tagged variable-length field. For example:

c090 a|PR3884.45

2

callNumericStart

Call number component

Numeric content up to the decimal point in subfield a or h (first occurrence only) of the c-tagged variable-length field. For example:

c090 a|PR3884.45

3

callNumericAfterDec

Call number component

The decimal point and the following numeric content in subfield a or h (first occurrence only) of the c-tagged variable-length field. For example:

c090 a|PR3884.45

4

callEndCR

Call number component

All remaining content (following the three elements above) in subfield a or h (first occurrence only) of the c-tagged variable-length field. For example:

c092 |a636.80887 WIL

5

callSubbCR

Call number component

All content in subfield b or i (first occurrence only) of the c-tagged variable-length field. For example:

C090 |aG4030 .s24|b.U52

6

callSuba

Call number component for pocket labels

All content following the first three elements listed above in subfield a or h (first occurrence only) of the c-tagged variable-length field. For example

c090 |aG4030 .s24|b.U52

7

call Subb

Call number component for pocket lables

All content in subfield b (first occurrence only) of the first c-tagged variable-length field. The leading decimal point is stripped and spaces are preserved. For example:

c092 |a004|b.A34 ONE TWO

8

callSubf

Call number prestamp

All content in subfield f (first occurrence only) of the first c-tagged variable-length field. For example:

c090 |aD842 mic 1992|fPicture Books|j1234|ktesting

9

callSubj

Call number shelving control number

All content in subfield j (first occurrence only) of the first c-tagged variable-length field. For example:

c090 |aD842 mic 1992|fPicture Books|j1234|ktesting

10

callSubK

Call number post-stamp

All content in subfield k (first occurrence only) of the first c-tagged variable-length field. For example:

c090 |aD842 mic 1992|fPicture Books|j1234|ktesting

11

itemFix58

Copy number

Fixed-length field 58 from the item record.

12

itemFix79

Item location

Fixed-length field 79 from the item record.

13

itemFix79Len3

Item location

Fixed-length field 79 from the item record.

14

branchesLabel

Item location

Label, found in the branches file, that corresponds to data in fixed-length field 79 from the item record.

15

concatIndex

Concatenated author-title

Derived from values in your system’s settings. Uses content from subfield a (first occurrence only) of the first c-tagged variable length field. If the field is non-MARC, the entried field is used.

16

acctname

Library name

From the account name file. For multi-account sites, the library name from the accounting unit (account name file) associated with the user’s login name.

19-45

itema, itemb…itemz

Item variable-length fields

First instance of the a-z tagged variable-length fields from the item record.

45

concatIndexCR

Concatenated author-title

Derived from values in the system’s settings. Uses content from subfield a (first occurrence only) of the first c-tagged variable length field. If the field is non-MARC, the entire field is used.

46

callField

Call number

All content “as is” from subfield a or h of the c-tagged variable-length field.

47

itemFix58c

Copy number

Fixed-length field 58 from the item record, preceded by the text “c”.

48

callNumericAll

Call number component

A concatenation of the callNumericStart and callNumericAfterDec elements. For example:

c090 a|PR3884.45

49

callEntire

Call number

All content from the call number field, including all subfields and repeated subfields, with redundant spaces and delimiters removed.

50

callEntireCR

Call number

All content from the call number field, including all subfields and repeated subfields, with redundant spaces and delimiters converted to carriage returns.

51

callSubc

Call number component for pocket labels

All content from subfield c (first occurrence only) of the first c-tagged variable-length field. For example: 090 FIC|c1998|d345|pandrew

52

callSubp

Call number component for pocket labels

All content from the subfield p (first occurrence only) of the first c-tagged variable-length field. For example:

090 FIC |c1998|d345|pandrew

53

biba

Author

All content from subfields a-z from the first a-tagged field from the bibliographic record, regardless of MARC tag.

54

bib245b

Title

All content from the first occurrence of subfield b in the first 245 or 200 field from the bibliographic record, regardless of the field group tag.

55

bib245n

Title

All content from the first occurrence of subfield n in the first 245 or 200 field from the bibliographic record, regardless of the field group tag.

56

bib245p

Title

All content from the first occurrence of subfield p in the first 245 or 200 field from the bibliographic record, regardless of field group tag.

57

callSube

Call number component

All content in subfield s (first occurrence only) of the first c-tagged variable-length field.

For example:

c089 |a823.912|sTOL|cD|r2|e/2

58

callSubr

Call number component

All content in subfield e (first occurrence only) of the first c-tagged variable-length field. For example:

c089 |a823.912|sTOL|cD|r2|e/2

59

callSubs

Call number component

All content in subfield s (first occurrence only) of the first c-tagged variable-length field. For example:

c089 |a823.912|sTOL|cD|r2|e/2

Top of page