Tags:
create new tag
view all tags
#VarCODE ---+++ CODE{"language"} -- highlight source code fragments for many languages * The =%<nop>CODE{}%= and =%<nop>ENDCODE%= variables are handled by the SyntaxHighlightingPlugin. * Syntax: =%<nop>CODE{"language"}% ...code... %<nop>ENDCODE%= * Parameters:%STARTSECTION{parameters}% | *Parameter* | *Description* | *Default* | | ="..."= or%BR% =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 |%ENDSECTION{parameters}% * Example: =<nop> <nop>= %BULLET% Expands to: <table><tr><td valign="top"> =<sticky>= %BR% =%<nop>CODE{"cpp" num="on"}%= %BR% =void foo() {= %BR% =<nop> print("Do stuff.\n");= %BR% =}= %BR% =%<nop>ENDCODE%= %BR% =</sticky>= </td><td> </td><td valign="top"> %CODE{"cpp" num="on"}% void foo() { print("Do stuff.\n"); } %ENDCODE% </td></tr></table> * Category: FormattingAndRenderingVariables, UIAndVisualizationVariables * Related: SyntaxHighlightingPlugin
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r3 - 2020-12-07
-
TWikiAdminUser
Home
Site map
Lab web
Main web
Sandbox web
TWiki web
TWiki Web
User registration
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Log In
Register User
E
dit
A
ttach
Copyright © 1999-2025 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
.