

Show HN: Markdown + LaTeX math in the browser - pkrein
http://socrates.io/#

======
jessriedel
People in this thread may also find GmailTex useful. It's a browser plugin
which enables using LaTeX syntax in Gmail and GChat.

<http://alexeev.org/gmailtex.html>

P.S.: This Socrates thing is pretty fantastic. Is there a keyboard shortcut
for switching to the compiled view?

------
csense
I tested it on Chromium (the FOSS version of Google Chrome), and in that
browser, the math uses a much smaller font than the Firefox version. (Firefox
looks "right.")

I'm using Linux Mint 14 (the most recent version), the default version of
Chromium from the distribution's repo; all packages are up-to-date, and I
don't have any browser extensions or any intense customization.

~~~
indubitably
The Firefox version appears broken to me?

<http://i.imgur.com/9eeSvlU.png>

Firefox 19/OSX Lion

------
chjj
I recommend upgrading to the latest release of marked (
<https://github.com/chjj/marked/tree/v0.2.8> ). It has a few improvements as
well as GFM tables.

~~~
ianstormtaylor
Beautiful! You wouldn't happen to know if it supports "smart" quotes would
you? Been meaning to find one that does support those.

Also auto-id-ing heading elements so they can be hash-linked to? That's
another of my marked requests.

~~~
chjj
> Beautiful! You wouldn't happen to know if it supports "smart" quotes would
> you?

Marked has a pretty big todo list right now. Those are on it somewhere.

> Also auto-id-ing heading elements so they can be hash-linked to?

This is actually requested less than I expected it to be, but I think I do
want to add something for it in the future.

~~~
ianstormtaylor
Oh nice, didn't make the connection that you were the maintainer ;)

Yeah id-ing of heading elements is something I really wish we had for our docs
(<https://segment.io/docs>) because we have to break out of markdown for every
header to make them linkable.

I just wish I knew enough to be able to contribute. That was my problem with
Stylus too...

------
cpursley
This is cool. I wanted to do a blog post on some real estate appraisal topics,
which requires math examples. Is this open source? Where I can I find
socrates.io - it goes straight to the interface.

~~~
ianstormtaylor
Yup it is! On Github: <https://github.com/segmentio/socrates>

------
imslavko
That's cool. I was using markable.in in last weeks. But lack of code
highlighting and Mathjax brings socrates.io on the first place :)

------
justinvh
I wrote a LaTeX Markdown plugin as well, but it served a different purpose. It
was geared for offline documents.

<https://github.com/justinvh/Markdown-LaTeX>

It generates inline/base64-encoded images with a small file-cache for the
generated images. Try it out!

------
nimrody
There used to be a similar service at <http://notepag.es/> However, it seems
to be down now.

------
amckinlay
Really wish they used Pandoc Markdown or some other form of extended
Markdown... then I could consider using it for real stuff,

------
pixie_
Why not use jqMath? It's latex based, 10 times smaller, and 10 times faster
than MathJax - which is aimed more at publishers.

~~~
jey
Interesting. Looks like it maps TeX directly to HTML, so it must support fewer
constructs? Or what are the downsides? Being 10x faster and 10x smaller
without any drawbacks seems too good to be true.

~~~
jessriedel
"TeX-based" is the operative term here. The syntax is somewhat different true
TeX (so it would drive people who use TeX regularly crazy, like me). And I
don't believe it has the same abilities.

------
quaz3l
I've been working on something just like this! It is a mashup of
Ghost<john.onolan.org/ghost/>, and a editor like this. If you was to see the
uncompleted version its here:
<http://quaz3l.github.com/ghost/g-admin/posts.html>

------
somethingnew
If you think this is cool, check out <http://spandex.io/>

------
kanatzidis
Oh man, this is really cool. Great job. I'm the co-founder of
<http://SpanDeX.io> (which I see someone already commented about) and we love
seeing this kind of stuff. Great to see LaTeX getting implemented in a really
useful way!

------
swah
In the end, how should I use this product? Writing Latex before compiling the
final thing on your PC?

------
hyperbovine
I wish it had better support for live editing, but this is really a limitation
of MathJax / TeX in general. Still, I wonder if it might be possible to
improve the experience a bit by e.g. only updating when I close a $$ block,
etc.

~~~
mcmire
That's what I was going to say. I found the constant reformatting of the math
stuff in the right pane extremely jarring.

Otherwise, nice and simple.

~~~
pkrein
yeah -- we'll try to smooth this out!

------
warmfuzzykitten
Does this mean you can only see the math in Socrates? How do you publish a
page on the web outside Socrates?

------
hnwh
this looks nice, but i'm confused.. how do i actually use it on my webpage?

------
gmt2027
It's a shame that there doesn't seem to be any export option.

~~~
ianstormtaylor
That's something we've gotten a lot of requests for and want to build one of
these weekends :)

------
traeblain
This is great!!

------
alcuadrado
LOVE it!

