diff --git a/README.md b/README.md new file mode 100644 index 0000000..8116db0 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# Excel => LaTeX + +A silly Javascript tool for converting Excel spreadsheets into LaTeX tables. + +Right now I don't have any settings for what the resulting table looks like...I want to add this eventually, it's not difficult or anything. Sorry in advance if the formatting isn't what you're looking for, I'll make it more flexible in the future! + +I just whipped this up in a few hours for fun, and haven't really tested it much. Pleasepleaseplease let me know if you manage to break it, I'd really appreciate it. + +### Compatability + +Not completely sure, but most likely newer versions of Chrome, Firefox, and IE 10 will work great with this. Only tested on Chrome...this is just a little experiment ;) + +### Shout outs + +Thanks to zip.js for making this thing possible. It's a badass library. + +### License + +``` +Copyright (c) 2012, Eric Wood +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the author nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL ERIC WOOD BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` diff --git a/converter.js b/converter.js index 06231bf..31aacb9 100644 --- a/converter.js +++ b/converter.js @@ -124,6 +124,7 @@ excelParser = { $('body').bind('dragover', function(event) { event.stopPropagation(); event.preventDefault(); + event.dataTransfer.dropEffect = 'copy'; }); $('body').bind('drop', excelParser.handleFile); diff --git a/index.html b/index.html index 2b7782f..4899f50 100644 --- a/index.html +++ b/index.html @@ -1,12 +1,22 @@ + - Excel to LaTeX converter + + Excel => LaTeX + -

Excel to LaTeX converter

-

Drag any .xlsx file onto the page to begin!

-

LaTeX output:

- + Fork me on GitHub +
+

excel => LaTeX

+

Drag any .xlsx file onto the page to convert it into a LaTeX table

+
+ +

Mostly untested, so if you find a bug or have a feature request, let me know! +

Note: this only works with .xlsx files. That means .xls files will not work.

+

Lovingly hacked together by Eric Wood

+
+
diff --git a/style.css b/style.css new file mode 100644 index 0000000..fb25a14 --- /dev/null +++ b/style.css @@ -0,0 +1,22 @@ +body { + font-family: monospace; +} + +a { + color: blue; +} + +.center { + margin: 0 auto; + width: 450px; +} + +.title { + font-size: 36pt; + text-align: center; +} + +#latex-output { + width: 100%; + height: 200px; +}