数据
<KScript.Document title="Gliders" to="'gliders.pdf'">
<Figure path="glider.png" caption="A glider over four generations." id="fig-glider" width="0.8" />
</KScript.Document>import KScript.Document
Document(title: 'Gliders', to: 'gliders.pdf') {
Figure(path: 'glider.png', caption: 'A glider over four generations.', id: 'fig-glider', width: 0.8)
}path: 是相对于脚本的 PNG 或 JPEG 文件。width: 为占文本宽度的比例(0.5 或 '50%')。带标题的图表按 [#id] 编号。