

My first project in Rails – Pastebin for Mathematicians - huy
http://texpaste.herokuapp.com
Made this using Rails and Mathjax JS library. Sort of like the Gists for Latex. Would love to get any feedback.
======
mathteacher1729
I will be sharing this with my students.

A few comments are below. My motivation behind the comments is based on how
students who are new to LaTeX tend to misuse or not fully recognize the full
power of LaTeX. I realize that this may not be the target audience of your
project and so if any of my comments are not appropriate, please disregard
them.

* Mention that \\( .. \\) is the same as $...$ and \\[ ... \\] is the same as $$...$$ and that each will slightly alter the appearance of limits, integrals, and sums. TO put it another way, make clear the difference between display math vs. inline math.

* Rename Brackets "Stretchy brackets"? (Presently you have \left( x \right) which, to a new user is no different than simply writing (x).)

* Powers and Indices should mention that x_{...} is only required if more than one character is being used as a sub/superscript.

* Under matrices, there is no need for the left and right delimters. There are three commonly used environments: bmatrix, pmatrix, and vmatrix for matrices enclosed by brackets, parenthesis and vertical bars. More types are listed here: [http://www.sascha-frank.com/Faq/matrices.html](http://www.sascha-frank.com/Faq/matrices.html)

* The inclusion of an aligned equations template is wonderful.

* The table template would be better if it followed the style guides suggested here: [http://tug.org/pracjourn/2007-1/mori/](http://tug.org/pracjourn/2007-1/mori/)

* Double and triple integrals without bounds can be written as \iint and \iiint respectively. (no need for a series of \\! between individual \int).

* It would be nice to toggle the collapse/expansion of a menu by clicking it. Presently clicking it allows me to expand and the only way to collapse is to click on another.

* Throw \LaTeX\ in there somewhere. It's not necessary, but would be nice to have.

Thank you for creating this, I am sure it will be very helpful for my
students!

~~~
huy
Thank you for the thoughtful answer. I'm really happy that you find it useful.
I have noted your feedback and will work through it.

> students who are new to LaTeX tend to misuse or not fully recognize the full
> power of LaTeX. I realize that this may not be the target audience of your
> project and so if any of my comments are not appropriate, please disregard
> them.

These are actually the perfect audience for the project. You see, the main
thing that this tool offers is _convenience_, which is much appreciated by the
LaTeX beginners thanks to its steep learning curve and complicated software
setups. So please do share it with your students, I hope this helps them one
way or another :)

By the way, I've got a proper domain for it: www.texpaste.com

~~~
mkl
The layouts of the page and the maths are doing weird things for me. The page
layout problem seems zoom-related.

[http://imgur.com/CulHI3N](http://imgur.com/CulHI3N) (Chrome 29.0.1547.57 on
Ubuntu 12.10, 125% zoom)

~~~
huy
Thanks and noted. That's a div float size issue.

------
ushi
Hmm, this doesn't work in Chrome on your https page, because you load
JavaScript (MathJax) with http and Chrome refuses to do that...

~~~
huy
Thanks for the report. Will be working on it!

~~~
jawnb
On the CDN urls, you can just change them to use protocol relative urls. It
Looks like the jquerytools cdn doesn't support HTTPS, but you should be okay
to use this one from cloudflare

//cdnjs.cloudflare.com/ajax/libs/jquery-tools/1.2.7/jquery.tools.min.js

Here's a texpaste showing what you should change your script src's to.
[https://texpaste.herokuapp.com/n/lyoitffa](https://texpaste.herokuapp.com/n/lyoitffa)

~~~
huy
Thank you for going the extra mile.

On a seperate note, I'm surprised that people actually try it on the https
version (or be extra careful and manually add the https).

~~~
tyilo
HTTPS Everywhre does it automatically for known sites that support https, eg.
*.herokuapp.com

------
beberlei
This is very cool! I could have really used this during my time at university.
:)

How about as a next step adding revisions to formulas and making them
commentable, working sort of like gists?

~~~
huy
Thank you! Or you could share it with your university juniors ;)

Those revisions and comments features are nice suggestions, though I really
want to see exactly what features are needed for users to use this
_regularly_.

~~~
fnordfnordfnord
I'm a bit embarrassed to admit it, but one of the first things that came to
mind was to wish it would render an image that could be c'd and p'd.

~~~
mdup
I thought that too, it would be very convenient. On the other hand don't drop
the MathJax support because the rendering is really slick. Sometimes rendered
images feel weird.

~~~
huy
Do you mean exporting the entire text to image or just the equation parts?

~~~
fnordfnordfnord
Just the equation parts, to be used in creating worksheets and quizzes.

