Difference between revisions of "Template:SourceCode"

From QETLAB
Jump to navigation Jump to search
m (Protected "Template:SourceCode" (‎[edit=sysop] (indefinite) ‎[move=sysop] (indefinite)))
Line 3: Line 3:
 
* '''name''': The name (case-sensitive) of the function.
 
* '''name''': The name (case-sensitive) of the function.
 
* '''helper''': Set to 1 if this is a helper function (omit otherwise).</noinclude><includeonly>==Source code==
 
* '''helper''': Set to 1 if this is a helper function (omit otherwise).</noinclude><includeonly>==Source code==
<div class="mw-collapsible mw-collapsed">
+
<syntaxhighlight><include src="http://www.qetlab.com/source/{{#if: {{{helper|}}} | helpers/}}{{{name|}}}.m" nopre /></syntaxhighlight></includeonly>
Click on "expand" to the right to view the MATLAB source code for this function.
 
<div class="mw-collapsible-content"><include src="http://www.qetlab.com/source/{{#if: {{{helper|}}} | helpers/}}{{{name|}}}.m" highlight="matlab" linenums /></div>
 
</div></includeonly>
 

Revision as of 20:21, 19 September 2014

This template includes the source code for a function on a wiki page. This template it intended to be included at the bottom of every function's documentation page. Parameters that can be passed to this function are:

  • name: The name (case-sensitive) of the function.
  • helper: Set to 1 if this is a helper function (omit otherwise).