~ubuntu-branches/ubuntu/utopic/asciidoc/utopic

« back to all changes in this revision

Viewing changes to doc/latexmathml.html

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Wirt
  • Date: 2010-11-27 23:19:57 UTC
  • mfrom: (1.1.12 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20101127231957-jxdmrk7z7lkcqy3l
Tags: 8.6.3-1
* New upstream version (Closes: #595324)
* Support asciidoc API (Closes: #526351)
* Depend on python >= 2.4 (Closes: #571303)
* Do not compress .txt files (Closes: #592423)
* Enhance asciidoc manpage (Closes: #499497)
* Move some of the Recommends (vim-addon-manager, source-highlight) to 
  Suggests (Closes: #564015)
* Bump standards version (No changes)
* Add README.Source file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2
 
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
 
<head>
5
 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
 
<meta name="generator" content="AsciiDoc 8.5.0" />
7
 
<title>LaTeXMathML Formulae</title>
8
 
<style type="text/css">
9
 
/* Debug borders */
10
 
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
11
 
/*
12
 
  border: 1px solid red;
13
 
*/
14
 
}
15
 
 
16
 
body {
17
 
  margin: 1em 5% 1em 5%;
18
 
}
19
 
 
20
 
a {
21
 
  color: blue;
22
 
  text-decoration: underline;
23
 
}
24
 
a:visited {
25
 
  color: fuchsia;
26
 
}
27
 
 
28
 
em {
29
 
  font-style: italic;
30
 
  color: navy;
31
 
}
32
 
 
33
 
strong {
34
 
  font-weight: bold;
35
 
  color: #083194;
36
 
}
37
 
 
38
 
tt {
39
 
  color: navy;
40
 
}
41
 
 
42
 
h1, h2, h3, h4, h5, h6 {
43
 
  color: #527bbd;
44
 
  font-family: sans-serif;
45
 
  margin-top: 1.2em;
46
 
  margin-bottom: 0.5em;
47
 
  line-height: 1.3;
48
 
}
49
 
 
50
 
h1, h2, h3 {
51
 
  border-bottom: 2px solid silver;
52
 
}
53
 
h2 {
54
 
  padding-top: 0.5em;
55
 
}
56
 
h3 {
57
 
  float: left;
58
 
}
59
 
h3 + * {
60
 
  clear: left;
61
 
}
62
 
 
63
 
div.sectionbody {
64
 
  font-family: serif;
65
 
  margin-left: 0;
66
 
}
67
 
 
68
 
hr {
69
 
  border: 1px solid silver;
70
 
}
71
 
 
72
 
p {
73
 
  margin-top: 0.5em;
74
 
  margin-bottom: 0.5em;
75
 
}
76
 
 
77
 
ul, ol, li > p {
78
 
  margin-top: 0;
79
 
}
80
 
 
81
 
pre {
82
 
  padding: 0;
83
 
  margin: 0;
84
 
}
85
 
 
86
 
span#author {
87
 
  color: #527bbd;
88
 
  font-family: sans-serif;
89
 
  font-weight: bold;
90
 
  font-size: 1.1em;
91
 
}
92
 
span#email {
93
 
}
94
 
span#revnumber, span#revdate, span#revremark {
95
 
  font-family: sans-serif;
96
 
}
97
 
 
98
 
div#footer {
99
 
  font-family: sans-serif;
100
 
  font-size: small;
101
 
  border-top: 2px solid silver;
102
 
  padding-top: 0.5em;
103
 
  margin-top: 4.0em;
104
 
}
105
 
div#footer-text {
106
 
  float: left;
107
 
  padding-bottom: 0.5em;
108
 
}
109
 
div#footer-badges {
110
 
  float: right;
111
 
  padding-bottom: 0.5em;
112
 
}
113
 
 
114
 
div#preamble {
115
 
  margin-top: 1.5em;
116
 
  margin-bottom: 1.5em;
117
 
}
118
 
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
119
 
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
120
 
div.admonitionblock {
121
 
  margin-top: 0.25em;
122
 
  margin-bottom: 1.5em;
123
 
}
124
 
div.admonitionblock {
125
 
  margin-top: 2.5em;
126
 
  margin-bottom: 2.5em;
127
 
}
128
 
 
129
 
div.content { /* Block element content. */
130
 
  padding: 0;
131
 
}
132
 
 
133
 
