Template:SourceCode: Difference between revisions

From QETLAB
Jump to navigation Jump to search
Updated for the move to github
SyntaxHighlight has been removed, so redirect to github instead
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">
[Click here https://github.com/nathanieljohnston/QETLAB/blob/master/{{#if: {{{helper|}}} | helpers/}}{{{name|}}}.m"] to view this function's source code on github.</includeonly>
Click on "expand" to the right to view the MATLAB source code for this function.
<div class="mw-collapsible-content"><syntaxhighlight src="https://raw.githubusercontent.com/nathanieljohnston/QETLAB/master/{{#if: {{{helper|}}} | helpers/}}{{{name|}}}.m" line></syntaxhighlight></div>
</div></includeonly>

Revision as of 14:06, 6 May 2022

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).