cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How to rotate text in table cell

EmilMeindl
7-Bedrock

How to rotate text in table cell

Is there a way to rotate text 90 degrees in a table row or table cell?

Thanks,

ACCEPTED SOLUTION

Accepted Solutions

I hope it helps:

<e-i-c gi="entry">

<charlist charsubsetref="own-line">

<font inherit="1">

<hyphen inherit="1">

</charlist>

<att>

<specval attname="rotate" attval="1">

<charsubset>

<suppress sup="1">

<usetext source="%\ROTCCW%,#CONTENT,%\ENDROTCCW%"></usetext>

</charsubset>

</att>

</e-i-c>

View solution in original post

17 REPLIES 17

Are you using Arbortext FOSI composition, Arbortext Print Publishing composion or XSL-FO composition?

PDF output, HTML output?

FOSI for PDF output.

I hope it helps:

<e-i-c gi="entry">

<charlist charsubsetref="own-line">

<font inherit="1">

<hyphen inherit="1">

</charlist>

<att>

<specval attname="rotate" attval="1">

<charsubset>

<suppress sup="1">

<usetext source="%\ROTCCW%,#CONTENT,%\ENDROTCCW%"></usetext>

</charsubset>

</att>

</e-i-c>

This answer looks good.

It matches the content described in the PTC article 38621

https://www.ptc.com/appserver/cs/view/solution.jsp?n=CS38621

Thanks for your help!

What sort of file do I look for to add this entry to. Is it added to .style or is it done in a .fos?

Bryon

TimPhelps
12-Amethyst
(To:bfriesen)

Peter's solution can be place in a .fos stylesheet.

It can also be placed into a .style by using a FOSI source edit.

Note: it is best to place source edits in property sets.

That way an element can use the property set, but the element's condtions and/or contexts themselves do not contain the source edit. (Can reduce the complication of the source edit.)

Will this also work in Change Page for Defense?

Still not sure where this goes.

I go to propert Set and created a new Table_cell_rotate. where do I go to paste the text above

Bryon

Will this solution work for the Editor vs. the Print Composer output?

You won't see the rotation in the editor window, only in the composed output.

thanks Clay, wanted to see if I made the e-i-c change in the correct location and it seems I did not.

thanks

Bryon

Hi Bryon--

When you update your FOSI, don't insert the whole chunk of code that Peter posted. Instead, there should already be an <eic> for "entry". Find that one, copy the entire <att> element and its content from Peter's code sample, and insert it at the end of the entry EIC (just before the </eic> end tag, after any other <att> elements).

If it still doesn't work, you might need to play around with the order of <att> conditions in your entry EIC, to prevent some other <att> condition from triggering first before you get to the @rotate check.

--Clay

Thanks for the guidance Clay. How do you set which cells you would like to rotate?

Bryon

That's what the @attname and @attval attributes indicate in the FOSI snippet. In this case, it's @rotate=1 on the <entry> element. I think that's what Docbook uses by default.

For DITA and specializations thereof, you would probably want to use @outputclass instead, since DITA doesn't define a @rotate attribute. So, in the FOSI code, you would change it to look like:

          <specval attname="outputclass" attval="rotate">


and then in your document, for the table cell you want to rotate, put the caret inside it, right-click, select "Modify Attributes->Cell", and set the "outputclass" attribute to "rotate".

Hi Clay,
I really Thank you and Peter for sharing the solution to wrap the content in table and rotate it.

 

However, I tried to implement the same in my file but unable to do so.

 

I have a predefined attribute "outputclass=maintenance.calendar" which is given to the table. Once it is given the content in header row should rotate 90deg CCW.
I have created a context as [xpath="table[@outputclass='maintenance.calendar']/tgroup/thead/row/entry"]
I used the code but output doesn't change.

This is what I have done. Do we need to substitute "#CONTENT" with any particular tag?

 

<e-i-c gi="entry"
xpath="table[@outputclass='maintenance.calendar']/tgroup/thead/row/entry"
selector="table[@outputclass='maintenance.calendar']/tgroup/thead/row/entry">
<charlist inherit="1">
<indent inherit="0"/>
<textbrk startln="1" endln="1"/></charlist>
<att>
<specval attname="PRINT-ONLY"
attloc="system-var" attval="#ANY"/>
<charsubset charsubsetref="Table_header">
<font famname="HelveticaNeueLT Std Lt Cn"
size="10pt" weight="bold"/>
<indent inherit="0"/>
<highlt fontclr="#FFFFFF"/></charsubset>
</att>
<att>
<specval attname="gentext-only"
attloc="system-var" attval="#ANY"/>
<specval
attname="_styleexportfosi::reset_counters_seen"
attloc="system-func" attval="1"/>
<charsubset></charsubset>
</att>
<att>
<specval attname="outputclass"
attval="maintenance.calendar"/>
<charsubset>
<suppress sup="1"/>
<usetext
source="%\ROTCCW%,#CONTENT,%\ENDROTCCW%">
</usetext>
</charsubset>
</att>
</e-i-c>

 

Can you please help me understand how and what can be done??

Thanks in advance.
Bhanu

What setting do you need to change to see the text rotate?

Bryon

Announcements

Top Tags