Is there a way to keep spaces and punctuation before a closing parenthesis/bracket?

Hello everyone,

One of the formatting rules in EN removes punctuation, spaces and paragraph ends before a closing parenthesis or bracket. This is obviously sensible but as I am now working with old/rare books and need to include collation in a custom field, that behaviour causes some inconvenience to me, as one of the common signatures for front matter quires is “):(” and thus the field starts with a closing parenthesis.

Explaining it briefly, I keep the pagination formula in Pages and collation formula in Section, e.g.:

[8], 1-71, [1 blank] (80 pag.)
):(1, A1-I4 (40 fol.)

and then insert in a style:

Pages
Section

When the Section field starts with “):(”, the result is the contents of both fields in one line without a space between.

[8], 1-71, [1 blank] (80 pag.)):(1, A1-I4 (40 fol.)

If I insert a leading text in the style, with a colon and a space:

Pages
Collation: Section

the output appears on two lines (as expected) but without the colon and space:

[8], 1-71, [1 blank] (80 pag.)
Collation):(1, A1-I4 (40 fol.)

A “brute and crude” way around this would be to insert a different character before the collation formula in the field and remove it automatically in the final formatted text. But maybe there is a trick to make EN keep any character before opening parenthesis/bracket?

Thanks for any suggestions – Rafal

Did you check with tech support to ask?

Are these in the record or defined by the output style? in the output style preceeding something with ` will force it to use the “text” and not the field. Maybe that would work here too?

Hi Ieanne,

Thank you for your reply. The closing parenthesis is the first character in a record field and that causes the problem. Yes, I tried the text in the output style but it does not help.

After continued trials and testing, I am now convinced EN removes the punctuation and space before the closing parenthesis after doing all the formatting, as the last stage parsing. So my best solution is to use some specific characters sequence in the output style that can then be automatically replaced in the final typescript.

E.g. I will have in the output style: “@@@### Pages” and then replace that first string with whatever I need in Word (after converting to plain text, of course).

This is a good practical solution but a bit ugly :slight_smile:

Best regards