You are here

README.txt in GeSHi Filter for syntax highlighting 5

Same filename and directory in other branches
  1. 8.2 README.txt
  2. 8 README.txt
  3. 5.2 README.txt
  4. 6 README.txt
  5. 7 README.txt
GeSHi Filter Module
Authors:  Vincent Filby <vfilby at gmail dot com>
          Michael Hutchinson (http://compsoc.dur.ac.uk/~mjh/contact)
          Damien Pitard <dpdev00 at gmail dot com>

GeSHi - Generic Syntax Highlighter
Author:   Nigel McNie <nigel at geshi dot org>

See the GeSHi homepage at:

	http://qbnz.com/highlighter

A big part of this README is quoted from the GeSHi documentation written
by Nigel McNie.

DESCRIPTION
-----------
The GeShiFilter Module provides <code [type="language"]>...</code> tags
to syntax-highlight code automatically.

SETTINGS
--------
Set the GeShi filter configuration options by navigating to:

     administer > settings > geshifilter
     
*GeSHi settings*

	Code Container:
		-Use <pre> container
		-Use <div> container
		-No container
		
The Code Container has a fundamental effect on the layout of your code
before you even begin to style. What is the Code Container? It's the bit
of markup that goes around your code to contain it. By default your code
is surrounded by a <pre>, but you can also specify a <div>.

The <pre> header is the default. If you're familiar with HTML you'll
know that whitespace is rendered "as is" by a <pre> element. The
advantage for you is that if you use <pre> the whitespace you use will
appear pretty much exactly how it is in the source, and what's more
GeSHi won't have to add a whole lot of <br />'s and non-breaking spaces
(&nbsp;) to your code to indent it. This saves you source code (and your
valuable visitors waiting time and your bandwidth).

But if you don't like <pre> or it looks stupid in your browser no matter
what styles you try to apply to it or something similar, you might want
to use a <div> instead. A <div> will result in more source - GeSHi will
have to insert whitespace markup - but in return you can wrap long lines
of code that would otherwise have your browser's horizontal scrollbar
appear. Of course with <div> you can *not* wrap lines if you please.

The third choice specifies that the code should not be wrapped in
anything at all.

	CSS classes:
		-Use in-line styles
		-Use CSS classes
		
Using CSS to highlight your code instead of in-lining the styles is a
definate bonus. Not only is it more compliant (the w3c is deprecating
the style attribute in XHTML 2.0) but it results in far less outputted
code - up to a whopping 50% saving - which makes a *huge* difference to
those of us on modems!

GeSHiFilter load geshi.css (in main directory) as default stylesheet but
you can style anything you want in your own theme CSS file.

	Line Numbers:
		-Disable line numbers
		-Use normal line numbering
		-Use fancy line numbering
		
GeSHi has the ability to add line numbers to your code. Line numbers are
a great way to make your code look professional, especially if you use
the fancy line numbers feature.

Normal line numbers means you specify a style for them, and that style
gets applied to all of them. Fancy line numbers means that you can
specify a different style for each nth line number.

	Fancy number each:
		number
		
Display a fancy number every n line numbers.

	Allow start param
		true|false

Allow users to make the line numbers start at any number using
start=number param.

If you have not enabled line numbers, this will have no effect.

This feature will break compliancy (however transitional compliancy
remains). This is because the only widely supported way to change the
start value for line numbers is by using the start="number" attribute of
the <ol> tag.

*In-line settings*

Customize here some in-line styles.
If you have not enabled in-line styles, this will have no effect.

USAGE
---
To post pieces of highlighted code, surround them with
<blockcode [type="language"] [start="startLineNumber"]>...</blockcode>.

E.g. highlight actionscript code:

<blockcode type="actionscript">
...
</blockcode>

if inline code is allowed in input format settings, you may also post
highlighted inline code surrounding it with <code [type="language"]>...
</code> tags.

E.g. highlight actionscript inline code:

<code type="actionscript">...</code>

If you don't use type="language" param or specify an unsupported
language, the code will be highlighted according to the default language
set in the input format or will not be highlighted if
"-DO NOT HIGHLIGHT-" is set as default language.

LINE NUMBERS:
When line numbers are enabled, you can specify the start line number
using start="startLineNumber" param.

E.g. highlight actionscript code and start line number at 5:

<code type="actionscript" start="5">
...
</code>
  
  
DEPENDENCIES
------------
This module requires the third-party GeShi Syntax Highlighter

	http://qbnz.com/highlighter

INSTALLATION
------------
See INSTALL.txt in this directory.

File

README.txt
View source
  1. GeSHi Filter Module
  2. Authors: Vincent Filby
  3. Michael Hutchinson (http://compsoc.dur.ac.uk/~mjh/contact)
  4. Damien Pitard
  5. GeSHi - Generic Syntax Highlighter
  6. Author: Nigel McNie
  7. See the GeSHi homepage at:
  8. http://qbnz.com/highlighter
  9. A big part of this README is quoted from the GeSHi documentation written
  10. by Nigel McNie.
  11. DESCRIPTION
  12. -----------
  13. The GeShiFilter Module provides ... tags
  14. to syntax-highlight code automatically.
  15. SETTINGS
  16. --------
  17. Set the GeShi filter configuration options by navigating to:
  18. administer > settings > geshifilter
  19. *GeSHi settings*
  20. Code Container:
  21. -Use
     container
    
  22. -Use
    container
  23. -No container
  24. The Code Container has a fundamental effect on the layout of your code
  25. before you even begin to style. What is the Code Container? It's the bit
  26. of markup that goes around your code to contain it. By default your code
  27. is surrounded by a
    , but you can also specify a 
    .
  28. The
     header is the default. If you're familiar with HTML you'll
    
  29. know that whitespace is rendered "as is" by a
     element. The
    
  30. advantage for you is that if you use
     the whitespace you use will
    
  31. appear pretty much exactly how it is in the source, and what's more
  32. GeSHi won't have to add a whole lot of
    's and non-breaking spaces
  33. ( ) to your code to indent it. This saves you source code (and your
  34. valuable visitors waiting time and your bandwidth).
  35. But if you don't like
     or it looks stupid in your browser no matter
    
  36. what styles you try to apply to it or something similar, you might want
  37. to use a
    instead. A
    will result in more source - GeSHi will
  38. have to insert whitespace markup - but in return you can wrap long lines
  39. of code that would otherwise have your browser's horizontal scrollbar
  40. appear. Of course with
    you can *not* wrap lines if you please.
  41. The third choice specifies that the code should not be wrapped in
  42. anything at all.
  43. CSS classes:
  44. -Use in-line styles
  45. -Use CSS classes
  46. Using CSS to highlight your code instead of in-lining the styles is a
  47. definate bonus. Not only is it more compliant (the w3c is deprecating
  48. the style attribute in XHTML 2.0) but it results in far less outputted
  49. code - up to a whopping 50% saving - which makes a *huge* difference to
  50. those of us on modems!
  51. GeSHiFilter load geshi.css (in main directory) as default stylesheet but
  52. you can style anything you want in your own theme CSS file.
  53. Line Numbers:
  54. -Disable line numbers
  55. -Use normal line numbering
  56. -Use fancy line numbering
  57. GeSHi has the ability to add line numbers to your code. Line numbers are
  58. a great way to make your code look professional, especially if you use
  59. the fancy line numbers feature.
  60. Normal line numbers means you specify a style for them, and that style
  61. gets applied to all of them. Fancy line numbers means that you can
  62. specify a different style for each nth line number.
  63. Fancy number each:
  64. number
  65. Display a fancy number every n line numbers.
  66. Allow start param
  67. true|false
  68. Allow users to make the line numbers start at any number using
  69. start=number param.
  70. If you have not enabled line numbers, this will have no effect.
  71. This feature will break compliancy (however transitional compliancy
  72. remains). This is because the only widely supported way to change the
  73. start value for line numbers is by using the start="number" attribute of
  74. the
      tag.
    1. *In-line settings*
    2. Customize here some in-line styles.
    3. If you have not enabled in-line styles, this will have no effect.
    4. USAGE
    5. ---
    6. To post pieces of highlighted code, surround them with
    7. ....
    8. E.g. highlight actionscript code:
    9. ...
    10. if inline code is allowed in input format settings, you may also post
    11. highlighted inline code surrounding it with ...
    12. tags.
    13. E.g. highlight actionscript inline code:
    14. ...
    15. If you don't use type="language" param or specify an unsupported
    16. language, the code will be highlighted according to the default language
    17. set in the input format or will not be highlighted if
    18. "-DO NOT HIGHLIGHT-" is set as default language.
    19. LINE NUMBERS:
    20. When line numbers are enabled, you can specify the start line number
    21. using start="startLineNumber" param.
    22. E.g. highlight actionscript code and start line number at 5:
    23. ...
    24. DEPENDENCIES
    25. ------------
    26. This module requires the third-party GeShi Syntax Highlighter
    27. http://qbnz.com/highlighter
    28. INSTALLATION
    29. ------------
    30. See INSTALL.txt in this directory.