Grid layout in a presentation
Generate stunning slides effortlessly with Carbone
- Template type document pptx expert
- Carbone min. v5.0.0+
- Features loop transform
- Target bank insurance quote custom
Objectives
You want to generate a gallery of objects in a PPTX document with the following features:
- Define the offset for the repetition of the main box on the x-axis and y-axis.
Solution
Here’s how you can achieve this using Carbone:
Insert a shape
Insert a shape, such as a text block, and include the information to be displayed using Carbone tags.
Duplicate this shape and modify the text to define the iteration
{d.stars[i+1]}
Note : Use shapes instead of images or tables
Use the iterator [i] to define the offset for the repetition
Right-click on the shape, and navigate to the "View Alt Text" menu to set the transformations.
Define the following formulas
{d.stars[i].starName:print(.i):mod(5):mul(6):transform(x,cm)}
and{d.stars[i].starName:print(.i):div(5):floor:mul(4):transform(y,cm)}
to configure the iterator and transformations on both axis where :print(.i)
to consider the iterator of the loopmod(A):
to set the number of A objects that will be on a same row (ie, the number of columns)mul(B)
to set the distance B with the next boxtransform(x, cm)
to define the axis (x) of transformation and its unit
And there you go!