support text rotation
Are you missing a feature? Request its implementation here.
-
- Posts: 156
- Joined: Sat Feb 26, 2005 12:09 am
- Location: USA
- Contact:
support text rotation
Post by shudson310 »
We need to be able to rotate certain headers in our tables when @outputclass=”rotated” is specified.
In our xsl:fo, we support this with:
Please add equivalent support in Chemistry PDF CSS.
In our xsl:fo, we support this with:
Code: Select all
<xsl:when test="@outputclass='rotated'">
<fo:block-container reference-orientation="90" inline-progression-dimension="1in">
<fo:block xsl:use-attribute-sets="thead.row.entry__content">
<xsl:apply-templates select="." mode="ancestor-start-flag"/>
<xsl:call-template name="processEntryContent"/>
<xsl:apply-templates select="." mode="ancestor-end-flag"/>
</fo:block>
</fo:block-container>
</xsl:when>
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Staff Content Engineer
Site: docs.servicenow.com
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: support text rotation
Hi Scott,
I already replied to this on the email you sent on our support email address, but I will also paste my reply on this thread.
Costin
I already replied to this on the email you sent on our support email address, but I will also paste my reply on this thread.
Regads,We only support transform: rotate(90deg); / rotate(-90deg); rules.
However, you could either rotate the whole page containing the table or rotate the table in the page.
For guidance, you should take a look at How to Deal With Wide Tables - Page Rotation and Rotating tables sections from the DCPP / Chemistry User-Guides respectively. Please make sure you pay attention also to the Notes on the indicated User-Guide pages.
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 156
- Joined: Sat Feb 26, 2005 12:09 am
- Location: USA
- Contact:
Re: support text rotation
Post by shudson310 »
I saw the reply, but this request is to support the text rotation within a header cell, not rotate the entire table. I still haven't been able to get this to work:
Code: Select all
*[class ~= "rotated"] {
transform: rotate(90deg) !important;
}
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Staff Content Engineer
Site: docs.servicenow.com
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: support text rotation
Hi Scott,
As a remark you should rotate the text the other way around:
But somehow indeed this does not work if you mark the "<entry>" with "outputclass='rotate'". We'll try to fix it on our side.
In the meantime if you can add a paragraph in each <entry> that you rotate like:
you could re-write your CSS like this:
and this should work.
Regards,
Radu
As a remark you should rotate the text the other way around:
Code: Select all
*[class ~= "rotated"] {
transform: rotate(-90deg) !important;
}
In the meantime if you can add a paragraph in each <entry> that you rotate like:
Code: Select all
<entry outputclass="rotated"><p>aaa</p></entry>
Code: Select all
*[class ~= "rotated"] > * {
transform: rotate(-90deg) !important;
}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 156
- Joined: Sat Feb 26, 2005 12:09 am
- Location: USA
- Contact:
Re: support text rotation
Post by shudson310 »
Adding the <p> around the table header text and using the style provided works! That said, the table header is not tall enough, so the text overruns. How can I address the table row height?
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Staff Content Engineer
Site: docs.servicenow.com
-
- Posts: 156
- Joined: Sat Feb 26, 2005 12:09 am
- Location: USA
- Contact:
Re: support text rotation
Post by shudson310 »
To address the height issue, I found a similar post on StackOverflow. I still can't get the text to align at the bottom of the cell now:
Code: Select all
*[outputclass ~= "rotated"] > * {
display: block;
transform: rotate(-90deg) translate(-100%) !important;
text-align: left !important;
margin-left: 0 !important;
margin-top: -10%;
vertical-align:bottom;
}
tr > *[outputclass ~= "rotated"] {
padding: 10% 0;
height: 0;
vertical-align:bottom;
}
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Staff Content Engineer
Site: docs.servicenow.com
-
- Posts: 156
- Joined: Sat Feb 26, 2005 12:09 am
- Location: USA
- Contact:
Re: support text rotation
Post by shudson310 »
The padding was the issue. I fixed as follows:
Code: Select all
*[outputclass ~= "rotated"] > * {
display: block;
transform: rotate(-90deg) translate(-100%) !important;
text-align: left !important;
margin-top: -10%;
margin-bottom: 0;
vertical-align:bottom;
white-space: nowrap;
}
tr > *[outputclass ~= "rotated"] {
padding-top: 10%;
height: 0;
vertical-align:bottom;
text-align: left !important;
}
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Staff Content Engineer
Site: docs.servicenow.com
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: support text rotation
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 40
- Joined: Wed May 25, 2016 10:45 am
Re: support text rotation
Thanks, this works somehow. But I cannot figure out how the cell height is calculated. As I understand, code "padding-top: 10%;" is responsible for that. But 10% of what? It does not depend on the cell content.Radu wrote:Hi,
Yes, as I explain further up in the thread:
Best regards,
Dr. ABacus
#define QUESTION ((bb) || !(bb)) // © 1601 William Shakespeare
Dr. ABacus
#define QUESTION ((bb) || !(bb)) // © 1601 William Shakespeare
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: support text rotation
The recommended way is to set a width and optionally a height to rotated block. Negative paddings or margins should be used as last resort.
If you are using the HTML based transformation try:
A DITA sample:
Many regards,
Dan
If you are using the HTML based transformation try:
Code: Select all
*[outputclass ~= "rotated"] > *[class ~= "topic/p"] {
display: block;
transform: rotate(-90deg) !important;
text-align: left !important;
padding:0;
margin:0;
vertical-align:bottom;
white-space: nowrap;
background-color:cyan;
width:50px;
height:80px;
}
tr > *[outputclass ~= "rotated"] {
background-color:yellow;
padding:0;
}
Code: Select all
<table frame="all"
id="simpletable_hfw_z5d_gfb" rowsep="1" colsep="1" >
<tgroup cols="2" >
<colspec colname="c1" colwidth="1*" rowsep="1"/>
<colspec colname="c2" colwidth="1*" colsep="1"/>
<thead>
<row>
<entry>Normal</entry>
<entry>Normal</entry>
</row>
</thead>
<tbody>
<row>
<entry outputclass="rotated">
<p>Rotated</p>
</entry>
<entry>Normal</entry>
</row>
<row>
<entry>Normal</entry>
<entry>Normal</entry>
</row>
<row>
<entry>Normal</entry>
<entry>Normal</entry>
</row>
</tbody>
</tgroup>
</table>
Dan
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: support text rotation
Post by julien_lacour »
Hello,
Starting with Oxygen 24.0 it is possible to rotate table cells.
You can either use CSS transform property (together with rotate() function) or directly the built-in DITA @rotate attribute.
Regards,
Julien
Starting with Oxygen 24.0 it is possible to rotate table cells.
You can either use CSS transform property (together with rotate() function) or directly the built-in DITA @rotate attribute.
Regards,
Julien
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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