Code macro
==========

[[Parent]]: available_macros.txt

The Code macro highlights source code. The syntax-highlighting is 
carried out by the Pygments library. If you want to specifically 
highlight C++ code, then you should look at [[Link: CppCode_Macro.txt]] 
for additional features.

Properties
----------

### Output type

Html

### Output expansion default

Disabled.

### Parameters

The source code to highlight.

### Variables

Code.type
: 	The type of the code. You may provide any of the Pygments lexer
	names available [here][PygmentLexers]. If this variable
	is empty, then the code-type is guessed from the content
	by Pygments. If the guessing fails, then the lexer is assumed
	to be the text lexer. The guessing is not very reliable, so explicit
	specification should be favored. Default: Empty.

[PygmentLexers]: http://pygments.org/docs/lexers/

Warnings
--------

invalid-input
:	This warning is generated when the `type` is not recognized
	by Pygments.

Example
-------

This
	
	[[set Code.type]]: python
	[[Code]]:
		def square(x):
			return x * x
		
produces this:
		
[[set Code.type]]: python
[[Code]]:
	def square(x):
		return x * x

Links
-----

[Pygments syntax highlighter][Pygments]

[Pygments]: http://pygments.org
