# Examples page for IkiWiki::Plugin::syntax

This page contains examples of syntax highlight using the IkiWiki::Plugin::syntax and several configuration and programming source files.

Source fragment.html using Simple engine

        1  <?xml version="1.0" encoding="UTF-8"?>
        2  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        3   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        4  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
        5
        6  <head>
        7  	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        8      <!-- <base href="" /> -->
        9  	<title>P&#xE1;gina principal</title>
       10  	<link rel="stylesheet" href="style.css" type="text/css"
       11          media="screen" />
       12  	<link rel="stylesheet" href="print.css" type="text/css"
       13          media="print" />
       14
       15
       16  </head>
       17  <body>
       18
       19  <!-- Contenedor global -->
       20  <div class="container">
       21
       22      <!-- Columna izquierda: logotipo, menÃº global,
       23          validaciones y licencia -->
       24      <div class="left">
       25              <!-- Logotipo -->
       26              <div class="logo">
       27                  <img src="images/taquiones-logo.png"
       28                      alt="Logotipo de Taquiones" />
       29              </div>

Source fragment.html using Kate engine

        1  <?xml version="1.0" encoding="UTF-8"?>
        2  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        3   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        4  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
        5
        6  <head>
        7      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        8      <!-- <base href="" /> -->
        9      <title>P&#xE1;gina principal</title>
       10      <link rel="stylesheet" href="style.css" type="text/css"
       11          media="screen" />
       12      <link rel="stylesheet" href="print.css" type="text/css"
       13          media="print" />
       14
       15
       16  </head>
       17  <body>
       18
       19  <!-- Contenedor global -->
       20  <div class="container">
       21
       22      <!-- Columna izquierda: logotipo, menú global,
       23          validaciones y licencia -->
       24      <div class="left">
       25              <!-- Logotipo -->
       26              <div class="logo">
       27                  <img src="images/taquiones-logo.png"
       28                      alt="Logotipo de Taquiones" />
       29              </div>

Source fragment.html using Vim engine

        1  <?xml version="1.0" encoding="UTF-8"?>
        2  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        3   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        4  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
        5
        6  <head>
        7  	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        8      <!-- <base href="" /> -->
        9  	<title>P&#xE1;gina principal</title>
       10  	<link rel="stylesheet" href="style.css" type="text/css"
       11          media="screen" />
       12  	<link rel="stylesheet" href="print.css" type="text/css"
       13          media="print" />
       14
       15
       16  </head>
       17  <body>
       18
       19  <!-- Contenedor global -->
       20  <div class="container">
       21
       22      <!-- Columna izquierda: logotipo, menú global,
       23          validaciones y licencia -->
       24      <div class="left">
       25              <!-- Logotipo -->
       26              <div class="logo">
       27                  <img src="images/taquiones-logo.png"
       28                      alt="Logotipo de Taquiones" />
       29              </div>

Source function.pl using Simple engine

        1  sub connection {
        2      my $class = shift;
        3      my $dsn = shift;
        4      my $user = shift;
        5      my $passwd = shift;
        6      my $attr = shift;
        7
        8      if (not $dsn) {
        9          my $conf = Lidia::Config->new();
       10          $dsn = $conf->db->dsn();
       11          $user = $conf->db->user();
       12          $passwd = $conf->db->passwd();
       13      }
       14
       15      return $class->SUPER::connection( $dsn, $user, $passwd, $attr);
       16  }

Source function.pl using Kate engine

        1  sub connection {
        2      my $class = shift;
        3      my $dsn = shift;
        4      my $user = shift;
        5      my $passwd = shift;
        6      my $attr = shift;
        7
        8      if (not $dsn) {
        9          my $conf = Lidia::Config->new();
       10          $dsn = $conf->db->dsn();
       11          $user = $conf->db->user();
       12          $passwd = $conf->db->passwd();
       13      }
       14
       15      return $class->SUPER::connection( $dsn, $user, $passwd, $attr);
       16  }

Source function.pl using Vim engine

        1  sub connection {
        2      my $class = shift;
        3      my $dsn = shift;
        4      my $user = shift;
        5      my $passwd = shift;
        6      my $attr = shift;
        7
        8      if (not $dsn) {
        9          my $conf = Lidia::Config->new();
       10          $dsn = $conf->db->dsn();
       11          $user = $conf->db->user();
       12          $passwd = $conf->db->passwd();
       13      }
       14
       15      return $class->SUPER::connection( $dsn, $user, $passwd, $attr);
       16  }

