oxy_ string functions don’t seem to work in CSS header specifications

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Vinny
Posts: 19
Joined: Wed Jan 12, 2022 1:07 pm

oxy_ string functions don’t seem to work in CSS header specifications

Post by Vinny »

Folks,
In my document, I would like to have a header reproducing only a part of the ‘sectiontitle’, so instead of writing, say:

Code: Select all

@page :left {
...
	@top-left {
		color: blue;
		content: string(sectiontitle);
		}
}
I would like something like this:

Code: Select all

@page :left {
...
	@top-left {
		color: blue;
		content: oxy_replace(string(sectiontitle), *some_pattern*, *replacement_string*, true);
		}
}
However, this doesn’t work for any pattern other than those matching a void string, and it seems the string(sectiontitle) expression is actually void when the oxy_replace (or any other oxy_* function for that matter, such as oxy_substring) is called.
Is this intended, and is there a workaround?
julien_lacour
Posts: 537
Joined: Wed Oct 16, 2019 3:47 pm

Re: oxy_ string functions don’t seem to work in CSS header specifications

Post by julien_lacour »

Hello,

Is it not simpler to redefine 'sectiontitle' using the string-set property? The default definition is available in the user guide.
You can also define a custom string-set and use it instead of sectiontitle if you need to keep it in some cases and use another in other cases.

Regards,
Julien
Vinny
Posts: 19
Joined: Wed Jan 12, 2022 1:07 pm

Re: oxy_ string functions don’t seem to work in CSS header specifications

Post by Vinny »

Hello Julien,

thanks for your answer and apologies for this belated one. Was busy with other things. I’ll definitely try that and let you know.
Post Reply