[RC 21] case sensitivity in placeholder tags

User avatar
drmajorbob
Posts: 924
Joined: Sun Jul 01, 2012 1:38 am
Platform: Mac

Sat Mar 20, 2021 6:39 pm Post

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!
Teeth, without gums, fall loosely in the mouth.

(I'm not a Literature & Latte employee. Just another user.)

ph
philjaq
Posts: 149
Joined: Tue Dec 22, 2015 7:07 pm
Platform: Linux + Windows

Sat Mar 20, 2021 9:22 pm Post

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.

User avatar
devinganger
Posts: 2674
Joined: Sat Nov 06, 2010 1:55 pm
Platform: Mac, Win + iOS
Location: Monroe, WA 98272
Contact:

Sat Mar 20, 2021 11:25 pm Post

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


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.
--
Devin L. Ganger
Not a L&L employee; opinions are those of my cat
Life has a way of moving you past wants and hopes -- Kevin Flynn

User avatar
tiho_d
Posts: 1548
Joined: Tue Sep 13, 2011 1:14 pm
Platform: Linux + Windows

Sun Mar 21, 2021 2:05 am Post

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.

User avatar
drmajorbob
Posts: 924
Joined: Sun Jul 01, 2012 1:38 am
Platform: Mac

Sun Mar 21, 2021 7:25 am Post

tiho_d wrote: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!
Teeth, without gums, fall loosely in the mouth.

(I'm not a Literature & Latte employee. Just another user.)

ph
philjaq
Posts: 149
Joined: Tue Dec 22, 2015 7:07 pm
Platform: Linux + Windows

Sun Mar 21, 2021 2:36 pm Post

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

You can tell Windows to become case sensitive but that's opening a whole can of worms that's not worth it. ....


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 :-(

User avatar
devinganger
Posts: 2674
Joined: Sat Nov 06, 2010 1:55 pm
Platform: Mac, Win + iOS
Location: Monroe, WA 98272
Contact:

Mon Mar 22, 2021 9:49 am Post

philjaq wrote: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.


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.
--
Devin L. Ganger
Not a L&L employee; opinions are those of my cat
Life has a way of moving you past wants and hopes -- Kevin Flynn