Source page.tmpl using Simple engine

        1  <HTML>
        2  <HEAD>
        3  <TITLE><TMPL_VAR NAME=title></TITLE>
        4  <LINK REL=StyleSheet HREF="../extras/syntax.css" TYPPE="text/css" MEDIA="all">
        5  </HEAD>
        6  <BODY>
        7      <H1><TMPL_VAR NAME=title></H1>
        8
        9      <P>This page contains examples of syntax highlight using the
       10      IkiWiki::Plugin::syntax and several configuration and programming source
       11      files. </P>
       12
       13      <TMPL_LOOP NAME=results>
       14          <TMPL_VAR NAME=output>
       15          </BR>
       16      </TMPL_LOOP>
       17  </BODY>
       18  </HTML>

Source page.tmpl using Kate engine

        1  <HTML>
        2  <HEAD>
        3  <TITLE><TMPL_VAR NAME=title></TITLE>
        4  <LINK REL=StyleSheet HREF="../extras/syntax.css" TYPPE="text/css" MEDIA="all">
        5  </HEAD>
        6  <BODY>
        7      <H1><TMPL_VAR NAME=title></H1>
        8
        9      <P>This page contains examples of syntax highlight using the
       10      IkiWiki::Plugin::syntax and several configuration and programming source
       11      files. </P>
       12
       13      <TMPL_LOOP NAME=results>
       14          <TMPL_VAR NAME=output>
       15          </BR>
       16      </TMPL_LOOP>
       17  </BODY>
       18  </HTML>

Source page.tmpl using Vim engine

        1  <HTML>
        2  <HEAD>
        3  <TITLE><TMPL_VAR NAME=title></TITLE>
        4  <LINK REL=StyleSheet HREF="../extras/syntax.css" TYPPE="text/css" MEDIA="all">
        5  </HEAD>
        6  <BODY>
        7      <H1><TMPL_VAR NAME=title></H1>
        8
        9      <P>This page contains examples of syntax highlight using the
       10      IkiWiki::Plugin::syntax and several configuration and programming source
       11      files. </P>
       12
       13      <TMPL_LOOP NAME=results>
       14          <TMPL_VAR NAME=output>
       15          </BR>
       16      </TMPL_LOOP>
       17  </BODY>
       18  </HTML>

Source sarajevo.conf using Simple engine

        1  #
        2  #	Cliente: Sarajevo
        3  #
        4  Catalog {
        5  	Name 		= Sarajevo
        6  	dbname 		= sarajevo
        7  	user		= bacula
        8  	password	= ""
        9  }
       10
       11  Client	{
       12  	Name		= sarajevo-fd
       13  	Address		= sarajevo.venexma.int
       14  	Catalog		= Sarajevo
       15  	Password	= "XXXXX"
       16  }
       17
       18  Job {
       19  	Name	=	"Sarajevo Semanal"
       20  	Enabled	=	yes
       21  	Type	=	Backup
       22  	Level	=	Full
       23  	Client	=	sarajevo-fd
       24  	FileSet	=	"Archivos de Sarajevo"
       25  	Storage	=	Disco
       26  	Schedule=	"Semanal"
       27  	Messages=	Standard
       28  	Pool	=	Workstation
       29  }
       30
       31  Job {
       32  	Name	=	"Sarajevo restore"
       33  	Type	=	Restore
       34  	Client	=	sarajevo-fd
       35  	FileSet	=	"Archivos de Sarajevo"
       36  	Storage =	Disco
       37  	Messages=	Standard
       38  	Pool	=	Workstation
       39  }
       40
       41  FileSet {
       42  	Name	=	"Archivos de Sarajevo"
       43  	Include {
       44  		Options	{
       45  			compression	=	GZIP;
       46  			signature	=	MD5;
       47  			verify		=	pins5;
       48  			onefs		=	yes;
       49  		}
       50  		File	=	/etc
       51  		File	=	/root
       52  		File	=	/home/victor
       53  	}
       54  	Exclude {
       55  		File	=	/home/victor/downloads
       56  		File	=	/home/victor/Videos
       57  		File	=	/home/victor/mp3
       58  	}
       59  }