/* Block element titles. */
134
 
div.title, caption.title {
135
 
  color: #527bbd;
136
 
  font-family: sans-serif;
137
 
  font-weight: bold;
138
 
  text-align: left;
139
 
  margin-top: 1.0em;
140
 
  margin-bottom: 0.5em;
141
 
}
142
 
div.title + * {
143
 
  margin-top: 0;
144
 
}
145
 
 
146
 
td div.title:first-child {
147
 
  margin-top: 0.0em;
148
 
}
149
 
div.content div.title:first-child {
150
 
  margin-top: 0.0em;
151
 
}
152
 
div.content + div.title {
153
 
  margin-top: 0.0em;
154
 
}
155
 
 
156
 
div.sidebarblock > div.content {
157
 
  background: #ffffee;
158
 
  border: 1px solid silver;
159
 
  padding: 0.5em;
160
 
}
161
 
 
162
 
div.listingblock > div.content {
163
 
  border: 1px solid silver;
164
 
  background: #f4f4f4;
165
 
  padding: 0.5em;
166
 
}
167
 
 
168
 
div.quoteblock {
169
 
  padding-left: 2.0em;
170
 
  margin-right: 10%;
171
 
}
172
 
div.quoteblock > div.attribution {
173
 
  padding-top: 0.5em;
174
 
  text-align: right;
175
 
}
176
 
 
177
 
div.verseblock {
178
 
  padding-left: 2.0em;
179
 
  margin-right: 10%;
180
 
}
181
 
div.verseblock > div.content {
182
 
  white-space: pre;
183
 
}
184
 
div.verseblock > div.attribution {
185
 
  padding-top: 0.75em;
186
 
  text-align: left;
187
 
}
188
 
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189
 
div.verseblock + div.attribution {
190
 
  text-align: left;
191
 
}
192
 
 
193
 
div.admonitionblock .icon {
194
 
  vertical-align: top;
195
 
  font-size: 1.1em;
196
 
  font-weight: bold;
197
 
  text-decoration: underline;
198
 
  color: #527bbd;
199
 
  padding-right: 0.5em;
200
 
}
201
 
div.admonitionblock td.content {
202
 
  padding-left: 0.5em;
203
 
  border-left: 2px solid silver;
204
 
}
205
 
 
206
 
div.exampleblock > div.content {
207
 
  border-left: 2px solid silver;
208
 
  padding: 0.5em;
209
 
}
210
 
 
211
 
div.imageblock div.content { padding-left: 0; }
212
 
span.image img { border-style: none; }
213
 
a.image:visited { color: white; }
214
 
 
215
 
dl {
216
 
  margin-top: 0.8em;
217
 
  margin-bottom: 0.8em;
218
 
}
219
 
dt {
220
 
  margin-top: 0.5em;
221
 
  margin-bottom: 0;
222
 
  font-style: normal;
223
 
  color: navy;
224
 
}
225
 
dd > *:first-child {
226
 
  margin-top: 0.1em;
227
 
}
228
 
 
229
 
ul, ol {
230
 
    list-style-position: outside;
231
 
}
232
 
ol.arabic {
233
 
  list-style-type: decimal;
234
 
}
235
 
ol.loweralpha {
236
 
  list-style-type: lower-alpha;
237
 
}
238
 
ol.upperalpha {
239
 
  list-style-type: upper-alpha;
240
 
}
241
 
ol.lowerroman {
242
 
  list-style-type: lower-roman;
243
 
}
244
 
ol.upperroman {
245
 
  list-style-type: upper-roman;
246
 
}
247
 
 
248
 
div.compact ul, div.compact ol,
249
 
div.compact p, div.compact p,
250
 
div.compact div, div.compact div {
251
 
  margin-top: 0.1em;
252
 
  margin-bottom: 0.1em;
253
 
}
254
 
 
255
 
div.tableblock > table {
256
 
  border: 3px solid #527bbd;
257
 
}
258
 
thead {
259
 
  font-family: sans-serif;
260
 
  font-weight: bold;
261
 
}
262
 
tfoot {
263
 
  font-weight: bold;
264
 
}
265
 
td > div.verse {
266
 
  white-space: pre;
267
 
}
268
 
p.table {
269
 
  margin-top: 0;
270
 
}
271
 
