rami's Auto Caption Instructions

LiCapt is a list of style sets which are place in dropdown: {<style name>,<LaTex instruction set>} (LiCapt = {{"large, name, value", "$ \large{\textsf{ %n=%v}}$"}, {"large, name", "$ \large{\textsf{ %n}}$"}, {"large bold, Name", "$ \large{\textsf{\textbf{ %n}}}$"}}) LiCaptSel = Zip[Element[L, 1], L, LiCapt] (captionTemplate = Element[LiCapt, SelectedIndex[LiCaptSel], 2])

This is entered into the Global JavaScript tab under Object Properties for any item in Algebra list function ggbOnInit() { ggbApplet.registerAddListener("AddCaption"); } function AddCaption(obj){ var tmpl= ggbApplet.getValueString("captionTemplate") OK=ggbApplet.evalCommand('SetCaption['+obj+',"'+tmpl+'"]') } Forum Source [url=http://forum.geogebra.org/viewtopic.php?f=2&t=41161]rami's attachment[/url]