none
OpenXml(Drawing - namespace): Which <a:tab /> from the <a:tabLst> is used on which tab character RRS feed

  • Question

  • This(http://i.imgur.com/HuU3qvn.png) is the powerpoint file with different sizes of tabs (indicated inside each red boxes is only one(1)tab). From left to right, the sizes are respectively: 2in, 1in, 1in.

    This(http://i.imgur.com/i4D2q0z.png) is a snippet from the XML file. Seen here is the the list of <a:tab> inside the <a:tabLst> tag.

    My question is: Which <a:tab> should be applied to which tab character inside the <a:t>? or is there any other way to work things out?

    Tuesday, July 28, 2015 7:01 AM

Answers

  • Hi, if you turn on the ruler (View -> Ruler) you can see what's going on here. The simple answer to your question is that it depends on the size of the text and where the next tab stop is physically. Here are a few examples that demonstrate the behavior using the same text and tab positions.

    Custom Tab Settings:



    Example #1. The text in this example is 9 pt.


    You can see that the word "World" is left aligned to the first tab stop,  "Apple" is right aligned to the second tab stop, and "Bee" is left aligned to the third tab stop. This is exactly what you might expect to see.


    Example #2. The text is larger, 18 pt. This is what your screen shot was showing.


    "World" is left aligned to the first tab stop but then "Apple" comes right after it without any spacing in between. "Bee is still left aligned at the third tab stop. I want to show you one more example before explaining what is going on between "World" and "Apple"


    Example #3. The text is larger again, 32 pt.


    This is where things will start making sense. "World" is still left aligned at the first tab stop but "Apple" is now left aligned at the third tab stop. The reason for this is because "World" is taking up more than the inch of space between the first and second tab stops. After the end of "World" the next tab stop is the one at the 4" mark. "Bee" is out there at the 6" tab stop because that is the first one following the end of "Apple", which is just barely exceeding the tab stop at the 5" mark. If you reduce the text size to 30 pt. in this example "Bee" gets bumped back to the tab stop at the 5" mark.

    Seeing that, it's probably a little easier to understand what is going on in example #2. After "World", the next physical tab stop is the second one that is right aligned at the 3" mark. However "Apple" is longer than the space available between the end of "World" and where the tab stop is, so it just does the best it can.

    If you experiment some more with this it should begin to make sense. Please let me know if that helps you.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Wednesday, July 29, 2015 7:39 PM
    Moderator
  • Hi, the answer here again is that it depends on the size of the text. Tab stops do not 'apply' to a specific tab in a run of text and you will not be able to determine which tab stop will be used when you encounter a tab without first knowing how the string has been rendered to the screen up to that point. Here is a very unrealistic example that hopefully will make everything clear.



    This is using the default font and size (Calibri 18pt) and I have a single custom tab stop defined at the 2" mark. But as you can see, the first tab encountered in the string is using the 3rd tab stop at the 4" mark because that is the first one that occurs after the end of that first really long word.

    In summary, it's not possible to know which tab stop will be used for a tab in a run of text by just looking at the XML. You have to take into consideration how it will look on the screen, which is a function of the rendering engine.

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Thursday, July 30, 2015 7:17 PM
    Moderator

All replies

  • Hi,

    Thank you for this inquiry. One of our engineers will look into this and follow-up soon.

    Thanks,

    Edgar

    Tuesday, July 28, 2015 2:51 PM
    Moderator
  • Hi, I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon. Thank you for your patience.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Tuesday, July 28, 2015 4:47 PM
    Moderator
  • Hi, if you turn on the ruler (View -> Ruler) you can see what's going on here. The simple answer to your question is that it depends on the size of the text and where the next tab stop is physically. Here are a few examples that demonstrate the behavior using the same text and tab positions.

    Custom Tab Settings:



    Example #1. The text in this example is 9 pt.


    You can see that the word "World" is left aligned to the first tab stop,  "Apple" is right aligned to the second tab stop, and "Bee" is left aligned to the third tab stop. This is exactly what you might expect to see.


    Example #2. The text is larger, 18 pt. This is what your screen shot was showing.


    "World" is left aligned to the first tab stop but then "Apple" comes right after it without any spacing in between. "Bee is still left aligned at the third tab stop. I want to show you one more example before explaining what is going on between "World" and "Apple"


    Example #3. The text is larger again, 32 pt.


    This is where things will start making sense. "World" is still left aligned at the first tab stop but "Apple" is now left aligned at the third tab stop. The reason for this is because "World" is taking up more than the inch of space between the first and second tab stops. After the end of "World" the next tab stop is the one at the 4" mark. "Bee" is out there at the 6" tab stop because that is the first one following the end of "Apple", which is just barely exceeding the tab stop at the 5" mark. If you reduce the text size to 30 pt. in this example "Bee" gets bumped back to the tab stop at the 5" mark.

    Seeing that, it's probably a little easier to understand what is going on in example #2. After "World", the next physical tab stop is the second one that is right aligned at the 3" mark. However "Apple" is longer than the space available between the end of "World" and where the tab stop is, so it just does the best it can.

    If you experiment some more with this it should begin to make sense. Please let me know if that helps you.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Wednesday, July 29, 2015 7:39 PM
    Moderator
  • Thank you for the light speed [for newbies — well-suited for me] answer, just a follow-up question, considering this XML snippet:

    To simplify things:

    1. There is <a:tab pos="1828800" algn="l"/>

    2. <a:t> value is Hello<tab>World<tab>Apple

    Question: To which tab would <a:tab pos="1828800" algn="l"> apply to (without looking at the actual file, that is)?

    Actual file:





    Thursday, July 30, 2015 1:44 AM
  • Hi, the answer here again is that it depends on the size of the text. Tab stops do not 'apply' to a specific tab in a run of text and you will not be able to determine which tab stop will be used when you encounter a tab without first knowing how the string has been rendered to the screen up to that point. Here is a very unrealistic example that hopefully will make everything clear.



    This is using the default font and size (Calibri 18pt) and I have a single custom tab stop defined at the 2" mark. But as you can see, the first tab encountered in the string is using the 3rd tab stop at the 4" mark because that is the first one that occurs after the end of that first really long word.

    In summary, it's not possible to know which tab stop will be used for a tab in a run of text by just looking at the XML. You have to take into consideration how it will look on the screen, which is a function of the rendering engine.

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Thursday, July 30, 2015 7:17 PM
    Moderator