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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Set first column in landscape

ctant
1-Newbie

Set first column in landscape

Hello every one,

I am currently facing a table issue. I shall keep my table in portrait but increase the number of columns (x4...), but doing so my table is too width.

If I change the first title column to display text in landscape, I can keep the current layout. I only found the attribute to change the whole page in landscape and when I applied it on a p element inside the table it does not correctly work: the table width take all the page even for small table.

Do you have any tip or clue to help me? You can find below exemples of the table I am trying to achieve and what I am actually achieving...

Thank you in advance,

Capture.JPG

Capture2.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
ClayHelberg
17-Peridot
(To:ctant)

Hi Camille--

Sorry, it seems I may have gotten your hopes up prematurely. This built-in support seems to only apply to CALS tables, used by several but not all doctypes. If your doctype doesn't use CALS table markup, then you would probably have to figure out how to support a rotation attribute on your own. It would depend on what attributes are available on your table cell element in your table model, and your stylesheet would have to support an appropriate attribute setting. For example, if you don't have a "rotate" attribute, but you have an "outputclass" attribute, you could configure your stylesheet to recognize a table cell where outputclass="landscape" and apply the rotation to its contents.

I haven't tried this rotation formatting for arbitrary markup (e.g. non-CALS tables), so I'm not sure how easy or difficult it would be in Styler. In the old days you used to have to do this using TeX macro insertion or other such dark magic. I don't know if that's still the case, or if there is a mechanism in Styler to do it more easily. I poked around in Styler just a little bit and didn't find anything obvious for doing this.

--Clay

View solution in original post

6 REPLIES 6
ClayHelberg
17-Peridot
(To:ctant)

Hi Camille--

To achieve this, you can set the rotate attribute on the table cell to 1:

  1. Place the caret in the cell you want to rotate
  2. Right-click, and select Modify Attribute->Cell...
  3. Find the rotate attribute and enter a 1

You will not see the rotated text in the editor view, but you will see it in PDF output.

Note that this is a fairly recently added feature, you would need version 6.0 or later to use this, and you either need to be using a standard Styler stylesheet, or you need to make sure your FOSI or XSL-FO stylesheet has appropriate templates to handle the rotate attribute.

--Clay

Hi Clay,

Thank you for this answer! I use an Arbortext v6.1 with a modified Styler stylesheet and I do not have this attribute for table cells... How can I improve my stylesheet? I never modify FOSI or XSL-FO stylesheet and I do not know wher I can find appropriate templates.

Thank you again for your help

Camille

ClayHelberg
17-Peridot
(To:ctant)

Hi Camille--

Sorry, it seems I may have gotten your hopes up prematurely. This built-in support seems to only apply to CALS tables, used by several but not all doctypes. If your doctype doesn't use CALS table markup, then you would probably have to figure out how to support a rotation attribute on your own. It would depend on what attributes are available on your table cell element in your table model, and your stylesheet would have to support an appropriate attribute setting. For example, if you don't have a "rotate" attribute, but you have an "outputclass" attribute, you could configure your stylesheet to recognize a table cell where outputclass="landscape" and apply the rotation to its contents.

I haven't tried this rotation formatting for arbitrary markup (e.g. non-CALS tables), so I'm not sure how easy or difficult it would be in Styler. In the old days you used to have to do this using TeX macro insertion or other such dark magic. I don't know if that's still the case, or if there is a mechanism in Styler to do it more easily. I poked around in Styler just a little bit and didn't find anything obvious for doing this.

--Clay

Ooooooooh dark magic, it's Voodoo time!

I already tried to set an outputclass "landscape" on a P markup, but the problem is that the only way to set content in landscape is the

setting "Landscape page body for duration of element"... When printing the PDF it is in landscape, but I get a cell with the P markup as high as the page body.

Thank you anyway, I would reopen this topic if I find a macro or anything else valuable.

Best regards

ClayHelberg
17-Peridot
(To:ctant)

Hi Camille--

On a hunch, I just did a quick test: with DITA at least, if I turn off completeness checking and force a rotate="1" attribute on a table cell (<entry>), it still has the desired effect, even though "rotate" is not a valid attribute according to the DTD. So, if you are using DITA, or some other doctype that uses OASIS tables, you might be able to get some kind of solution this way. You might need to add some code that runs just prior to publishing to insert the rotate attrs for publishing, since they are technically invalid markup, so you probably wouldn't want to save them in your actual documents. You could maybe work something out where authors use outputclass="rotate", and then the publishing preprocessor finds the cells with outputclass="rotate" and inserts the rotate="1" attr before sending the doc on to the publishing pipeline.

--Clay

OK I will try and see if it is working, or I will work on my DTD to add the rotate attribute...

Top Tags