Page 1 of 1

Creating Author Mode Custom CSS Layer for Docbook

Posted: Fri May 22, 2015 8:36 pm
by steve.cuzner
I'm interested in creating a custom CSS for my docbook variant. I've started by creating a new document type association as and extension of docbook 5. Under the author tab of the doctype I've added my own css:

Code: Select all

${frameworks}/tmwbook.framework/css/tmwbook.css
Note that my custom framework cannot reside in the Oxygen installation directory.

This all works fine. I can select the tmwbook.css file from the style toolbar. The problem is that I've got minor modifications to make and I want to inherit the core docbook.css file (${baseFramework}/css/docbook.css). tmwbook.css is a trivial customization:

Code: Select all

@import "${baseFramework}/css/docbook.css";

@namespace oxy url('http://www.oxygenxml.com/extensions/author');
@namespace xi "http://www.w3.org/2001/XInclude";

xi|include[xpointer]:before {
content: "test";
link: oxy_concat(attr(href), "#", attr(xpointer)) !important;
When I try to import docbook.css using the ${baseFramework} variable, I get a css validation error that it cannot find the file specified. So it appears that I cannot use the variables directly in the CSS. I read in a help topic (http://www.oxygenxml.com/doc/versions/1 ... ports.html) that I can use catalogs to help resolve the import statements. Given that I can't ensure that users will install Oxygen to the same location as I want, and that we expect to upgrade as the product allows and the install directory changes, How can I construct a catalog with indirection that allows for this level of unknowns? I really could use some way of accessing ${baseFramework}.

Thanks in advance,

Steve

Re: Creating Author Mode Custom CSS Layer for Docbook

Posted: Mon May 25, 2015 1:31 pm
by alex_jitianu
Hello Steve,

First of all you should remove the import of docbook.css from tmwbook.css. Afterwards, edit your document type extension and on the CSS tab add a new entry with tmwbook.css in one of the following way:

1. When specifying the tmwbook.css, make sure you give it the title Default (the same title as teh default CSS) and that the Alternate check box is not selected. What will happen now is that the two CSSs will merge and will be applied together.

2. When specifying the tmwbook.css, give it a title like My layer and make sure that the Alternate check box is selected. Afterwards, in the Styles menu you will see an entry My layer that you can activate/deactivate independently.

Best regards,
Alex

Re: Creating Author Mode Custom CSS Layer for Docbook

Posted: Thu May 28, 2015 8:20 pm
by steve.cuzner
Awesome, worked just as expected! Thanks.