Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support table cell entry @rotate attribute #2717

Closed
raducoravu opened this issue Jun 8, 2017 · 5 comments

Comments

Projects
None yet
6 participants
@raducoravu
Copy link
Member

commented Jun 8, 2017

Based on this DITA Users List feedback:

I have tried text rotation in cells using No rotation occurred. Does anyone have any suggestions as to why this might not be working?

As a possible solution in the XSLT stylesheet:

      DITA-OT\plugins\org.dita.pdf2\xsl\fo\tables.xsl

the template with mode "processTableEntry" could be modified as such:

            <xsl:template match="*" mode="processTableEntry">
                <xsl:call-template name="commonattributes"/>
                <xsl:call-template name="applySpansAttrs"/>
                <xsl:call-template name="applyAlignAttrs"/>
                <xsl:call-template name="generateTableEntryBorder"/>
                <fo:block-container reference-orientation="{if (@rotate eq '1') then 90 else 0}">                
                    <fo:block xsl:use-attribute-sets="tbody.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:template>

Only Antenna House seems to have decent support for this from what I tested. Both XEP and Apache FOP do not properly render the table.

@jelovirt

This comment has been minimized.

Copy link
Member

commented Jun 8, 2017

We should not generate fo:block-container elements unless they are absolutely needed. They will mess up @start-indent and other other similar properties. Thus, if something like this is added, we need to only generate the container if it's rotated.

@raducoravu

This comment has been minimized.

Copy link
Member Author

commented Jun 8, 2017

👍

@ToshihikoMakita

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2017

They will mess up @start-indent and other other similar properties.

What the meaning of the phase "mess up"?
Even if fo:block-container is located inside the fo:table-cell, the @start-indent is inherited from fo:table-caption to inside the fo:block-container. This inheritance should be the feature of XSL-FO specification.

So there should be no influence to generate redundant fo:block-container inside fo:table-cell.

robander added a commit that referenced this issue Nov 27, 2018

Support rotate att on table entry #2717
Signed-off-by: Robert D Anderson <robander@us.ibm.com>

robander added a commit that referenced this issue Nov 27, 2018

Avoid entry rotation for FOP #2717
Signed-off-by: Robert D Anderson <robander@us.ibm.com>

@robander robander self-assigned this Nov 27, 2018

robander added a commit that referenced this issue Nov 30, 2018

Skip cell rotation for XEP #2717
Signed-off-by: Robert D Anderson <robander@us.ibm.com>
@kirkilj

This comment has been minimized.

Copy link

commented Feb 8, 2019

How is this issue related to #1778?

@robander

This comment has been minimized.

Copy link
Member

commented Feb 9, 2019

@kirkilj this appears to be a duplicate of 1778 - I had not noticed the extra copy, or I would have closed one of them a while back. Thanks for helping to clean up the list of issues.

#3161 is about ready to go, and will handle the @rotate attribute in the upcoming 3.3 release for this issue / for 1778.

@robander robander added this to the 3.3 milestone Feb 9, 2019

robander added a commit that referenced this issue Feb 14, 2019

Merge pull request #3161 from dita-ot/feature/rotateentry
Support rotate attribute on table entries #2717
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.