Defaulting prolog in Author mode

<oXygen/> general issues.
kmank
Posts: 81

Defaulting prolog in Author mode

Mon Jul 25, 2016 5:37 pm

Hello,
I am trying to collapse the prolog by default (it's quite lengthy) when opening a topic in Author mode.
I have tried adding the following to the dita.css file:

prolog{
visibility:-oxy-collapse-text;
}

Obviously not using this correctly. Please provide direction. Thanks!!
alex_jitianu
Posts: 632

Re: Defaulting prolog in Author mode

Tue Jul 26, 2016 3:20 pm

Hello,

The prolog is already marked as being foldable so all you need to do is to set its initial state:

Code: Select all

*[class~="topic/prolog"] {
  -oxy-folded:true;
}

You should also make sure you are adding the rule inside the right CSS. You haven't mentioned which Oxygen version you are using and that's important because starting with version 17.1 we begun using some new CSSs for DITA (the ones located inside frameworks/dita/css/core). If you are running version 17 or newer you can use the CSS Inspector to locate the CSS that styles the prolog element.

An alternative would be to put this rule inside a new CSS, save this CSS inside ${oxygenInstallDir}/frameworks/dita and:
- Open the Preferences dialog box (Options > Preferences) and go to Document Type Association.
- Select the DITA document type and press the Edit button.
- Go to the CSS subtab of the Author tab.
- Click the Add button to open a dialog box in which you will specify the URI to your newly created stylesheet. Note: please make sure you leave the Title empty and the Alternate button unchecked.
This rule will now be contributed to all the built-in DITA CSSs.
kmank
Posts: 81

Re: Defaulting prolog in Author mode

Wed Aug 03, 2016 7:39 pm

Thanks, Alex! We have opted for your second option, which is working well. As a related item (sorry to tag this onto the thread):

Is there a way to default a view to use the Basic style as default? It seems to default to Old - Compatibility Mode, and then we have to switch to Basic to make the prolog fold.

Thanks!
alex_jitianu
Posts: 632

Re: Defaulting prolog in Author mode

Thu Aug 04, 2016 11:40 am

Hello,

If you've opted for the second option then it means that you have the "fold" rule inside a new CSS. This new CSS should be applied on top of any active CSS as long as you left the "Title" empty and the "Alternate" button unchecked.

By default, Oxygen activates the first available CSS present in the "Styles" drop-down. After changing the active CSS, that change will be remembered during the current editing session (until you restart Oxygen). Is the "Old - Compatibility mode" CSS the first one present in the Styles drop-down? If the answer is "Yes", you should go again to the Document Type Edit dialog, on the CSS tab. On the bottom of the table presenting the CSSs there are two arrows that will Promote/Demote the entries from the table. Use them to move the "Basic" CSS on the first position in the table.

Best regards,
Alex

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 1 guest