Pomoc:Zvýrazňovanie sytaxe: Rozdiel medzi revíziami
Skočit na navigaci
Skočit na vyhledávání
(4 medziľahlé úpravy od jedného ďalšieho používateľa nie sú zobrazené) | |||
Riadok 94: | Riadok 94: | ||
* line; Povolenie číslovania riadkov. | * line; Povolenie číslovania riadkov. | ||
* start; Číslo prvého riadku. | * start; Číslo prvého riadku. | ||
− | * highlight; Číslo | + | * highlight; Číslo označeného riadku. |
+ | |||
+ | == Podporované jazyky == | ||
+ | Nasledujúce jazyky sú rozpoznané pomocou parametra ''lang''. | ||
+ | {| class="wikitable" style="float:left" | ||
+ | !Code||Language | ||
+ | |- | ||
+ | |<code>abap</code>||[http://en.wikipedia.org/wiki/ABAP ABAP] | ||
+ | |- | ||
+ | |<code>actionscript</code>||[http://en.wikipedia.org/wiki/ActionScript ActionScript] | ||
+ | |- | ||
+ | |<code>ada</code>||[http://en.wikipedia.org/wiki/Ada_(programming language) Ada] | ||
+ | |- | ||
+ | |<code>apache</code>||[http://en.wikipedia.org/wiki/Apache_HTTP_Server Apache Configuration] | ||
+ | |- | ||
+ | |<code>applescript</code>||[http://en.wikipedia.org/wiki/AppleScript AppleScript] | ||
+ | |- | ||
+ | |<code>asm</code>||[http://en.wikipedia.org/wiki/Assembly language ASM] | ||
+ | |- | ||
+ | |<code>asp</code>||[http://en.wikipedia.org/wiki/Active Server Pages Active Server Pages (ASP)] | ||
+ | |- | ||
+ | |<code>autoit</code>||[http://en.wikipedia.org/wiki/AutoIt AutoIt] | ||
+ | |- | ||
+ | |<code>bash</code>||[http://en.wikipedia.org/wiki/Bash Bash] | ||
+ | |- | ||
+ | |<code>basic4gl</code>||[http://en.wikipedia.org/wiki/Basic4GL Basic4GL] | ||
+ | |- | ||
+ | |<code>bf</code>||[http://en.wikipedia.org/wiki/Brainfuck Brainfuck] | ||
+ | |- | ||
+ | |<code>blitzbasic</code>||[http://en.wikipedia.org/wiki/Blitz_BASIC Blitz BASIC] | ||
+ | |- | ||
+ | |<code>bnf</code>||[http://en.wikipedia.org/wiki/Backus-Naur_Form Backus-Naur Form] | ||
+ | |- | ||
+ | |<code>c</code>||[http://en.wikipedia.org/wiki/C_(programming_language) C] | ||
+ | |- | ||
+ | |<code>c_mac</code>||C (Mac) | ||
+ | |- | ||
+ | |<code>caddcl</code>||[http://en.wikipedia.org/wiki/Dialog_Control Language AutoCAD DCL] | ||
+ | |- | ||
+ | |<code>cadlisp</code>||[http://en.wikipedia.org/wiki/AutoLISP AutoLISP] | ||
+ | |- | ||
+ | |<code>cfdg</code>||CFDG | ||
+ | |- | ||
+ | |<code>cfm</code>||[http://en.wikipedia.org/wiki/ColdFusion_Markup_Language ColdFusion Markup Language] | ||
+ | |- | ||
+ | |<code>cil</code>||[http://en.wikipedia.org/wiki/Common_Intermediate_Language Common Intermediate Language (CIL)] | ||
+ | |- | ||
+ | |<code>cobol</code>||[http://en.wikipedia.org/wiki/COBOL COBOL] | ||
+ | |- | ||
+ | |<code>cpp-qt</code>||[http://en.wikipedia.org/wiki/Qt (toolkit) C++ (Qt toolkit)] | ||
+ | |- | ||
+ | |<code>cpp</code>||[http://en.wikipedia.org/wiki/C++ C++] | ||
+ | |- | ||
+ | |<code>csharp</code>||[http://en.wikipedia.org/wiki/C_Sharp_(programming_language) C#] | ||
+ | |- | ||
+ | |<code>css</code>||[http://en.wikipedia.org/wiki/Cascading_Style_Sheets Cascading Style Sheets (CSS)] | ||
+ | |- | ||
+ | |<code>d</code>||[http://en.wikipedia.org/wiki/D_(programming_language) D] | ||
+ | |- | ||
+ | |<code>delphi</code>||[http://en.wikipedia.org/wiki/Delphi_programming_language Delphi] | ||
+ | |- | ||
+ | |<code>diff</code>||[http://en.wikipedia.org/wiki/diff Diff] | ||
+ | |- | ||
+ | |<code>div</code>||DIV | ||
+ | |- | ||
+ | |<code>dos</code>||[http://en.wikipedia.org/wiki/DOS_batch_file DOS batch file] | ||
+ | |- | ||
+ | |<code>dot</code>||[http://en.wikipedia.org/wiki/DOT_language DOT] | ||
+ | |- | ||
+ | |<code>eiffel</code>||[http://en.wikipedia.org/wiki/Eiffel_(programming_language) Eiffel] | ||
+ | |- | ||
+ | |<code>fortran</code>||[http://en.wikipedia.org/wiki/Fortran Fortran] | ||
+ | |- | ||
+ | |<code>freebasic</code>||[http://en.wikipedia.org/wiki/FreeBASIC FreeBASIC] | ||
+ | |- | ||
+ | |<code>genero</code>||Genero | ||
+ | |- | ||
+ | |<code>gettext</code>||[http://en.wikipedia.org/wiki/GNU_gettext GNU internationalization (i18n) library] | ||
+ | |- | ||
+ | |<code>glsl</code>||[http://en.wikipedia.org/wiki/GLSL OpenGL Shading Language (GLSL)] | ||
+ | |- | ||
+ | |<code>gml</code>||[http://en.wikipedia.org/wiki/Game_Maker_Language Game Maker Language (GML)] | ||
+ | |- | ||
+ | |<code>gnuplot</code>||[http://en.wikipedia.org/wiki/Gnuplot gnuplot] | ||
+ | |- | ||
+ | |<code>groovy</code>||[http://en.wikipedia.org/wiki/Groovy_(programming_language) Groovy] | ||
+ | |- | ||
+ | |<code>haskell</code>||[http://en.wikipedia.org/wiki/Haskell_(programming_language) Haskell] | ||
+ | |- | ||
+ | |<code>hq9plus</code>||HQ9+ | ||
+ | |- | ||
+ | |<code>html4strict</code>||[http://en.wikipedia.org/wiki/HTML HTML] | ||
+ | |- | ||
+ | |<code>idl</code>||[http://en.wikipedia.org/wiki/Universal Network Objects Uno IDL] | ||
+ | |- | ||
+ | |<code>ini</code>||[http://en.wikipedia.org/wiki/INI_file INI] | ||
+ | |- | ||
+ | |<code>inno</code>||[http://en.wikipedia.org/wiki/Inno_Setup Inno] | ||
+ | |- | ||
+ | |<code>intercal</code>||[http://en.wikipedia.org/wiki/INTERCAL INTERCAL] | ||
+ | |- | ||
+ | |<code>io</code>||[http://en.wikipedia.org/wiki/Io_(programming_language) Io] | ||
+ | |- | ||
+ | |<code>java</code>||[http://en.wikipedia.org/wiki/Java_(programming_language) Java] | ||
+ | |- | ||
+ | |<code>java5</code>||[http://en.wikipedia.org/wiki/Java_(programming_language) Java(TM) 2 Platform Standard Edition 5.0 ] | ||
+ | |- | ||
+ | |<code>javascript</code>||[http://en.wikipedia.org/wiki/JavaScript JavaScript] | ||
+ | |- | ||
+ | |<code>kixtart</code>||[http://en.wikipedia.org/wiki/KiXtart KiXtart] | ||
+ | |- | ||
+ | |<code>klonec</code>||Klone C | ||
+ | |- | ||
+ | |<code>klonecpp</code>||Klone C++ | ||
+ | |- | ||
+ | |<code>latex</code>||[http://en.wikipedia.org/wiki/LaTeX LaTeX] | ||
+ | |- | ||
+ | |<code>lisp</code>||[http://en.wikipedia.org/wiki/Lisp_(programming_language) Lisp] | ||
+ | |- | ||
+ | |<code>lolcode</code>||[http://en.wikipedia.org/wiki/LOLCODE LOLCODE] | ||
+ | |- | ||
+ | |<code>lotusscript</code>||[http://en.wikipedia.org/wiki/LotusScript LotusScript] | ||
+ | |- | ||
+ | |<code>lua</code>||[http://en.wikipedia.org/wiki/Lua_(programming_language) Lua] | ||
+ | |} | ||
+ | {| class="wikitable" style="float:left" | ||
+ | !Code||Language | ||
+ | |- | ||
+ | |<code>m68k</code>||[http://en.wikipedia.org/wiki/Motorola_68000 Motorola 68000 Assembler] | ||
+ | |- | ||
+ | |<code>make</code>||[http://en.wikipedia.org/wiki/Make_(software) make] | ||
+ | |- | ||
+ | |<code>matlab</code>||[http://en.wikipedia.org/wiki/MATLAB MATLAB M] | ||
+ | |- | ||
+ | |<code>mirc</code>||[http://en.wikipedia.org/wiki/mIRC_scripting_language mIRC scripting language] | ||
+ | |- | ||
+ | |<code>mxml</code>||[http://en.wikipedia.org/wiki/MXML MXML] | ||
+ | |- | ||
+ | |<code>mpasm</code>||[http://en.wikipedia.org/wiki/PIC_microcontroller Microchip Assembler] | ||
+ | |- | ||
+ | |<code>mysql</code>||[http://en.wikipedia.org/wiki/MySQL MySQL] | ||
+ | |- | ||
+ | |<code>nsis</code>||[http://en.wikipedia.org/wiki/Nullsoft_Scriptable_Install_System Nullsoft Scriptable Install System (NSIS)] | ||
+ | |- | ||
+ | |<code>objc</code>||[http://en.wikipedia.org/wiki/Objective-C Objective-C] | ||
+ | |- | ||
+ | |<code>ocaml-brief</code>||[http://en.wikipedia.org/wiki/Objective_Caml OCaml] | ||
+ | |- | ||
+ | |<code>ocaml</code>||[http://en.wikipedia.org/wiki/Objective_Caml OCaml] | ||
+ | |- | ||
+ | |<code>oobas</code>||[http://en.wikipedia.org/wiki/StarOffice_Basic OpenOffice.org Basic] | ||
+ | |- | ||
+ | |<code>oracle8</code>||[http://en.wikipedia.org/wiki/PL/SQL Oracle 8 SQL] | ||
+ | |- | ||
+ | |<code>oracle11</code>||[http://en.wikipedia.org/wiki/PL/SQL Oracle 11 SQL] | ||
+ | |- | ||
+ | |<code>pascal</code>||[http://en.wikipedia.org/wiki/Pascal_(programming_language) Pascal] | ||
+ | |- | ||
+ | |<code>per</code>||per | ||
+ | |- | ||
+ | |<code>perl</code>||[http://en.wikipedia.org/wiki/Perl Perl] | ||
+ | |- | ||
+ | |<code>php-brief</code>||[http://en.wikipedia.org/wiki/PHP PHP] | ||
+ | |- | ||
+ | |<code>php</code>||[http://en.wikipedia.org/wiki/PHP PHP] | ||
+ | |- | ||
+ | |<code>pixelbender</code>||[http://en.wikipedia.org/wiki/Adobe_Pixel_Bender Pixel Bender] | ||
+ | |- | ||
+ | |<code>plsql</code>||[http://en.wikipedia.org/wiki/PL/SQL PL/SQL] | ||
+ | |- | ||
+ | |<code>povray</code>||[http://en.wikipedia.org/wiki/POV-Ray Persistence of Vision Raytracer] | ||
+ | |- | ||
+ | |<code>powershell</code>||[http://en.wikipedia.org/wiki/Windows_PowerShell Windows PowerShell] | ||
+ | |- | ||
+ | |<code>progress</code>||[http://en.wikipedia.org/wiki/OpenEdge_Advanced_Business_Language OpenEdge Advanced Business Language] | ||
+ | |- | ||
+ | |<code>prolog</code>||[http://en.wikipedia.org/wiki/Prolog Prolog] | ||
+ | |- | ||
+ | |<code>providex</code>||[http://en.wikipedia.org/wiki/ProvideX ProvideX] | ||
+ | |- | ||
+ | |<code>python</code>||[http://en.wikipedia.org/wiki/Python_(programming_language) Python] | ||
+ | |- | ||
+ | |<code>qbasic</code>||[http://en.wikipedia.org/wiki/QBasic QBasic/QuickBASIC] | ||
+ | |- | ||
+ | |<code>rails</code>||[http://en.wikipedia.org/wiki/Ruby_on_Rails Rails] | ||
+ | |- | ||
+ | |<code>reg</code>||[http://en.wikipedia.org/wiki/Windows_Registry Windows Registry] | ||
+ | |- | ||
+ | |<code>robots</code>||[http://en.wikipedia.org/wiki/Robots Exclusion Standard robots.txt] | ||
+ | |- | ||
+ | |<code>ruby</code>||[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby] | ||
+ | |- | ||
+ | |<code>sas</code>||[http://en.wikipedia.org/wiki/SAS_System SAS] | ||
+ | |- | ||
+ | |<code>scala</code>||[http://en.wikipedia.org/wiki/Scala_(programming_language) Scala] | ||
+ | |- | ||
+ | |<code>scheme</code>||[http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme] | ||
+ | |- | ||
+ | |<code>scilab</code>||[http://en.wikipedia.org/wiki/Scilab Scilab] | ||
+ | |- | ||
+ | |<code>sdlbasic</code>||[http://en.wikipedia.org/wiki/SdlBasic SdlBasic] | ||
+ | |- | ||
+ | |<code>smalltalk</code>||[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] | ||
+ | |- | ||
+ | |<code>smarty</code>||[http://en.wikipedia.org/wiki/Smarty Smarty] | ||
+ | |- | ||
+ | |<code>sql</code>||[http://en.wikipedia.org/wiki/SQL SQL] | ||
+ | |- | ||
+ | |<code>tcl</code>||[http://en.wikipedia.org/wiki/Tcl Tcl] | ||
+ | |- | ||
+ | |<code>teraterm</code>||[http://en.wikipedia.org/wiki/TeraTerm Tera Term] | ||
+ | |- | ||
+ | |<code>text</code>||[http://en.wikipedia.org/wiki/Plain text Plain text] | ||
+ | |- | ||
+ | |<code>thinbasic</code>||[http://en.wikipedia.org/wiki/thinBasic thinBasic] | ||
+ | |- | ||
+ | |<code>tsql</code>||[http://en.wikipedia.org/wiki/Transact-SQL Transact-SQL] | ||
+ | |- | ||
+ | |<code>typoscript</code>||[http://en.wikipedia.org/wiki/TYPO3 TypoScript] | ||
+ | |- | ||
+ | |<code>vb</code>||[http://en.wikipedia.org/wiki/Visual_Basic Visual Basic] | ||
+ | |- | ||
+ | |<code>vbnet</code>||[http://en.wikipedia.org/wiki/Visual_Basic_.NET Visual Basic .NET] | ||
+ | |- | ||
+ | |<code>verilog</code>||[http://en.wikipedia.org/wiki/Verilog Verilog] | ||
+ | |- | ||
+ | |<code>vhdl</code>||[http://en.wikipedia.org/wiki/VHSIC_Hardware_Description_Language VHDL] | ||
+ | |- | ||
+ | |<code>vim</code>||[http://en.wikipedia.org/wiki/Vimscript Vimscript] | ||
+ | |- | ||
+ | |<code>visualfoxpro</code>||[http://en.wikipedia.org/wiki/Visual_FoxPro Visual FoxPro] | ||
+ | |- | ||
+ | |<code>visualprolog</code>||[http://en.wikipedia.org/wiki/Visual_Prolog Visual Prolog] | ||
+ | |- | ||
+ | |<code>whitespace</code>||[http://en.wikipedia.org/wiki/Whitespace_(programming_language) Whitespace] | ||
+ | |- | ||
+ | |<code>winbatch</code>||[http://en.wikipedia.org/wiki/Winbatch Winbatch] | ||
+ | |- | ||
+ | |<code>xml</code>||[http://en.wikipedia.org/wiki/XML XML] | ||
+ | |- | ||
+ | |<code>xorg_conf</code>||[http://en.wikipedia.org/wiki/Xorg.conf Xorg.conf] | ||
+ | |- | ||
+ | |<code>xpp</code>||[http://en.wikipedia.org/wiki/Microsoft_Dynamics_AX X++] | ||
+ | |- | ||
+ | |<code>z80</code>||[http://en.wikipedia.org/wiki/Zilog Z80 ZiLOG Z80 Assembler] | ||
+ | |} | ||
+ | <div style="clear:both"></div> | ||
+ | |||
[[Kategória:Kiwiki]] | [[Kategória:Kiwiki]] | ||
[[Kategória:Portál]] | [[Kategória:Portál]] |
Aktuálna revízia z 19:54, 14. február 2010
Obsah
Použitie
Na wiki stránke môžete použiť tagy source, ako je to v nasledujúcich príkladoch
Zdrojový kód v jazyku PHP
<source lang="php"> <?php v = "string"; // sample initialization ?> html text <? echo v; // end of php code ?> </source> |
<?php
v = "string"; // sample initialization
?>
html text
<?
echo v; // end of php code
?>
|
Zdrojový kód v jazyku C
<source lang="c"> #include<stdio.h> int main() { printf("Ahoj svet"); int a=5,b=0; while(a--) b++; return 0; } </source> |
#include<stdio.h>
int main()
{
printf("Ahoj svet");
int a=5,b=0;
while(a--)
b++;
return 0;
}
|
Zdrojový kód v jazyku python
<source lang="python" line start="1" highlight="3"> def numeric_compare(x, y): if x>y: return 1 elif x==y: return 0 else: # x<y return -1 </source> |
1 def numeric_compare(x, y):
2 if x>y:
3 return 1
4 elif x==y:
5 return 0
6 else: # x<y
7 return -1
|
Parametre
Kompletná dokumentácia k rozšíreniu GeSHi je na http://qbnz.com/highlighter/geshi-doc.html
Najpoužívanejšie parametre:
- lang; Definuje jazyk.
- line; Povolenie číslovania riadkov.
- start; Číslo prvého riadku.
- highlight; Číslo označeného riadku.
Podporované jazyky
Nasledujúce jazyky sú rozpoznané pomocou parametra lang.