0.3.2 • Published 11 years ago

commonform-latex v0.3.2

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
11 years ago

Render Common Forms in LaTeX.

var latex = require('commonform-latex')
var assert = require('assert')

var form = {
  content: [
    { heading: 'IP',
      form: {
        content: [ 'An IP clause' ] } },
    { heading: 'Survival',
      form: {
        content: [ { reference: 'IP' } ] } } ] }

var output = [
  '\\noindent%',
  '\\hspace{1\\parindent}%',
  '1.\\ %',
  '\\textbf{IP}. %',
  'An IP clause',
  '',
  '\\noindent%',
  '\\hspace{1\\parindent}%',
  '2.\\ %',
  '\\textbf{Survival}. %',
  'Section 1 (IP)' ]
.join('\n')

assert.deepEqual(latex(form, {}), output)
0.3.2

11 years ago

0.3.1

11 years ago

0.3.0

11 years ago

0.2.3

11 years ago

0.2.2

11 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

1.0.0

11 years ago