· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Help On Macros

1. Macros

Macros allow the insertion of system features into normal wiki pages; the only thing that makes those pages special is that they contain macros. If you edit pages like RecentChanges or SystemInfo, you'll see what that means.

For more information on the possible markup, see HelpOnEditing.

1.1. Search macros

[[TitleSearch]] search the page titles FindPage
[[FullSearch]] search the page contents FindPage
[[GoTo]] directly go to the page you enter FindPage
[[PageList(regex)]] list of pages whose title matches the regex HelpIndex

1.2. Navigation

[[RecentChanges]] a list of recently edited pages RecentChanges
[[TitleIndex]] an index of all page titles TitleIndex
[[WordIndex]] an index of all words in page titles WordIndex
[[RandomPage]] a link to a random page UploadedFiles
[[RandomPage(#)]] links to a number of random pages
[[TableOfContents]] display a local table of contents see below

1.3. System information

[[InterWiki]] a list of all known InterWiki names InterWiki
[[SystemInfo]] info on the wiki, the python interpreter and the host system SystemInfo
[[PageCount]] current page count 2397 pages

1.4. Others

[[Icon(image)]] display system icons HelpOnNavigation
[[UserPreferences]] display a user preferences dialog UserPreferences
[[BR]] insert a line break 1st line
2nd line
[[Include(HelloWorld[,heading[,level]])]] include contents of another page


10 print "Hello World"

C Language

#include <stdio.h>
int main()
  printf("Hello World\n");
  return 0;

#include <stdio.h>
#define e 3
#define g (e/e)
#define h ((g+e)/2)
#define f (e-g-h)
#define j (e*e-g)
#define k (j-h)
#define l(x) tab2[x]/h
#define m(n,a) ((n&(a))==(a))

long tab1[]={ 989L,5L,26L,0L,88319L,123L,0L,9367L };
int tab2[]={ 4,6,10,14,22,26,34,38,46,58,62,74,82,86 };

int main(m1,s) char *s; {
    int a,b,c,d,o[k],n=(int)s;
    if(m1==1){ char b[2*j+f-g]; main(l(h+e)+h+e,b); printf(b); }
    else switch(m1-=h){
        case f:
        case h:
            if(m1-=e) main(m1-g+e+h,s+g); else *(s+g)=f;
            for(*s=a=f;a<e;) *s=(*s<<e)|main(h+a++,(char *)m1);
        return 0;


#include <iostream>
int main()
  std::cout <<"Hello, world.\n";
  return 0;


// HelloWorld.java

class HelloWorld {
    public static void main(String args[]) {
        System.out.println("Hello, World!");

2. Example Display

We don't show examples for all macros here, because that would make this page quite long. Here is is the replacement text for the [[SystemInfo]] macro:
PHP Version 7.0.33Linux wiki.kldp.org 3.10.0-1160.6.1.el7.x86_64 #1 SMP Tue Nov 17 13:59:11 UTC 2020 x86_64
MoniWiki Version Release 1.2.5-RC1 [Revision: 1.1273 ]
HTTP Server Version Apache
Number of Pages 2397

You will be singled out for promotion in your work.

sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-03-31 10:01:23
Processing time 0.0020 sec