diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2012-01-22 19:51:13 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2012-01-22 19:51:13 (GMT) |
commit | 9b81ead283ea3f56a89835ac8afcdb75cdaadd03 (patch) | |
tree | 082a1fab748f7d6917c9728b6f302bb4757de12d /doc/commands.doc | |
parent | 9066ec6131e1f77bbc745b50664db3cbcb2577ee (diff) | |
download | Doxygen-9b81ead283ea3f56a89835ac8afcdb75cdaadd03.zip Doxygen-9b81ead283ea3f56a89835ac8afcdb75cdaadd03.tar.gz Doxygen-9b81ead283ea3f56a89835ac8afcdb75cdaadd03.tar.bz2 |
Release-1.7.6.1-20120122
Diffstat (limited to 'doc/commands.doc')
-rw-r--r-- | doc/commands.doc | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/doc/commands.doc b/doc/commands.doc index 0b1db8c..ad6b2ba 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -2140,13 +2140,35 @@ Commands for visual enhancements To have multiple words in typewriter font use \<tt\>multiple words\</tt\>. <hr> -\section cmdcode \\code +\section cmdcode \\code [ '{'<word>'}'] \addindex \\code Starts a block of code. A code block is treated differently - from ordinary text. It is interpreted as C/C++ code. The names of the - classes and members that are documented are automatically replaced by - links to the documentation. + from ordinary text. It is interpreted as source code. The names of + classes and members and other documented entities are automatically + replaced by links to the documentation. + + By default the language that is assumed for syntax highlighting is based + on the location where the \\code block was found. If this part of + a Python file for instance, the syntax highlight will be done according + to the Python syntax. + + If it unclear from the context which language is meant (for instance the + comment is in a .txt or .markdown file) then you can also explicitly + indicate the language, by putting the file extension typically + that doxygen associated with the language in curly brackets after the + code block. Here is an example: + +\verbatim + \code{.py} + class Python: + pass + \endcode + + \code{.cpp} + class Cpp {}; + \endcode +\endverbatim \sa section \ref cmdendcode "\\endcode" and section \ref cmdverbatim "\\verbatim". |