How to remove a space by 1 in Harlowe

Twine version 2 (not sure where to check for version number, nothing in help)

So far my example code below is only for the Trunk. But if the book is in the briefcase, you will see else (for the trunk) will just output a period character. However when this happens there is 1 space between train and the period . How do i remove this 1 space? In another program i use to create text games, i can do this with a < del > command, is there anything like that in Twine? I hope this makes sense.

You have your briefcase on your lap (if: $BookWhere contains "briefcase")[which the old world book is safely inside.] Your trunk is stored in the luggage carriage at the very back of the train (if: $BookWhere contains "trunk")[where the old world book is safely stored inside it.](else:)[.]

Hi, welcome to the forum!

It should work if you just move the conditional text directly up to the preceding text, put the space (or comma and space) inside the conditional text, and remove the else, and just print the period unconditionally. It might not look very nice in the editor, but it comes out correctly in the game.

One additional thing to note is that the first period should be outside the conditionally printed text as well; otherwise, if the first condition ($BookWhere contains "briefcase") is not true, then it won’t be printed, and the text will read like: “You have your briefcase on your lap Your trunk is stored” (and so on), without the period after “lap”.

So, putting it together:

You have your briefcase on your lap(if: $BookWhere contains "briefcase")[, which the old world book is safely inside]. Your trunk is stored in the luggage carriage at the very back of the train(if: $BookWhere contains "trunk")[, where the old world book is safely stored inside it].

Having said that, I think I’d maybe also rewrite the text slightly, because the first relative clause might be a bit confusing at first glance when it doesn’t come directly after the noun which it refers to (the briefcase). So that variant might look like:

You have your briefcase(if: $BookWhere contains "briefcase")[, which safely contains the old world book,] on your lap. Your trunk is stored in the luggage carriage at the very back of the train(if: $BookWhere contains "trunk")[, where the old world book is safely stored inside it].

Thanks for your reply and help. Rewriting that sentence makes better sense.