/* Because the table frame attribute is overriden by CSS in most browsers. */
272
 
div.tableblock > table[frame="void"] {
273
 
  border-style: none;
274
 
}
275
 
div.tableblock > table[frame="hsides"] {
276
 
  border-left-style: none;
277
 
  border-right-style: none;
278
 
}
279
 
div.tableblock > table[frame="vsides"] {
280
 
  border-top-style: none;
281
 
  border-bottom-style: none;
282
 
}
283
 
 
284
 
 
285
 
div.hdlist {
286
 
  margin-top: 0.8em;
287
 
  margin-bottom: 0.8em;
288
 
}
289
 
div.hdlist tr {
290
 
  padding-bottom: 15px;
291
 
}
292
 
dt.hdlist1.strong, td.hdlist1.strong {
293
 
  font-weight: bold;
294
 
}
295
 
td.hdlist1 {
296
 
  vertical-align: top;
297
 
  font-style: normal;
298
 
  padding-right: 0.8em;
299
 
  color: navy;
300
 
}
301
 
td.hdlist2 {
302
 
  vertical-align: top;
303
 
}
304
 
div.hdlist.compact tr {
305
 
  margin: 0;
306
 
  padding-bottom: 0;
307
 
}
308
 
 
309
 
.comment {
310
 
  background: yellow;
311
 
}
312
 
 
313
 
.footnote, .footnoteref {
314
 
  font-size: 0.8em;
315
 
}
316
 
 
317
 
span.footnote, span.footnoteref {
318
 
  vertical-align: super;
319
 
}
320
 
 
321
 
#footnotes {
322
 
  margin: 20px 0 20px 0;
323
 
  padding: 7px 0 0 0;
324
 
}
325
 
 
326
 
#footnotes div.footnote {
327
 
  margin: 0 0 5px 0;
328
 
}
329
 
 
330
 
#footnotes hr {
331
 
  border: none;
332
 
  border-top: 1px solid silver;
333
 
  height: 1px;
334
 
  text-align: left;
335
 
  margin-left: 0;
336
 
  width: 20%;
337
 
  min-width: 100px;
338
 
}
339
 
 
340
 
 
341
 
@media print {
342
 
  div#footer-badges { display: none; }
343
 
}
344
 
 
345
 
div#toctitle {
346
 
  color: #527bbd;
347
 
  font-family: sans-serif;
348
 
  font-size: 1.1em;
349
 
  font-weight: bold;
350
 
  margin-top: 1.0em;
351
 
  margin-bottom: 0.1em;
352
 
}
353
 
 
354
 
div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
355
 
  margin-top: 0;
356
 
  margin-bottom: 0;
357
 
}
358
 
div.toclevel2 {
359
 
  margin-left: 2em;
360
 
  font-size: 0.9em;
361
 
}
362
 
div.toclevel3 {
363
 
  margin-left: 4em;
364
 
  font-size: 0.9em;
365
 
}
366
 
div.toclevel4 {
367
 
  margin-left: 6em;
368
 
  font-size: 0.9em;
369
 
}
370
 
/* Workarounds for IE6's broken and incomplete CSS2. */
371
 
 
372
 
div.sidebar-content {
373
 
  background: #ffffee;
374
 
  border: 1px solid silver;
375
 
  padding: 0.5em;
376
 
}
377
 
div.sidebar-title, div.image-title {
378
 
  color: #527bbd;
379
 
  font-family: sans-serif;
380
 
  font-weight: bold;
381
 
  margin-top: 0.0em;
382
 
  margin-bottom: 0.5em;
383
 
}
384
 
 
385
 
div.listingblock div.content {
386
 
  border: 1px solid silver;
387
 
  background: #f4f4f4;
388
 
  padding: 0.5em;
389
 
}
390
 
 
391
 
div.quoteblock-attribution {
392
 
  padding-top: 0.5em;
393
 
  text-align: right;
394
 
}
395
 
 
396
 
div.verseblock-content {
397
 
  white-space: pre;
398
 
}
399
 
div.verseblock-attribution {
400
 
  padding-top: 0.75em;
401
 
  text-align: left;
402
 
}
403
 
 
404
 
div.exampleblock-content {
405
 
  border-left: 2px solid silver;
406
 
  padding-left: 0.5em;
407
 
}
408
 
 
409
 
/* IE6 sets dynamically generated links as visited. */
410
 
