Removing punctuation in certain circumstances

I've come across an odd requirement in a style guide - at least it seems odd to me - and am struggling to find a neat way to implement it without having completely different sections for online and print versions of the same type of sources.

Online versions include the phrase "[online]" immediately after the title or container title, and separated from it by a space. That's easy enough. But the [online] tag must never be followed by a full stop. This is the case even if the title in a print source is.

So a print book is

Dudley, P. R. (2001) Wavelets in Computing: An Efficient Means of Conducting Research. 2nd edn.
Oxford: Oxford University Press

But an online book is

Potter, H. (2005) An Introduction to Human Anatomy [online] 4th edn. London: Adam Arnold. available
from <http://anatomy/introduction/human/htm>; [27 March 2006]

There are several other situations where this occurs in the style guide and when I questioned it I was told that the logic is that [online] is never followed by a full stop. Is there a simple way of implementing this, or am I stuck with some extensive rewriting and tortuous logic?
  • edited October 4, 2013
    there's nothing super elegant. What I'd do is to include the period as part of the title macro, i.e. you'd have something like

    <choose>
    <if variable="URL">
    <group delimiter=" ">
    <text variable="title/>
    <text term="online" prefix="[" suffix="]"/>
    </group>
    </if>
    <else>
    <text variable="title" suffix="."/>
    </else>
    </choose>


    Obviously the whole thing becomes more complicated as you need different formatting for titles (italics, quotes, etc.), but that's the general idea.
  • Thanks. It did indeed get more complicated than that, largely because though [online] is never followed by a period, it is not the case that the title always is. But your suggestion formed the basis of something that seems to have worked.
Sign In or Register to comment.