Page History: Snippets
Compare Page Revisions
Page Revision: 2016/05/12 01:26
A snippet is a small container of re-usable code (math, text, regions). Ordinarily, it is intended as an unit to incorporate into larger programming modules.
Snippets in SMath Studio are simple *.sm files that are placed into the special "snippets" folder.
How to use a snippet
Every snippet can be inserted into the page:
- using the Dynamic Assistance;
- pressing TAB will insert snippet inside the collapsed Area Region
- pressing Shift+TAB will insert just all snippet expressions without Area Region
- directly from the "Snippet Manager" of the "Tools" menu group.
How to make a snippet
To make a *.sm file a snippet, follow these steps:
- go in the File > Properties > File attributes menu and setup a Snippet Shortcut;
- save the file in the snippets folder (in Windows 7 this is usually C:\Program Files (x86)\SMath Studio\snippets);
History
- SMath 0.90 (Stable): Snippets feature implemented;
- SMath 0.95.4594 (Stable): all the available snippet's title translations are included to collapsed Area on snippet insert;
- SMath 0.97.5280 (Nightly build): Fixed inserted snippet layout when collapsed Area Region exists inside Snippet;
See also
References