div#toc a:visited { color: blue; }
411
 
</style>
412
 
<script type="text/javascript">
413
 
/*<![CDATA[*/
414
 
window.onload = function(){asciidoc.footnotes();}
415
 
var asciidoc = {  // Namespace.
416
 
 
417
 
/////////////////////////////////////////////////////////////////////
418
 
// Table Of Contents generator
419
 
/////////////////////////////////////////////////////////////////////
420
 
 
421
 
/* Author: Mihai Bazon, September 2002
422
 
 * http://students.infoiasi.ro/~mishoo
423
 
 *
424
 
 * Table Of Content generator
425
 
 * Version: 0.4
426
 
 *
427
 
 * Feel free to use this script under the terms of the GNU General Public
428
 
 * License, as long as you do not remove or alter this notice.
429
 
 */
430
 
 
431
 
 /* modified by Troy D. Hanson, September 2006. License: GPL */
432
 
 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
433
 
 
434
 
// toclevels = 1..4.
435
 
toc: function (toclevels) {
436
 
 
437
 
  function getText(el) {
438
 
    var text = "";
439
 
    for (var i = el.firstChild; i != null; i = i.nextSibling) {
440
 
      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
441
 
        text += i.data;
442
 
      else if (i.firstChild != null)
443
 
        text += getText(i);
444
 
    }
445
 
    return text;
446
 
  }
447
 
 
448
 
  function TocEntry(el, text, toclevel) {
449
 
    this.element = el;
450
 
    this.text = text;
451
 
    this.toclevel = toclevel;
452
 
  }
453
 
 
454
 
  function tocEntries(el, toclevels) {
455
 
    var result = new Array;
456
 
    var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
457
 
    // Function that scans the DOM tree for header elements (the DOM2
458
 
    // nodeIterator API would be a better technique but not supported by all
459
 
    // browsers).
460
 
    var iterate = function (el) {
461
 
      for (var i = el.firstChild; i != null; i = i.nextSibling) {
462
 
        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
463
 
          var mo = re.exec(i.tagName);
464
 
          if (mo)
465
 
            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
466
 
          iterate(i);
467
 
        }
468
 
      }
469
 
    }
470
 
    iterate(el);
471
 
    return result;
472
 
  }
473
 
 
474
 
  var toc = document.getElementById("toc");
475
 
  var entries = tocEntries(document.getElementById("content"), toclevels);
476
 
  for (var i = 0; i < entries.length; ++i) {
477
 
    var entry = entries[i];
478
 
    if (entry.element.id == "")
479
 
      entry.element.id = "_toc_" + i;
480
 
    var a = document.createElement("a");
481
 
    a.href = "#" + entry.element.id;
482
 
    a.appendChild(document.createTextNode(entry.text));
483
 
    var div = document.createElement("div");
484
 
    div.appendChild(a);
485
 
    div.className = "toclevel" + entry.toclevel;
486
 
    toc.appendChild(div);
487
 
  }
488
 
  if (entries.length == 0)
489
 
    toc.parentNode.removeChild(toc);
490
 
},
491
 
 
492
 
 
493
 
/////////////////////////////////////////////////////////////////////
494
 
// Footnotes generator
495
 
/////////////////////////////////////////////////////////////////////
496
 
 
497
 
/* Based on footnote generation code from:
498
 
 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
499
 
 */
500
 
 
501
 
footnotes: function () {
502
 
  var cont = document.getElementById("content");
503
 
  var noteholder = document.getElementById("footnotes");
504
 
  var spans = cont.getElementsByTagName("span");
505
 
  var refs = {};
506
 
  var n = 0;
507
 
  for (i=0; i<spans.length; i++) {
508
 
    if (spans[i].className == "footnote") {
509
 
      n++;
510
 
      // Use [\s\S] in place of . so multi-line matches work.
511
 
      // Because JavaScript has no s (dotall) regex flag.
512
 
      note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
513
 
      noteholder.innerHTML +=
514
 
        "<div class='footnote' id='_footnote_" + n + "'>" +
515
 
        "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
516
 
        n + "</a>. " + note + "</div>";
517
 
      spans[i].innerHTML =
518
 
        "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
519
 
        "' title='View footnote' class='footnote'>" + n + "</a>]";
520
 
      var id =spans[i].getAttribute("id");
521
 
      if (id != null) refs["#"+id] = n;
522
 
    }
523
 
  }
524
 
  if (n == 0)
525
 
    noteholder.parentNode.removeChild(noteholder);
526
 
  else {
527
 
    // Process footnoterefs.
528
 
    for (i=0; i<spans.length; i++) {
529
 
      if (spans[i].className == "footnoteref") {
530
 
        var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
531
 
        href = href.match(/#.*/)[0];  // Because IE return full URL.
532
 
        n = refs[href];
533
 
        spans[i].innerHTML =
534
 
          "[<a href='#_footnote_" + n +
535
 
          "' title='View footnote' class='footnote'>" + n + "</a>]";
536
 
      }
537
 
    }
538
 
  }
539
 
}
540
 
 
541
 
}
542
 