Source sarajevo.conf using Kate engine

        1  #
        2  #    Cliente: Sarajevo
        3  #
        4  Catalog {
        5      Name         = Sarajevo
        6      dbname         = sarajevo
        7      user        = bacula
        8      password    = ""
        9  }
       10
       11  Client    {
       12      Name        = sarajevo-fd
       13      Address        = sarajevo.venexma.int
       14      Catalog        = Sarajevo
       15      Password    = "XXXXX"
       16  }
       17
       18  Job {
       19      Name    =    "Sarajevo Semanal"
       20      Enabled    =    yes
       21      Type    =    Backup
       22      Level    =    Full
       23      Client    =    sarajevo-fd
       24      FileSet    =    "Archivos de Sarajevo"
       25      Storage    =    Disco
       26      Schedule=    "Semanal"
       27      Messages=    Standard
       28      Pool    =    Workstation
       29  }
       30
       31  Job {
       32      Name    =    "Sarajevo restore"
       33      Type    =    Restore
       34      Client    =    sarajevo-fd
       35      FileSet    =    "Archivos de Sarajevo"
       36      Storage =    Disco
       37      Messages=    Standard
       38      Pool    =    Workstation
       39  }
       40
       41  FileSet {
       42      Name    =    "Archivos de Sarajevo"
       43      Include {
       44          Options    {
       45              compression    =    GZIP;
       46              signature    =    MD5;
       47              verify        =    pins5;
       48              onefs        =    yes;
       49          }
       50          File    =    /etc
       51          File    =    /root
       52          File    =    /home/victor
       53      }
       54      Exclude {
       55          File    =    /home/victor/downloads
       56          File    =    /home/victor/Videos
       57          File    =    /home/victor/mp3
       58      }
       59  }

Source sarajevo.conf using Vim engine

        1  #
        2  #	Cliente: Sarajevo
        3  #
        4  Catalog {
        5  	Name 		= Sarajevo
        6  	dbname 		= sarajevo
        7  	user		= bacula
        8  	password	= ""
        9  }
       10
       11  Client	{
       12  	Name		= sarajevo-fd
       13  	Address		= sarajevo.venexma.int
       14  	Catalog		= Sarajevo
       15  	Password	= "XXXXX"
       16  }
       17
       18  Job {
       19  	Name	=	"Sarajevo Semanal"
       20  	Enabled	=	yes
       21  	Type	=	Backup
       22  	Level	=	Full
       23  	Client	=	sarajevo-fd
       24  	FileSet	=	"Archivos de Sarajevo"
       25  	Storage	=	Disco
       26  	Schedule=	"Semanal"
       27  	Messages=	Standard
       28  	Pool	=	Workstation
       29  }
       30
       31  Job {
       32  	Name	=	"Sarajevo restore"
       33  	Type	=	Restore
       34  	Client	=	sarajevo-fd
       35  	FileSet	=	"Archivos de Sarajevo"
       36  	Storage =	Disco
       37  	Messages=	Standard
       38  	Pool	=	Workstation
       39  }
       40
       41  FileSet {
       42  	Name	=	"Archivos de Sarajevo"
       43  	Include {
       44  		Options	{
       45  			compression	=	GZIP;
       46  			signature	=	MD5;
       47  			verify		=	pins5;
       48  			onefs		=	yes;
       49  		}
       50  		File	=	/etc
       51  		File	=	/root
       52  		File	=	/home/victor
       53  	}
       54  	Exclude {
       55  		File	=	/home/victor/downloads
       56  		File	=	/home/victor/Videos
       57  		File	=	/home/victor/mp3
       58  	}
       59  }

Source bash.sh using Simple engine

        1  # Long term variables, which may be set in the cvsdeb config file or the
        2  # environment:
        3  # rootdir workdir (if all original sources are kept in one dir)
        4
        5  TEMPDIR=/tmp/$$
        6  mkdir $TEMPDIR || exit 1
        7  TEMPFILE=$TEMPDIR/cl-tmp
        8  trap "rm -f $TEMPFILE; rmdir $TEMPDIR" 0 1 2 3 7 10 13 15
        9
       10  TAGOPT=
       11
       12  # Command line; will bomb out if unrecognised options
       13  TEMP=$(getopt -a -s bash \
       14         -o hC:EH:G:M:P:R:T:U:V:W:Ff:dcnr:x:Bp:Dk:a:Sv:m:e:i:I:t: \
       15         --long help,version,ctp,tC,sgpg,spgp,us,uc,op \
       16         --long si,sa,sd,ap,sp,su,sk,sr,sA,sP,sU,sK,sR,ss,sn \
       17         -n "$PROGNAME" -- "$@")
       18  eval set -- $TEMP

