This file is indexed.

/usr/share/doc/libjs-mathjax-doc/html/installation.html is in libjs-mathjax-doc 2.7+20171212-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Installing and Testing MathJax &mdash; MathJax 2.7 documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
        <link rel="index" title="Index"
              href="genindex.html"/>
        <link rel="search" title="Search" href="search.html"/>
    <link rel="top" title="MathJax 2.7 documentation" href="index.html"/>
        <link rel="next" title="Loading and Configuring MathJax" href="configuration.html"/>
        <link rel="prev" title="Getting Started" href="start.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="index.html" class="icon icon-home"> MathJax
          

          
          </a>

          
            
            
              <div class="version">
                2.7
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">Basic Usage</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="mathjax.html">What is MathJax?</a></li>
<li class="toctree-l1"><a class="reference internal" href="start.html">Getting Started with MathJax</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installing and Testing MathJax</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#obtaining-mathjax-via-an-archive">Obtaining MathJax via an archive</a></li>
<li class="toctree-l2"><a class="reference internal" href="#obtaining-mathjax-via-git">Obtaining MathJax via Git</a></li>
<li class="toctree-l2"><a class="reference internal" href="#obtaining-mathjax-via-svn">Obtaining MathJax via SVN</a></li>
<li class="toctree-l2"><a class="reference internal" href="#obtaining-mathjax-via-npm">Obtaining MathJax via npm</a></li>
<li class="toctree-l2"><a class="reference internal" href="#obtaining-mathjax-via-composer">Obtaining MathJax via Composer</a></li>
<li class="toctree-l2"><a class="reference internal" href="#obtaining-mathjax-via-bower">Obtaining MathJax via Bower</a></li>
<li class="toctree-l2"><a class="reference internal" href="#testing-your-installation">Testing your installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#notes-about-shared-installations">Notes about shared installations</a></li>
<li class="toctree-l2"><a class="reference internal" href="#firefox-and-local-fonts">Firefox and local fonts</a></li>
<li class="toctree-l2"><a class="reference internal" href="#ie9-and-remote-fonts">IE9 and remote fonts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Loading and Configuring MathJax</a></li>
<li class="toctree-l1"><a class="reference internal" href="config-files.html">Combined MathJax Configurations</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="tex.html">MathJax TeX and LaTeX Support</a></li>
<li class="toctree-l1"><a class="reference internal" href="mathml.html">MathJax MathML Support</a></li>
<li class="toctree-l1"><a class="reference internal" href="asciimath.html">MathJax AsciiMath Support</a></li>
<li class="toctree-l1"><a class="reference internal" href="output.html">MathJax Output Formats</a></li>
<li class="toctree-l1"><a class="reference internal" href="font-support.html">MathJax Font Support</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="localization.html">MathJax Localization</a></li>
<li class="toctree-l1"><a class="reference internal" href="safe-mode.html">MathJax Safe-mode</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="community.html">The MathJax Community</a></li>
</ul>
<p class="caption"><span class="caption-text">Configuration options</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="options/index.html">Configuration options</a></li>
</ul>
<p class="caption"><span class="caption-text">Advanced topics</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="advanced/model.html">The MathJax Processing Model</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced/startup.html">The MathJax Startup Sequence</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced/synchronize.html">Synchronizing Your Code with MathJax</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced/dynamic.html">Loading MathJax Dynamically</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced/typeset.html">Modifying Math on the Page</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced/toMathML.html">Obtaining the MathML for an Expression</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced/extension-writing.html">Writing MathJax Extensions</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced/debugging-tips.html">Debugging Tips</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced/mathjax-node.html">MathJax on NodeJS</a></li>
</ul>
<p class="caption"><span class="caption-text">The MathJax API</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="api/index.html">Details of the MathJax API</a></li>
</ul>
<p class="caption"><span class="caption-text">Miscellanea</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="misc/accessibility-features.html">Accessibility features</a></li>
<li class="toctree-l1"><a class="reference internal" href="misc/browser-compatibility.html">Browser Compatibility</a></li>
<li class="toctree-l1"><a class="reference internal" href="misc/epub.html">EPUB3 Reading Systems</a></li>
<li class="toctree-l1"><a class="reference internal" href="misc/badges.html">MathJax Badges and Logo</a></li>
<li class="toctree-l1"><a class="reference internal" href="misc/articles.html">Articles and Presentations</a></li>
<li class="toctree-l1"><a class="reference internal" href="misc/platforms.html">Using MathJax in Web Platforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="misc/faq.html">MathJax FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="misc/mathjax-in-use.html">MathJax in Use</a></li>
</ul>
<p class="caption"><span class="caption-text">Upgrading MathJax</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="upgrading/index.html">Upgrading MathJax</a></li>
</ul>
<p class="caption"><span class="caption-text">Reference Pages</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="reference/HTML-snippets.html">HTML snippets</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference/CSS-styles.html">CSS style objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference/localization-strings.html">Localization strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference/glossary.html">Glossary</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">MathJax</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>Installing and Testing MathJax</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/installation.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="installing-and-testing-mathjax">
<span id="installation"></span><h1>Installing and Testing MathJax<a class="headerlink" href="#installing-and-testing-mathjax" title="Permalink to this headline"></a></h1>
<p>The easiest way to use MathJax is to link directly to the MathJax
distributed network service (see <a class="reference internal" href="start.html#mathjax-cdn"><span class="std std-ref">Using the MathJax CDN</span></a>).  In that case, there is no need to install MathJax
yourself, and you can begin using MathJax right away; skip this document on
installation and go directly to <a class="reference internal" href="configuration.html#loading"><span class="std std-ref">Configuring MathJax</span></a>.</p>
<p>MathJax can be loaded from a public web server or privately from your
hard drive or other local media. To use MathJax in either way, you
will need to obtain a copy of MathJax. There are three ways to do
this: via <code class="docutils literal"><span class="pre">git</span></code>, <code class="docutils literal"><span class="pre">svn</span></code>, or via a pre-packaged archive. We
recommend <code class="docutils literal"><span class="pre">git</span></code> or <code class="docutils literal"><span class="pre">svn</span></code>, as it is easier to keep your
installation up to date with these tools.</p>
<div class="section" id="obtaining-mathjax-via-an-archive">
<span id="getting-mathjax-zip"></span><h2>Obtaining MathJax via an archive<a class="headerlink" href="#obtaining-mathjax-via-an-archive" title="Permalink to this headline"></a></h2>
<p>Release versions of MathJax are available in archive files from the
<a class="reference external" href="https://github.com/mathjax/mathjax/">MathJax GitHub page</a> (via the
“zip” button, or the “downloads” tab), where you can download the archive
that you need.</p>
<p><strong>Current Version</strong>:  <a class="reference external" href="https://github.com/mathjax/MathJax/archive/2.7.2.zip">MathJax-2.7</a> (33.0MB)</p>
<p>Consult the <a class="reference internal" href="upgrading/whats-new-2.7.html#whats-new-2-7"><span class="std std-ref">change log</span></a> for what’s new in version 2.7.</p>
<p>For previous versions, see the <a class="reference external" href="https://github.com/mathjax/MathJax/releases">release page on GitHub</a> or for quick access</p>
<ul class="simple">
<li><a class="reference external" href="https://github.com/mathjax/MathJax/archive/v2.6-latest.zip">MathJax-2.6</a> (34.3MB)</li>
<li><a class="reference external" href="https://github.com/mathjax/MathJax/archive/v2.5-latest.zip">MathJax-2.5</a> (33.0MB)</li>
<li><a class="reference external" href="https://github.com/mathjax/MathJax/archive/v2.4-latest.zip">MathJax-2.4</a> (32.6MB)</li>
<li><a class="reference external" href="https://github.com/mathjax/MathJax/archive/v2.3-latest.zip">MathJax-2.3</a> (32.9MB)</li>
<li><a class="reference external" href="https://github.com/mathjax/MathJax/archive/v2.2-latest.zip">MathJax-2.2</a> (17.0MB)</li>
<li><a class="reference external" href="https://github.com/mathjax/MathJax/archive/v2.1-latest.zip">MathJax-2.1</a> (17.1MB)</li>
<li><a class="reference external" href="https://github.com/mathjax/MathJax/archive/v2.0-latest.zip">MathJax-2.0</a> (17.6MB)</li>
<li><a class="reference external" href="https://github.com/mathjax/MathJax/archive/v1.1a.zip">MathJax-1.1a</a> (15.4MB)</li>
<li><a class="reference external" href="https://github.com/mathjax/MathJax/archive/v1.1.zip">MathJax-1.1</a> (16.4MB)</li>
<li><code class="docutils literal"><span class="pre">MathJax</span> <span class="pre">v1.0.1a</span></code><ul>
<li>To install MathJax v1.0.1a, you must download two files: <a class="reference external" href="https://www.mathjax.org/1.0/MathJax-v1.0.1a.zip">MathJax-v1.0.1a.zip</a> and <a class="reference external" href="https://www.mathjax.org/1.0/MathJax-Font-Update.zip">MathJax-Font-Update.zip</a>. First install the <cite>MathJax-v1.01a.zip</cite> distribution. Then&nbsp;replace the <code class="docutils literal"><span class="pre">MathJax/fonts/HTML-CSS/TeX/otf</span></code> directory in the resulting MathJax installation with the&nbsp;<cite>otf</cite> directory contained in the <code class="docutils literal"><span class="pre">MathJax-Font-Update.zip</span></code> archive.</li>
</ul>
</li>
</ul>
<p>You should download the archive of the branch corresponding to the version
you need then simply unzip it.
Once the MathJax directory is unpacked, you should move it to the
desired location on your server (or your hard disk, if you are using
it locally rather then through a web server).  One natural location is
to put it at the top level of your web server’s hierarchy.  That would
let you refer to the main MathJax file as <code class="docutils literal"><span class="pre">/MathJax/MathJax.js</span></code> from
within any page on your server.</p>
<p>From the <a class="reference external" href="https://github.com/mathjax/mathjax/downloads">MathJax GitHub download link</a>, you can also select
the <code class="docutils literal"><span class="pre">Download</span> <span class="pre">.tar.gz</span></code> or <code class="docutils literal"><span class="pre">Download</span> <span class="pre">.zip</span></code> buttons to get a copy of
the current development version of MathJax that contains all the
latest changes and bug-fixes.</p>
<p>If a packaged release receives any important updates, then those
updates will be part of the <cite>branch</cite> for that version.  The link to
the <code class="docutils literal"><span class="pre">.zip</span></code> file in the download list will be the original release
version, not the patched version.  To obtain the patched version, use
the <cite>Branches</cite> drop down menu (at the far left of the menus within the
page) to select the release branch that you want (for example
<code class="docutils literal"><span class="pre">v2.1-latest</span></code>), and then use the “zip” button just above it to get
the latest patched version of that release.</p>
</div>
<div class="section" id="obtaining-mathjax-via-git">
<span id="getting-mathjax-git"></span><h2>Obtaining MathJax via Git<a class="headerlink" href="#obtaining-mathjax-via-git" title="Permalink to this headline"></a></h2>
<p>The easiest way to get MathJax and keep it up to date is to use the <a class="reference external" href="http://git-scm.com/">Git</a> version control system to access our <a class="reference external" href="https://github.com/mathjax/MathJax">GitHub repository</a>. Use the command</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>git clone https://github.com/mathjax/MathJax.git MathJax
</pre></div>
</div>
<p>to obtain and set up a copy of MathJax.  (Note that there is no longer
a <code class="docutils literal"><span class="pre">fonts.zip</span></code> file, as there was in v1.0, and that the <code class="docutils literal"><span class="pre">fonts</span></code>
directory is now part of the repository itself.)</p>
<p>Whenever you want to update MathJax, you can now use</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span><span class="nb">cd</span> MathJax
git remote show origin
</pre></div>
</div>
<p>to check if there are updates to MathJax (this will print several
lines of data, but the last line should tell you if your copy is up to
date or out of date). If MathJax needs updating, use</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span><span class="nb">cd</span> MathJax
git pull origin
</pre></div>
</div>
<p>to update your copy of MathJax to the current release version.  If you
keep MathJax updated in this way, you will be sure that you have the
latest bug fixes and new features as they become available.</p>
<p>This gets you the current development copy of MathJax, which is the version
that contains all the latest changes to MathJax.  Although we try to make
sure this version is a stable and usable version of MathJax, it is under
active development, and at times it may be less stable than the “release”
version.  If you prefer to use the most stable version (that may not
include all the latest patches and features), you will want to get one
of the tagged releases.  Use</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span><span class="nb">cd</span> MathJax
git tag -l
</pre></div>
</div>
<p>to see all tagged versions, and use</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span><span class="nb">cd</span> MathJax
git checkout &lt;tag_name&gt;
</pre></div>
</div>
<p>to checkout the indicated version of MathJax, where <code class="docutils literal"><span class="pre">&lt;tag_name&gt;</span></code> is
the name of the tagged version you want to use.  When you want to
upgrade to a new release, you will need to repeat this for the latest
release tag.</p>
<p>Each of the main releases also has a branch in which critical updates
are applied (we try hard not to patch the stable releases, but sometimes
there is a crucial change that needs to be made).  If you want to use the
patched version of a release, then check out the branch rather than the
tag.  Use</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span><span class="nb">cd</span> MathJax
git branch
</pre></div>
</div>
<p>to get a list of the available branches.  There are separate branches
for the main releases, but with <code class="docutils literal"><span class="pre">-latest</span></code> appended.  These contain
all the patches for that particular release.  You can check out one of
the branches just as you would a tagged copy.  For example, the branch
for the <code class="docutils literal"><span class="pre">v2.1</span></code> tagged release is <code class="docutils literal"><span class="pre">v2.1-latest</span></code>.  To get this
release, use</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span><span class="nb">cd</span> MathJax
git checkout v2.1-latest
</pre></div>
</div>
<p>and to update it when changes occur, use</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span><span class="nb">cd</span> MathJax
git pull origin v2.1-latest
</pre></div>
</div>
</div>
<div class="section" id="obtaining-mathjax-via-svn">
<span id="getting-mathjax-svn"></span><h2>Obtaining MathJax via SVN<a class="headerlink" href="#obtaining-mathjax-via-svn" title="Permalink to this headline"></a></h2>
<p>If you are more comfortable with the <a class="reference external" href="http://subversion.apache.org/">subversion</a> source control system, you may want
to use GitHub’s <code class="docutils literal"><span class="pre">svn</span></code> service to obtain MathJax.  If you want to get the
latest revision using <code class="docutils literal"><span class="pre">svn</span></code>, use the command</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>svn checkout http://github.com/mathjax/MathJax/trunk MathJax
</pre></div>
</div>
<p>to obtain and set up a copy of MathJax.  (Note that there is no longer
a <code class="docutils literal"><span class="pre">fonts.zip</span></code> file as of v1.1, and that the <code class="docutils literal"><span class="pre">fonts</span></code> directory is
now part of the repository itself.)</p>
<p>Whenever you want to update MathJax, you can now use</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span><span class="nb">cd</span> MathJax
svn status -u
</pre></div>
</div>
<p>to check if there are updates to MathJax.  If MathJax needs updating,
use</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span><span class="nb">cd</span> MathJax
svn update
</pre></div>
</div>
<p>to update your copy of MathJax to the current release version.  If you
keep MathJax updated in this way, you will be sure that you have the
latest bug fixes and new features as they become available.</p>
<p>This gets you the current development copy of MathJax, which is the version
that contains all the latest changes to MathJax.  Although we try to make
sure this version is a stable and usable version of MathJax, it is under
active development, and at times it may be less stable than the “release”
version.  If you prefer to use one of the tagged releases instead,
then use</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>svn checkout https://github.com/mathjax/MathJax/branches/<span class="o">[</span>name<span class="o">]</span> MathJax
</pre></div>
</div>
<p>where <code class="docutils literal"><span class="pre">[name]</span></code> is replaced by the name of the branch you want to
check out; e.g., <code class="docutils literal"><span class="pre">2.1-latest</span></code>.  The branch names can be found on the
<a class="reference external" href="https://github.com/mathjax/MathJax/">GitHub MathJax page</a> under the
<a class="reference external" href="https://github.com/mathjax/MathJax/branches">branches</a> tab.</p>
</div>
<div class="section" id="obtaining-mathjax-via-npm">
<h2>Obtaining MathJax via npm<a class="headerlink" href="#obtaining-mathjax-via-npm" title="Permalink to this headline"></a></h2>
<p>Starting with version 2.6, it is possible to use <a class="reference external" href="http://npmjs.com/">npm</a> to install MathJax. Assuming <code class="docutils literal"><span class="pre">npm</span></code> is installed
on your system, just execute the following command:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>npm install mathjax
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The distribution on <code class="docutils literal"><span class="pre">npm</span></code> does not contain the PNG fonts</p>
</div>
</div>
<div class="section" id="obtaining-mathjax-via-composer">
<h2>Obtaining MathJax via Composer<a class="headerlink" href="#obtaining-mathjax-via-composer" title="Permalink to this headline"></a></h2>
<p>Starting with version 2.5, it is possible to use <a class="reference external" href="http://getcomposer.org//">Composer</a> to install MathJax. See the <a class="reference external" href="https://getcomposer.org/doc/00-intro.md">Composer
documentation</a> to get started.</p>
</div>
<div class="section" id="obtaining-mathjax-via-bower">
<h2>Obtaining MathJax via Bower<a class="headerlink" href="#obtaining-mathjax-via-bower" title="Permalink to this headline"></a></h2>
<p>Starting with version 2.3, it is possible to use <a class="reference external" href="http://bower.io/">Bower</a> to install MathJax. Assuming Bower is installed
on your system, just execute the following command:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>bower install MathJax
</pre></div>
</div>
<p>For a slim copy without PNG fonts use</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>bower install components/MathJax
</pre></div>
</div>
</div>
<div class="section" id="testing-your-installation">
<h2>Testing your installation<a class="headerlink" href="#testing-your-installation" title="Permalink to this headline"></a></h2>
<p>Use the HTML files in the <code class="docutils literal"><span class="pre">test</span></code> directory to see if your
installation is working properly:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">test</span><span class="o">/</span>
    <span class="n">index</span><span class="o">.</span><span class="n">html</span>          <span class="c1"># Tests default configuration</span>
    <span class="n">index</span><span class="o">-</span><span class="n">images</span><span class="o">.</span><span class="n">html</span>   <span class="c1"># Tests image-font fallback display</span>
    <span class="n">sample</span><span class="o">.</span><span class="n">html</span>         <span class="c1"># Sample page with lots of pretty equations</span>
    <span class="n">examples</span><span class="o">.</span><span class="n">html</span>       <span class="c1"># Page with links to all sample pages</span>
