### Index
#### Example Wiki Document

*** Some Links

- A description of this project: [Building a Wiki in Haskell]

- An example document on generic programming: [Testing a generic term rewrite framework]

- An internal reference to [#code-snippet|the code snippet below]

*** Example LaTeX formulas.

- First formula:

  @@ formula

    \begin{displaymath}
    \oint_{\partial A}\vec H\;\cdot\mathrm{d}\vec s=\iint_A\vec J\;\cdot\mathrm{d}\vec A+\frac{\mathrm{d}}
    {\mathrm{d} t}\iint_A\vec D\;\cdot\mathrm{d}\vec A
    \end{displaymath}

- Second formula:

  @@ formula

    \begin{displaymath}
    \vec A \vec B \vec \theta_{\vec \beta}
    \end{displaymath}

*** Displaced Table of Contents

@@ toc

*** Snippet of Haskell Code

#anchor code-snippet

  @@ haskell

    module Httpd.Handlers.Head (hHead) where

    import Control.Applicative
    import Control.Monad.State

    import Httpd.Httpd
    import Protocol.Http

    {-  
    The 'hHead' handler makes sure no response body is sent to the client when
    the request is an HTTP 'HEAD' request. In the case of a 'HEAD' request the 
    specified sub handler will be executed under the assumption that the request
    was a 'GET' request, otherwise this handler will act as the identify
    function.
    -}  

    hHead :: Handler a -> Handler a
    hHead handler = do
      m <- gets (method . request)
      case m of
        HEAD -> withRequest (setMethod GET) handler
             <* putQueue []
        _    -> handler
