Skip to content

Rewrite the entire darn thing #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["env"]
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
.DS_Store
dist/
.cache/
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
# Excel => LaTeX

Check out the [demo](http://ericwood.org/excel2latex/).
Check it out here: [excel2latex.com](http://excel2latex.com).

A silly Javascript tool for converting Excel spreadsheets into LaTeX tables.
A silly Javascript tool for converting Excel spreadsheets into LaTeX tables, born out of a desire to write tools to help me work on lab reports instead of actually writing lab reports.

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!
### Local development

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.
excel2latex is a static site built with [parcel](https://parceljs.org). If you're looking to contribute, you can run the site locally using these directions.

### Compatability
First, install the packages we need:

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 ;)
```bash
npm install
```

Once that completes, you can boot up the dev server:

### Shout outs
```bash
npm start
```

This will boot up an http server that you can access at `http://localhost:1234`. Hooray!

Thanks to [zip.js](http://gildas-lormeau.github.com/zip.js/) for making this thing possible. It's a badass library.

### License

```
Copyright (c) 2012, Eric Wood
Copyright (c) 2018, Eric Wood
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -43,4 +50,4 @@ 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.
```
```
226 changes: 0 additions & 226 deletions converter.js

This file was deleted.

57 changes: 5 additions & 52 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,53 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Excel => LaTeX</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-92247838-1', 'auto');
ga('send', 'pageview');
</script>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-2094934741938997",
enable_page_level_ads: true
});
</script>
</head>
<body>
<a href="https://github.com/eric-wood/excel2latex"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<div class="center">
<h1 class="title">excel => LaTeX</h1>
<h4 class="info">Drag any .xlsx file onto the page to extract data and convert it into a LaTeX table</h4>
<div class="content">
<label for="workbook">Workbook:</label>
<select id="workbook" name="workbook"></select>

<textarea id="latex-output" readonly="readonly" onclick="this.select();"></textarea>

<div class="settings">
<input type="checkbox" name="escape" id="escape" checked="checked">
<label for="escape">Escape input text</label>
</div>

<p>Mostly untested, so if you find a bug or have a feature request, <a href="https://github.com/eric-wood/excel2latex/issues">let me know!</a>
<p class="disclaimer">Note: this only works with .xlsx files. That means .xls files will <b>not</b> work.</p>
<p>Formatting from the Excel document won't be preserved, only the text will be extracted.</p>
<p>Lovingly hacked together by <a href="http://ericwood.org">Eric Wood</a></p>
</div>
<h4>Preview</h4>
<div id="preview">$$ \LaTeX $$</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="zip/zip.js"></script>
<script type="text/javascript" src="converter.js"></script>
</body>
</html>
<body>
<script src="index.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
</body>
</html>
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Parser from './parser.js'

const parser = new Parser()
Loading