A simple LaTeX generating framework for SC applications
JavaScript
Switch branches/tags
Nothing to show
Latest commit 157a0ec Sep 13, 2012 @mauritslamers many fixes
Permalink
Failed to load latest commit information.
classes many fixes Sep 13, 2012
english.lproj initial commit of TeXSC Jun 11, 2011
README adding readme, adding constants Jun 11, 2011
core.js adding readme, adding constants Jun 11, 2011

README

TeXSC

A small and simple (La)TeX generating framework for use with SC applications.

Currently limited to article class documents, TeXSC can help you generate LaTeX 
documents on the client. TeXSC only generates LaTeX code, which can then be sent
to the server for processing.

TeXSC is quite easy to use:

Creating a document:

    var myDoc = TeXSC.Article.create({
      docType: 'a4paper',
      font: 'helvetica',
      fontSize: '11pt',
      fontFamily: 'roman',
      isSloppy: YES
    });

Adding packages: 

    myDoc.addPackage('mathpazo');

Adding a line:

    myDoc.addLine("this is my text",fontinfo,alignInfo);

fontinfo is an override or addition to the defaults defined in the document creation. 
fontinfo can be generated using:

    var myBoldFont = doc.createFontInfo(size,fontfaces,fontfamily);

in which size is a number (-4 to +5) of which 0 is the default font size.

Adding a paragraph:

    myDoc.addParagraph(text,fontinfo,aligninfo,shouldIndent);

shouldIndent is a boolean denoting whether the first line of a paragraph should be indented.

Inserting vertical space:

    myDoc.addVSpaceMm(10);
    myDoc.addVSpaceCm(1);
    myDoc.addVSpaceText('1cm');