ExLibrisGroup / spineomatic-cloudapp

Cloud App version of SpineOMatic
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

Formatting only first line of call number #106

Closed DiederikL closed 1 year ago

DiederikL commented 1 year ago

Hi,

I'm currently trying to design layouts and templates for the different members of my consortium which look as much as possible like the labels they are now printing with the Alma Label Tool.

We had a lot of local additional configuration on that and I'm fully aware that not all of it can be reproduced in SpineOMatic but there is one issue I would like to present to you.

On the labels of quite a number of the libraries involved, the first line of the parsed call number was formatted differently: it was printed in bold and underlined.

An example: a holding with 852 _8 $$b KVHB $$c KVHB $$h 05.20 $$i 01 $$l 019 resulted in a spine label as shown below

image

I was wondering if there might be a way to get the same result in SpineOMatic. I'm not very familiar with html and css but some 'googling' showed that there are some ways to do this for the first line of a paragraph with a so-called pseudo-element (which sounds rather mysterious).

Is there a way to apply this method in SpineOMatic?

Best regards,

Diederik Lanoye

LIBIS KU Leuven Libraries (LIBISnet-consortium, Belgium)

mgobat commented 1 year ago

@DiederikL, interesting idea, the pseudo-element. Initial investigation indicates that any CSS included in the label template disappears upon save. This will require further investigation.

Ideally, if we exposed the individual parts of the call number for inclusion in the label template, each part could get its own styling, i.e.: bold, italic, font, font size. But we haven't considered exposing the individual parts previously.

mgobat commented 1 year ago

@DiederikL, which call number field are you including in your template? Is it {{field:item_data.call_no}}? Thanks.

DiederikL commented 1 year ago

Hi @mgobat ,

Indeed, I use the Parsed call number which corresponds to {{field:item_data.call_no}}.

Exposing the indvidual subfields of the call number would indeed be an interesting option to solve this complicated problem. I recently found another 'local' solution where the first line combines the label prefix (// 852 $$c) with 852 $$k.

Best regards,

Diederik

mgobat commented 1 year ago

@DiederikL, if we exposed the individual parts of the item_data.call_no field, would that help? Not the actual MARC data, but the individual parts as parsed by Alma. Thanks.

DiederikL commented 1 year ago

@mgobat , that would indeed be the way to a solution since it would allow to add the parsed parts as separate elements on consecutive lines and apply distinctive formatting to the first element. Sounds great 👍

mgobat commented 1 year ago

This enhancement is available in version v1.3.2-beta2 of the Cloud App. To use the beta version: From the Cloud App Center List, click the “I” icon in the upper right corner of the SpineOMatic tile. Then click the “Try: v1.3.2-beta2” link in the “More information” panel.

New fields appear in the "Add Field" dropdown when editing a template:

These values are taken from the item_data.call_no field. Each individual part included in the layout may have its own styling, e.g. font, font weight, bold, italic, underline.

DiederikL commented 1 year ago

Hi @mgobat,

With these additional available fields, I'm getting close to a solution. With the call number parts I can indeed create templates such as the one shown below with specific styling for each individual part and specific choices to combine parts on one line or to separate them.

image

However I still have one problem but I think it might be easy to solve. At this moment call number parts 1 to 7 are available but the parsed call number often has more individual parts. For exemple, the 852 below

image

has 8 individual parts.

image

Alma parses each subfield to an individual part and splits subfields by spaces into separate parts so the number of individual parts can rise quickly. So would it be possible to make some more of these individual parts (8-10?) available.

Best regards,

Diederik

mgobat commented 1 year ago

@DiederikL, sure we'll increase the call number parts available to 10 for the general release.

DiederikL commented 1 year ago

@mgobat, that's great. What is the time schedule for this next general release?

Diederik

mgobat commented 1 year ago

@DiederikL, late April or early May.

mgobat commented 1 year ago

@DiederikL, v1.3.2 is now in general release with this enhancement.

DiederikL commented 1 year ago

Hi @mgobat, that's great. Once again many thanks for your help.