17
$\begingroup$

This question already has an answer here:

I would like to be able to use MathJax offline, so I can develop questions and answers without having to do them online. I would later copy and paste my text.

So, how can I do this?

I have Windows, Mac, Android, and iOS available, although I would prefer Mac.

$\endgroup$

marked as duplicate by Grigory M, Dan Rust, Lord_Farin, dfeuer, Martin Sleziak Nov 3 '13 at 8:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from math.stackexchange.com Jul 24 '13 at 18:55

This question came from our site for people studying math at any level and professionals in related fields.

7
$\begingroup$

This does not mimic the markup features provided by Stack Exchange, but if you use this template in a file with a ".html" extension, and replace the body, then drag the file to your browser, you should see the MathJax rendered.

<html>
<head>
    <title>MathJax</title>
    <script type="text/x-mathjax-config">
        MathJax.Hub.Config({"HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"] },
            tex2jax: { inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ], displayMath: [ ["$$","$$"], ["\\[", "\\]"] ], processEscapes: true, ignoreClass: "tex2jax_ignore|dno" },
            TeX: { noUndefined: { attributes: { mathcolor: "red", mathbackground: "#FFEEEE", mathsize: "90%" } } },
            messageStyle: "none"
        });
    </script>    
    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/2.2-latest/MathJax.js?config=TeX-AMS_HTML"></script>       
</head>
<body>
    The definition of the Euler-Mascheroni constant is
    $$\gamma=\lim_{n\to\infty}\left(\sum_{k=1}^n\frac1k\right)-\frac1n$$
</body>
</html>

I use this method with the Markup > Preview in BBEdit feature of BBEdit to get live updating.


Caveat: I may have misinterpreted "offline". To use the template above, you need to be online so that you can access the server at cdn.mathjax.org, but you can work on MathJax away from MSE. To use MathJax offline, you can download the local version of MathJax as described here. Otherwise, you can get a standalone LaTeX system, many of which are listed here.

$\endgroup$
  • $\begingroup$ I tried this and the mathjax was not rendered. $\endgroup$ – user1527227 Jul 28 '13 at 6:28
  • 1
    $\begingroup$ @user1527227: my sample MathJax lacked $$s. It should render now. $\endgroup$ – robjohn Jul 28 '13 at 7:17
  • $\begingroup$ yup. great job! $\endgroup$ – user1527227 Jul 28 '13 at 7:46
  • 1
    $\begingroup$ I have a collection of math wiki pages mirrored on my hard drive, that I'd like to look at on a vacation, where I have no internet. I notice the math text won't compile. Will downloading the local version of MathJax allow me to view them in Chrome, for example? $\endgroup$ – Eric Auld Aug 3 '13 at 12:29
  • 2
    $\begingroup$ @EricAuld it's unlikely to work w/o modifying MathJax. When a page using MathJax is rendered, the fonts are downloaded from the MathJax CDN. $\endgroup$ – Jonathan Aug 3 '13 at 16:40
  • $\begingroup$ @EricAuld: as described here, if the fonts are installed locally, you should be okay. $\endgroup$ – robjohn Aug 3 '13 at 21:50
  • $\begingroup$ Thanks @robjohn . Does it matter that they don't look like normal Math jax? They look like this when I load the mirrored version. i.imgur.com/NeY6Crp.jpg?1 I notice sometimes they're missing dollar signs, etc. $\endgroup$ – Eric Auld Aug 3 '13 at 23:12
  • $\begingroup$ Is the LaTeX not being rendered? Some environments, such as array, do not need $$ delimiters to work. For example, \begin{bmatrix}1&0\\0&1\end{bmatrix} was entered without $$s $\endgroup$ – robjohn Aug 4 '13 at 0:15
  • $\begingroup$ Oh, OK, I guess that's not the problem. Unfortunately it's not rendering...I tried installing the fonts on Windows; also I tried just placing the mathjax folder in the directory where the mirrored pages are. No luck. :( $\endgroup$ – Eric Auld Aug 6 '13 at 2:34
  • $\begingroup$ @EricAuld: the fonts shouldn't stop MathJax from working; if MathJax cannot find the fonts it wants, it will use image fonts. Things won't look as nice, but they should render. I've not run a local installation, so all I can suggest is to read the sections starting here and following. $\endgroup$ – robjohn Aug 6 '13 at 10:58
6
$\begingroup$

I am using Qute at http://www.inkcode.net/qute.

It works quite well.

I can create a MathJax document, edit it until it looks fine, and then copy and paste the result into math.stackexchange.

Definitely recommended.

Notes on Qute:

I like the split-screen mode.

Qute formats a paragraph at a time.

Click in a paragraph to edit it, double-click to format it.

Click on the "Q" in the upper left corner to get the menu.

To break a line in a paragraph, use shift-enter.

$\endgroup$
2
$\begingroup$

When a mathematician wants to write a document using, well, maths, they use a $\LaTeX$ compiler program package thing. $\LaTeX$ is a markup language for the $\TeX$ typesetting program, much like MathJax. Therefore, everything which goes between the dollar signs in MathJax code works in $\LaTeX$ (as between the dollar signs is simply $\TeX$ code). The stuff outside the dollar signs is different, as Martin Sleziak has pointed out in the comments. So $\LaTeX$ is well-suited to your needs! I am a mac user, and I use $\TeX$Shop.

To use $\LaTeX$, open a new $\TeX$ file using your favourite program (e.g. $\TeX$shop)and write,

\documentclass[12pt,a4paper]{article}

\usepackage{amssymb, amsmath}

\begin{document}
Hello. This is a test. Also, $e^{\pi i}=-1$.
\end{document}

The document class thing tells the complier what to make it look like (12pt writing, etc). the package bit adds some more power to what you can do. For example, amssymb gives you more symbols to play with, while amsmath allows you to have an improved layout. Compiling this file will produce a pdf file which will contain the stuff you wrote between the \begin and \end document bits rendered as maths.

As you can tell from $\TeX$.SE, $\TeX$ is a pretty popular thing...

$\endgroup$
  • $\begingroup$ Of course, it has to be said that on MSE you use MarkDown, which is not interpreted by LaTeX compiler. Similarly, there are many things that work in LaTeX but will \textbf{not} work here. But the parts using only math (no formatting) should work more-or-less the same. (There are still some differences.) $\endgroup$ – Martin Sleziak Jul 25 '13 at 10:08
  • $\begingroup$ Thanks, didn't think about that. $\endgroup$ – user1729 Jul 25 '13 at 10:15
0
$\begingroup$

A while back, I wrote a small program that allows me to write MathJax markup offline in a standalone app. If you want to download it, click here. If you don't trust me, I can provide the sources as well (C#)

$\endgroup$
0
$\begingroup$

There's a MathJax plugin for TiddlyWiki. If you read through the comments of this web page there's a modification for offline usage.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .