Is there any way to align two text boxes horizontally on the same page?

Hi Everybody,

I need to align the two text boxes horizontally on a single page. Below is the scenario showing what exactly I am looking for.

Screenshot showing Text Box A in black at the top, Text Box B in green below it, and Text Box C in blue aligned to the right of Text Box B.

The text of all the boxes will vary but the Text Box B and Text Box C must be bottom align as shown in the above screenshot. 

  1. If the text of Text Box A increase/decrease then the Text Box B should reduce from top but alignment of Text Box B must be aligned with Text Box C.
  2. If the text of Text Box C increase/decrease then also the Text Box B must be aligned with Text Box C.

Can anyone help me to achieve this output without manual intervention.

Thanks and Regards,

Shahnawaz



Generated Image Alt-Text
[edited by: Trados AI at 5:33 AM (GMT 0) on 5 Mar 2024]
emoji
  • Via transform, if you could put Boxes A, B, and C in the same pickup in 3 separate annotations with different Xorig, Yorig, and Width values, it should work. You have to know the page geometry as far as box widths are concerned. 

    In the coding sample below, the live area is 39p, so Box A and Box B are 25.8p wide and Box C is 12.4p wide. 

    Pickup is 39p, scope is page. 

    <?xpp PICK;3boxesin1;39p;;page;;;;yes;1?>)

    Box A <?xpp ANNT;25.8p;;left;top;;;;;;15;;left-to-right?> (left and top are key)

    Box B <?xpp ANNT;25.8p;;left;bottom;;;;;;15;;left-to-right?> (left and bottom are key)

    Box C <?xpp ANNT;12.4p;;right;top;;;;;;15;;left-to-right?> (right and top) are key

    Box D is in it's own 39p pickup and pickups have to be ordered. 

    Using this markup, Box A will always top align with Box C and Box B will always bottom align with Box C as long as Box C is deeper than the total of Box A and Box B. If not, Box B should be stacked and I used a 1p gutter, ie, 
    <?xpp ANNT;25.8p;;left;stack;1p;;;;;15;;left-to-right?>.

    We have a measure cycle for our content to determine the depth of certain elements. In this case we would use the measure cycle to determine the depth of Boxes A, B, and C so that if the depth of Box A plus the depth of Box B, plus 1p is less than the depth of Box C, then the annotation for Box B is <?xpp ANNT;25.8p;;left;bottom;;;;;;15;;left-to-right?>, otherwise it's <?xpp ANNT;25.8p;;left;stack;1p;;;;;15;;left-to-right?>

    (Note that 15 is the background color for the annotation, in this case a light blue.)


    emoji
  • Thank you Mize for your detail input on this and really appreciated, but I have a sections instead of Boxes and in that we are using multiple tables and setting them using page column override in order to utilize maximum white space of the current 0page.

    So is there any other way instead of converting the whole section into the pickups.

    Thanks and Regards! 

    emoji