HtmlTableToLatex
Converter html tables tables in latex
Installation
$ npm install htmltabletolatex --save
Usage
// httl = HtmlTableToLatex var httl = HTTL; httl;
Example
Html input
Table: usuario Name Data Type Nullable PK FK Default Comment user_idUsuario VARCHAR(45) Yes Yes No user_Correo VARCHAR(45) Yes No No
Latex output
\begin{center} \caption{tableTableUsuario} \label{labelTableUsuario} \begin{tabular}{ |l|l|l|l|l|l|l| } \hline Name & DataType & Nullable & PK & FK & Default & Comment \\ UserIdUsuario & VARCHAR(45) & Yes & Yes & No & & \\ \hline UserCorreo & VARCHAR(45) & Yes & No & No & & \\ \hline \end{tabular}\end{center}
API
HtmlTableToLatex
constructor(args) -> Param | Type | Description | Default |
---|---|---|---|
minLengthColumnsByRow | number | Take into account only columns by minimum size in text | 3 |
separator | string | Table columns size. i.e: l, c, r |
l |
lines | boolean | Show lines | true |
Example
var HtmlTableToLatex = HtmlTableToLatex; var httl = 2 'l' false;
You can also change the parameters without the need of a constructor:
var httl = HTTL; httllines = false;httlminLengthColumnsByRow = 2;httlseparator = 'l';
Colaborate
# Fork it this repo # Install typescript cli $ git clone https://github.com/<your-username>/HtmlTableToLatex.git$ cd HtmlTableToLatex# Edit & transpile file index.ts # Commit + push + Pull request
License MIT
This software is released under the MIT License.