General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion How to change table width?

  • linjinwei

    How to change table width?

    Participants 12
    Replies 13
    Last Activity 13 years, 7 months ago

    First an introduction.
    Hi, I am new here and also new to XMetal. I will very likely have lots and lots of questions. So please bare with me. I need these solved for my project.

    My question: How do you change the table width? No matter what width I set in “table properties”, in pdf will always show 100%(full width of file). I checked the “tables-attr.xsl”, and I believe this is where you change the coding for table.

    [code]
    line 54

        
          
         auto
          100%
            5pt
            5pt
       

    [/code]

    What do I need to change? I changed “table-layout” from “fixed” to “auto”, but still didnt work…

    By the way, if I have more questions, do I post in new thread or edit this one?

    Reply

    Su-Laine Yeo

    Reply to: How to change table width?

    Welcome to XMetaL, linjinwei. Please create a new thread for each question. Don't worry, we'r all new here 🙂

    Reply

    linjinwei

    Reply to: How to change table width?

    Thanks for the warm welcome.

    But im afraid you didnt answer my first question…

    Reply

    Su-Laine Yeo

    Reply to: How to change table width?

    I didn't answer because I don't know XSL. Can anyone else answer this question?

    Reply

    mag3737

    Reply to: How to change table width?

    I'm afraid I don't immediately know the answer to your “real” question either.  But it looks to me like you are using DITA.  (I recognize that filename as being from the DITA OT.)  So…if no one comes up with an answer here quickly, you might also try asking the question on the dita-users email list (http://tech.groups.yahoo.com/group/dita-users/)

    Reply

    linjinwei

    Reply to: How to change table width?

    What's DITA?

    OK my real question is simply how to change the table width?

    Reply

    Derek Read

    Reply to: How to change table width?

    To answer this question easily we need to know the following:

    Which DTD or Schema are you working with? (this is why people are asking about “DITA”)

    Which table model does the DTD use? XMetaL supports HTML, CALS, and “semantic” tables.

    Are you asking about modifying the width during editing or in output?

    The first two have official specs (HTML at W3C and CALS at OASIS) and XMetaL Author allows you to modify the width for both of these very easily during editing through the user interface, either by dragging borders or using the Table Properties dialog, provided your DTD or Schema defines these tables using the proper attributes to support this.

    Semantic tables are any group of elements you have customized (usually using XMetaL Developer) to render as a table using CSS settings. The width of semantic tables is automatically determined by the content it contains, but will not render larger than the width of the current editing width of the document containing it.

    When producing output the width of tables is defined directly as a result of the process used to generate that output in combination with the XML being passed to that process. The transformation process might use XSLT, XSLT + XSL-FO, or some other method. So, knowing the table type is important, knowing which tool you are using to generate output is important, as well as the type of output you are producing.

    If you are working with DITA documents then we might assume you are using the DITA Open Toolkit that is integrated with XMetaL Author Enterprise. In that case we still need to know which type of output you are attempting to produce.

    Reply

    linjinwei

    Reply to: How to change table width?

    Im not very sure either. Perharps it is easier to describe with screenshots.

    1)First I created a table, and set the width to 5cm
    [img]http://img141.imageshack.us/img141/9214/tablewidthproblem1ol9.th.png[/img]

    2)Then I run the output in pdf
    [img]http://img366.imageshack.us/img366/2126/tablewidthproblem2kj0.th.png[/img]

    3)As you can see, the result of the table in pdf is not 5cm, but the full width
    [img]http://img234.imageshack.us/img234/1653/tablewidthproblem3qd0.th.png[/img]

    What I'm trying to say is, no matter what value I set for the Table width, it will always be the same as image 3.
    I'm not sure whether this is HTML, CALS, or “semantic” tables.

    Reply

    linjinwei

    Reply to: How to change table width?

    Nobody?

    Reply

    Su-Laine Yeo

    Reply to: How to change table width?

    Hi Linjinwei,

    I'll look into this. It's very hard to see what's going on in your screenshots because they are so small. Can you post bigger ones?

    I assume you're using the Table menu to insert the table? When the dialog comes up asking for a “Table Type”, are you choosing “Normal table” or something else?

    Reply

    Su-Laine Yeo

    Reply to: How to change table width?

    I did some testing and this seems to be a bug in the open-source DITA Open Toolkit that XMetaL invokes to publish DITA content. I've logged it here: https://sourceforge.net/tracker2/?func=detail&aid=2374525&group_id=132728&atid=725074

    I'm surprised that I've never seen anyone else report this bug before. In theory, bugs in the Open Toolkit can be fixed by anyone (and anyone can then contribute their fix back into the Open Toolkit). Unfortunately I don't know enough XSL to specify how exactly to fix it. Maybe others can help here.

    Reply

    linjinwei

    Reply to: How to change table width?

    The table type is Normal.
    I'm still not sure whether this is HTML, CALS, or “semantic” tables.
    I'll repost everything:

    1)First I created a table, and set the width to 5cm
    [img]http://img122.imageshack.us/img122/5983/tablewidthproblem1jy7.png[/img]

    2)Then I run the output in pdf
    [img]http://img151.imageshack.us/img151/1397/tablewidthproblem2rc9.png[/img]

    3)As you can see, the result of the table in pdf is not 5cm, but the full width
    [img]http://img386.imageshack.us/img386/3050/tablewidthproblem3ts3.png[/img]

    Edit: So you are saying that the only solution is to wait for the next release?

    Reply

    Su-Laine Yeo

    Reply to: How to change table width?

    No, I'm saying that that this bug can be fixed by anyone who has the necessary technical skills, including other XMetaL users, or other DITA Open Toolkit users who do not use XMetaL. Most likely there is a file in the Open Toolkit that needs to be edited to have some logic added to it.

    Reply

    Su-Laine Yeo

    Reply to: How to change table width?

    By the way, the screenshots are coming through very clearly now and it really helps. Thanks for reposting them.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support