目录 |
<source lang="html4strict" line start=1 > <table align=center style="background: ivory;color:maroon;font-style:italic;font-family:arial;font-weight:bold;font-size:10pt;"> <tr><th> Heading 1 </th><th> Heading 2 </th></tr> <tr> <td style="padding:10px;"> This is cell 1 text </td> <td style="padding:10px;"> This is cell 2 text </td> </tr> </table> </source>
<table align=center style="background: ivory;color:maroon;font-style:italic;font-family:arial;font-weight:bold;font-size:10pt;"> <tr><th> Heading 1 </th><th> Heading 2 </th></tr> <tr> <td style="padding:10px;"> This is cell 1 text </td> <td style="padding:10px;"> This is cell 2 text </td> </tr> </table>
<source lang="c" line="GESHI_FANCY_LINE_NUMBERS">
main
{
int a =1;
}
</source>
main { int a =1; }
<source lang="c">
main
{
int a =1;
}
</source>
main { int a =1; }
<source lang="csharp">
// Hello World in Microsoft C# ("C-Sharp").
using System;
class HelloWorld
{
public static int Main(String[] args)
{
Console.WriteLine("Hello, World!");
return 0;
}
}
</source>
Results in:
// Hello World in Microsoft C# ("C-Sharp"). using System; class HelloWorld { public static int Main(String[] args) { Console.WriteLine("Hello, World!"); return 0; } }
常用 python ---- python php ---- php c# ---- csharp c ---- c html html4strict
These are the languages known by GeSHi that can be used in the lang parameter.
Note that installed GeSHi version (can be revealed by previewing e.g. <source lang="-"></source>) might not be the most recent version; see Bugzilla:10967 for Wikimedia sites.
支持的语言对应表
| Code | Language |
|---|---|
abap
| ABAP |
actionscript
| ActionScript |
ada
| Ada |
apache
| Apache Log |
applescript
| AppleScript |
asm
| ASM |
asp
| Active Server Pages (ASP) |
autoit
| AutoIt |
bash
| Bash |
basic4gl
| Basic4GL |
blitzbasic
| Blitz BASIC |
bnf
| Backus-Naur Form |
c
| C |
c_mac
| C (Mac) |
caddcl
| AutoCAD DCL |
cadlisp
| AutoLISP |
cfdg
| CFDG |
cfm
| ColdFusion |
cpp-qt
| C++ (Qt toolkit) |
cpp
| C++ |
csharp
| C# |
css
| Cascading Style Sheets (CSS) |
d
| D |
delphi
| Delphi |
diff
| Diff |
div
| DIV |
dos
| DOS batch file |
dot
| DOT |
eiffel
| Eiffel |
fortran
| Fortran |
freebasic
| FreeBASIC |
genero
| Genero |
gml
| Game Maker Language (GML) |
groovy
| Groovy |
haskell
| Haskell |
html4strict
| HTML |
idl
| Uno IDL |
ini
| INI |
inno
| Inno |
io
| Io |
java
| Java |
java5
| Java(TM) 2 Platform Standard Edition 5.0 |
javascript
| JavaScript |
latex
| LaTeX |
| Code | Language |
|---|---|
lisp
| Lisp |
lua
| Lua |
m68k
| Motorola 68000 Assembler |
matlab
| MATLAB M |
mirc
| mIRC scripting language |
mpasm
| Microchip Assembler |
mysql
| MySQL |
nsis
| Nullsoft Scriptable Install System (NSIS) |
objc
| Objective-C |
ocaml-brief
| OCaml |
ocaml
| OCaml |
oobas
| OpenOffice.org Basic |
oracle8
| Oracle 8 SQL |
pascal
| Pascal |
per
| per |
perl
| Perl |
php-brief
| PHP |
php
| PHP |
plsql
| PL/SQL |
python
| Python |
qbasic
| QBasic/QuickBASIC |
rails
| Rails |
reg
| Windows Registry |
robots
| robots.txt |
ruby
| Ruby |
sas
| SAS |
scheme
| Scheme |
sdlbasic
| SdlBasic |
smalltalk
| Smalltalk |
smarty
| Smarty |
sql
| SQL |
tcl
| Tcl |
text
| Plain text |
thinbasic
| thinBasic |
tsql
| Transact-SQL |
vb
| Visual Basic |
vbnet
| Visual Basic .NET |
vhdl
| VHDL |
visualfoxpro
| Visual FoxPro |
winbatch
| Winbatch |
xml
| XML |
xpp
| X++ |
z80
| ZiLOG Z80 Assembler |