Source bash.sh using Kate engine

        1  # Long term variables, which may be set in the cvsdeb config file or the
        2  # environment:
        3  # rootdir workdir (if all original sources are kept in one dir)
        4
        5  TEMPDIR=/tmp/$$
        6  mkdir $TEMPDIR || exit 1
        7  TEMPFILE=$TEMPDIR/cl-tmp
        8  trap "rm -f $TEMPFILE; rmdir $TEMPDIR" 0 1 2 3 7 10 13 15
        9
       10  TAGOPT=
       11
       12  # Command line; will bomb out if unrecognised options
       13  TEMP=$(getopt -a -s bash \
       14         -o hC:EH:G:M:P:R:T:U:V:W:Ff:dcnr:x:Bp:Dk:a:Sv:m:e:i:I:t: \
       15         --long help,version,ctp,tC,sgpg,spgp,us,uc,op \
       16         --long si,sa,sd,ap,sp,su,sk,sr,sA,sP,sU,sK,sR,ss,sn \
       17         -n "$PROGNAME" -- "$@")
       18  eval set -- $TEMP

Source bash.sh using Vim engine

        1  # Long term variables, which may be set in the cvsdeb config file or the
        2  # environment:
        3  # rootdir workdir (if all original sources are kept in one dir)
        4
        5  TEMPDIR=/tmp/$$
        6  mkdir $TEMPDIR || exit 1
        7  TEMPFILE=$TEMPDIR/cl-tmp
        8  trap "rm -f $TEMPFILE; rmdir $TEMPDIR" 0 1 2 3 7 10 13 15
        9
       10  TAGOPT=
       11
       12  # Command line; will bomb out if unrecognised options
       13  TEMP=$(getopt -a -s bash \
       14         -o hC:EH:G:M:P:R:T:U:V:W:Ff:dcnr:x:Bp:Dk:a:Sv:m:e:i:I:t: \
       15         --long help,version,ctp,tC,sgpg,spgp,us,uc,op \
       16         --long si,sa,sd,ap,sp,su,sk,sr,sA,sP,sU,sK,sR,ss,sn \
       17         -n "$PROGNAME" -- "$@")
       18  eval set -- $TEMP

Source smart_comments.pl using Simple engine

        1  #!/usr/bin/perl
        2
        3  use strict;
        4  use Carp;
        5
        6  # use Smart::Comments;
        7
        8  # Valores iniciales
        9  our $text = 'Hola';
       10  our $dinero = 3000.03;
       11
       12  ### Texto: $text
       13  ### Dinero: $dinero
       14
       15  $text =~ s/Hola/Adios/;
       16  $dinero /= 24;
       17
       18  ### Texto: $text
       19  ### Dinero: $dinero
       20
       21  exit (0);

Source smart_comments.pl using Kate engine

        1  #!/usr/bin/perl
        2
        3  use strict;
        4  use Carp;
        5
        6  # use Smart::Comments;
        7
        8  # Valores iniciales
        9  our $text = 'Hola';
       10  our $dinero = 3000.03;
       11
       12  ### Texto: $text
       13  ### Dinero: $dinero
       14
       15  $text =~ s/Hola/Adios/;
       16  $dinero /= 24;
       17
       18  ### Texto: $text
       19  ### Dinero: $dinero
       20
       21  exit (0);

Source smart_comments.pl using Vim engine

        1  #!/usr/bin/perl
        2
        3  use strict;
        4  use Carp;
        5
        6  # use Smart::Comments;
        7
        8  # Valores iniciales
        9  our $text = 'Hola';
       10  our $dinero = 3000.03;
       11
       12  ### Texto: $text
       13  ### Dinero: $dinero
       14
       15  $text =~ s/Hola/Adios/;
       16  $dinero /= 24;
       17
       18  ### Texto: $text
       19  ### Dinero: $dinero
       20
       21  exit (0);