Hacker News new | past | comments | ask | show | jobs | submit login
My first project in Rails – Pastebin for Mathematicians (texpaste.herokuapp.com)
136 points by huy on Sept 4, 2013 | hide | past | favorite | 65 comments



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

* 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/

* 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!


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


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 (Chrome 29.0.1547.57 on Ubuntu 12.10, 125% zoom)


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


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


Thanks for the report. Will be working on it!


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


Note that this won't work for MathJax, since the certificate won't match the domain. For a workaround: http://www.mathjax.org/resources/faqs/#problem-https


> protocol relative urls.

Fun bit of trivia: these are actually called 'network path references.' http://tools.ietf.org/html/rfc3986.html#section-4.2


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).


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


Many have plugins in their browsers that automatically try to get the https version of any website.


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?


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_.


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.


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.


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


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


+1 Great Work OP!!!


Theres already one: http://mathbin.net ... and you can also contribute: http://mathbin.net/contribute.html


I'm not sure why every "Show HN" post attracts somebody that points out that what OP has created isn't novel. It's a big world and novelty isn't half as important as quality of execution and UX.

The purpose of these posts isn't to lay focus on what's already out there, but to focus on what OP has created, usually for the primary purpose of critical feedback so they can improve themselves and their product.


Part of critical feedback is comparing something to its competitors. Of course, the GP could have done a better job at this.


That would be perfectly valid criticism. If they'd said "there's x and y competitors and they do [...] really well - might be something you'd want to look at because these are very heavily used features", that'd be really constructive feedback. But all noodly said was "theres already one" and solicited contributors.


I prefer the usability of the OPs much better. The use of dollar signs might be a little clunkier than the begin/end tags when you want to use a dollar sign. But all in all I think the presentation is better and a bit more welcoming.


Yes it is, and I hope he can contribute to mathbin as it is more widely used - at least it's official pastebin in ##math channel on freenode.

I don't know if the author of mathbin is still working on it (the message on main page is old), but I think it's worth a shot ;)


I showed this to ##math and the ops decided to make TexPaste the official pastebin instead of Mathbin: http://i.imgur.com/hk9fPZV.png


I disagree about dollar sign. This is how embedding mathematical notation in LaTeX always worked, and I never had, nor heard of anyone having problems with that in practice.


There was already a search engine when Google started.


There still are search engines besides Google. ;)


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?


are there? :)


are there?


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.


Thank you, really good feedback.


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.


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


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


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/ (I like it)


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


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?


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'.


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!


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


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


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.


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


Great, good luck!


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


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


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.


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

http://www.quicklatex.com/

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


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

http://texpaste.herokuapp.com/n/c0iohnf5


Exception: Division by zero


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. (:


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!


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


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

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


Love the idea of Twitter for Mathematicians.


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

Keep up the great work, OP!


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


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


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


Useful and simple. Congrats!


I can't find a link to the source code


Maybe it's not open source.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: