commonform-latex

0.3.2 • Public • Published

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)

/commonform-latex/

    Package Sidebar

    Install

    npm i commonform-latex

    Weekly Downloads

    17

    Version

    0.3.2

    License

    Apache-2.0

    Last publish

    Collaborators

    • kemitchell