Difference: VarCODE (1 vs. 9)

Revision 92016-08-08 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

CODE{"language"} -- highlight source code fragments for many languages

Revision 82016-08-08 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

CODE{"language"} -- highlight source code fragments for many languages

Revision 72016-08-08 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

CODE{"language"} -- highlight source code fragments for many languages

Revision 62016-08-08 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

CODE{"language"} -- highlight source code fragments for many languages

Revision 52016-08-08 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

CODE{"language"} -- highlight source code fragments for many languages

Revision 42016-08-08 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

CODE{"language"} -- highlight source code fragments for many languages

Revision 32016-08-08 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

CODE{"language"} -- highlight source code fragments for many languages

Revision 22016-02-24 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

CODE{"language"} -- highlight source code fragments for many languages

Revision 12016-02-24 - TWikiAdminUser

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="TWikiVariables"

CODE{"language"} -- highlight source code fragments for many languages

  • The %CODE{}% and %ENDCODE% variables are handled by the SyntaxHighlightingPlugin.
  • Syntax: %CODE{"language"}% ...code... %ENDCODE%
  • Parameters:
    Parameter Description Default
    "..." or
    lang="..."
    Source language. Supported languages: ada, asm, awk, bash, changelog, cpp, csh, c, delphi, diffs, diff, diffu, dylan, eiffel, elisp, Name:, forth, fortran_pp, fortran, haskell, html, icon, idl, inf, javascript, java, ksh, lua, m4, mail, makefile, matlab, nroff, oberon2, objc, outline, oz, pascal, perl, php, postscript, pyrex, python, rfc, ruby, scheme, sh, skill, Smalltalk, sml, sql, states, synopsys, tcl, tcsh, tex, vba, verilog, vhdl, vrml, wmlscript, zsh (none, required)
    num="..." Show line numbers next to the source code. An integer indicates the start number. Also "on" and "off" "off"
    step="..." Increment line numbers with the given step. Negative numbers will decrement. "1"
    style="..." Style of box around the source code light gray box
    numstyle="..." Style of line number column light brown box
  • Example:                   • Expands to:
    <sticky>
    %CODE{"cpp" num="on"}%
    void foo() {
      print("Do stuff.\n");
    }
    %ENDCODE%
    </sticky>
     
    <-- SyntaxHighlightingPlugin -->
        1void foo() {
        2     print("Do stuff.\n");
        3   } 
    <-- end SyntaxHighlightingPlugin -->
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.VarCODE.