TransWikia.com

creating a template (class) for smart diagram (bubble diagram)

TeX - LaTeX Asked by BSik on February 27, 2021

I’m trying to build a template for a bubble diagram, since I don’t know in advance how many bubbles need to be added I’m trying to do it using foreach.

I suspect foreach does not expand the way I think it would because instead of multiple bubbles I get 1 bubble with all the text.

newcommandaddbubbles[1]{
    foreach x in {#1}{textbf{x}, newline}
}

% Command for printing bubble
newcommandflexbubblediag[1]{
    renewcommand{flexbubblediag}{
        smartdiagram[bubble diagram]{
            addbubbles{#1}
        }
    }
}

in my .tex I use to

flexbubblediag{{bubble1},{bubble2}}

One Answer

Turns out the expansion with foreach was unnecessary.

% Command for printing bubble
newcommandskillbubbles[1]{
    renewcommand{skillbubbles}{
        smartdiagram[bubble diagram]{#1}
    }
}

Works just fine

% Skill bubbles 
skillbubbles{{Skill1}, {Kill12}, {madSkill}, {mad  science}}

Answered by BSik on February 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP