[RC 21] case sensitivity in placeholder tags

Many placeholders are case sensitive on Windows but not the Mac, and the same is true (last time I checked) for image names when used in a placeholder. The latest example is <$compileGroup>, which works on the Mac … but it has to be <$compilegroup> on Windows.

Some tags must be case sensitive, like <$R> vs <$r>, <$W> vs <$w>, <$p-R> vs <$p-r>.

Most tags don’t need case sensitivity, and I wish they didn’t have any. In the case of <$compileGroup> or <$pageGroupTitle>, capitalizing words (after the first) makes the tag easier to read and understand.

The bigger issue is portability. If a compile format works on the Mac, it should work on Windows.

That’s difficult with external files in the mix, but making Compile replacements conditional on platform would help a lot!

The problem is that Windows is NOT case sensitive. It treats test.txt as identical to Test.txt.

I prepared a load of images in a linux machine and transferred them into Scrivener on Windows. I had forgotten that Windows doesn’t care about case and I had a few problems with image files named for example like this : Gm3m7.png and another GM3m7.png.

I had forgotten that Windows was not case sensitive and thus considered these two files as identical. Fortunately, it usually provides a warning asking if you want to over write one file with the other.

It is a pain but Windows was always like that.

You can tell Windows to become case sensitive but that’s opening a whole can of worms that’s not worth it. But to your point, any references to a filename should follow the case sensitivity standards of the underlying OS, absolutely – but the placeholder tags themselves should not be case sensitive on Windows if they aren’t on the Mac, and vice versa, because those are being evaluated by Scrivener, not the OS.

Thanks drmajorbob, when the <$compileGroup> placeholder is within the main text, it is handled as expected, but when placed as a compile prefix/suffix or in compile headers/footers it is not working as expected. This has been adjusted and will be available in the next update.

It was in Compile that I needed it. Thanks!

Thank you for that information, devinganger. It prompted me to do a bit of checking and I found that it exists since 2018. So I installed the subsystem for linux and then set my directory to case sensitive.

Only sad thing is that it doesn’t feed thro to sub-directories. They all have to be changed individually.

Maybe another sad thing is that I’ll feel obliged at some time to look and see what else can be done with the linux sub-system :frowning:

Yeah, just be sure to keep the system directories out of it.

And if you’re going to mess with WSL, WSL2 is definitely the best way to do it.