Understanding the CSS used buy the map with resolved topics
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 9
- Joined: Tue Mar 26, 2013 12:00 am
- Location: Paris, France
- Contact:
Understanding the CSS used buy the map with resolved topics
Hi,
In fact the way this "map resolved topics" author view works is a little bit cryptic for me.
In my application, I have a standard map with standard topicrefs going to specialized topics.
Everything for my specialized topics is in a dedicated oXygen framework but the map is a standard DITA one, using the DITA oXygen framework.
Now I want to parameterize the standard "resolved view", for my dedicated topics and print. If I use this feature, it is for being able to get oXygen customizations for author revisions and comments.
So, I have different questions, all related to the same use case :
- for now the only solution I found for css customization was to modify the Oxygen XML Editor 18\frameworks\dita\css\edit\alternate-full-width-layout.css. How can I only have my own customizations and where do I put them ? In my own framework with a dedicated specialized map ? Elsewhere ?
- what is the structure of this css ? I assume it needs to import my topic css plus the dita oxygen stuff for managing references and conref ? Have anyone got a sample ?
- how to modify the css for comments (too large, too big font that goes over the text) and revision stuff ?
- how to remove topic nested indentation ? I put every borrders to 0 (topicref, topic, body) but it continue to indent?
- last, working with alternate-full-width-layout.css, as soon as I print, the font size is not respected. Seems that the font grows up to fullfill margin. So Iis it the same css that is used when viewing the resolved map in the editor and when printing this view ? How to work on css-print margins and font size ?
Ok, this is a long set of question but I really spent yet a lot of time tryoing to understand so I will be happy to get directions and ideas.
Regards, Pierre
In fact the way this "map resolved topics" author view works is a little bit cryptic for me.
In my application, I have a standard map with standard topicrefs going to specialized topics.
Everything for my specialized topics is in a dedicated oXygen framework but the map is a standard DITA one, using the DITA oXygen framework.
Now I want to parameterize the standard "resolved view", for my dedicated topics and print. If I use this feature, it is for being able to get oXygen customizations for author revisions and comments.
So, I have different questions, all related to the same use case :
- for now the only solution I found for css customization was to modify the Oxygen XML Editor 18\frameworks\dita\css\edit\alternate-full-width-layout.css. How can I only have my own customizations and where do I put them ? In my own framework with a dedicated specialized map ? Elsewhere ?
- what is the structure of this css ? I assume it needs to import my topic css plus the dita oxygen stuff for managing references and conref ? Have anyone got a sample ?
- how to modify the css for comments (too large, too big font that goes over the text) and revision stuff ?
- how to remove topic nested indentation ? I put every borrders to 0 (topicref, topic, body) but it continue to indent?
- last, working with alternate-full-width-layout.css, as soon as I print, the font size is not respected. Seems that the font grows up to fullfill margin. So Iis it the same css that is used when viewing the resolved map in the editor and when printing this view ? How to work on css-print margins and font size ?
Ok, this is a long set of question but I really spent yet a lot of time tryoing to understand so I will be happy to get directions and ideas.
Regards, Pierre
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Understanding the CSS used buy the map with resolved topics
Hello Pierre,
Please find some answers below:
Could you give me more details? So basically you want to see all comments made by users in the entire DITA Map context, right? And you also want to print this to PDF so that reviewers look at the existing reviews and comments? Usually we recommend that the entire flow or editing and reviewing XML should be XML based. We have a WebAuthor tool which can be used for online reviewing of topics directly in DITA.
The "alternate-full-width-layout.css" is an alternate CSS, it does not import another CSS but it is combined with one of the base non-alternate CSSs.
All non-alternate CSSs (for example "frameworks\dita\css\edit\style-basic.css" which is applied by default) refer to the "dita.css". This CSS in turn will import other CSSs which will include styling both for DITA topics and DITA Maps.
You can add your own CSS styles in a couple of ways:
1) Extend the "DITA Map" document type association and in the Author->CSS tab add a reference to an extra CSS without specifying a title for it and without setting its "Alternate" flag. This should instruct Oxygen to combine your custom CSS with the currently applied one.
2) Via an XML catalog you can resolve a special URI http://www.oxygenxml.com/extensions/aut ... Custom.css to your custom CSS's location. Your custom CSS will be contributed to all other CSSs used to render any XML in the Author editing mode:
https://www.oxygenxml.com/doc/versions/ ... ports.html
The problem is that if your custom CSS is provided as a non-alternate CSS, it will also be used when a DITA Map is opened in the Author visual editing mode without topicrefs expanded.
which will only be used by Oxygen when printing (File->Print).
One more thing about printing to PDF using CSS, you can either use the File->Print action or there is a special DITA Open Toolkit transformation scenario called DITA Map PDF - WYSIWYG - Experimental which can be used to print to PDF using a commercial engine (Prince XML or Antenna House):
https://www.oxygenxml.com/doc/versions/ ... f-css.html
so this might be an alternative to explore.
Regards,
Radu
Please find some answers below:
Usually when rendering a topic in the Author visual editing mode Oxygen presents conrefs expanded in place. But by default when a DITA Map is rendered in the Author editing mode topicrefs are not expanded. When using this special "map resolved topics" mode Oxygen expands topicrefs as if they would be conrefs.In fact the way this "map resolved topics" author view works is a little bit cryptic for me.
Ok.In my application, I have a standard map with standard topicrefs going to specialized topics.
Everything for my specialized topics is in a dedicated oXygen framework but the map is a standard DITA one, using the DITA oXygen framework.
I do not understand your use case.Now I want to parameterize the standard "resolved view", for my dedicated topics and print. If I use this feature, it is for being able to get oXygen customizations for author revisions and comments.
Could you give me more details? So basically you want to see all comments made by users in the entire DITA Map context, right? And you also want to print this to PDF so that reviewers look at the existing reviews and comments? Usually we recommend that the entire flow or editing and reviewing XML should be XML based. We have a WebAuthor tool which can be used for online reviewing of topics directly in DITA.
If in the Preferences->Document Type Association page you edit (or extend) the DITA Map document type association, in the Author tab there is a CSS tab. Some of the CSSs there are added with "Alternate:yes" meaning that they apply as layers over one of the base CSSs.So, I have different questions, all related to the same use case :
- for now the only solution I found for css customization was to modify the Oxygen XML Editor 18\frameworks\dita\css\edit\alternate-full-width-layout.css. How can I only have my own customizations and where do I put them ? In my own framework with a dedicated specialized map ? Elsewhere ?
The "alternate-full-width-layout.css" is an alternate CSS, it does not import another CSS but it is combined with one of the base non-alternate CSSs.
All non-alternate CSSs (for example "frameworks\dita\css\edit\style-basic.css" which is applied by default) refer to the "dita.css". This CSS in turn will import other CSSs which will include styling both for DITA topics and DITA Maps.
When you want to see how a certain XML element is styled, you can right click in the Author visual editing mode and choose Inspect styles.- what is the structure of this css ? I assume it needs to import my topic css plus the dita oxygen stuff for managing references and conref ? Have anyone got a sample ?
You can add your own CSS styles in a couple of ways:
1) Extend the "DITA Map" document type association and in the Author->CSS tab add a reference to an extra CSS without specifying a title for it and without setting its "Alternate" flag. This should instruct Oxygen to combine your custom CSS with the currently applied one.
2) Via an XML catalog you can resolve a special URI http://www.oxygenxml.com/extensions/aut ... Custom.css to your custom CSS's location. Your custom CSS will be contributed to all other CSSs used to render any XML in the Author editing mode:
https://www.oxygenxml.com/doc/versions/ ... ports.html
Could you maybe attach or refer to an image? Do you mean those side callouts? Those cannot be customized via CSS.- how to modify the css for comments (too large, too big font that goes over the text) and revision stuff ?
If you use the "Open map with resolved topics" action and then in the "Styles" drop down you choose the "Print ready" alternate CSS, it should left align all topicrefs. The print-ready CSS frameworks\dita\css\edit\alternate-map-print-preview-layout.css basically sets 0 padding left on topicrefs. As I said before, using the CSS Inspector view is a good way to know what exact selector to overwrite. You can also use the !important CSS flag to increase the priority of your selector.- how to remove topic nested indentation ? I put every borrders to 0 (topicref, topic, body) but it continue to indent?
The problem is that if your custom CSS is provided as a non-alternate CSS, it will also be used when a DITA Map is opened in the Author visual editing mode without topicrefs expanded.
The same set of CSSs that is applied when editing the XML should also be applied when printing it. With the addition that in the CSS you can add special media print selectors like:- last, working with alternate-full-width-layout.css, as soon as I print, the font size is not respected. Seems that the font grows up to fullfill margin. So is it the same css that is used when viewing the resolved map in the editor and when printing this view ? How to work on css-print margins and font size ?
Code: Select all
@media print {
p {padding-left:0px;}
}
One more thing about printing to PDF using CSS, you can either use the File->Print action or there is a special DITA Open Toolkit transformation scenario called DITA Map PDF - WYSIWYG - Experimental which can be used to print to PDF using a commercial engine (Prince XML or Antenna House):
https://www.oxygenxml.com/doc/versions/ ... f-css.html
so this might be an alternative to explore.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service