Page 1 of 1

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

Posted: Wed Jun 05, 2024 2:41 pm
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?

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

Posted: Thu Jun 06, 2024 2:32 pm
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

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

Posted: Thu Jun 13, 2024 5:11 pm
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.