------
noodly
Theres already one: [http://mathbin.net](http://mathbin.net) ... and you can
also contribute:
[http://mathbin.net/contribute.html](http://mathbin.net/contribute.html)

~~~
lysa
There was already a search engine when Google started.

~~~
noodly
There still _are_ search engines besides Google. ;)

~~~
lysa
There were already search engines before those search engines (that exist side
by side with Google). Stop complaining about free "stuff"'s _existence_.

What does the world owe to you?

------
antoni
As I believe you target this to mathematicians mainly, I would suggest putting
some more sophisticated (a mathematics "milestone") equation as an example,
instead of simple quadratic equation.

~~~
huy
Thank you, really good feedback.

------
mej10
This is pretty cool! I think the usability is better than mathbin, and I like
the list of easily findable/clickable examples. Could even be useful for
learning math formatting with LaTeX.

~~~
huy
That's what I have in mind too. This would be so much easier for Latex
beginners to pick up latex!

------
zer01
Nice job! I like it, and this is a lot easier then sharing screenshots or raw
TeX :-P.

Also make sure you sanitize user input, you have a XSS issue.

[https://texpaste.herokuapp.com/n/bj1jknil](https://texpaste.herokuapp.com/n/bj1jknil)

------
singold
This is really cool, I've learned a lot of latex in ~30 mins thanks to this.

I'm learning latex as part of a Numeric Methods course and will be sharing
this with my fellow students

It would be great to have some feedback-app-thing integrated, I'll love to
report issues, but I think that if it is in page would be better than going to
some mail client or something. Maybe this could help:
[https://www.uservoice.com/](https://www.uservoice.com/) (I like it)

~~~
huy
Was thinking about the feedback thing this morning actually - and I think that
would be the very first feature to add (after work)

------
kctong529
Great work! This will make more people start to see the beauty of LaTeX. As I
suppose the target users of this project are those who like WYSIWYG approach,
they may not want to replace the default element in the text field one by one.
Is it possible to prompt the user in request for values before passing it to
the textfield? Or let the user create their own default values after logged
in?

~~~
huy
That would be slightly complicated, but maybe the alternative is if you select
an expression and click on some 1-variable function then we'll use the
expression instead of the generic 'x'.

------
xyfer
This is pretty cool. I hate how we have a tough crowd here that's not very
encouraging. Keep hacking and having fun doing so!

~~~
huy
Actually the crowd has been pretty encouraging and supportive. I'm really
surprised and didn't expect the response to be this positive.

------
nilliams
Nice project, is there a logical next step where the text outside the dollars
can be formatted with markdown (or I suppose LaTeX)?

~~~
huy
That would be nice suggestion. Though I'm trying to see what would people use
this for before adding any extra feature. I envision it would be used in
university for students to share math notes/proofs. We'll see.

~~~
fnordfnordfnord
I'll show it to my JuCo students, maybe it will improve their papers.

------
pseut
I was going to be a smartass and put in unicode, but it worked. At least $∫$
did. So that was a very pleasant surprise.

------
bcuccioli
This doesn't load for me at the moment, so I can't compare, but I also made
something similar a few months ago in node.js:
[http://texbin.bcuccioli.com](http://texbin.bcuccioli.com)

------
garenp
Very nice. I always wished there was a nice way to write natural looking math
via IRC--that was still readable in text form--with some kind of whiteboard
looking interface for DCC chats that looked pretty.

------
nimrody
An older alternative that does not rely on MathJax (produces png images) is
QuickLatex:

[http://www.quicklatex.com/](http://www.quicklatex.com/)

It even supports latex packages (e.g. tikz).

------
delinka
One equals two - I stump high school teachers and college professors on this
one:

[http://texpaste.herokuapp.com/n/c0iohnf5](http://texpaste.herokuapp.com/n/c0iohnf5)

~~~
tghw
Exception: Division by zero

------
bliti
Do you plan to open source the source code? I'd like to contribute with with
the front end. It works very nicely, but looks too generic. (:

~~~
huy
Haven't really thought about it, but yeah why not! I'd love some help,
especially with the front end.

Edit: Sorry I close it down. Realized that there's some bit of JS code that's
contributed by a friend, so I need to check and ask for his permission first.
I'll contact you personally to seek for your help :) Thank you again!

~~~
bliti
Its all right. If you do get the green light, email me. I'm looking for open
source projects to contribute.

------
mrcactu5
Currently I use MathOverflow's `ask question` feature.

This is a great 1st rails project. Also there should be mathematician's
Twitter.

~~~
huy
Love the idea of Twitter for Mathematicians.

------
ydeft
This is a very cool project. The design is clean, and the rendering is
beautiful. Bookmarked.

Keep up the great work, OP!

------
jnevelson
The 'How This Works' link is throwing a JS error in my Chrome console.

------
tghw
TeX needs to be more widely taught. It saved my ass in grad school.

------
coherentpony
The example doesn't work. The maths isn't rendered.

------
pmtarantino
Useful and simple. Congrats!

------
PuercoPop
I can't find a link to the source code

~~~
kintamanimatt
Maybe it's not open source.

