authoring-0.3.3.1: A library for writing papers

Safe HaskellNone

Text.Authoring.TH

Description

This module provides quasi-quotes rawQ and escQ for writing papers. The quasi-quotes will generate authoring monads, so you can use them in authoring context like follows.

 paragraph = do
   let takahashi2007 = citep ["isbn:9784130627184"] 
       val = 3e6
   [rawQ| The dielectric strength of air is $ #{val} $ V/m @{takahashi2007}.  |]

We support antiquote syntax:

  #{val}

for embedding values (Show instance is required), and

  @{...}

for embedding authring monads.

Synopsis

Documentation

rawQ :: QuasiQuoterSource

Quote without escaping any special characters.

escQ :: QuasiQuoterSource

Quote with LaTeX special characters escaped.

declareLabels :: QuasiQuoterSource

Define a type and a Label from the given name. We use Types to uniquely label concepts within a paper. For example

 [declareLabels| myFormula |]

generates following three lines.

 data MyFormula = MyFormula deriving Typeable
 myFormula :: Label
 myFormula = fromValue MyFormula

You can declare multiple labels at one shot by separating them with a comma.

 [declareLabels| FluxConservation, FaradayLaw, GaussLaw, AmpereLaw |]