0.3.2 • Published 10 years ago

commonform-latex v0.3.2

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
10 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

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

1.0.0

10 years ago