User Tools

Site Tools


instikis_take_on_syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
instikis_take_on_syntax [2019/11/18 13:34]
127.0.0.1 external edit
instikis_take_on_syntax [2023/01/25 09:51]
boris removed
Line 1: Line 1:
-====== Instikis take on Syntax ====== 
- 
-//Could not include contents// 
-===== Markdown ===== 
- 
-Instiki sports a variety of markup options, but the main one for use with mathematics (that’s why you’re here, after all) is Markdown. 
- 
-The Markdown implementation is based on [[http://maruku.rubyforge.org/|Maruku]], a greatly enhanced implementation which augments John Gruber’s orginal [[http://daringfireball.net/projects/markdown/syntax|Markdown syntax]] with [[http://michelf.com/projects/php-markdown/extra/|Michel Fortin’s Markdown-Extra extensions]] (tables, footnotes, definition-lists, …). It also sports a very nice [[http://maruku.rubyforge.org/proposal.html|metadata syntax]] for adding attributes (''%%id%%'', ''%%class%%'', ''%%style%%'', etc.) to the generated XHTML, which is especially useful in combination with its syntax for [[http://maruku.rubyforge.org/div.html|creating DIVs]]. 
- 
-==== Itex ==== 
- 
-With the (default) **Markdown+itex2MML** filter, you can enter equations in [[http://golem.ph.utexas.edu/~distler/blog/itex2MMLcommands.html|itex]], a LaTeX-like dialect. Inline and display equations are supported, as is automatic equation numbering and other such niceties. 
- 
-Here’s a simple example: 
- 
-<code> 
- \[\label 
-    ^\infty e^ d x} = \sqrt} 
- \] 
-</code> 
-produces 
- 
-[\label ^\infty e^ d x} = \sqrt} ] For more examples, see the Sandbox. 
- 
-==== Theorems ==== 
- 
-Instiki support a range of **Theorem**-like environments, modeled on [[ftp://ftp.ams.org/pub/tex/doc/amscls/amsthdoc.pdf|amsthm]]. (Indeed, the LaTeX-export is ''%%amsthm%%''-compatible.). See here for details. 
- 
-==== Syntax Colouring ==== 
- 
-The Markdown filters also support syntax-colouring of code blocks. Ruby and (X)HTML flavours are supported. 
- 
-Here’s an example of Ruby syntax-colouring: 
- 
-~~~~~~~~~~ require ‘chunks/chunk’ 
- 
-====== Contains all the methods for finding and replacing wiki links. ====== 
- 
-module WikiChunk include Chunk 
- 
-# A wiki reference is the top-level class for anything that refers to # another wiki page. class WikiReference < Chunk::Abstract 
- 
-<code> 
-# Name of the referenced page 
-attr_reader :page_name 
- 
-# Name of the referenced page 
-attr_reader :web_name 
- 
-# the referenced page 
-def refpage 
-  @content.web.page(@page_name) 
-end 
-</code> 
-end ~~~~~~~~~~~~~~~~~~~~~~~~ 
- 
-which is generated by 
- 
-<code> 
-~~~~~~~~~~  
-require 'chunks/chunk' 
- 
-# Contains all the methods for finding and replacing wiki links. 
-module WikiChunk 
-    include Chunk 
-       ⋮ 
-~~~~~~~~~~~~~~~~~~~~~~~~ 
-</code> 
-(Note the use of Markdown-Extra fenced code-blocks.) Here’s an example of CSS syntax-colouring 
- 
-<code> 
- body  
- 
- .skipNav  
-  
- div#Content  
-  
- a:visited  
-</code> 
-which is generated by appending 
- 
-<code> 
-     body  
-</code> 
-to a standard Markdown indented code-block. 
- 
-The syntax-colouring modes, supported in Instiki 0.18.1, are: 
- 
-<code> 
- html, xml, ruby, ansic, javascript, yaml, sqlite, css fortran 
-</code> 
 ===== Wiki Syntax ===== ===== Wiki Syntax =====