v3: mysterious line of placeholders in Chapter Title

I am an experienced v3 user since I used it from the first time it came out as a beta version. A few minutes ago I switched to the new release and everything works fine - not much of a difference to the last beta which was already great and almost ready. But there is some sort of a glitch, which I still have in the v3, so I post it here as a bug:

Since a few version updates of the beta I noticed a strange behaviour in my chapter titles. I use “Kapitel <$n>” in the options and everything works fine. But whenever I start a compilation there is a mysterious string of placeholder tags placed before the word “Kapitel”, and it also shows up in the output format.
It is inserted via “Prefix”. I can delete it there and everything is fine - until the next start of scrivener and the next compilation. Then it appears again and I have to remove it manually.
I think these are residuals from a former beta version, but I really want to get rid of it.

[attachment=1]Screenshot_10.jpg[/attachment]

Could please somebody reply to this Question?
I just found a very similar line of strange placeholder symbols within the Scrivener Manual (3.0 for windows),
<!$Scr_Cs::1>
I am sure it is not intended that they are there. It looks to me that even the authors of the manual don’t know how to get rid of them?
Please repair that or tell me what to do to make them disappear!

[attachment=0]Screenshot_20.jpg[/attachment]

You can find a list of all the Scrivener placeholders here (Help->List of All Placeholders…):
[attachment=0]Screenshot 2021-04-14 113626.png[/attachment]
A quick look through the placeholder list shows that <$…> is how they are used. What you are showing does not follow that usage - <!$Scr_Cs::1>. This could be extra stuff that came over from an import from a different document type than Scrivener? If they are showing as text, you should be able to edit and delete that stuff, yes?

That code specifically shouldn’t ever come up as visible in Scrivener, it is one of the hidden codes it uses to mark style usage. Last I checked, styles don’t work correctly in the Prefix and Suffix fields yet, which is probably how they ended up showing as codes like that. You can safely delete them from the text, but it might be safest to just clear the field and type it in again from scratch.

Thank you AmberV for your reply.
Could you please tell me how to remove it?
Whenever I delete it from Prefix Field, it shows up again when restarting Scrivener, as I mentioned before - very annoying.
And obviously the makers of the help file have the same issue. So I guess I am not the only one.

@Jetstar: Thanks for your comment.
I never imported anything into scrivener from other applications. I guess this is a residual from some older version of Scrivener v2.0 beta. And I would love to get rid of it but don’t know how.

Hmm, if it is refusing to go away then the code that is designed to clean up and clear empty fields is not working properly either, in this scenario. My guess would be that since it isn’t properly coded to understand styled text in the first place, it also is somewhat “blind” to its presence.

If you are willing to do a little XML surgery, the problem should be easy enough to clear. With the project closed, go into the “Settings/Compile Formats” subfolder and edit the .scrformat file in a suitable plain-text editor. First, search for the Layout with the error in it, by looking for:

<Layout Name="(Name of Layout)"

Once you are in the right place, search for “”. You can safely remove the entire span of text between the line beginning with that, and the line ending with “”.

Now reload the project, check the layout, and all should be well.

Needless to say, it would be a good idea to make a copy of that .scrformat file in Explorer, just in case the editing of it goes awry. It’s a relatively simple operating, no more than deleting a few lines from a text file when you get down to it, but if you’d rather not mess with things at that level, the only other alternative I can think of would be to delete the Section Layout entirely, and rebuild it from scratch.

Speaking, and that could probably only be said in the most general of ways. These errors were found on caption lines that had or currently have an inline annotation at the beginning of the line, and is (or was) a bug found in the Mac text editor.

Thanks for pointing out those flaws, though, I’ve fixed them and they appear to be gone for good. I’ve made a search collection so that I can periodically check though, in case it is an ongoing Mac bug.

Thanks AmberV for your answer.
I have tried what you suggested but failed.
There is no “Compile format” folder in my Settings folder.
The only files with file ending “.scrformat” are within the Scrivener folder and point to my compile formats (not layouts).
I opened the file with the name of my problem compilation, but did not find the <$Scr_Ps::0> part.
What I found was <$Scr_H::1> what is showing up as well since I played with style settings of the Chapter Number, but all .scrformat files seem to have that.
Any ideas?
[attachment=2]Screenshot_23.jpg[/attachment]

Sorry, I should have anticipated that your Format may have been saved globally, rather than to the project. Yes, if it is a format found in the “My Formats” section of the sidebar, it will be in your main Scrivener support folder.

Each compile Format will have its own file, and within that file there will be settings relating to the Section Layouts it has within it, among all of the other settings that make up that format. So you have to first find the file for the format you are using (it should be named similarly to what you see in the sidebar), and then you will be looking for the Section Layout that causes this issue within that file, as described.

You may or may not see all of these codes in the XML file itself. It depends upon the nature of the bug. That is why I suggest just deleting the entire Prefix or Suffix element from the XML, so as to make sure no residual formatting is left over.

I suggested searching for the elements rather than the codes, because these codes may very well exist in a valid sense elsewhere in the format, where it has been programmed to work with styles correctly (like the Title Prefix and other areas of the Formatting tab).

I tried as you suggested, even deleted the format and made it new from scratch, but the line is still here. :blush:

All right, could you attach a zipped copy of the Format file so I can take a look at it? If it may have personal info in it (page headers/footers etc.) then feel free to PM me.

Thanks AmberV for your help, I managed to remove it.
I had to export the corrupted format, edit the file with a text editor, then delete the format in Scrivener and import the corrected file. Now it seems to work.

All right, glad that finally managed to solve it in the end.