-
Hi @pgundlach I am trying to make a group unit the 85% of a cell of any given grid (3x3, 2x4, etc), is there a method to get the size of a cell? I read there is this Thanks! 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
You can create a Group of size 1 x 1 (place a box with size 1 inside the group) and use |
Beta Was this translation helpful? Give feedback.
-
Another answer: if you are still inside this grid: you can just use |
Beta Was this translation helpful? Give feedback.
-
Hi @pgundlach Using However using one of this two formulas with and without
<SetVariable variable="noc" select="sd:group-width('unit')" /> or
<SetVariable variable="noc" select="sd:number-of-columns()" /> Targeting this: <!-- The variable that control maxwidth -->
<SetVariable variable="mw" select="count(img)" />
<PlaceObject column="1" row="1">
<Table width="{$noc * 0.85}" stretch="max" balance="yes">
<Tr minheight="12">
<ForAll select="img">
<Td valign="middle" align="center">
<Image file="{@file}" stretch="yes" maxheight="{12}"
maxwidth="{($noc * 0.7) div ($mw * 1.2)}" />
</Td>
</ForAll>
</Tr>
</Table>
</PlaceObject> Ended up with: [...]
PlaceObject: Table at (1,1) wd/ht: 18/12 in "unit" (p. 5)
PlaceObject: Table at (1,14) wd/ht: 17/3 in "unit" (p. 5)
PlaceObject: Textblock at (1,17) wd/ht: 17/2 in "unit" (p. 5)
Error: [page 5] Could not convert dimension "\
HDMI 19 pin male to HDMI 19 pin female right angle\
24K Gold-plated\
RoHS Compliant\
\
"
/Git/publisher/src/lua/xpath.lua:632: attempt to perform arithmetic on a nil value (local 'second')
[...] Sorry for all these questions, these days have been pretty catastrophic for my skills... 😭 |
Beta Was this translation helpful? Give feedback.
-
I got the a portion of the problem, it is related with the grid issue I sent you by email. It fails when a group falls into a grid that it was supposed to use other rules. This issue that I have is shifting the grid to one page messing everything, I am pretty sure if I fix the grid shifting this will solve this issue. |
Beta Was this translation helpful? Give feedback.
I found issue I was doing math operation in this form:
$var * .8
rather than$var * 0.8
🤦♂️However the math is totally wrong, it happened the exact contrary of what I thought, is taking the whole page... 😂