0.3.2 • Published 8 years ago

commonform-latex v0.3.2

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

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

1.0.0

9 years ago