</pre></div>
</div>
<p>Open these files in your browser to see that they appear to be working
properly.  If you have installed MathJax on a server, use the web
address for those files rather than opening them locally.  When you
view the <code class="docutils literal"><span class="pre">index.html</span></code> file, you should see (after a few moments) a
message that MathJax appears to be working.  If not, you should check
that the files have been transferred to the server completely, and that
the permissions allow the server to access the files and folders that
are part of the MathJax directory (be sure to verify the MathJax
folder’s permissions as well).  Checking the server logs may help
locate problems with the installation.</p>
</div>
<div class="section" id="notes-about-shared-installations">
<span id="cross-domain-linking"></span><h2>Notes about shared installations<a class="headerlink" href="#notes-about-shared-installations" title="Permalink to this headline"></a></h2>
<p>Typically, you want to have MathJax installed on the same server as
your web pages that use MathJax.  There are times, however, when that
may be impractical, or when you want to use a MathJax installation at
a different site.  For example, a departmental server at
<code class="docutils literal"><span class="pre">www.math.yourcollege.edu</span></code> might like to use a college-wide
installation at <code class="docutils literal"><span class="pre">www.yourcollege.edu</span></code> rather than installing a
separate copy on the departmental machine.  MathJax can certainly
be loaded from another server, but there is one important caveat —
Firefox’s and IE9’s same-origin security policy for cross-domain scripting.</p>
<p>Firefox’s interpretation of the same-origin policy is more strict than most
other browsers, and it affects how fonts are loaded with the <cite>&#64;font-face</cite>
CSS directive.  MathJax uses this directive to load web-based math fonts
into a page when the user doesn’t have them installed locally on their own
computer.  Firefox’s security policy, however, only allows this when the
fonts come from the same server as the web page itself, so if you load
MathJax (and hence its web fonts) from a different server, Firefox won’t be
able to access those web fonts.  In this case, MathJax will pause while
waiting for the font to download (which will never happen); it will time
out after about 5 seconds and switch to image fonts as a fallback.
Similarly, IE9 has a similar same-origin policy in its <cite>IE9 standards
mode</cite>, so it exhibits this same behavior.</p>
<p>There is a solution to this, however, if you manage the server where
MathJax is installed, and if that server is running the <a class="reference external" href="http://www.apache.org/">Apache web
server</a>.  In the remote server’s
<code class="docutils literal"><span class="pre">MathJax/fonts/</span></code> folder, create a file called
<code class="docutils literal"><span class="pre">.htaccess</span></code> that contains the following lines:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">FilesMatch</span> <span class="s2">&quot;\.(ttf|otf|eot|woff)$&quot;</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="n">IfModule</span> <span class="n">mod_headers</span><span class="o">.</span><span class="n">c</span><span class="o">&gt;</span>
<span class="n">Header</span> <span class="nb">set</span> <span class="n">Access</span><span class="o">-</span><span class="n">Control</span><span class="o">-</span><span class="n">Allow</span><span class="o">-</span><span class="n">Origin</span> <span class="s2">&quot;*&quot;</span>
<span class="o">&lt;/</span><span class="n">IfModule</span><span class="o">&gt;</span>
<span class="o">&lt;/</span><span class="n">FilesMatch</span><span class="o">&gt;</span>
</pre></div>
</div>
<p>and make sure the permissions allow the server to read this file.  (The
file’s name starts with a period, which causes it to be an “invisible” file
on unix-based operating systems.  Some systems, particularly those with
graphical user interfaces, may not allow you to create such files, so you
might need to use the command-line interface to accomplish this.)</p>
<p>This file should make it possible for pages at other sites to load MathJax
from this server in such a way that Firefox and IE9 will be able to
download the web-based fonts.  If you want to restrict the sites that can
access the web fonts, change the <code class="docutils literal"><span class="pre">Access-Control-Allow-Origin</span></code> line to
something like:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Header</span> <span class="nb">set</span> <span class="n">Access</span><span class="o">-</span><span class="n">Control</span><span class="o">-</span><span class="n">Allow</span><span class="o">-</span><span class="n">Origin</span> <span class="s2">&quot;http://www.math.yourcollege.edu&quot;</span>
</pre></div>
</div>
<p>so that only pages at <code class="docutils literal"><span class="pre">www.math.yourcollege.edu</span></code> will be able to
download the fonts from this site.  See the open font library
discussion of <a class="reference external" href="http://openfontlibrary.org/wiki/Web_Font_linking_and_Cross-Origin_Resource_Sharing">web-font linking</a>
for more details.</p>
</div>
<div class="section" id="firefox-and-local-fonts">
<span id="ff-local-fonts"></span><h2>Firefox and local fonts<a class="headerlink" href="#firefox-and-local-fonts" title="Permalink to this headline"></a></h2>
<p>Firefox’s same-origin security policy affects its ability to load
web-based fonts, as described above.  This has implications not only
to cross-domain loading of MathJax, but also to using MathJax locally
from your hard disk.  Firefox’s interpretation of the same-origin
policy for local files is that the “same domain” for a page is the
directory where that page exists, or any of its subdirectories.  So if
you use MathJax in a page with a <code class="docutils literal"><span class="pre">file://</span></code> URL, and if MathJax is
loaded from a directory other than the one containing the original
page, then MathJax will not be able to access the web-based fonts in
Firefox.  In that case, MathJax will fall back on image fonts to
display the mathematics.</p>
<p>In order for Firefox to be able to load the fonts properly for a local
file, your MathJax installation must be in a subdirectory of the one
containing the page that uses MathJax.  This is an unfortunate
restriction, but it is a limitiation imposed by Firefox’s security
model that MathJax can not circumvent.  Currently, this is not a
problem for other browsers.</p>
<p>One solution to this problem is to install the MathJax fonts locally, so
that Firefox will not have to use web-based fonts in the first place.  To
do that, either install the <a class="reference external" href="http://stixfonts.org">STIX fonts</a>, or copy
the fonts from <code class="docutils literal"><span class="pre">MathJax/fonts/HTML-CSS/TeX/otf</span></code> into your systems fonts
directory and restart your browser.</p>
</div>
<div class="section" id="ie9-and-remote-fonts">
<span id="ie9-local-fonts-solution"></span><h2>IE9 and remote fonts<a class="headerlink" href="#ie9-and-remote-fonts" title="Permalink to this headline"></a></h2>
<p>IE9’s same-origin policy affects its ability to load web-based fonts, as
described above.  This has implications not ony to cross-domain loading of
MathJax, but also to the case where you view a local page (with a
<code class="docutils literal"><span class="pre">file://</span></code> URL) that accesses MathJax from a remote site such as the MathJax
CDN service.  In this case, IE9 does <strong>not</strong> honor the
<code class="docutils literal"><span class="pre">Access-Control-Allow-Origin</span></code> setting of the remote server (as it would
if the web page came from an <code class="docutils literal"><span class="pre">http://</span></code> URL), and so it <strong>never</strong> allows the
font to be accessed.</p>
<p>One solution to this problem is to install the MathJax fonts locally so
that MathJax doesn’t have to use web-based fonts in the first place.  Your
best bet is to install the <a class="reference external" href="http://stixfonts.org">STIX fonts</a> on your system (see the <a class="reference external" href="font-support">MathJax
fonts help page</a> for details).</p>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="configuration.html" class="btn btn-neutral float-right" title="Loading and Configuring MathJax" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="start.html" class="btn btn-neutral" title="Getting Started" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2017 The MathJax Consortium.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'2.7',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: '.txt'
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>