DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Anyscript syntaxt highligthing and indenting

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed:2005-01-07T00:13:52
Author:Jeppe Vesterbæk
Email:jhve02@control.auc.dk
Info 3:
Info 4:

EXT: Anyscript syntaxt highligthing and indenting

Extension Key: anyscript_markup

Copyright 2000-2002, Jeppe Vesterbæk, <jhve02@control.auc.dk>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: Anyscript syntaxt highligthing and indenting 1

Introduction 1

Users manual 1

Configuration 3

To-Do list 4

Changelog 4

Introduction

Does syntaxt highligthing and indenting of Anyscript source code. Anyscript code to be highligthed and indented can either be placed a special anyscript content element or simply be written in a normal text content element. The syntax highligthing and indenting functionality is based on www.beautifier.org .

Anyscript is a scripting language with c-like syntax created by AnyBody Technology ( http://www.anybodytech.com ). Have a look at the documentation section of the homepage (created in Typo3!), if you want to know more about it. There are some great tutorails there.

Users manual

When the extension is installed, a new page content type is added to Typo3 as shown below.

img-1

The Anyscript source code shown in the figure will be indented and highlighted. The first word (“AnySeg”) is an Anyscript class and it will hence be marked blue. Single line comments (“//UpperArm” in last line) are marked green.

If you want to attract attention to special parts of the code listing, it is possible by enclosing the part by “§” signs. This is e.g. useful if you change a single parameter in two versions of a code sample in a tutorial.

The result of our small Anyscript code will look like this:

img-2

It is also possible to write Anyscript along with normal text. This is nice when writing a tutorial page with many small code samles. When doing so, the Anyscript code must be encosed with <ANYSCRIPT> </ANYSCRIPT> tags. The <ANYSCRIPT> tags are removed and the code between them is marked up. This is shown is the picture below.

img-3

Our fine result:

img-4

Configuration

To enable the extension to markup Anyscript enclosed by <ANYSCRIPT> </ANYSCRIPT> tags in text content elements, the following typoscript must be set in the page ts config:

anyscript-replacer.enabled = 1

If you want to enable this functionality on all pages, just place this in your root page.

If you want to change the anyscript classes (those colored blue), it is possible to supply the extension with a CSV file (comma seperated values file) containing all new classes. This is done in the extension manager.

img-5

To-Do list

- Clean up code

- Comment code

- Write documentation

Changelog

0.3.0: Added manual

img-6 EXT: Anyscript syntaxt highligthing and indenting - 4