/*]]>*/
543
 
</script>
544
 
</head>
545
 
<body>
546
 
<div id="header">
547
 
<h1>LaTeXMathML Formulae</h1>
548
 
</div>
549
 
<div id="content">
550
 
<div id="preamble">
551
 
<div class="sectionbody">
552
 
<div class="paragraph"><p><a href="http://www.maths.nottingham.ac.uk/personal/drw/lm.html">LaTeXMathML</a>
553
 
capability has been added to <em>AsciiDoc</em> for users who are more familar
554
 
with or prefer LaTeX math formulas to the
555
 
<a href="http://www.methods.co.nz/asciidoc/asciimathml.html">ASCIIMathML</a>
556
 
notation.</p></div>
557
 
<div class="paragraph"><p><em>LaTeXMathML</em> is a derivative of
558
 
<a href="http://www.methods.co.nz/asciidoc/asciimathml.html">ASCIIMathML</a>&#8201;&#8212;&#8201;in
559
 
terms of usage the only difference it that you use the <tt>latexmath</tt>
560
 
attribute instead of the <tt>asciimath</tt> attribute.</p></div>
561
 
<div class="paragraph"><p><em>LaTeXMathML</em> processes LaTeX math formulas not arbitrary LaTeX (as
562
 
<tt>dblatex(1)</tt> does). See the
563
 
<a href="http://www.maths.nottingham.ac.uk/personal/drw/lm.html">LaTeXMathML</a>
564
 
website for details.</p></div>
565
 
<div class="paragraph"><p>Here&#8217;s the <a href="latexmathml.txt"><em>AsciiDoc</em> source</a> that generated this
566
 
page.</p></div>
567
 
<div class="paragraph"><p>Some example <em>LaTeXMathML</em> formulas:</p></div>
568
 
<div class="ulist"><ul>
569
 
<li>
570
 
<p>
571
 
$R_x = 10.0 \times \sin(R_\phi)$
572
 
</p>
573
 
</li>
574
 
<li>
575
 
<p>
576
 
<span style="font-size: 2em;">$\sum_{n=1}^\infty \frac{1}{2^n}$</span>
577
 
</p>
578
 
</li>
579
 
<li>
580
 
<p>
581
 
$\lim_{x\to\infty} f(x) = k \choose r + \frac ab
582
 
  \sum_{n=1}^\infty a_n + \displaystyle{ \left\{ \frac{1}{13}
583
 
  \sum_{n=1}^\infty b_n \right\} }$
584
 
</p>
585
 
</li>
586
 
<li>
587
 
<p>
588
 
$\$\alpha + \$\beta = \$(\alpha + \beta)$
589
 
</p>
590
 
</li>
591
 
<li>
592
 
<p>
593
 
$\begin{eqnarray} x &amp; = &amp; \frac{-7 \pm
594
 
  \sqrt{49 - 24}}{6} \\ &amp; = &amp; -2 \textrm{ or } -\frac13.
595
 
  \end{eqnarray}$
596
 
</p>
597
 
</li>
598
 
<li>
599
 
<p>
600
 
$\displaystyle{ V_i = C_0 - C_3
601
 
  \frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} }$
602
 
</p>
603
 
</li>
604
 
</ul></div>
605
 
</div>
606
 
</div>
607
 
</div>
608
 
<div id="footnotes"><hr /></div>
609
 
<div id="footer">
610
 
<div id="footer-text">
611
 
Last updated 2009-02-27 10:24:12 NZDT
612
 
</div>
613
 
</div>
614
 
</body>
615
 
</html>