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=
"fr">
5 <meta http-equiv=
"Content-Type" content=
"application/xhtml+xml; charset=UTF-8" />
6 <meta name=
"copyright" content=
"© 2014 (CC) BY Julien Moutinho &lt;julm+hledger@autogeree.net&gt;" />
7 <meta name=
"generator" content=
"AsciiDoc 8.6.9 / slidy2 backend 1.0.3" />
8 <meta name=
"font-size-adjustment" content=
"-3" />
9 <title>Informatiser une comptabilité avec confiance
</title>
10 <style type=
"text/css">
11 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
15 font-family: Georgia,serif;
19 h1, h2, h3, h4, h5, h6,
20 div.title, caption.title,
21 thead, p.table.header,
23 #author, #revnumber, #revdate, #revremark,
25 font-family: Arial,Helvetica,sans-serif;
29 margin:
1em
5%
1em
5%;
34 text-decoration: underline;
50 h1, h2, h3, h4, h5, h6 {
58 border-bottom:
2px solid silver;
78 border:
1px solid silver;
89 ul
> li { color: #aaa; }
90 ul
> li
> * { color: black; }
92 .monospaced, code, pre {
93 font-family:
"Courier New", Courier, monospace;
100 white-space: pre-wrap;
110 #revnumber, #revdate, #revremark {
115 border-top:
2px solid silver;
121 padding-bottom:
0.5em;
125 padding-bottom:
0.5em;
130 margin-bottom:
1.5em;
132 div.imageblock, div.exampleblock, div.verseblock,
133 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
134 div.admonitionblock {
136 margin-bottom:
1.5em;
138 div.admonitionblock {
140 margin-bottom:
2.0em;
145 div.content { /* Block element content. */
149 /* Block element titles. */
150 div.title, caption.title {
155 margin-bottom:
0.5em;
161 td div.title:first-child {
164 div.content div.title:first-child {
167 div.content + div.title {
171 div.sidebarblock
> div.content {
173 border:
1px solid #dddddd;
174 border-left:
4px solid #f0f0f0;
178 div.listingblock
> div.content {
179 border:
1px solid #dddddd;
180 border-left:
5px solid #f0f0f0;
185 div.quoteblock, div.verseblock {
189 border-left:
5px solid #f0f0f0;
193 div.quoteblock
> div.attribution {
198 div.verseblock
> pre.content {
199 font-family: inherit;
202 div.verseblock
> div.attribution {
206 /* DEPRECATED: Pre version
8.2.7 verse style literal block. */
207 div.verseblock + div.attribution {
211 div.admonitionblock .icon {
215 text-decoration: underline;
217 padding-right:
0.5em;
219 div.admonitionblock td.content {
221 border-left:
3px solid #dddddd;
224 div.exampleblock
> div.content {
225 border-left:
3px solid #dddddd;
229 div.imageblock div.content { padding-left:
0; }
230 span.image img { border-style: none; vertical-align: text-bottom; }
231 a.image:visited { color: white; }
235 margin-bottom:
0.8em;
248 list-style-position: outside;
251 list-style-type: decimal;
254 list-style-type: lower-alpha;
257 list-style-type: upper-alpha;
260 list-style-type: lower-roman;
263 list-style-type: upper-roman;
266 div.compact ul, div.compact ol,
267 div.compact p, div.compact p,
268 div.compact div, div.compact div {
270 margin-bottom:
0.1em;
282 margin-bottom:
0.8em;
285 padding-bottom:
15px;
287 dt.hdlist1.strong, td.hdlist1.strong {
293 padding-right:
0.8em;
299 div.hdlist.compact tr {
308 .footnote, .footnoteref {
312 span.footnote, span.footnoteref {
313 vertical-align: super;
317 margin:
20px
0 20px
0;
321 #footnotes div.footnote {
327 border-top:
1px solid silver;
336 padding-right:
0.5em;
337 padding-bottom:
0.3em;
345 #footer-badges { display: none; }
349 margin-bottom:
2.5em;
357 margin-bottom:
0.1em;
360 div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
377 span.aqua { color: aqua; }
378 span.black { color: black; }
379 span.blue { color: blue; }
380 span.fuchsia { color: fuchsia; }
381 span.gray { color: gray; }
382 span.green { color: green; }
383 span.lime { color: lime; }
384 span.maroon { color: maroon; }
385 span.navy { color: navy; }
386 span.olive { color: olive; }
387 span.purple { color: purple; }
388 span.red { color: red; }
389 span.silver { color: silver; }
390 span.teal { color: teal; }
391 span.white { color: white; }
392 span.yellow { color: yellow; }
394 span.aqua-background { background: aqua; }
395 span.black-background { background: black; }
396 span.blue-background { background: blue; }
397 span.fuchsia-background { background: fuchsia; }
398 span.gray-background { background: gray; }
399 span.green-background { background: green; }
400 span.lime-background { background: lime; }
401 span.maroon-background { background: maroon; }
402 span.navy-background { background: navy; }
403 span.olive-background { background: olive; }
404 span.purple-background { background: purple; }
405 span.red-background { background: red; }
406 span.silver-background { background: silver; }
407 span.teal-background { background: teal; }
408 span.white-background { background: white; }
409 span.yellow-background { background: yellow; }
411 span.big { font-size:
2em; }
412 span.small { font-size:
0.6em; }
414 span.underline { text-decoration: underline; }
415 span.overline { text-decoration: overline; }
416 span.line-through { text-decoration: line-through; }
418 div.unbreakable { page-break-inside: avoid; }
428 margin-bottom:
1.5em;
430 div.tableblock
> table {
431 border:
3px solid #
527bbd;
433 thead, p.table.header {
440 /* Because the table frame attribute is overriden by CSS in most browsers. */
441 div.tableblock
> table[
frame=
"void"] {
444 div.tableblock
> table[
frame=
"hsides"] {
445 border-left-style: none;
446 border-right-style: none;
448 div.tableblock
> table[
frame=
"vsides"] {
449 border-top-style: none;
450 border-bottom-style: none;
461 margin-bottom:
1.5em;
463 thead, p.tableblock.header {
474 border-color: #
527bbd;
475 border-collapse: collapse;
477 th.tableblock, td.tableblock {
481 border-color: #
527bbd;
484 table.tableblock.frame-topbot {
485 border-left-style: hidden;
486 border-right-style: hidden;
488 table.tableblock.frame-sides {
489 border-top-style: hidden;
490 border-bottom-style: hidden;
492 table.tableblock.frame-none {
493 border-style: hidden;
496 th.tableblock.halign-left, td.tableblock.halign-left {
499 th.tableblock.halign-center, td.tableblock.halign-center {
502 th.tableblock.halign-right, td.tableblock.halign-right {
506 th.tableblock.valign-top, td.tableblock.valign-top {
509 th.tableblock.valign-middle, td.tableblock.valign-middle {
510 vertical-align: middle;
512 th.tableblock.valign-bottom, td.tableblock.valign-bottom {
513 vertical-align: bottom;
524 padding-bottom:
0.5em;
525 border-top:
2px solid silver;
526 border-bottom:
2px solid silver;
531 body.manpage div.sectionbody {
536 body.manpage div#toc { display: none; }
539 <style type=
"text/css">
542 Copyright (c)
2005-
2010 W3C (MIT, ERCIM, Keio), All Rights Reserved.
543 W3C liability, trademark, document use and software licensing
546 http://www.w3.org/Consortium/Legal/copyright-documents
547 http://www.w3.org/Consortium/Legal/copyright-software
551 SJR:
2010-
09-
29: Modified for AsciiDoc slidy backend.
552 Mostly just commented out stuff that is handled by AsciiDoc's CSS files.
562 background-color: white;
564 font-family:
"Gill Sans MT",
"Gill Sans", GillSans, sans-serif;
570 position: fixed; z-index:
200;
571 top: auto; bottom:
0; left:
0; right:
0;
572 height:
1.2em; text-align: right;
577 background-color: rgb(
240,
240,
240);
578 border-top: solid
1px rgb(
180,
180,
180);
581 div.toolbar span.copyright {
591 background-color: rgb(
200,
200,
200);
596 div.initial_prompt p.help {
600 div.initial_prompt p.close {
617 background: rgb(
240,
240,
240);
623 div.slidy_toc .toc_heading {
628 border-bottom-style: solid;
629 border-bottom-color: rgb(
180,
180,
180);
630 border-bottom-width:
1px;
647 background-color: transparent;
659 div.slide.titlepage {
663 div.slide.titlepage.h1 {
675 margin-bottom:
0.5em;
679 background: transparent;
691 border: solid thin black;
693 background: rgb(
240,
240,
240);
703 border-bottom: solid
1px rgb(
180,
180,
180);
714 padding-bottom:
0.2em;
718 border-left-width:
1em;
719 border-top-width: thin;
720 border-right-width: thin;
721 border-bottom-width: thin;
722 border-color: #
95ABD0;
724 background-color: #E4E5E7;
729 li pre { margin-left:
0; }
731 blockquote { font-style: italic }
733 img { background-color: transparent }
735 p.copyright { font-size: smaller }
738 .center { text-align: center }
739 .footnote { font-size: smaller; margin-left:
2em; }
742 a img { border-width:
0; border-style: none }
745 a:visited { color: navy }
746 a:link { color: navy }
747 a:hover { color: red; text-decoration: underline }
748 a:active { color: red; text-decoration: underline }
750 a {text-decoration: none}
751 .navbar a:link {color: white}
752 .navbar a:visited {color: yellow}
753 .navbar a:active {color: red}
754 .navbar a:hover {color: red}
757 ul { list-style-type: square; }
758 ul ul { list-style-type: disc; }
759 ul ul ul { list-style-type: circle; }
760 ul ul ul ul { list-style-type: disc; }
761 li { margin-left:
0.5em; margin-top:
0.5em; }
762 li li { font-size:
85%; font-style: italic }
763 li li li { font-size:
85%; font-style: normal }
770 margin-bottom:
0.5em;
776 margin-bottom:
0.5em;
781 p,pre,ul,ol,blockquote,h2,h3,h4,h5,h6,dl,table {
787 p.subhead { font-weight: bold; margin-top:
2em; }
789 .smaller { font-size: smaller }
790 .bigger { font-size:
130% }
793 td,th { padding:
0.2em }
797 margin:
0.5em
1.5em
0.5em
1.5em;
802 margin:
0.5em
1.5em
0.5em
1.5em;
806 ul { list-style-type: square; }
807 ul ul { list-style-type: disc; }
808 ul ul ul { list-style-type: circle; }
809 ul ul ul ul { list-style-type: disc; }
814 margin:
0.1em
0em
0.6em
0;
820 margin:
0.1em
0em
0.6em
1.5em;
823 list-style-type: decimal;
829 list-style-type: disc;
830 background: transparent;
836 list-style-type: circle;
837 background: transparent;
841 list-style-type: disc;
842 background: transparent;
847 list-style-type: decimal;
852 list-style-type: decimal;
857 setting
class=
"outline" on ol or ul makes it behave as an
858 ouline list where blocklevel content in li elements is
859 hidden by default and can be expanded or collapsed with
860 mouse click. Set
class=
"expand" on li to override default
863 ol.outline li:hover { cursor: pointer }
864 ol.outline li.nofold:hover { cursor: default }
866 ul.outline li:hover { cursor: pointer }
867 ul.outline li.nofold:hover { cursor: default }
869 ol.outline { list-style:decimal; }
870 ol.outline ol { list-style-type:lower-alpha }
872 ol.outline li.nofold {
874 background: transparent url(../graphics/nofold-dim.gif) no-repeat
0px
0.5em;
876 ol.outline li.unfolded {
878 background: transparent url(../graphics/fold-dim.gif) no-repeat
0px
0.5em;
880 ol.outline li.folded {
882 background: transparent url(../graphics/unfold-dim.gif) no-repeat
0px
0.5em;
884 ol.outline li.unfolded:hover {
886 background: transparent url(../graphics/fold.gif) no-repeat
0px
0.5em;
888 ol.outline li.folded:hover {
890 background: transparent url(../graphics/unfold.gif) no-repeat
0px
0.5em;
893 ul.outline li.nofold {
895 background: transparent url(../graphics/nofold-dim.gif) no-repeat
0px
0.5em;
897 ul.outline li.unfolded {
899 background: transparent url(../graphics/fold-dim.gif) no-repeat
0px
0.5em;
901 ul.outline li.folded {
903 background: transparent url(../graphics/unfold-dim.gif) no-repeat
0px
0.5em;
905 ul.outline li.unfolded:hover {
907 background: transparent url(../graphics/fold.gif) no-repeat
0px
0.5em;
909 ul.outline li.folded:hover {
911 background: transparent url(../graphics/unfold.gif) no-repeat
0px
0.5em;
914 /* for slides with class
"title" in table of contents */
915 a.titleslide { font-weight: bold; font-style: italic }
918 hide images for work around for save as bug
919 where browsers fail to save images used by CSS
921 img.hidden { display: none; visibility: hidden }
922 div.initial_prompt { display: none; visibility: hidden }
929 border-top-style: solid;
930 border-top-width: thin;
931 border-top-color: black;
935 .hidden { display: none; visibility: visible }
937 div.slide.hidden { display: block; visibility: visible }
938 div.handout.hidden { display: block; visibility: visible }
939 div.background { display: none; visibility: hidden }
940 body.single_slide div.initial_prompt { display: block; visibility: visible }
941 body.single_slide div.background { display: block; visibility: visible }
942 body.single_slide div.background.hidden { display: none; visibility: hidden }
943 body.single_slide .invisible { visibility: hidden }
944 body.single_slide .hidden { display: none; visibility: hidden }
945 body.single_slide div.slide { position: absolute }
946 body.single_slide div.handout { display: none; visibility: hidden }
950 .hidden { display: block; visibility: visible }
953 div.slide pre { font-size:
60%; padding-left:
0.5em; }
955 div.toolbar { display: none; visibility: hidden; }
956 div.slidy_toc { display: none; visibility: hidden; }
957 div.background { display: none; visibility: hidden; }
958 div.slide { page-break-before: always }
959 /* :first-child isn't reliable for print media */
960 div.slide.first-slide { page-break-before: avoid }
964 /* SJR: AsciiDoc slidy backend tweaks */
967 margin:
0.8em
1.5em
0.8em
1.8em;
973 .outline
> li.folded,
974 .outline
> li.unfolded {
977 ul
> li{ color: #aaa; }
978 ul
> li
> *, ol
> li
> * { color: black; }
982 margin-bottom:
0.5em;
987 body.single_slide .invisible { opacity:
0.15; visibility: visible; }
988 /*img.invisible { opacity:
0.1; visibility: visible; } */
989 img.invisible { visibility: hidden !important }
991 a {text-decoration: underline;}
993 <style type=
"text/css" title=
"slidy_color_set_none">
994 /* empty color set styles */
996 <style type=
"text/css" title=
"slidy_color_set_yellow">
997 /* rainbow color styles */
998 body { background-color: #ffffaa;}
999 a:link, a:visited, a:hover, a:active { color: blue; text-decoration: underline }
1000 a:hover { color: red; text-decoration: underline }
1001 div.slide { color: black;}
1002 div.slide h1,h2,h3,h4,h5,h6 { color: orange;}
1005 div.sidebarblock, div.literalblock, div.listingblock, div.exampleblock, div.title { color: red;}
1006 div.quoteblock, div.verseblock { color: black; }
1007 div.admonitionblock { color: red;}
1009 <style type=
"text/css" title=
"slidy_color_set_green">
1010 /* blue color styles */
1011 body { background-color: #
449900;}
1012 a:link, a:visited, a:hover, a:active { color: fuchsia; text-decoration: underline }
1013 a:hover { color: red; text-decoration: underline }
1014 div.slide { color: yellow;}
1015 div.slide h1,h2,h3,h4,h5,h6 { color: lime;}
1016 em { color: orange;}
1017 tt { color: orange;}
1018 div.sidebarblock, div.literalblock, div.listingblock, div.exampleblock, div.title { color: #
44ff00;}
1019 div.quoteblock, div.verseblock { color: black; }
1020 div.admonitionblock { color: #
88ff55;}
1022 <style type=
"text/css" title=
"slidy_color_set_blue">
1023 /* blue color styles */
1024 body { background-color: navy;}
1025 a:link, a:visited, a:hover, a:active { color: yellow; text-decoration: underline }
1026 a:hover { color: red; text-decoration: underline }
1027 div.slide { background-color: navy; color: aqua;}
1028 div.slide h1,h2,h3,h4,h5,h6 { color: aqua;}
1031 div.sidebarblock, div.literalblock, div.listingblock, div.exampleblock, div.title { color: teal;}
1032 div.admonitionblock { color: teal;}
1034 <style type=
"text/css" title=
"slidy_color_set_black">
1035 /* black color set styles */
1036 body { background-color: black !important; }
1037 a:link, a:visited, a:hover, a:active { color: gray; text-decoration: underline }
1038 a:hover { color: red; text-decoration: underline }
1039 div.slide { color: silver !important; }
1040 span, caption, th { color: silver !important; }
1041 div.slide h1,h2,h3,h4,h5,h6 { color: white;}
1042 em, strong { color: #
999999;}
1044 div.sidebarblock, div.literalblock, div.listingblock, div.exampleblock, div.title { color: black; }
1045 div.admonitionblock, div.quoteblock, div.verseblock { color: white; }
1046 div.cover.slide, div.cover.slide h1 { background-color: black; }
1048 <style type=
"text/css">
1057 h1, h2, h3, h4, h5, h6 {
1061 margin:
0 0 0 0 !important;
1074 -moz-box-sizing:border-box;
1075 -webkit-box-sizing:border-box;
1076 box-sizing:border-box;
1080 margin:
0 auto
0 auto;
1081 padding:
0 1em
0 1em;
1084 .article
> .sect1:last-child {
1087 .article
> .sect1 * {
1090 .article
> .refnamediv
> *,
1091 .article
> .sect1
> *,
1092 .article
> .refsynopsisdiv
> * {
1094 .article
> .sect1
> .sect2
> * {
1097 .article
> .sect1
> .sect2
> .sect3
> * {
1108 .article .emphasis {
1109 text-decoration:underline;
1122 .article h3 + p[title] {
1128 .article code.literal {
1129 background-color:#EEEEEE;
1130 color:inherit !important;
1131 font-family:monospace,Courier;
1136 /*background-color: #ffffff;*/
1137 font-family:monospace,Courier;
1138 line-height:
1.3; /* TODO:
1.2 ? */
1140 font-family: monospace;
1145 .article pre.literallayout {
1146 border-left:
1ex solid navy;
1151 border-width:
0px
0px
0px
5px;
1153 display:inline-block;
1154 margin:
0.5ex
0 0.5ex
0;
1156 .article .programlisting {
1161 .article .listitem
> .simpara {
1166 .article
> .sect1
> h2 {
1167 border-bottom:
2px solid black;
1168 /*box-shadow:
0px
1px
00px #
888888;*/
1170 font-family:monospace,Arial,sans-serif;
1172 /*font-variant:small-caps;*/
1174 margin:
1ex
0 0.5ex
0;
1175 padding:
0 0 0.5ex
0;
1177 .article
> .refnamediv
> h2,
1178 .article
> .refsynopsisdiv
> h2 {
1179 font-variant:small-caps;
1181 .article
> .sect1
> .sect2
> h3 {
1183 font-family:monospace,Arial,sans-serif;
1185 padding:
1.5ex
0 0.5ex
0;
1188 .article
> .sect1
> h2 + .sect2
> h3 {
1191 .article
> .sect1
> .sect2
> h3:before,
1192 .article .toc .sect2:before {
1195 font-family:monospace,Arial,sans-serif;
1198 .article
> .sect1
> .sect2
> .sect3
> h4 {
1200 font-family:monospace,Arial,sans-serif;
1205 .article
> .sect1
> .sect2
> .sect3
> h4:before,
1206 .article .toc .sect3:before {
1209 font-family:monospace,Arial,sans-serif;
1212 .article li.listitem
> p.simpara:first-child {
1215 .article p .formalpara-title {
1216 /* XXX: there is a docbook-xsl bug here:
1217 * https://lists.oasis-open.org/archives/docbook-apps/
201107/msg00003.html
1231 .article span.citerefentry
> span.articletitle {
1235 .article .hdlist p {
1238 .article .hdlist td.hdlist1 {
1242 .article .hdlist td.hdlist1,
1243 .article .hdlist td.hdlist1 {
1246 .article .hdlist td.hdlist2 {
1249 vertical-align:middle;
1251 .article .hdlist td.hdlist2
> .listingblock {
1254 .article .hdlist.math td.hdlist1,
1255 .article .hdlist.math td.hdlist2 {
1256 vertical-align:middle !important;
1258 .article .calloutlist p {
1261 .article .calloutlist td {
1264 .article .calloutlist td p {
1266 .article .calloutlist td:first-child {
1269 .article .calloutlist td:first-child p {
1272 .article .itemizedlist,
1273 .article .orderedlist {
1277 .article .itemizedlist ul,
1278 .article .orderedlist ol {
1281 list-style-position:outside;
1283 .article .itemizedlist ul li,
1284 .article .orderedlist ol li {
1293 .article .dlist dl {
1294 list-style-position:outside;
1296 padding:
0.5ex
0 0 0;
1298 .article .dlist dl dt {
1302 .article .dlist dl dd {
1303 border-left:
1px dotted black;
1304 margin:
0.5ex
0 0.5ex
0.9ex;
1309 .article .dlist dl dd
> p:first-child {
1312 .article .dlist dl dd
> p:last-child {
1315 .article .dlist dt:before,
1316 .article .toc dt:before {
1319 font-family:monospace,Arial,sans-serif;
1322 .article h2 + .itemizedlist ul,
1323 .article h2 + .orderedlist ol,
1324 .article h2 + .dlist dl {
1328 .article a[href^=
"#fhs:"] {
1331 .article .toc a[href^=
"#fhs:"] {
1336 -moz-box-sizing:border-box;
1337 -webkit-box-sizing:border-box;
1338 background:none repeat scroll
0 0 #FFFFEE;
1339 border:
1px solid #C0C0C0;
1340 box-sizing:border-box;
1347 padding:
1ex
1em
1ex
1em;
1352 .article .sidebar .refnamediv {
1355 .article .sidebar .refnamediv h2 {
1356 border-bottom:
2px solid black;
1358 font-family:monospace,Arial,sans-serif;
1360 font-variant:small-caps;
1361 border-bottom:
0 solid black;
1365 .article .sidebar .refnamediv p {
1371 .article .location {
1374 .article .location .location-title {
1375 display:inline-block;
1377 .article .location .location-path {
1378 display:inline-block;
1380 margin-bottom:
0.5ex;
1382 .article .location .location-path a {
1383 display:inline-block;
1385 .article .location .location-path .dir {
1389 .article .location .location-path .dir .slash {
1392 .article .location .location-path .file {
1396 .article .language {
1399 .article .language .language-title {
1400 display:inline-block;
1402 .article .language .language-list {
1403 display:inline-block;
1407 .article .language .language-list .lang-available {
1410 .article .language .language-list .lang-current {
1421 .article .toc dl dd {
1422 border-left:
1px dotted #
333;
1427 .article .toc dl dt span.refsynopsisdiv {
1429 .article .toc .sect1:before {
1432 font-family:monospace,Arial,sans-serif;
1435 .article .toc .toc-title,
1436 .article .language .language-title,
1437 .article .location .location-title {
1438 border-bottom:
0 solid black;
1441 font-variant:small-caps;
1443 margin-bottom:
0.5ex;
1446 body
> div.slidy_toc,
1447 .article div.slidy_toc {
1448 background: none repeat scroll
0 0 #F0F0F0;
1449 border-style: solid;
1453 left: auto !important;
1454 bottom: auto !important;
1455 right:
0 !important;
1456 max-width: none !important;
1457 width:
50% !important;
1464 .article div.toc-heading {
1465 border-bottom:
1px solid #B4B4B4;
1471 /* incremental preview */
1472 body.single_slide .invisible {
1474 visibility: visible;
1477 visibility: hidden !important;
1481 border:
1px solid black;
1483 margin:
0 auto
0 auto;
1486 div.hledgersplash
> div.imageblock {
1487 /*border:black solid
1px;*/
1492 pre .Error { color: #
8080ff; background-color: #ffffff; }
1493 pre .PreProc { color: #ff6060; text-decoration: underline; font-weight: bold; }
1494 pre .Special { color: #
8080ff; font-weight: bold; }
1495 pre .Constant { color: #ff40ff; text-decoration: none; }
1496 pre .Statement { color: #B8860B; font-weight: bold; }
1497 pre .Identifier { color: #ffff00; text-decoration: underline; }
1498 pre .Comment { color: #
4169e1; font-weight: bold; }
1499 /* vim syntax: hledger */
1500 pre .hledgerNumberOdd { color: #
0000ff; background-color: #e5e5e5; font-weight: bold; }
1501 pre .hledgerPostingAmountOdd { color: #eead0e; background-color: #e5e5e5; font-weight: bold; }
1502 pre .hledgerAccountSeparatorOdd { color: #eead0e; background-color: #e5e5e5; font-weight: bold; }
1503 pre .hledgerPostingAccountOdd { color: #
4d4d4d; background-color: #e5e5e5; }
1504 pre .hledgerNumber { color: #
0000ff; background-color: #
90ee90; font-weight: bold; }
1505 pre .hledgerPostingAmount { color: #eead0e; background-color: #
90ee90; font-weight: bold; }
1506 pre .hledgerAccountSeparator { color: #eead0e; background-color: #
90ee90; font-weight: bold; }
1507 pre .hledgerPostingAccount { color: #
4d4d4d; background-color: #
90ee90; }
1508 pre .hledgerTagValue { color: #ff0000; }
1509 pre .hledgerTag { color: #ffa500; font-weight: bold; }
1510 pre .hledgerTransactionComment { color: #
4169e1; font-weight: bold; }
1511 pre .hledgerTransaction { font-weight: bold; }
1512 pre .hledgerTransactionDate { background-color: #eedd82; font-weight: bold; }
1513 pre .hledgerDirective { font-weight: bold; }
1514 pre .hledgerInclude { font-weight: bold; }
1515 pre .hledgerComment { color: #
4169e1; font-weight: bold; }
1517 <script type=
"text/javascript">
1521 Copyright (c)
2005-
2010 W3C (MIT, ERCIM, Keio), All Rights Reserved.
1522 W3C liability, trademark, document use and software licensing
1525 http://www.w3.org/Consortium/Legal/copyright-documents
1526 http://www.w3.org/Consortium/Legal/copyright-software
1528 Defines single name
"w3c_slidy" in global namespace
1529 Adds event handlers without trampling on any others
1531 JMI: Dynamic features added
1534 // the slidy object implementation
1536 // classify which kind of browser we're running under
1537 ns_pos: (typeof window.pageYOffset!='undefined'),
1538 khtml: ((navigator.userAgent).indexOf(
"KHTML")
>=
0 ? true : false),
1539 opera: ((navigator.userAgent).indexOf(
"Opera")
>=
0 ? true : false),
1540 ipad: ((navigator.userAgent).indexOf(
"iPad")
>=
0 ? true : false),
1541 iphone: ((navigator.userAgent).indexOf(
"iPhone")
>=
0 ? true : false),
1542 ie: (typeof document.all !=
"undefined" && !this.opera),
1543 ie6: (!this.ns_pos && navigator.userAgent.indexOf(
"MSIE 6") != -
1),
1544 ie7: (!this.ns_pos && navigator.userAgent.indexOf(
"MSIE 7") != -
1),
1545 ie8: (!this.ns_pos && navigator.userAgent.indexOf(
"MSIE 8") != -
1),
1546 ie9: (!this.ns_pos && navigator.userAgent.indexOf(
"MSIE 9") != -
1),
1547 keyboardless: (this.ipad || this.iphone),
1549 // are we running as XHTML? (doesn't work on Opera)
1550 is_xhtml: /xml/.test(document.contentType),
1552 slide_number:
0, // integer slide count:
0,
1,
2, ...
1553 slide_number_element: null, // element containing slide number
1554 slides: [], // set to array of slide div's
1555 notes: [], // set to array of handout div's
1556 backgrounds: [], // set to array of background div's
1557 toolbar: null, // element containing toolbar
1558 title: null, // document title
1559 last_shown: null, // last incrementally shown item
1560 eos: null, // span element for end of slide indicator
1561 toc: null, // table of contents
1562 outline: null, // outline element with the focus
1563 selected_text_len:
0, // length of drag selection on document
1564 view_all:
0, //
1 to view all slides + handouts
1565 want_toolbar: true, // user preference to show/hide toolbar
1566 mouse_click_enabled: true, // enables left click for next slide
1567 scroll_hack:
0, // IE work around for position: fixed
1568 disable_slide_click: false, // used by clicked anchors
1570 lang:
"en", // updated to language specified by html file
1572 help_anchor: null, // used for keyboard focus hack in showToolbar()
1573 help_page:
"http://www.w3.org/Talks/Tools/Slidy2/help/help.html",
1574 help_text:
"Navigate with mouse click, space bar, Cursor Left/Right, " +
1575 "or Pg Up and Pg Dn. Use S and B to change font size.",
1578 "PGDN\t: nextSlide\n" +
1579 "PGUP\t: previousSlide\n" +
1580 "HOME\t: firstSlide\n" +
1581 "END \t: lastSlide\n" +
1582 "SPACE\t: nextContent\n" +
1583 "-> \t: nextContent\n" +
1584 "<- \t: previousContent\n" +
1585 "A \t: toggleAllSlides\n" +
1586 "F \t: toggleFooter\n" +
1587 "K \t: toggleMouseClick\n" +
1588 "I \t: toggleIncremental\n" +
1589 "L \t: toggleColorSet\n" +
1590 "T, C\t: tableOfContents\n" +
1591 "B \t: biggerFontSize\n" +
1592 "S \t: smallerFontSize\n" +
1593 "M \t: key mapping\n",
1597 sizes: new Array(
"10pt",
"12pt",
"14pt",
"16pt",
"18pt",
"20pt",
1598 "22pt",
"24pt",
"26pt",
"28pt",
"30pt",
"32pt"),
1600 // needed for efficient resizing
1605 // Needed for cross browser support for relative width/height on
1606 // object elements. The work around is to save width/height attributes
1607 // and then to recompute absolute width/height dimensions on resizing
1611 incremental_display: true,
1613 // attach initialiation event handlers
1614 set_up: function () {
1615 var init = function() { w3c_slidy.init(); };
1616 if (typeof window.addEventListener !=
"undefined")
1617 window.addEventListener(
"load", init, false);
1619 window.attachEvent(
"onload", init);
1622 hide_slides: function () {
1623 if (document.body && !w3c_slidy.initialized)
1624 document.body.style.visibility =
"hidden";
1626 setTimeout(w3c_slidy.hide_slides,
50);
1629 // hack to persuade IE to compute correct document height
1630 // as needed for simulating fixed positioning of toolbar
1631 ie_hack: function () {
1632 window.resizeBy(
0,-
1);
1633 window.resizeBy(
0,
1);
1637 //alert(
"slidy starting test 10");
1638 document.body.style.visibility =
"visible";
1639 this.init_localization();
1641 this.wrap_implicit_slides();
1642 this.collect_slides();
1643 this.collect_notes();
1644 this.collect_backgrounds();
1645 this.objects = document.body.getElementsByTagName(
"object");
1646 this.patch_anchors();
1647 this.slide_number = this.find_slide_number(location.href);
1648 window.offscreenbuffering = true;
1649 this.size_adjustment = this.find_size_adjust();
1650 this.time_left = this.find_duration();
1651 this.hide_image_toolbar(); // suppress IE image toolbar popup
1652 this.init_outliner(); // activate fold/unfold support
1653 this.title = document.title;
1655 this.color_sets = new Array();
1656 this.init_color_sets();
1658 // work around for opera bug
1659 this.is_xhtml = (document.body.tagName ==
"BODY" ? false : true);
1661 if (this.slides.length
> 0)
1663 var slide = this.slides[this.slide_number];
1665 if (this.slide_number
> 0)
1667 this.set_visibility_all_incremental(
"visible");
1668 this.last_shown = this.previous_incremental_item(null);
1669 this.set_eos_status(true);
1673 this.last_shown = null;
1674 this.set_visibility_all_incremental(
"hidden");
1675 this.set_eos_status(!this.next_incremental_item(this.last_shown));
1678 this.set_location();
1679 this.add_class(this.slides[
0],
"first-slide");
1680 w3c_slidy.show_slide(slide);
1683 this.toc = this.table_of_contents();
1685 this.add_initial_prompt();
1687 // bind event handlers without interfering with custom page scripts
1688 // Tap events behave too weirdly to support clicks reliably on
1689 // iPhone and iPad, so exclude these from click handler
1691 if (!this.keyboardless)
1692 this.add_listener(document.body,
"click", this.mouse_button_click);
1694 this.add_listener(document,
"keydown", this.key_down);
1695 this.add_listener(document,
"keypress", this.key_press);
1696 this.add_listener(window,
"resize", this.resized);
1697 this.add_listener(window,
"scroll", this.scrolled);
1698 this.add_listener(window,
"unload", this.unloaded);
1700 // this seems to be a debugging hack
1701 //if (!document.body.onclick)
1702 // document.body.onclick = function () { };
1704 this.single_slide_view();
1706 //this.set_location();
1711 setTimeout(w3c_slidy.ie_hack,
100);
1713 this.show_toolbar();
1715 // for back button detection
1716 setInterval(function () { w3c_slidy.check_location(); },
200);
1717 w3c_slidy.initialized = true;
1720 // create div element with links to each slide
1721 table_of_contents: function () {
1722 var toc = this.create_element(
"div");
1723 this.add_class(toc,
"slidy_toc hidden");
1724 //toc.setAttribute(
"tabindex",
"0");
1726 var heading = this.create_element(
"div");
1727 this.add_class(heading,
"toc-heading");
1728 heading.innerHTML = this.localize(
"Table of Contents");
1730 toc.appendChild(heading);
1731 var previous = null;
1733 for (var i =
0; i < this.slides.length; ++i)
1735 var title = this.has_class(this.slides[i],
"title");
1736 var num = document.createTextNode((i +
1) +
". ");
1738 toc.appendChild(num);
1740 var a = this.create_element(
"a");
1741 a.setAttribute(
"href",
"#(" + (i+
1) +
")");
1744 this.add_class(a,
"titleslide");
1746 var name = document.createTextNode(this.slide_name(i));
1747 a.appendChild(name);
1748 a.onclick = w3c_slidy.toc_click;
1749 a.onkeydown = w3c_slidy.toc_key_down;
1750 a.previous = previous;
1760 if (i < this.slides.length -
1)
1762 var br = this.create_element(
"br");
1763 toc.appendChild(br);
1769 toc.focus = function () {
1774 toc.onmouseup = w3c_slidy.mouse_button_up;
1776 toc.onclick = function (e) {
1777 e||(e=window.event);
1779 if (w3c_slidy.selected_text_len <=
0)
1780 w3c_slidy.hide_table_of_contents(true);
1782 w3c_slidy.stop_propagation(e);
1784 if (e.cancel != undefined)
1787 if (e.returnValue != undefined)
1788 e.returnValue = false;
1793 document.body.insertBefore(toc, document.body.firstChild);
1797 is_shown_toc: function () {
1798 return !w3c_slidy.has_class(w3c_slidy.toc,
"hidden");
1801 show_table_of_contents: function () {
1802 w3c_slidy.remove_class(w3c_slidy.toc,
"hidden");
1803 var toc = w3c_slidy.toc;
1806 if (w3c_slidy.ie7 && w3c_slidy.slide_number ==
0)
1807 setTimeout(w3c_slidy.ie_hack,
100);
1810 hide_table_of_contents: function (focus) {
1811 w3c_slidy.add_class(w3c_slidy.toc,
"hidden");
1813 if (focus && !w3c_slidy.opera)
1814 w3c_slidy.help_anchor.focus();
1817 toggle_table_of_contents: function () {
1818 if (w3c_slidy.is_shown_toc())
1819 w3c_slidy.hide_table_of_contents(true);
1821 w3c_slidy.show_table_of_contents();
1824 // called on clicking toc entry
1825 toc_click: function (e) {
1829 var target = w3c_slidy.get_target(e);
1831 if (target && target.nodeType ==
1)
1833 var uri = target.getAttribute(
"href");
1837 //alert(
"going to " + uri);
1838 var slide = w3c_slidy.slides[w3c_slidy.slide_number];
1839 w3c_slidy.hide_slide(slide);
1840 w3c_slidy.slide_number = w3c_slidy.find_slide_number(uri);
1841 slide = w3c_slidy.slides[w3c_slidy.slide_number];
1842 w3c_slidy.last_shown = null;
1843 w3c_slidy.set_location();
1844 w3c_slidy.set_visibility_all_incremental(
"hidden");
1845 w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown));
1846 w3c_slidy.show_slide(slide);
1851 if (!w3c_slidy.opera)
1852 w3c_slidy.help_anchor.focus();
1860 w3c_slidy.hide_table_of_contents(true);
1861 if (w3c_slidy.ie7) w3c_slidy.ie_hack();
1862 w3c_slidy.stop_propagation(e);
1863 return w3c_slidy.cancel(e);
1866 // called onkeydown for toc entry
1867 toc_key_down: function (event) {
1871 var event = window.event;
1873 // kludge around NS/IE differences
1875 key = window.event.keyCode;
1876 else if (event.which)
1879 return true; // Yikes! unknown browser
1881 // ignore event if key value is zero
1882 // as for alt on Opera and Konqueror
1886 // check for concurrent control/command/alt key
1887 // but are these only present on mouse events?
1889 if (event.ctrlKey || event.altKey)
1894 var uri = this.getAttribute(
"href");
1898 //alert(
"going to " + uri);
1899 var slide = w3c_slidy.slides[w3c_slidy.slide_number];
1900 w3c_slidy.hide_slide(slide);
1901 w3c_slidy.slide_number = w3c_slidy.find_slide_number(uri);
1902 slide = w3c_slidy.slides[w3c_slidy.slide_number];
1903 w3c_slidy.last_shown = null;
1904 w3c_slidy.set_location();
1905 w3c_slidy.set_visibility_all_incremental(
"hidden");
1906 w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown));
1907 w3c_slidy.show_slide(slide);
1912 if (!w3c_slidy.opera)
1913 w3c_slidy.help_anchor.focus();
1920 w3c_slidy.hide_table_of_contents(true);
1923 w3c_slidy.ie_hack();
1925 return w3c_slidy.cancel(event);
1928 if (key ==
40 && this.next)
1931 return w3c_slidy.cancel(event);
1934 if (key ==
38 && this.previous)
1936 this.previous.focus();
1937 return w3c_slidy.cancel(event);
1945 before_print: function () {
1946 this.show_all_slides();
1947 this.hide_toolbar();
1948 alert(
"before print");
1952 after_print: function () {
1955 this.single_slide_view();
1956 this.show_toolbar();
1958 alert(
"after print");
1962 print_slides: function () {
1963 this.before_print();
1968 // ### OBSOLETE ?? ###
1969 toggle_view: function () {
1972 this.single_slide_view();
1973 this.show_toolbar();
1978 this.show_all_slides();
1979 this.hide_toolbar();
1984 // prepare for printing ### OBSOLETE ###
1985 show_all_slides: function () {
1986 this.remove_class(document.body,
"single_slide");
1987 this.set_visibility_all_incremental(
"visible");
1990 // restore after printing ### OBSOLETE ###
1991 single_slide_view: function () {
1992 this.add_class(document.body,
"single_slide");
1993 this.set_visibility_all_incremental(
"visible");
1994 this.last_shown = this.previous_incremental_item(null);
1997 // suppress IE's image toolbar pop up
1998 hide_image_toolbar: function () {
2001 var images = document.getElementsByTagName(
"IMG");
2003 for (var i =
0; i < images.length; ++i)
2004 images[i].setAttribute(
"galleryimg",
"no");
2008 unloaded: function (e) {
2009 //alert(
"unloaded");
2012 // Safari and Konqueror don't yet support getComputedStyle()
2013 // and they always reload page when location.href is updated
2014 is_KHTML: function () {
2015 var agent = navigator.userAgent;
2016 return (agent.indexOf(
"KHTML")
>=
0 ? true : false);
2019 // find slide name from first h1 element
2020 // default to document title + slide number
2021 slide_name: function (index) {
2023 var slide = this.slides[index];
2025 var heading = this.find_heading(slide);
2028 name = this.extract_text(heading);
2031 name = this.title +
"(" + (index +
1) +
")";
2033 name.replace(/\&/g,
"&");
2034 name.replace(/\
</g,
"<");
2035 name.replace(/\
>/g,
">");
2040 // find first h1 element in DOM tree
2041 find_heading: function (node) {
2042 if (!node || node.nodeType !=
1)
2045 if (node.nodeName ==
"H1" || node.nodeName ==
"h1")
2048 var child = node.firstChild;
2052 node = this.find_heading(child);
2057 child = child.nextSibling;
2063 // recursively extract text from DOM tree
2064 extract_text: function (node) {
2069 if (node.nodeType ==
3)
2070 return node.nodeValue;
2073 if (node.nodeType ==
1)
2075 node = node.firstChild;
2080 text = text + this.extract_text(node);
2081 node = node.nextSibling;
2090 // find copyright text from meta element
2091 find_copyright: function () {
2093 var meta = document.getElementsByTagName(
"meta");
2095 for (var i =
0; i < meta.length; ++i)
2097 name = meta[i].getAttribute(
"name");
2098 content = meta[i].getAttribute(
"content");
2100 if (name ==
"copyright")
2107 find_size_adjust: function () {
2108 var name, content, offset;
2109 var meta = document.getElementsByTagName(
"meta");
2111 for (var i =
0; i < meta.length; ++i)
2113 name = meta[i].getAttribute(
"name");
2114 content = meta[i].getAttribute(
"content");
2116 if (name ==
"font-size-adjustment")
2123 //
<meta name=
"duration" content=
"20" /> for
20 minutes
2124 find_duration: function () {
2125 var name, content, offset;
2126 var meta = document.getElementsByTagName(
"meta");
2128 for (var i =
0; i < meta.length; ++i)
2130 name = meta[i].getAttribute(
"name");
2131 content = meta[i].getAttribute(
"content");
2133 if (name ==
"duration")
2134 return
60000 * content;
2140 replace_by_non_breaking_space: function (str) {
2141 for (var i =
0; i < str.length; ++i)
2145 // ### CHECK ME ### is use of
"li" okay for text/html?
2146 // for XHTML do we also need to specify namespace?
2147 init_outliner: function () {
2148 var items = document.getElementsByTagName(
"li");
2150 for (var i =
0; i < items.length; ++i)
2152 var target = items[i];
2154 if (!this.has_class(target.parentNode,
"outline"))
2157 target.onclick = this.outline_click;
2158 /* ### more work needed for IE6
2161 target.onmouseover = this.hover_outline;
2162 target.onmouseout = this.unhover_outline;
2165 if (this.foldable(target))
2167 target.foldable = true;
2168 target.onfocus = function () {w3c_slidy.outline = this;};
2169 target.onblur = function () {w3c_slidy.outline = null;};
2171 if (!target.getAttribute(
"tabindex"))
2172 target.setAttribute(
"tabindex",
"0");
2174 if (this.has_class(target,
"expand"))
2175 this.unfold(target);
2181 this.add_class(target,
"nofold");
2182 target.visible = true;
2183 target.foldable = false;
2188 foldable: function (item) {
2189 if (!item || item.nodeType !=
1)
2192 var node = item.firstChild;
2196 if (node.nodeType ==
1 && this.is_block(node))
2199 node = node.nextSibling;
2205 // ### CHECK ME ### switch to add/remove
"hidden" class
2206 fold: function (item) {
2209 this.remove_class(item,
"unfolded");
2210 this.add_class(item,
"folded");
2213 var node = item ? item.firstChild : null;
2217 if (node.nodeType ==
1 && this.is_block(node)) // element
2219 w3c_slidy.add_class(node,
"hidden");
2222 node = node.nextSibling;
2225 item.visible = false;
2228 // ### CHECK ME ### switch to add/remove
"hidden" class
2229 unfold: function (item) {
2232 this.add_class(item,
"unfolded");
2233 this.remove_class(item,
"folded");
2236 var node = item ? item.firstChild : null;
2240 if (node.nodeType ==
1 && this.is_block(node)) // element
2242 w3c_slidy.remove_class(node,
"hidden");
2245 node = node.nextSibling;
2248 item.visible = true;
2251 outline_click: function (e) {
2255 var rightclick = false;
2256 var target = w3c_slidy.get_target(e);
2258 while (target && target.visible == undefined)
2259 target = target.parentNode;
2265 rightclick = (e.which ==
3);
2267 rightclick = (e.button ==
2);
2269 if (!rightclick && target.visible != undefined)
2271 if (target.foldable)
2274 w3c_slidy.fold(target);
2276 w3c_slidy.unfold(target);
2279 w3c_slidy.stop_propagation(e);
2281 e.returnValue = false;
2287 add_initial_prompt: function () {
2288 var prompt = this.create_element(
"div");
2289 prompt.setAttribute(
"class",
"initial_prompt");
2291 var p1 = this.create_element(
"p");
2292 prompt.appendChild(p1);
2293 p1.setAttribute(
"class",
"help");
2295 if (this.keyboardless)
2296 p1.innerHTML =
"Tap footer to move to next slide";
2298 p1.innerHTML =
"Space or Right Arrow to move to next " +
2299 "slide, M to see keys mapping, click help below for more details";
2301 this.add_listener(prompt,
"click", function (e) {
2302 document.body.removeChild(prompt);
2303 w3c_slidy.stop_propagation(e);
2305 if (e.cancel != undefined)
2308 if (e.returnValue != undefined)
2309 e.returnValue = false;
2314 document.body.appendChild(prompt);
2315 this.initial_prompt = prompt;
2316 setTimeout(function() {document.body.removeChild(prompt);},
5000);
2319 add_toolbar: function () {
2322 this.toolbar = this.create_element(
"div");
2323 this.toolbar.setAttribute(
"class",
"toolbar");
2325 // a reasonably behaved browser
2326 if (this.ns_pos || !this.ie6)
2328 var right = this.create_element(
"div");
2329 right.setAttribute(
"style",
"float: right; text-align: right");
2331 counter = this.create_element(
"span")
2332 counter.innerHTML = this.localize(
"slide") +
" n/m";
2333 right.appendChild(counter);
2334 this.toolbar.appendChild(right);
2336 var left = this.create_element(
"div");
2337 left.setAttribute(
"style",
"text-align: left");
2339 // global end of slide indicator
2340 this.eos = this.create_element(
"span");
2341 this.eos.innerHTML =
"* ";
2342 left.appendChild(this.eos);
2344 var help = this.create_element(
"a");
2345 help.setAttribute(
"href", this.help_page);
2346 help.setAttribute(
"title", this.localize(this.help_text));
2347 help.innerHTML = this.localize(
"help?");
2348 left.appendChild(help);
2349 this.help_anchor = help; // save for focus hack
2351 var gap1 = document.createTextNode(
" ");
2352 left.appendChild(gap1);
2354 var contents = this.create_element(
"a");
2355 contents.setAttribute(
"href",
"javascript:w3c_slidy.toggle_table_of_contents()");
2356 contents.setAttribute(
"title", this.localize(
"table of contents"));
2357 contents.innerHTML = this.localize(
"contents?");
2358 left.appendChild(contents);
2360 var gap2 = document.createTextNode(
" ");
2361 left.appendChild(gap2);
2363 var copyright = this.find_copyright();
2367 var span = this.create_element(
"span");
2368 span.className =
"copyright";
2369 span.innerHTML = copyright;
2370 left.appendChild(span);
2373 this.toolbar.setAttribute(
"tabindex",
"0");
2374 this.toolbar.appendChild(left);
2376 else // IE6 so need to work around its poor CSS support
2378 this.toolbar.style.position = (this.ie7 ?
"fixed" :
"absolute");
2379 this.toolbar.style.zIndex =
"200";
2380 this.toolbar.style.width =
"99.9%";
2381 this.toolbar.style.height =
"1.2em";
2382 this.toolbar.style.top =
"auto";
2383 this.toolbar.style.bottom =
"0";
2384 this.toolbar.style.left =
"0";
2385 this.toolbar.style.right =
"0";
2386 this.toolbar.style.textAlign =
"left";
2387 this.toolbar.style.fontSize =
"60%";
2388 this.toolbar.style.color =
"red";
2389 this.toolbar.borderWidth =
0;
2390 this.toolbar.className =
"toolbar";
2391 this.toolbar.style.background =
"rgb(240,240,240)";
2393 // would like to have help text left aligned
2394 // and page counter right aligned, floating
2395 // div's don't work, so instead use nested
2396 // absolutely positioned div's.
2398 var sp = this.create_element(
"span");
2399 sp.innerHTML =
" * ";
2400 this.toolbar.appendChild(sp);
2401 this.eos = sp; // end of slide indicator
2403 var help = this.create_element(
"a");
2404 help.setAttribute(
"href", this.help_page);
2405 help.setAttribute(
"title", this.localize(this.help_text));
2406 help.innerHTML = this.localize(
"help?");
2407 this.toolbar.appendChild(help);
2408 this.help_anchor = help; // save for focus hack
2410 var gap1 = document.createTextNode(
" ");
2411 this.toolbar.appendChild(gap1);
2413 var contents = this.create_element(
"a");
2414 contents.setAttribute(
"href",
"javascript:toggleTableOfContents()");
2415 contents.setAttribute(
"title", this.localize(
"table of contents".localize));
2416 contents.innerHTML = this.localize(
"contents?");
2417 this.toolbar.appendChild(contents);
2419 var gap2 = document.createTextNode(
" ");
2420 this.toolbar.appendChild(gap2);
2422 var copyright = this.find_copyright();
2426 var span = this.create_element(
"span");
2427 span.innerHTML = copyright;
2428 span.style.color =
"black";
2429 span.style.marginLeft =
"0.5em";
2430 this.toolbar.appendChild(span);
2433 counter = this.create_element(
"div")
2434 counter.style.position =
"absolute";
2435 counter.style.width =
"auto"; //
"20%";
2436 counter.style.height =
"1.2em";
2437 counter.style.top =
"auto";
2438 counter.style.bottom =
0;
2439 counter.style.right =
"0";
2440 counter.style.textAlign =
"right";
2441 counter.style.color =
"red";
2442 counter.style.background =
"rgb(240,240,240)";
2444 counter.innerHTML = this.localize(
"slide") +
" n/m";
2445 this.toolbar.appendChild(counter);
2448 // ensure that click isn't passed through to the page
2449 this.toolbar.onclick =
2454 var target = e.target;
2456 if (!target && e.srcElement)
2457 target = e.srcElement;
2459 // work around Safari bug
2460 if (target && target.nodeType ==
3)
2461 target = target.parentNode;
2463 w3c_slidy.stop_propagation(e);
2465 if (target && target.nodeName.toLowerCase() !=
"a")
2466 w3c_slidy.mouse_button_click(e);
2469 this.slide_number_element = counter;
2470 this.set_eos_status(false);
2471 document.body.appendChild(this.toolbar);
2474 // wysiwyg editors make it hard to use div elements
2475 // e.g. amaya loses the div when you copy and paste
2476 // this function wraps div elements around implicit
2477 // slides which start with an h1 element and continue
2478 // up to the next heading or div element
2479 wrap_implicit_slides: function () {
2480 var i, heading, node, next, div;
2481 var headings = document.getElementsByTagName(
"h1");
2486 for (i =
0; i < headings.length; ++i)
2488 heading = headings[i];
2490 if (heading.parentNode != document.body)
2493 node = heading.nextSibling;
2495 div = document.createElement(
"div");
2496 this.add_class(div,
"slide");
2497 document.body.replaceChild(div, heading);
2498 div.appendChild(heading);
2502 if (node.nodeType ==
1 && // an element
2503 (node.nodeName ==
"H1" ||
2504 node.nodeName ==
"h1" ||
2505 node.nodeName ==
"DIV" ||
2506 node.nodeName ==
"div"))
2509 next = node.nextSibling;
2510 node = document.body.removeChild(node);
2511 div.appendChild(node);
2517 // return new array of all slides
2518 collect_slides: function () {
2519 var slides = new Array();
2520 var divs = document.body.getElementsByTagName(
"div");
2522 for (var i =
0; i < divs.length; ++i)
2526 if (this.has_class(div,
"slide"))
2528 // add slide to collection
2529 slides[slides.length] = div;
2531 // hide each slide as it is found
2532 this.add_class(div,
"hidden");
2534 // add dummy
<br/> at end for scrolling hack
2535 var node1 = document.createElement(
"br");
2536 div.appendChild(node1);
2537 var node2 = document.createElement(
"br");
2538 div.appendChild(node2);
2540 else if (this.has_class(div,
"background"))
2541 { // work around for Firefox SVG reload bug
2542 // which otherwise replaces
1st SVG graphic with
2nd
2543 div.style.display =
"block";
2547 this.slides = slides;
2550 // return new array of all
<div class=
"handout">
2551 collect_notes: function () {
2552 var notes = new Array();
2553 var divs = document.body.getElementsByTagName(
"div");
2555 for (var i =
0; i < divs.length; ++i)
2559 if (this.has_class(div,
"handout"))
2561 // add note to collection
2562 notes[notes.length] = div;
2565 this.add_class(div,
"hidden");
2572 // return new array of all
<div class=
"background">
2573 // including named backgrounds e.g.
class=
"background titlepage"
2574 collect_backgrounds: function () {
2575 var backgrounds = new Array();
2576 var divs = document.body.getElementsByTagName(
"div");
2578 for (var i =
0; i < divs.length; ++i)
2582 if (this.has_class(div,
"background"))
2584 // add background to collection
2585 backgrounds[backgrounds.length] = div;
2588 this.add_class(div,
"hidden");
2592 this.backgrounds = backgrounds;
2595 // set click handlers on all anchors
2596 patch_anchors: function () {
2597 var self = w3c_slidy;
2598 var handler = function (event) {
2599 // compare this.href with location.href
2600 // for link to another slide in this doc
2602 if (self.page_address(this.href) == self.page_address(location.href))
2604 // yes, so find new slide number
2605 var newslidenum = self.find_slide_number(this.href);
2607 if (newslidenum != self.slide_number)
2609 var slide = self.slides[self.slide_number];
2610 self.hide_slide(slide);
2611 self.slide_number = newslidenum;
2612 slide = self.slides[self.slide_number];
2613 self.show_slide(slide);
2614 self.set_location();
2618 w3c_slidy.stop_propagation(event);
2620 // else if (this.target == null)
2621 // location.href = this.href;
2624 self.disable_slide_click = true;
2627 var anchors = document.body.getElementsByTagName(
"a");
2629 for (var i =
0; i < anchors.length; ++i)
2631 if (window.addEventListener)
2632 anchors[i].addEventListener(
"click", handler, false);
2634 anchors[i].attachEvent(
"onclick", handler);
2638 // ### CHECK ME ### see which functions are invoked via setTimeout
2639 // either directly or indirectly for use of w3c_slidy vs this
2640 show_slide_number: function () {
2641 var timer = w3c_slidy.get_timer();
2642 w3c_slidy.slide_number_element.innerHTML = timer + w3c_slidy.localize(
"slide") +
" " +
2643 (w3c_slidy.slide_number +
1) +
"/" + w3c_slidy.slides.length;
2646 // every
200mS check if the location has been changed as a
2647 // result of the user activating the Back button/menu item
2648 // doesn't work for Opera <
9.5
2649 check_location: function () {
2650 var hash = location.hash;
2652 if (w3c_slidy.slide_number
> 0 && (hash ==
"" || hash ==
"#"))
2653 w3c_slidy.goto_slide(
0);
2654 else if (hash.length
> 2 && hash !=
"#("+(w3c_slidy.slide_number+
1)+
")")
2656 var num = parseInt(location.hash.substr(
2));
2659 w3c_slidy.goto_slide(num-
1);
2662 if (w3c_slidy.time_left && w3c_slidy.slide_number
> 0)
2664 w3c_slidy.show_slide_number();
2666 if (w3c_slidy.time_left
> 0)
2667 w3c_slidy.time_left -=
200;
2671 get_timer: function () {
2673 if (w3c_slidy.time_left)
2676 secs = Math.floor(w3c_slidy.time_left/
1000);
2677 mins = Math.floor(secs /
60);
2679 timer = (mins ? mins+
"m" :
"") + secs +
"s ";
2685 // this doesn't push location onto history stack for IE
2686 // for which a hidden iframe hack is needed: load page into
2687 // the iframe with script that set's parent's location.hash
2688 // but that won't work for standalone use unless we can
2689 // create the page dynamically via a javascript: URL
2690 set_location: function () {
2691 var uri = w3c_slidy.page_address(location.href);
2692 var hash =
"#(" + (w3c_slidy.slide_number+
1) +
")";
2694 if (w3c_slidy.slide_number
>=
0)
2697 if (w3c_slidy.ie && !w3c_slidy.ie8)
2698 w3c_slidy.push_hash(hash);
2700 if (uri != location.href) // && !khtml
2701 location.href = uri;
2704 hash =
"(" + (w3c_slidy.slide_number+
1) +
")";
2706 if (!this.ie && location.hash != hash && location.hash !=
"")
2707 location.hash = hash;
2709 document.title = w3c_slidy.title +
" (" + (w3c_slidy.slide_number+
1) +
")";
2710 w3c_slidy.show_slide_number();
2713 page_address: function (uri) {
2714 var i = uri.indexOf(
"#");
2717 i = uri.indexOf(
"%23");
2719 // check if anchor is entire page
2724 return uri.substr(
0, i);
2727 // only used for IE6 and IE7
2728 on_frame_loaded: function (hash) {
2729 location.hash = hash;
2730 var uri = w3c_slidy.page_address(location.href);
2731 location.href = uri + hash;
2734 // history hack with thanks to Bertrand Le Roy
2735 push_hash: function (hash) {
2736 if (hash ==
"") hash =
"#(1)";
2737 window.location.hash = hash;
2739 var doc = document.getElementById(
"historyFrame").contentWindow.document;
2742 // find current slide based upon location
2743 // first find target anchor and then look
2744 // for associated div element enclosing it
2745 // finally map that to slide number
2746 find_slide_number: function (uri) {
2747 // first get anchor from page location
2749 var i = uri.indexOf(
"#");
2751 // check if anchor is entire page
2755 var anchor = unescape(uri.substr(i+
1));
2757 // now use anchor as XML ID to find target
2758 var target = document.getElementById(anchor);
2762 // does anchor look like
"(2)" for slide
2 ??
2763 // where first slide is (
1)
2764 var re = /\((\d)+\)/;
2766 if (anchor.match(re))
2768 var num = parseInt(anchor.substring(
1, anchor.length-
1));
2770 if (num
> this.slides.length)
2779 // accept [
2] for backwards compatibility
2782 if (anchor.match(re))
2784 var num = parseInt(anchor.substring(
1, anchor.length-
1));
2786 if (num
> this.slides.length)
2795 // oh dear unknown anchor
2799 // search for enclosing slide
2803 // browser coerces html elements to uppercase!
2804 if (target.nodeName.toLowerCase() ==
"div" &&
2805 this.has_class(target,
"slide"))
2807 // found the slide element
2811 // otherwise try parent element if any
2813 target = target.parentNode;
2817 return
0; // no luck!
2821 for (i =
0; i < slides.length; ++i)
2823 if (slides[i] == target)
2824 return i; // success
2827 // oh dear still no luck
2831 previous_slide: function (incremental) {
2832 if (!w3c_slidy.view_all)
2837 if (!w3c_slidy.incremental_display) {incremental = false;}
2839 if ((incremental || w3c_slidy.slide_number ==
0) && w3c_slidy.last_shown != null)
2841 w3c_slidy.last_shown = w3c_slidy.hide_previous_item(w3c_slidy.last_shown);
2842 w3c_slidy.set_eos_status(false);
2844 else if (w3c_slidy.slide_number
> 0)
2846 slide = w3c_slidy.slides[w3c_slidy.slide_number];
2847 w3c_slidy.hide_slide(slide);
2849 w3c_slidy.slide_number = w3c_slidy.slide_number -
1;
2850 slide = w3c_slidy.slides[w3c_slidy.slide_number];
2851 w3c_slidy.set_visibility_all_incremental(
"visible");
2852 w3c_slidy.last_shown = w3c_slidy.previous_incremental_item(null);
2853 w3c_slidy.set_eos_status(true);
2854 w3c_slidy.show_slide(slide);
2857 w3c_slidy.set_location();
2859 if (!w3c_slidy.ns_pos)
2860 w3c_slidy.refresh_toolbar(
200);
2864 next_slide: function (incremental) {
2865 if (!w3c_slidy.view_all)
2867 var slide, last = w3c_slidy.last_shown;
2869 if (!w3c_slidy.incremental_display) {incremental = false;}
2871 if (incremental || w3c_slidy.slide_number == w3c_slidy.slides.length -
1)
2872 w3c_slidy.last_shown = w3c_slidy.reveal_next_item(w3c_slidy.last_shown);
2874 if ((!incremental || w3c_slidy.last_shown == null) &&
2875 w3c_slidy.slide_number < w3c_slidy.slides.length -
1)
2877 slide = w3c_slidy.slides[w3c_slidy.slide_number];
2878 w3c_slidy.hide_slide(slide);
2880 w3c_slidy.slide_number = w3c_slidy.slide_number +
1;
2881 slide = w3c_slidy.slides[w3c_slidy.slide_number];
2882 w3c_slidy.last_shown = null;
2883 w3c_slidy.set_visibility_all_incremental(
"hidden");
2884 w3c_slidy.show_slide(slide);
2886 else if (!w3c_slidy.last_shown)
2888 if (last && incremental)
2889 w3c_slidy.last_shown = last;
2892 w3c_slidy.set_location();
2894 w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown));
2896 if (!w3c_slidy.ns_pos)
2897 w3c_slidy.refresh_toolbar(
200);
2901 // to first slide with nothing revealed
2902 // i.e. state at start of presentation
2903 first_slide: function () {
2904 if (!w3c_slidy.view_all)
2908 if (w3c_slidy.slide_number !=
0)
2910 slide = w3c_slidy.slides[w3c_slidy.slide_number];
2911 w3c_slidy.hide_slide(slide);
2913 w3c_slidy.slide_number =
0;
2914 slide = w3c_slidy.slides[w3c_slidy.slide_number];
2915 w3c_slidy.last_shown = null;
2916 w3c_slidy.set_visibility_all_incremental(
"hidden");
2917 w3c_slidy.show_slide(slide);
2920 w3c_slidy.set_eos_status(
2921 !w3c_slidy.next_incremental_item(w3c_slidy.last_shown));
2922 w3c_slidy.set_location();
2926 // goto last slide with everything revealed
2927 // i.e. state at end of presentation
2928 last_slide: function () {
2929 if (!w3c_slidy.view_all)
2933 w3c_slidy.last_shown = null; //revealNextItem(lastShown);
2935 if (w3c_slidy.last_shown == null &&
2936 w3c_slidy.slide_number < w3c_slidy.slides.length -
1)
2938 slide = w3c_slidy.slides[w3c_slidy.slide_number];
2939 w3c_slidy.hide_slide(slide);
2940 w3c_slidy.slide_number = w3c_slidy.slides.length -
1;
2941 slide = w3c_slidy.slides[w3c_slidy.slide_number];
2942 w3c_slidy.set_visibility_all_incremental(
"visible");
2943 w3c_slidy.last_shown = w3c_slidy.previous_incremental_item(null);
2945 w3c_slidy.show_slide(slide);
2949 w3c_slidy.set_visibility_all_incremental(
"visible");
2950 w3c_slidy.last_shown = w3c_slidy.previous_incremental_item(null);
2953 w3c_slidy.set_eos_status(true);
2954 w3c_slidy.set_location();
2959 // ### check this and consider add/remove class
2960 set_eos_status: function (state) {
2962 this.eos.style.color = (state ?
"rgb(240,240,240)" :
"red");
2966 goto_slide: function (num) {
2967 //alert(
"going to slide " + (num+
1));
2968 var slide = w3c_slidy.slides[w3c_slidy.slide_number];
2969 w3c_slidy.hide_slide(slide);
2970 w3c_slidy.slide_number = num;
2971 slide = w3c_slidy.slides[w3c_slidy.slide_number];
2972 w3c_slidy.last_shown = null;
2973 w3c_slidy.set_visibility_all_incremental(
"hidden");
2974 w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown));
2975 document.title = w3c_slidy.title +
" (" + (w3c_slidy.slide_number+
1) +
")";
2976 w3c_slidy.show_slide(slide);
2977 w3c_slidy.show_slide_number();
2981 show_slide: function (slide) {
2982 this.sync_background(slide);
2983 window.scrollTo(
0,
0);
2984 this.remove_class(slide,
"hidden");
2987 hide_slide: function (slide) {
2988 this.add_class(slide,
"hidden");
2991 // show just the backgrounds pertinent to this slide
2992 // when slide background-color is transparent
2993 // this should now work with rgba color values
2994 sync_background: function (slide) {
2998 if (slide.currentStyle)
2999 bgColor = slide.currentStyle[
"backgroundColor"];
3000 else if (document.defaultView)
3002 var styles = document.defaultView.getComputedStyle(slide,null);
3005 bgColor = styles.getPropertyValue(
"background-color");
3006 else // broken implementation probably due Safari or Konqueror
3008 //alert(
"defective implementation of getComputedStyle()");
3009 bgColor =
"transparent";
3013 bgColor ==
"transparent";
3015 if (bgColor ==
"transparent" ||
3016 bgColor.indexOf(
"rgba")
>=
0 ||
3017 bgColor.indexOf(
"opacity")
>=
0)
3019 var slideClass = this.get_class_list(slide);
3021 for (var i =
0; i < this.backgrounds.length; i++)
3023 background = this.backgrounds[i];
3025 var bgClass = this.get_class_list(background);
3027 if (this.matching_background(slideClass, bgClass))
3028 this.remove_class(background,
"hidden");
3030 this.add_class(background,
"hidden");
3033 else // forcibly hide all backgrounds
3034 this.hide_backgrounds();
3037 hide_backgrounds: function () {
3038 for (var i =
0; i < this.backgrounds.length; i++)
3040 background = this.backgrounds[i];
3041 this.add_class(background,
"hidden");
3045 // compare classes for slide and background
3046 matching_background: function (slideClass, bgClass) {
3047 var i, count, pattern, result;
3049 // define pattern as regular expression
3052 // check background class names
3053 result = bgClass.match(pattern);
3055 for (i = count =
0; i < result.length; i++)
3057 if (result[i] ==
"hidden")
3060 if (result[i] ==
"background")
3066 if (count ==
0) // default match
3069 // check for matches and place result in array
3070 result = slideClass.match(pattern);
3072 // now check if desired name is present for background
3073 for (i = count =
0; i < result.length; i++)
3075 if (result[i] ==
"hidden")
3078 if (this.has_token(bgClass, result[i]))
3085 resized: function () {
3088 if ( typeof( window.innerWidth ) == 'number' )
3089 width = window.innerWidth; // Non IE browser
3090 else if (document.documentElement && document.documentElement.clientWidth)
3091 width = document.documentElement.clientWidth; // IE6
3092 else if (document.body && document.body.clientWidth)
3093 width = document.body.clientWidth; // IE4
3097 if ( typeof( window.innerHeight ) == 'number' )
3098 height = window.innerHeight; // Non IE browser
3099 else if (document.documentElement && document.documentElement.clientHeight)
3100 height = document.documentElement.clientHeight; // IE6
3101 else if (document.body && document.body.clientHeight)
3102 height = document.body.clientHeight; // IE4
3104 if (height && (width/height
> 1.05*
1024/
768))
3106 width = height *
1024.0/
768;
3109 // IE fires onresize even when only font size is changed!
3110 // so we do a check to avoid blocking < and
> actions
3111 if (width != w3c_slidy.last_width || height != w3c_slidy.last_height)
3114 w3c_slidy.size_index =
5; //
4
3115 else if (width
>=
1000)
3116 w3c_slidy.size_index =
4; //
3
3117 else if (width
>=
800)
3118 w3c_slidy.size_index =
3; //
2
3119 else if (width
>=
600)
3120 w3c_slidy.size_index =
2; //
1
3122 w3c_slidy.size_index =
0;
3124 // add in font size adjustment from meta element e.g.
3125 //
<meta name=
"font-size-adjustment" content=
"-2" />
3126 // useful when slides have too much content ;-)
3128 if (
0 <= w3c_slidy.size_index + w3c_slidy.size_adjustment &&
3129 w3c_slidy.size_index + w3c_slidy.size_adjustment < w3c_slidy.sizes.length)
3130 w3c_slidy.size_index = w3c_slidy.size_index + w3c_slidy.size_adjustment;
3132 // enables cross browser use of relative width/height
3133 // on object elements for use with SVG and Flash media
3134 w3c_slidy.adjust_object_dimensions(width, height);
3136 if (document.body.style.fontSize != w3c_slidy.sizes[w3c_slidy.size_index])
3138 document.body.style.fontSize = w3c_slidy.sizes[w3c_slidy.size_index];
3141 w3c_slidy.last_width = width;
3142 w3c_slidy.last_height = height;
3144 // force reflow to work around Mozilla bug
3145 if (w3c_slidy.ns_pos)
3147 var slide = w3c_slidy.slides[w3c_slidy.slide_number];
3148 w3c_slidy.hide_slide(slide);
3149 w3c_slidy.show_slide(slide);
3152 // force correct positioning of toolbar
3153 w3c_slidy.refresh_toolbar(
200);
3157 scrolled: function () {
3158 if (w3c_slidy.toolbar && !w3c_slidy.ns_pos && !w3c_slidy.ie7)
3160 w3c_slidy.hack_offset = w3c_slidy.scroll_x_offset();
3162 w3c_slidy.toolbar.style.display =
"none";
3164 // make it reappear later
3165 if (w3c_slidy.scrollhack ==
0 && !w3c_slidy.view_all)
3167 setTimeout(function () {w3c_slidy.show_toolbar(); },
1000);
3168 w3c_slidy.scrollhack =
1;
3173 hide_toolbar: function () {
3174 w3c_slidy.add_class(w3c_slidy.toolbar,
"hidden");
3178 // used to ensure IE refreshes toolbar in correct position
3179 refresh_toolbar: function (interval) {
3180 if (!w3c_slidy.ns_pos && !w3c_slidy.ie7)
3182 w3c_slidy.hide_toolbar();
3183 setTimeout(function () {w3c_slidy.show_toolbar(); }, interval);
3187 // restores toolbar after short delay
3188 show_toolbar: function () {
3189 if (w3c_slidy.want_toolbar)
3191 w3c_slidy.toolbar.style.display =
"block";
3193 if (!w3c_slidy.ns_pos)
3195 // adjust position to allow for scrolling
3196 var xoffset = w3c_slidy.scroll_x_offset();
3197 w3c_slidy.toolbar.style.left = xoffset;
3198 w3c_slidy.toolbar.style.right = xoffset;
3200 // determine vertical scroll offset
3201 //var yoffset = scrollYOffset();
3203 // bottom is doc height - window height - scroll offset
3204 //var bottom = documentHeight() - lastHeight - yoffset
3206 //if (yoffset
> 0 || documentHeight()
> lastHeight)
3207 // bottom +=
16; // allow for height of scrollbar
3209 w3c_slidy.toolbar.style.bottom =
0; //bottom;
3212 w3c_slidy.remove_class(w3c_slidy.toolbar,
"hidden");
3215 w3c_slidy.scrollhack =
0;
3218 // set the keyboard focus to the help link on the
3219 // toolbar to ensure that document has the focus
3220 // IE doesn't always work with window.focus()
3221 // and this hack has benefit of Enter for help
3225 if (!w3c_slidy.opera)
3226 w3c_slidy.help_anchor.focus();
3233 // invoked via F key
3234 toggle_toolbar: function () {
3235 if (!w3c_slidy.view_all)
3237 if (w3c_slidy.has_class(w3c_slidy.toolbar,
"hidden"))
3239 w3c_slidy.remove_class(w3c_slidy.toolbar,
"hidden")
3240 w3c_slidy.want_toolbar =
1;
3244 w3c_slidy.add_class(w3c_slidy.toolbar,
"hidden")
3245 w3c_slidy.want_toolbar =
0;
3250 scroll_x_offset: function () {
3251 if (window.pageXOffset)
3252 return self.pageXOffset;
3254 if (document.documentElement &&
3255 document.documentElement.scrollLeft)
3256 return document.documentElement.scrollLeft;
3259 return document.body.scrollLeft;
3264 scroll_y_offset: function () {
3265 if (window.pageYOffset)
3266 return self.pageYOffset;
3268 if (document.documentElement &&
3269 document.documentElement.scrollTop)
3270 return document.documentElement.scrollTop;
3273 return document.body.scrollTop;
3278 // looking for a way to determine height of slide content
3279 // the slide itself is set to the height of the window
3280 optimize_font_size: function () {
3281 var slide = w3c_slidy.slides[w3c_slidy.slide_number];
3283 //var dh = documentHeight(); //getDocHeight(document);
3284 var dh = slide.scrollHeight;
3285 var wh = getWindowHeight();
3286 var u =
100 * dh / wh;
3288 alert(
"window utilization = " + u +
"% (doc "
3289 + dh +
" win " + wh +
")");
3292 // from document object
3293 get_doc_height: function (doc) {
3297 if (doc && doc.body && doc.body.offsetHeight)
3298 return doc.body.offsetHeight; // ns/gecko syntax
3300 if (doc && doc.body && doc.body.scrollHeight)
3301 return doc.body.scrollHeight;
3303 alert(
"couldn't determine document height");
3306 get_window_height: function () {
3307 if ( typeof( window.innerHeight ) == 'number' )
3308 return window.innerHeight; // Non IE browser
3310 if (document.documentElement && document.documentElement.clientHeight)
3311 return document.documentElement.clientHeight; // IE6
3313 if (document.body && document.body.clientHeight)
3314 return document.body.clientHeight; // IE4
3317 document_height: function () {
3320 sh = document.body.scrollHeight;
3321 oh = document.body.offsetHeight;
3325 return (sh
> oh ? sh : oh);
3332 smaller: function () {
3333 if (w3c_slidy.size_index
> 0)
3335 --w3c_slidy.size_index;
3338 w3c_slidy.toolbar.style.display =
"none";
3339 document.body.style.fontSize = w3c_slidy.sizes[w3c_slidy.size_index];
3340 var slide = w3c_slidy.slides[w3c_slidy.slide_number];
3341 w3c_slidy.hide_slide(slide);
3342 w3c_slidy.show_slide(slide);
3343 setTimeout(function () {w3c_slidy.show_toolbar(); },
50);
3346 bigger: function () {
3347 if (w3c_slidy.size_index < w3c_slidy.sizes.length -
1)
3349 ++w3c_slidy.size_index;
3352 w3c_slidy.toolbar.style.display =
"none";
3353 document.body.style.fontSize = w3c_slidy.sizes[w3c_slidy.size_index];
3354 var slide = w3c_slidy.slides[w3c_slidy.slide_number];
3355 w3c_slidy.hide_slide(slide);
3356 w3c_slidy.show_slide(slide);
3357 setTimeout(function () {w3c_slidy.show_toolbar(); },
50);
3360 // enables cross browser use of relative width/height
3361 // on object elements for use with SVG and Flash media
3362 // with thanks to Ivan Herman for the suggestion
3363 adjust_object_dimensions: function (width, height) {
3364 for( var i =
0; i < w3c_slidy.objects.length; i++ )
3366 var obj = this.objects[i];
3367 var mimeType = obj.getAttribute(
"type");
3369 if (mimeType ==
"image/svg+xml" || mimeType ==
"application/x-shockwave-flash")
3371 if ( !obj.initialWidth )
3372 obj.initialWidth = obj.getAttribute(
"width");
3374 if ( !obj.initialHeight )
3375 obj.initialHeight = obj.getAttribute(
"height");
3377 if ( obj.initialWidth && obj.initialWidth.charAt(obj.initialWidth.length-
1) ==
"%" )
3379 var w = parseInt(obj.initialWidth.slice(
0, obj.initialWidth.length-
1));
3380 var newW = width * (w/
100.0);
3381 obj.setAttribute(
"width",newW);
3384 if ( obj.initialHeight &&
3385 obj.initialHeight.charAt(obj.initialHeight.length-
1) ==
"%" )
3387 var h = parseInt(obj.initialHeight.slice(
0, obj.initialHeight.length-
1));
3388 var newH = height * (h/
100.0);
3389 obj.setAttribute(
"height", newH);
3395 // needed for Opera to inhibit default behavior
3396 // since Opera delivers keyPress even if keyDown
3398 key_press: function (event) {
3400 event = window.event;
3402 if (!w3c_slidy.key_wanted)
3403 return w3c_slidy.cancel(event);
3408 // See e.g. http://www.quirksmode.org/js/events/keys.html for keycodes
3409 key_down: function (event) {
3410 var key, target, tag;
3412 w3c_slidy.key_wanted = true;
3415 event = window.event;
3417 // kludge around NS/IE differences
3420 key = window.event.keyCode;
3421 target = window.event.srcElement;
3423 else if (event.which)
3426 target = event.target;
3429 return true; // Yikes! unknown browser
3431 // ignore event if key value is zero
3432 // as for alt on Opera and Konqueror
3436 // avoid interfering with keystroke
3437 // behavior for non-slidy chrome elements
3438 if (!w3c_slidy.slidy_chrome(target) &&
3439 w3c_slidy.special_element(target))
3442 // check for concurrent control/command/alt key
3443 // but are these only present on mouse events?
3445 if (event.ctrlKey || event.altKey || event.metaKey)
3448 // dismiss table of contents if visible
3449 if (w3c_slidy.is_shown_toc() && key !=
9 && key !=
16 && key !=
38 && key !=
40)
3451 w3c_slidy.hide_table_of_contents(true);
3453 if (key ==
27 || key ==
84 || key ==
67)
3454 return w3c_slidy.cancel(event);
3457 if (key ==
34) // Page Down
3459 if (w3c_slidy.view_all)
3462 w3c_slidy.next_slide(false);
3463 return w3c_slidy.cancel(event);
3465 else if (key ==
33) // Page Up
3467 if (w3c_slidy.view_all)
3470 w3c_slidy.previous_slide(false);
3471 return w3c_slidy.cancel(event);
3473 else if (key ==
32) // space bar
3475 w3c_slidy.next_slide(true);
3476 return w3c_slidy.cancel(event);
3478 else if (key ==
37) // Left arrow
3480 w3c_slidy.previous_slide(!event.shiftKey);
3481 return w3c_slidy.cancel(event);
3483 else if (key ==
36) // Home
3485 w3c_slidy.first_slide();
3486 return w3c_slidy.cancel(event);
3488 else if (key ==
35) // End
3490 w3c_slidy.last_slide();
3491 return w3c_slidy.cancel(event);
3493 else if (key ==
39) // Right arrow
3495 w3c_slidy.next_slide(!event.shiftKey);
3496 return w3c_slidy.cancel(event);
3498 else if (key ==
13) // Enter
3500 if (w3c_slidy.outline)
3502 if (w3c_slidy.outline.visible)
3503 w3c_slidy.fold(w3c_slidy.outline);
3505 w3c_slidy.unfold(w3c_slidy.outline);
3507 return w3c_slidy.cancel(event);
3510 else if (key ==
188) // < for smaller fonts
3512 w3c_slidy.smaller();
3513 return w3c_slidy.cancel(event);
3515 else if (key ==
190) //
> for larger fonts
3518 return w3c_slidy.cancel(event);
3520 else if (key ==
189 || key ==
109) // - for smaller fonts
3522 w3c_slidy.smaller();
3523 return w3c_slidy.cancel(event);
3525 else if (key ==
187 || key ==
191 || key ==
107) // = + for larger fonts
3528 return w3c_slidy.cancel(event);
3530 else if (key ==
83) // S for smaller fonts
3532 w3c_slidy.smaller();
3533 return w3c_slidy.cancel(event);
3535 else if (key ==
66) // B for larger fonts
3538 return w3c_slidy.cancel(event);
3540 else if (key ==
90) // Z for last slide
3542 w3c_slidy.last_slide();
3543 return w3c_slidy.cancel(event);
3545 else if (key ==
70) // F for toggle toolbar
3547 w3c_slidy.toggle_toolbar();
3548 return w3c_slidy.cancel(event);
3550 else if (key ==
65) // A for toggle view single/all slides
3552 w3c_slidy.toggle_view();
3553 return w3c_slidy.cancel(event);
3555 else if (key ==
75) // toggle action of left click for next page
3557 w3c_slidy.mouse_click_enabled = !w3c_slidy.mouse_click_enabled;
3558 var alert_msg = (w3c_slidy.mouse_click_enabled ?
3559 "enabled" :
"disabled") +
" mouse click advance";
3561 alert(w3c_slidy.localize(alert_msg));
3562 return w3c_slidy.cancel(event);
3564 else if (key ==
84 || key ==
67) // T or C for table of contents
3567 w3c_slidy.toggle_table_of_contents();
3569 return w3c_slidy.cancel(event);
3571 else if (key ==
72) // H for help
3573 window.location = w3c_slidy.help_page;
3574 return w3c_slidy.cancel(event);
3577 else if (key ==
73) // I to toggle incremental display
3579 var slide = w3c_slidy.slides[w3c_slidy.slide_number];
3580 w3c_slidy.hide_slide(slide);
3581 if (w3c_slidy.incremental_display) { w3c_slidy.set_visibility_all_incremental(
"visible"); }
3582 w3c_slidy.incremental_display = !w3c_slidy.incremental_display ;
3583 w3c_slidy.last_shown = null ;
3584 w3c_slidy.set_visibility_all_incremental(
"hidden");
3585 //this.set_eos_status(true);
3586 w3c_slidy.show_slide(slide);
3587 return w3c_slidy.cancel(event);
3589 else if (key ==
76) // L to toggle color-set
3591 w3c_slidy.toggle_color_set();
3592 return w3c_slidy.cancel(event);
3594 else if (key ==
77) // display help_keymap
3596 alert(w3c_slidy.help_keymap);
3597 return w3c_slidy.cancel(event);
3600 //else alert(
"key code is "+ key);
3604 // safe for both text/html and application/xhtml+xml
3605 create_element: function (name) {
3606 if (this.xhtml && (typeof document.createElementNS != 'undefined'))
3607 return document.createElementNS(
"http://www.w3.org/1999/xhtml", name)
3609 return document.createElement(name);
3612 get_element_style: function (elem, IEStyleProp, CSSStyleProp) {
3613 if (elem.currentStyle)
3615 return elem.currentStyle[IEStyleProp];
3617 else if (window.getComputedStyle)
3619 var compStyle = window.getComputedStyle(elem,
"");
3620 return compStyle.getPropertyValue(CSSStyleProp);
3625 // the string str is a whitespace separated list of tokens
3626 // test if str contains a particular token, e.g.
"slide"
3627 has_token: function (str, token) {
3630 // define pattern as regular expression
3631 var pattern = /\w+/g;
3633 // check for matches
3634 // place result in array
3635 var result = str.match(pattern);
3637 // now check if desired token is present
3638 for (var i =
0; i < result.length; i++)
3640 if (result[i] == token)
3648 get_class_list: function (element) {
3649 if (typeof element.className != 'undefined')
3650 return element.className;
3652 return element.getAttribute(
"class");
3655 has_class: function (element, name) {
3656 if (element.nodeType !=
1)
3659 var regexp = new RegExp(
"(^| )" + name +
"\W*");
3661 if (typeof element.className != 'undefined')
3662 return regexp.test(element.className);
3664 return regexp.test(element.getAttribute(
"class"));
3667 remove_class: function (element, name) {
3668 var regexp = new RegExp(
"(^| )" + name +
"\W*");
3671 if (typeof element.className != 'undefined')
3673 clsval = element.className;
3677 clsval = clsval.replace(regexp,
"");
3678 element.className = clsval;
3683 clsval = element.getAttribute(
"class");
3687 clsval = clsval.replace(regexp,
"");
3688 element.setAttribute(
"class", clsval);
3693 add_class: function (element, name) {
3694 if (!this.has_class(element, name))
3696 if (typeof element.className != 'undefined')
3697 element.className +=
" " + name;
3700 var clsval = element.getAttribute(
"class");
3701 clsval = clsval ? clsval +
" " + name : name;
3702 element.setAttribute(
"class", clsval);
3707 // HTML elements that can be used with
class=
"incremental"
3708 // note that you can also put the class on containers like
3709 // up, ol, dl, and div to make their contents appear
3710 // incrementally. Upper case is used since this is what
3711 // browsers report for HTML node names (text/html).
3712 incremental_elements: null,
3713 okay_for_incremental: function (name) {
3714 if (!this.incremental_elements)
3716 var inclist = new Array();
3717 inclist[
"p"] = true;
3718 inclist[
"pre"] = true;
3719 inclist[
"li"] = true;
3720 inclist[
"blockquote"] = true;
3721 inclist[
"dt"] = true;
3722 inclist[
"dd"] = true;
3723 inclist[
"h2"] = true;
3724 inclist[
"h3"] = true;
3725 inclist[
"h4"] = true;
3726 inclist[
"h5"] = true;
3727 inclist[
"h6"] = true;
3728 inclist[
"span"] = true;
3729 inclist[
"address"] = true;
3730 inclist[
"table"] = true;
3731 inclist[
"tr"] = true;
3732 inclist[
"th"] = true;
3733 inclist[
"td"] = true;
3734 inclist[
"img"] = true;
3735 inclist[
"object"] = true;
3736 this.incremental_elements = inclist;
3738 return this.incremental_elements[name.toLowerCase()];
3741 next_incremental_item: function (node) {
3742 var br = this.is_xhtml ?
"br" :
"BR";
3743 var slide = w3c_slidy.slides[w3c_slidy.slide_number];
3747 node = w3c_slidy.next_node(slide, node);
3749 if (node == null || node.parentNode == null)
3752 if (node.nodeType ==
1) // ELEMENT
3754 if (node.nodeName == br)
3757 if (w3c_slidy.has_class(node,
"incremental")
3758 && w3c_slidy.okay_for_incremental(node.nodeName))
3761 if (w3c_slidy.has_class(node.parentNode,
"incremental")
3762 && !w3c_slidy.has_class(node,
"non-incremental"))
3770 previous_incremental_item: function (node) {
3771 var br = this.is_xhtml ?
"br" :
"BR";
3772 var slide = w3c_slidy.slides[w3c_slidy.slide_number];
3776 node = w3c_slidy.previous_node(slide, node);
3778 if (node == null || node.parentNode == null)
3781 if (node.nodeType ==
1)
3783 if (node.nodeName == br)
3786 if (w3c_slidy.has_class(node,
"incremental")
3787 && w3c_slidy.okay_for_incremental(node.nodeName))
3790 if (w3c_slidy.has_class(node.parentNode,
"incremental")
3791 && !w3c_slidy.has_class(node,
"non-incremental"))
3799 // set visibility for all elements on current slide with
3800 // a parent element with attribute
class=
"incremental"
3801 set_visibility_all_incremental: function (value) {
3802 var node = this.next_incremental_item(null);
3805 if (!w3c_slidy.incremental_display) {value =
"visible";}
3807 if (value ==
"hidden")
3811 w3c_slidy.add_class(node,
"invisible");
3812 node = w3c_slidy.next_incremental_item(node);
3815 else // value ==
"visible"
3819 w3c_slidy.remove_class(node,
"invisible");
3820 node = w3c_slidy.next_incremental_item(node);
3825 // reveal the next hidden item on the slide
3826 // node is null or the node that was last revealed
3827 reveal_next_item: function (node) {
3828 node = w3c_slidy.next_incremental_item(node);
3830 if (node && node.nodeType ==
1) // an element
3831 w3c_slidy.remove_class(node,
"invisible");
3836 // exact inverse of revealNextItem(node)
3837 hide_previous_item: function (node) {
3838 if (node && node.nodeType ==
1) // an element
3839 w3c_slidy.add_class(node,
"invisible");
3841 return this.previous_incremental_item(node);
3844 // left to right traversal of root's content
3845 next_node: function (root, node) {
3847 return root.firstChild;
3849 if (node.firstChild)
3850 return node.firstChild;
3852 if (node.nextSibling)
3853 return node.nextSibling;
3857 node = node.parentNode;
3859 if (!node || node == root)
3862 if (node && node.nextSibling)
3863 return node.nextSibling;
3869 // right to left traversal of root's content
3870 previous_node: function (root, node) {
3873 node = root.lastChild;
3877 while (node.lastChild)
3878 node = node.lastChild;
3884 if (node.previousSibling)
3886 node = node.previousSibling;
3888 while (node.lastChild)
3889 node = node.lastChild;
3894 if (node.parentNode != root)
3895 return node.parentNode;
3900 previous_sibling_element: function (el) {
3901 el = el.previousSibling;
3903 while (el && el.nodeType !=
1)
3904 el = el.previousSibling;
3909 next_sibling_element: function (el) {
3910 el = el.nextSibling;
3912 while (el && el.nodeType !=
1)
3913 el = el.nextSibling;
3918 first_child_element: function (el) {
3921 for (node = el.firstChild; node; node = node.nextSibling)
3923 if (node.nodeType ==
1)
3930 first_tag: function (element, tag) {
3934 tag = tag.toUpperCase();
3936 for (node = element.firstChild; node; node = node.nextSibling)
3938 if (node.nodeType ==
1 && node.nodeName == tag)
3945 hide_selection: function () {
3946 if (window.getSelection) // Firefox, Chromium, Safari, Opera
3948 var selection = window.getSelection();
3950 if (selection.rangeCount
> 0)
3952 var range = selection.getRangeAt(
0);
3953 range.collapse (false);
3956 else // Internet Explorer
3958 var textRange = document.selection.createRange ();
3959 textRange.collapse (false);
3963 get_selected_text: function () {
3966 if (window.getSelection)
3967 return window.getSelection().toString();
3969 if (document.getSelection)
3970 return document.getSelection().toString();
3972 if (document.selection)
3973 return document.selection.createRange().text;
3982 // make note of length of selected text
3983 // as this evaluates to zero in click event
3984 mouse_button_up: function (e) {
3985 w3c_slidy.selected_text_len = w3c_slidy.get_selected_text().length;
3988 // right mouse button click is reserved for context menus
3989 // it is more reliable to detect rightclick than leftclick
3990 mouse_button_click: function (e) {
3991 var rightclick = false;
3992 var leftclick = false;
3993 var middleclick = false;
3997 var e = window.event;
4001 else if (e.srcElement)
4002 target = e.srcElement;
4004 // work around Safari bug
4005 if (target.nodeType ==
3)
4006 target = target.parentNode;
4008 if (e.which) // all browsers except IE
4010 leftclick = (e.which ==
1);
4011 middleclick = (e.which ==
2);
4012 rightclick = (e.which ==
3);
4016 // Konqueror gives
1 for left,
4 for middle
4017 // IE6 gives
0 for left and not
1 as I expected
4022 // all browsers agree on
2 for right button
4023 rightclick = (e.button ==
2);
4028 if (w3c_slidy.selected_text_len
> 0)
4030 w3c_slidy.stop_propagation(e);
4032 e.returnValue = false;
4036 // dismiss table of contents
4037 w3c_slidy.hide_table_of_contents(false);
4039 // check if target is something that probably want's clicks
4040 // e.g. a, embed, object, input, textarea, select, option
4041 var tag = target.nodeName.toLowerCase();
4043 if (w3c_slidy.mouse_click_enabled && leftclick &&
4044 !w3c_slidy.special_element(target) &&
4047 w3c_slidy.next_slide(true);
4048 w3c_slidy.stop_propagation(e);
4050 e.returnValue = false;
4057 special_element: function (e) {
4058 var tag = e.nodeName.toLowerCase();
4060 return e.onkeydown ||
4068 tag ==
"textarea" ||
4073 slidy_chrome: function (el) {
4076 if (el == w3c_slidy.toc ||
4077 el == w3c_slidy.toolbar ||
4078 w3c_slidy.has_class(el,
"outline"))
4087 get_key: function (e)
4091 // kludge around NS/IE differences
4092 if (typeof window.event !=
"undefined")
4093 key = window.event.keyCode;
4100 get_target: function (e) {
4108 else if (e.srcElement)
4109 target = e.srcElement;
4111 if (target.nodeType !=
1)
4112 target = target.parentNode;
4117 // does display property provide correct defaults?
4118 is_block: function (elem) {
4119 var tag = elem.nodeName.toLowerCase();
4121 return tag ==
"ol" || tag ==
"ul" || tag ==
"p" ||
4122 tag ==
"li" || tag ==
"table" || tag ==
"pre" ||
4123 tag ==
"h1" || tag ==
"h2" || tag ==
"h3" ||
4124 tag ==
"h4" || tag ==
"h5" || tag ==
"h6" ||
4125 tag ==
"blockquote" || tag ==
"address";
4128 add_listener: function (element, event, handler) {
4129 if (window.addEventListener)
4130 element.addEventListener(event, handler, false);
4132 element.attachEvent(
"on"+event, handler);
4135 // used to prevent event propagation from field controls
4136 stop_propagation: function (event) {
4137 event = event ? event : window.event;
4138 event.cancelBubble = true; // for IE
4140 if (event.stopPropagation)
4141 event.stopPropagation();
4146 cancel: function (event) {
4149 event.cancel = true;
4150 event.returnValue = false;
4152 if (event.preventDefault)
4153 event.preventDefault();
4156 w3c_slidy.key_wanted = false;
4160 init_color_sets: function(){
4161 if (this.color_sets.length ==
0){
4162 // initialize color_sets array
4163 var tmp = document.styleSheets;
4165 for (var i=
0;i
<tmp.length;i++) {
4166 var css_name = null ;
4168 css_name = tmp[i].title ;
4170 if ((tmp[i].href) && (tmp[i].href.indexOf('.css') != -
1)) {
4171 css_name = tmp[i].href.substring(tmp[i].href.lastIndexOf('/')+
1,tmp[i].href.indexOf('.css')) ;
4173 if ((css_name) && (css_name.indexOf('color_set')
> 0)) {
4174 this.color_sets[j] = tmp[i];
4175 this.color_sets[j++].disabled = true;
4178 if (this.color_sets.length
> 0){ this.color_sets[
0].disabled = false; }
4181 toggle_color_set: function(){
4182 // toggle to the next color_set
4183 if (this.color_sets.length
> 0){
4185 while ((i < this.color_sets.length) && (this.color_sets[i].disabled == true)) { i = i +
1 ; }
4186 if (i == this.color_sets.length) { i = i -
1; }
4187 this.color_sets[i].disabled = true ;
4188 this.color_sets[(i +
1) % (this.color_sets.length)].disabled = false ;
4192 // for each language define an associative array
4193 // and also the help text which is longer
4198 "contents?":
"Índice",
4199 "table of contents":
"tabla de contenidos",
4200 "Table of Contents":
"Tabla de Contenidos",
4201 "restart presentation":
"Reiniciar presentación",
4205 "Utilice el ratón, barra espaciadora, teclas Izda/Dcha, " +
4206 "o Re pág y Av pág. Use S y B para cambiar el tamaño de fuente.",
4211 "contents?":
"Índex",
4212 "table of contents":
"taula de continguts",
4213 "Table of Contents":
"Taula de Continguts",
4214 "restart presentation":
"Reiniciar presentació",
4218 "Utilitzi el ratolí, barra espaiadora, tecles Esq./Dta. " +
4219 "o Re pàg y Av pàg. Usi S i B per canviar grandària de font.",
4224 "contents?":
"obsah",
4225 "table of contents":
"obsah prezentace",
4226 "Table of Contents":
"Obsah prezentace",
4227 "restart presentation":
"znovu spustit prezentaci",
4228 "restart?":
"restart"
4231 "Prezentaci můžete procházet pomocí kliknutí myši, mezerníku, " +
4232 "šipek vlevo a vpravo nebo kláves PageUp a PageDown. Písmo se " +
4233 "dá zvětšit a zmenšit pomocí kláves B a S.",
4238 "contents?":
"Inhoud?",
4239 "table of contents":
"inhoudsopgave",
4240 "Table of Contents":
"Inhoudsopgave",
4241 "restart presentation":
"herstart presentatie",
4242 "restart?":
"Herstart?"
4245 "Navigeer d.m.v. het muis, spatiebar, Links/Rechts toetsen, " +
4246 "of PgUp en PgDn. Gebruik S en B om de karaktergrootte te veranderen.",
4251 "contents?":
"Übersicht",
4252 "table of contents":
"Inhaltsverzeichnis",
4253 "Table of Contents":
"Inhaltsverzeichnis",
4254 "restart presentation":
"Präsentation neu starten",
4255 "restart?":
"Neustart"
4258 "Benutzen Sie die Maus, Leerschlag, die Cursortasten links/rechts oder " +
4259 "Page up/Page Down zum Wechseln der Seiten und S und B für die Schriftgrösse.",
4264 "contents?":
"spis treści?",
4265 "table of contents":
"spis treści",
4266 "Table of Contents":
"Spis Treści",
4267 "restart presentation":
"Restartuj prezentację",
4268 "restart?":
"restart?"
4271 "Zmieniaj slajdy klikając myszą, naciskając spację, strzałki lewo/prawo" +
4272 "lub PgUp / PgDn. Użyj klawiszy S i B, aby zmienić rozmiar czczionki.",
4277 "contents?":
"Index",
4278 "table of contents":
"table des matières",
4279 "Table of Contents":
"Table des matières",
4280 "restart presentation":
"Recommencer l'exposé",
4284 "Naviguez avec la souris, la barre d'espace, les flèches " +
4285 "gauche/droite ou les touches Pg Up, Pg Dn. Utilisez " +
4286 "les touches S et B pour modifier la taille de la police, M pour l'association des touches.",
4291 "contents?":
"tartalom",
4292 "table of contents":
"tartalomjegyzék",
4293 "Table of Contents":
"Tartalomjegyzék",
4294 "restart presentation":
"bemutató újraindítása",
4295 "restart?":
"újraindítás"
4298 "Az oldalak közti lépkedéshez kattintson az egérrel, vagy " +
4299 "használja a szóköz, a bal, vagy a jobb nyíl, illetve a Page Down, " +
4300 "Page Up billentyűket. Az S és a B billentyűkkel változtathatja " +
4301 "a szöveg méretét.",
4306 "contents?":
"Indice",
4307 "table of contents":
"indice",
4308 "Table of Contents":
"Indice",
4309 "restart presentation":
"Ricominciare la presentazione",
4313 "Navigare con mouse, barra spazio, frecce sinistra/destra o " +
4314 "PgUp e PgDn. Usare S e B per cambiare la dimensione dei caratteri.",
4319 "contents?":
"περιεχόμενα;",
4320 "table of contents":
"πίνακας περιεχομένων",
4321 "Table of Contents":
"Πίνακας Περιεχομένων",
4322 "restart presentation":
"επανεκκίνηση παρουσίασης",
4323 "restart?":
"επανεκκίνηση;"
4326 "Πλοηγηθείτε με το κλίκ του ποντικιού, το space, τα βέλη αριστερά/δεξιά, " +
4327 "ή Page Up και Page Down. Χρησιμοποιήστε τα πλήκτρα S και B για να αλλάξετε " +
4328 "το μέγεθος της γραμματοσειράς.",
4334 "table of contents":
"目次を表示",
4335 "Table of Contents":
"目次",
4336 "restart presentation":
"最初から再生",
4340 "マウス左クリック ・ スペース ・ 左右キー " +
4341 "または Page Up ・ Page Downで操作, S ・ Bでフォントサイズ変更",
4347 "table of contents":
"目录",
4348 "Table of Contents":
"目录",
4349 "restart presentation":
"重新启动展示",
4353 "用鼠标点击, 空格条, 左右箭头, Pg Up 和 Pg Dn 导航. " +
4359 "contents?":
"содержание?",
4360 "table of contents":
"оглавление",
4361 "Table of Contents":
"Оглавление",
4362 "restart presentation":
"перезапустить презентацию",
4363 "restart?":
"перезапуск?"
4366 "Перемещайтесь кликая мышкой, используя клавишу пробел, стрелки" +
4367 "влево/вправо или Pg Up и Pg Dn. Клавиши S и B меняют размер шрифта.",
4372 "contents?":
"innehåll",
4373 "table of contents":
"innehållsförteckning",
4374 "Table of Contents":
"Innehållsförteckning",
4375 "restart presentation":
"visa presentationen från början",
4376 "restart?":
"börja om"
4379 "Bläddra med ett klick med vänstra musknappen, mellanslagstangenten, " +
4380 "vänster- och högerpiltangenterna eller tangenterna Pg Up, Pg Dn. " +
4381 "Använd tangenterna S och B för att ändra textens storlek.",
4385 localize: function (src) {
4389 // try full language code, e.g. en-US
4390 var s, lookup = w3c_slidy.strings[w3c_slidy.lang];
4400 // strip country code suffix, e.g.
4401 // try en if undefined for en-US
4402 var lg = w3c_slidy.lang.split(
"-");
4406 lookup = w3c_slidy.strings[lg[
0]];
4417 // otherwise string as is
4421 init_localization: function () {
4422 var i18n = w3c_slidy;
4423 var help_text = w3c_slidy.help_text;
4425 // each such language array is declared in the localize array
4426 // this is used as in w3c_slidy.localize(
"foo");
4428 "es":this.strings_es,
4429 "ca":this.strings_ca,
4430 "cs":this.strings_cs,
4431 "nl":this.strings_nl,
4432 "de":this.strings_de,
4433 "pl":this.strings_pl,
4434 "fr":this.strings_fr,
4435 "hu":this.strings_hu,
4436 "it":this.strings_it,
4437 "el":this.strings_el,
4438 "jp":this.strings_ja,
4439 "zh":this.strings_zh,
4440 "ru":this.strings_ru,
4441 "sv":this.strings_sv
4444 i18n.strings_es[help_text] = i18n.help_es;
4445 i18n.strings_ca[help_text] = i18n.help_ca;
4446 i18n.strings_cs[help_text] = i18n.help_cs;
4447 i18n.strings_nl[help_text] = i18n.help_nl;
4448 i18n.strings_de[help_text] = i18n.help_de;
4449 i18n.strings_pl[help_text] = i18n.help_pl;
4450 i18n.strings_fr[help_text] = i18n.help_fr;
4451 i18n.strings_hu[help_text] = i18n.help_hu;
4452 i18n.strings_it[help_text] = i18n.help_it;
4453 i18n.strings_el[help_text] = i18n.help_el;
4454 i18n.strings_ja[help_text] = i18n.help_ja;
4455 i18n.strings_zh[help_text] = i18n.help_zh;
4456 i18n.strings_ru[help_text] = i18n.help_ru;
4457 i18n.strings_sv[help_text] = i18n.help_sv;
4459 w3c_slidy.lang = document.body.parentNode.getAttribute(
"lang");
4461 if (!w3c_slidy.lang)
4462 w3c_slidy.lang = document.body.parentNode.getAttribute(
"xml:lang");
4464 if (!w3c_slidy.lang)
4465 w3c_slidy.lang =
"en";
4469 // hack for back button behavior
4470 if (w3c_slidy.ie6 || w3c_slidy.ie7)
4472 document.write(
"<iframe id='historyFrame' " +
4473 "src='javascript:\"<html"+"></
"+"html
>\
"' " +
4474 "height='1' width='1' " +
4475 "style='position:absolute;left:-800px'></iframe>");
4478 // attach event listeners for initialization
4481 // hide the slides as soon as body element is available
4482 // to reduce annoying screen mess before the onload event
4483 setTimeout(w3c_slidy.hide_slides,
50);
4487 <script type=
"text/javascript">
4493 This file, in this form, is due to Douglas Woodall, June
2006.
4494 It contains JavaScript functions to convert (most simple) LaTeX
4495 math notation to Presentation MathML. It was obtained by
4496 downloading the file ASCIIMathML.js from
4497 http://www1.chapman.edu/~jipsen/mathml/asciimathdownload/
4498 and modifying it so that it carries out ONLY those conversions
4499 that would be carried out in LaTeX. A description of the original
4500 file, with examples, can be found at
4501 www1.chapman.edu/~jipsen/mathml/asciimath.html
4502 ASCIIMathML: Math on the web for everyone
4504 Here is the header notice from the original file:
4508 This file contains JavaScript functions to convert ASCII math notation
4509 to Presentation MathML. The conversion is done while the (X)HTML page
4510 loads, and should work with Firefox/Mozilla/Netscape
7+ and Internet
4511 Explorer
6+MathPlayer (http://www.dessci.com/en/products/mathplayer/).
4512 Just add the next line to your (X)HTML page with this file in the same folder:
4513 (script
type=
"text/javascript" src=
"ASCIIMathML.js")(/script)
4514 This is a convenient and inexpensive solution for authoring MathML.
4516 Version
1.4.7 Dec
15,
2005, (c) Peter Jipsen http://www.chapman.edu/~jipsen
4517 Latest version at http://www.chapman.edu/~jipsen/mathml/ASCIIMathML.js
4518 For changes see http://www.chapman.edu/~jipsen/mathml/asciimathchanges.txt
4519 If you use it on a webpage, please send the URL to jipsen@chapman.edu
4521 This program is free software; you can redistribute it and/or modify
4522 it under the terms of the GNU General Public License as published by
4523 the Free Software Foundation; either version
2 of the License, or (at
4524 your option) any later version.
4526 This program is distributed in the hope that it will be useful,
4527 but WITHOUT ANY WARRANTY; without even the implied warranty of
4528 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4529 General Public License (at http://www.gnu.org/copyleft/gpl.html)
4532 LaTeXMathML.js (ctd)
4535 The instructions for use are the same as for the original
4536 ASCIIMathML.js, except that of course the line you add to your
4538 (script
type=
"text/javascript" src=
"LaTeXMathML.js")(/script)
4539 Or use absolute path names if the file is not in the same folder
4540 as your (X)HTML page.
4543 var checkForMathML = true; // check if browser can display MathML
4544 var notifyIfNoMathML = true; // display note if no MathML capability
4545 var alertIfNoMathML = false; // show alert box if no MathML capability
4547 var mathcolor =
""; // change it to
"" (to inherit) or any other color
4549 var mathfontfamily =
""; // change to
"" to inherit (works in IE)
4550 // or another family (e.g.
"arial")
4551 var showasciiformulaonhover = true; // helps students learn ASCIIMath
4553 // Commented out by DRW -- not now used -- see DELIMITERS (twice) near the end
4554 var displaystyle = false; // puts limits above and below large operators
4555 var decimalsign =
"."; // change to
"," if you like, beware of `(
1,
2)`!
4556 var AMdelimiter1 =
"`", AMescape1 =
"\\\\`"; // can use other characters
4557 var AMdelimiter2 =
"$", AMescape2 =
"\\\\\\$", AMdelimiter2regexp =
"\\$";
4558 var doubleblankmathdelimiter = false; // if true, x+
1 is equal to `x+
1`
4559 // for IE this works only in
<!-- -->
4560 //var separatetokens;// has been removed (email me if this is a problem)
4562 var isIE = document.createElementNS==null;
4564 if (document.getElementById==null)
4565 alert(
"This webpage requires a recent browser such as \nMozilla/Netscape 7+ or Internet Explorer 6+MathPlayer")
4567 // all further global variables start with
"AM"
4569 function AMcreateElementXHTML(t) {
4570 if (isIE) return document.createElement(t);
4571 else return document.createElementNS(
"http://www.w3.org/1999/xhtml",t);
4574 function AMnoMathMLNote() {
4575 var nd = AMcreateElementXHTML(
"h3");
4576 nd.setAttribute(
"align",
"center")
4577 nd.appendChild(AMcreateElementXHTML(
"p"));
4578 nd.appendChild(document.createTextNode(
"To view the "));
4579 var an = AMcreateElementXHTML(
"a");
4580 an.appendChild(document.createTextNode(
"LaTeXMathML"));
4581 an.setAttribute(
"href",
"http://www.maths.nott.ac.uk/personal/drw/lm.html");
4583 nd.appendChild(document.createTextNode(
" notation use Internet Explorer 6+"));
4584 an = AMcreateElementXHTML(
"a");
4585 an.appendChild(document.createTextNode(
"MathPlayer"));
4586 an.setAttribute(
"href",
"http://www.dessci.com/en/products/mathplayer/download.htm");
4588 nd.appendChild(document.createTextNode(
" or Netscape/Mozilla/Firefox"));
4589 nd.appendChild(AMcreateElementXHTML(
"p"));
4593 function AMisMathMLavailable() {
4594 if (navigator.appName.slice(
0,
8)==
"Netscape")
4595 if (navigator.appVersion.slice(
0,
1)
>=
"5") return null;
4596 else return AMnoMathMLNote();
4597 else if (navigator.appName.slice(
0,
9)==
"Microsoft")
4599 var ActiveX = new ActiveXObject(
"MathPlayer.Factory.1");
4602 return AMnoMathMLNote();
4604 else return AMnoMathMLNote();
4607 // character lists for Mozilla/Netscape fonts
4608 var AMcal = [
"\uD835\uDC9C",
"\uD835\uDC9D",
"\uD835\uDC9E",
"\uD835\uDC9F",
"\uD835\uDCA0",
"\uD835\uDCA1",
"\uD835\uDCA2",
"\uD835\uDCA3",
"\uD835\uDCA4",
"\uD835\uDCA5",
"\uD835\uDCA6",
"\uD835\uDCA7",
"\uD835\uDCA8",
"\uD835\uDCA9",
"\uD835\uDCAA",
"\uD835\uDCAB",
"\uD835\uDCAC",
"\uD835\uDCAD",
"\uD835\uDCAE",
"\uD835\uDCAF",
"\uD835\uDCB0",
"\uD835\uDCB1",
"\uD835\uDCB2",
"\uD835\uDCB3",
"\uD835\uDCB4",
"\uD835\uDCB5"];
4609 var AMfrk = [
"\uD835\uDD04",
"\uD835\uDD05",
"\uD835\uDD06",
"\uD835\uDD07",
"\uD835\uDD08",
"\uD835\uDD09",
"\uD835\uDD0A",
"\uD835\uDD0B",
"\uD835\uDD0C",
"\uD835\uDD0D",
"\uD835\uDD0E",
"\uD835\uDD0F",
"\uD835\uDD10",
"\uD835\uDD11",
"\uD835\uDD12",
"\uD835\uDD13",
"\uD835\uDD14",
"\uD835\uDD15",
"\uD835\uDD16",
"\uD835\uDD17",
"\uD835\uDD18",
"\uD835\uDD19",
"\uD835\uDD1A",
"\uD835\uDD1B",
"\uD835\uDD1C",
"\uD835\uDD1D"];
4610 var AMbbb = [
"\uD835\uDD38",
"\uD835\uDD39",
"\uD835\uDD3A",
"\uD835\uDD3B",
"\uD835\uDD3C",
"\uD835\uDD3D",
"\uD835\uDD3E",
"\uD835\uDD3F",
"\uD835\uDD40",
"\uD835\uDD41",
"\uD835\uDD42",
"\uD835\uDD43",
"\uD835\uDD44",
"\uD835\uDD45",
"\uD835\uDD46",
"\uD835\uDD47",
"\uD835\uDD48",
"\uD835\uDD49",
"\uD835\uDD4A",
"\uD835\uDD4B",
"\uD835\uDD4C",
"\uD835\uDD4D",
"\uD835\uDD4E",
"\uD835\uDD4F",
"\uD835\uDD50",
"\uD835\uDD51"];
4612 var CONST =
0, UNARY =
1, BINARY =
2, INFIX =
3, LEFTBRACKET =
4,
4613 RIGHTBRACKET =
5, SPACE =
6, UNDEROVER =
7, DEFINITION =
8,
4614 TEXT =
9, BIG =
10, LONG =
11, STRETCHY =
12, MATRIX =
13; // token types
4616 var AMsqrt = {input:
"\\sqrt", tag:
"msqrt", output:
"sqrt", ttype:UNARY},
4617 AMnot = {input:
"\\not", tag:
"mnot", output:
"not", ttype:UNARY},
4618 AMroot = {input:
"\\root", tag:
"mroot", output:
"root", ttype:BINARY},
4619 AMfrac = {input:
"\\frac", tag:
"mfrac", output:
"/", ttype:BINARY},
4620 AMover = {input:
"\\stackrel", tag:
"mover", output:
"stackrel", ttype:BINARY},
4621 AMatop = {input:
"\\atop", tag:
"mfrac", output:
"", ttype:INFIX},
4622 AMchoose = {input:
"\\choose", tag:
"mfrac", output:
"", ttype:INFIX},
4623 AMsub = {input:
"_", tag:
"msub", output:
"_", ttype:INFIX},
4624 AMsup = {input:
"^", tag:
"msup", output:
"^", ttype:INFIX},
4625 AMtext = {input:
"\\mathrm", tag:
"mtext", output:
"text", ttype:TEXT},
4626 AMmbox = {input:
"\\mbox", tag:
"mtext", output:
"mbox", ttype:TEXT};
4628 // Commented out by DRW to prevent
1/
2 turning into a
2-line fraction
4629 // AMdiv = {input:
"/", tag:
"mfrac", output:
"/", ttype:INFIX},
4630 // Commented out by DRW so that
" prints literally in equations
4631 // AMquote = {input:"\
"", tag:
"mtext", output:
"mbox", ttype:TEXT};
4633 // List of negations obtained from http://frodo.elon.edu/tutorial/tutorial.pdf
4634 var AMRelationNegations = {
4635 "\u003C":
"\u226E",
"\u003E":
"\u226F",
"\u2264":
"\u2270",
"\u2265":
"\u2271",
4636 "\u003D":
"\u2260",
"\u2261":
"\u2262",
"\u227A":
"\u2280",
"\u227B":
"\u2281",
4637 "\u227C":
"\u22E0",
"\u227D":
"\u22E1",
"\u223C":
"\u2241",
"\u2243":
"\u2244",
4638 "\u2282":
"\u2284",
"\u2283":
"\u2285",
"\u2286":
"\u2288",
"\u2287":
"\u2289",
4639 "\u2248":
"\u2249",
"\u2245":
"\u2247",
"\u2291":
"\u22E2",
"\u2292":
"\u22E3",
4645 {input:
"\\alpha", tag:
"mi", output:
"\u03B1", ttype:CONST},
4646 {input:
"\\beta", tag:
"mi", output:
"\u03B2", ttype:CONST},
4647 {input:
"\\gamma", tag:
"mi", output:
"\u03B3", ttype:CONST},
4648 {input:
"\\delta", tag:
"mi", output:
"\u03B4", ttype:CONST},
4649 {input:
"\\epsilon", tag:
"mi", output:
"\u03B5", ttype:CONST},
4650 {input:
"\\varepsilon", tag:
"mi", output:
"\u025B", ttype:CONST},
4651 {input:
"\\zeta", tag:
"mi", output:
"\u03B6", ttype:CONST},
4652 {input:
"\\eta", tag:
"mi", output:
"\u03B7", ttype:CONST},
4653 {input:
"\\theta", tag:
"mi", output:
"\u03B8", ttype:CONST},
4654 {input:
"\\vartheta", tag:
"mi", output:
"\u03D1", ttype:CONST},
4655 {input:
"\\iota", tag:
"mi", output:
"\u03B9", ttype:CONST},
4656 {input:
"\\kappa", tag:
"mi", output:
"\u03BA", ttype:CONST},
4657 {input:
"\\lambda", tag:
"mi", output:
"\u03BB", ttype:CONST},
4658 {input:
"\\mu", tag:
"mi", output:
"\u03BC", ttype:CONST},
4659 {input:
"\\nu", tag:
"mi", output:
"\u03BD", ttype:CONST},
4660 {input:
"\\xi", tag:
"mi", output:
"\u03BE", ttype:CONST},
4661 {input:
"\\pi", tag:
"mi", output:
"\u03C0", ttype:CONST},
4662 {input:
"\\varpi", tag:
"mi", output:
"\u03D6", ttype:CONST},
4663 {input:
"\\rho", tag:
"mi", output:
"\u03C1", ttype:CONST},
4664 {input:
"\\varrho", tag:
"mi", output:
"\u03F1", ttype:CONST},
4665 {input:
"\\varsigma", tag:
"mi", output:
"\u03C2", ttype:CONST},
4666 {input:
"\\sigma", tag:
"mi", output:
"\u03C3", ttype:CONST},
4667 {input:
"\\tau", tag:
"mi", output:
"\u03C4", ttype:CONST},
4668 {input:
"\\upsilon", tag:
"mi", output:
"\u03C5", ttype:CONST},
4669 {input:
"\\phi", tag:
"mi", output:
"\u03C6", ttype:CONST},
4670 {input:
"\\varphi", tag:
"mi", output:
"\u03D5", ttype:CONST},
4671 {input:
"\\chi", tag:
"mi", output:
"\u03C7", ttype:CONST},
4672 {input:
"\\psi", tag:
"mi", output:
"\u03C8", ttype:CONST},
4673 {input:
"\\omega", tag:
"mi", output:
"\u03C9", ttype:CONST},
4674 {input:
"\\Gamma", tag:
"mo", output:
"\u0393", ttype:CONST},
4675 {input:
"\\Delta", tag:
"mo", output:
"\u0394", ttype:CONST},
4676 {input:
"\\Theta", tag:
"mo", output:
"\u0398", ttype:CONST},
4677 {input:
"\\Lambda", tag:
"mo", output:
"\u039B", ttype:CONST},
4678 {input:
"\\Xi", tag:
"mo", output:
"\u039E", ttype:CONST},
4679 {input:
"\\Pi", tag:
"mo", output:
"\u03A0", ttype:CONST},
4680 {input:
"\\Sigma", tag:
"mo", output:
"\u03A3", ttype:CONST},
4681 {input:
"\\Upsilon", tag:
"mo", output:
"\u03A5", ttype:CONST},
4682 {input:
"\\Phi", tag:
"mo", output:
"\u03A6", ttype:CONST},
4683 {input:
"\\Psi", tag:
"mo", output:
"\u03A8", ttype:CONST},
4684 {input:
"\\Omega", tag:
"mo", output:
"\u03A9", ttype:CONST},
4687 {input:
"\\frac12", tag:
"mo", output:
"\u00BD", ttype:CONST},
4688 {input:
"\\frac14", tag:
"mo", output:
"\u00BC", ttype:CONST},
4689 {input:
"\\frac34", tag:
"mo", output:
"\u00BE", ttype:CONST},
4690 {input:
"\\frac13", tag:
"mo", output:
"\u2153", ttype:CONST},
4691 {input:
"\\frac23", tag:
"mo", output:
"\u2154", ttype:CONST},
4692 {input:
"\\frac15", tag:
"mo", output:
"\u2155", ttype:CONST},
4693 {input:
"\\frac25", tag:
"mo", output:
"\u2156", ttype:CONST},
4694 {input:
"\\frac35", tag:
"mo", output:
"\u2157", ttype:CONST},
4695 {input:
"\\frac45", tag:
"mo", output:
"\u2158", ttype:CONST},
4696 {input:
"\\frac16", tag:
"mo", output:
"\u2159", ttype:CONST},
4697 {input:
"\\frac56", tag:
"mo", output:
"\u215A", ttype:CONST},
4698 {input:
"\\frac18", tag:
"mo", output:
"\u215B", ttype:CONST},
4699 {input:
"\\frac38", tag:
"mo", output:
"\u215C", ttype:CONST},
4700 {input:
"\\frac58", tag:
"mo", output:
"\u215D", ttype:CONST},
4701 {input:
"\\frac78", tag:
"mo", output:
"\u215E", ttype:CONST},
4703 //binary operation symbols
4704 {input:
"\\pm", tag:
"mo", output:
"\u00B1", ttype:CONST},
4705 {input:
"\\mp", tag:
"mo", output:
"\u2213", ttype:CONST},
4706 {input:
"\\triangleleft",tag:
"mo", output:
"\u22B2", ttype:CONST},
4707 {input:
"\\triangleright",tag:
"mo",output:
"\u22B3", ttype:CONST},
4708 {input:
"\\cdot", tag:
"mo", output:
"\u22C5", ttype:CONST},
4709 {input:
"\\star", tag:
"mo", output:
"\u22C6", ttype:CONST},
4710 {input:
"\\ast", tag:
"mo", output:
"\u002A", ttype:CONST},
4711 {input:
"\\times", tag:
"mo", output:
"\u00D7", ttype:CONST},
4712 {input:
"\\div", tag:
"mo", output:
"\u00F7", ttype:CONST},
4713 {input:
"\\circ", tag:
"mo", output:
"\u2218", ttype:CONST},
4714 //{input:
"\\bullet", tag:
"mo", output:
"\u2219", ttype:CONST},
4715 {input:
"\\bullet", tag:
"mo", output:
"\u2022", ttype:CONST},
4716 {input:
"\\oplus", tag:
"mo", output:
"\u2295", ttype:CONST},
4717 {input:
"\\ominus", tag:
"mo", output:
"\u2296", ttype:CONST},
4718 {input:
"\\otimes", tag:
"mo", output:
"\u2297", ttype:CONST},
4719 {input:
"\\bigcirc", tag:
"mo", output:
"\u25CB", ttype:CONST},
4720 {input:
"\\oslash", tag:
"mo", output:
"\u2298", ttype:CONST},
4721 {input:
"\\odot", tag:
"mo", output:
"\u2299", ttype:CONST},
4722 {input:
"\\land", tag:
"mo", output:
"\u2227", ttype:CONST},
4723 {input:
"\\wedge", tag:
"mo", output:
"\u2227", ttype:CONST},
4724 {input:
"\\lor", tag:
"mo", output:
"\u2228", ttype:CONST},
4725 {input:
"\\vee", tag:
"mo", output:
"\u2228", ttype:CONST},
4726 {input:
"\\cap", tag:
"mo", output:
"\u2229", ttype:CONST},
4727 {input:
"\\cup", tag:
"mo", output:
"\u222A", ttype:CONST},
4728 {input:
"\\sqcap", tag:
"mo", output:
"\u2293", ttype:CONST},
4729 {input:
"\\sqcup", tag:
"mo", output:
"\u2294", ttype:CONST},
4730 {input:
"\\uplus", tag:
"mo", output:
"\u228E", ttype:CONST},
4731 {input:
"\\amalg", tag:
"mo", output:
"\u2210", ttype:CONST},
4732 {input:
"\\bigtriangleup",tag:
"mo",output:
"\u25B3", ttype:CONST},
4733 {input:
"\\bigtriangledown",tag:
"mo",output:
"\u25BD", ttype:CONST},
4734 {input:
"\\dag", tag:
"mo", output:
"\u2020", ttype:CONST},
4735 {input:
"\\dagger", tag:
"mo", output:
"\u2020", ttype:CONST},
4736 {input:
"\\ddag", tag:
"mo", output:
"\u2021", ttype:CONST},
4737 {input:
"\\ddagger", tag:
"mo", output:
"\u2021", ttype:CONST},
4738 {input:
"\\lhd", tag:
"mo", output:
"\u22B2", ttype:CONST},
4739 {input:
"\\rhd", tag:
"mo", output:
"\u22B3", ttype:CONST},
4740 {input:
"\\unlhd", tag:
"mo", output:
"\u22B4", ttype:CONST},
4741 {input:
"\\unrhd", tag:
"mo", output:
"\u22B5", ttype:CONST},
4745 {input:
"\\sum", tag:
"mo", output:
"\u2211", ttype:UNDEROVER},
4746 {input:
"\\prod", tag:
"mo", output:
"\u220F", ttype:UNDEROVER},
4747 {input:
"\\bigcap", tag:
"mo", output:
"\u22C2", ttype:UNDEROVER},
4748 {input:
"\\bigcup", tag:
"mo", output:
"\u22C3", ttype:UNDEROVER},
4749 {input:
"\\bigwedge", tag:
"mo", output:
"\u22C0", ttype:UNDEROVER},
4750 {input:
"\\bigvee", tag:
"mo", output:
"\u22C1", ttype:UNDEROVER},
4751 {input:
"\\bigsqcap", tag:
"mo", output:
"\u2A05", ttype:UNDEROVER},
4752 {input:
"\\bigsqcup", tag:
"mo", output:
"\u2A06", ttype:UNDEROVER},
4753 {input:
"\\coprod", tag:
"mo", output:
"\u2210", ttype:UNDEROVER},
4754 {input:
"\\bigoplus", tag:
"mo", output:
"\u2A01", ttype:UNDEROVER},
4755 {input:
"\\bigotimes", tag:
"mo", output:
"\u2A02", ttype:UNDEROVER},
4756 {input:
"\\bigodot", tag:
"mo", output:
"\u2A00", ttype:UNDEROVER},
4757 {input:
"\\biguplus", tag:
"mo", output:
"\u2A04", ttype:UNDEROVER},
4758 {input:
"\\int", tag:
"mo", output:
"\u222B", ttype:CONST},
4759 {input:
"\\oint", tag:
"mo", output:
"\u222E", ttype:CONST},
4761 //binary relation symbols
4762 {input:
":=", tag:
"mo", output:
":=", ttype:CONST},
4763 {input:
"\\lt", tag:
"mo", output:
"<", ttype:CONST},
4764 {input:
"\\gt", tag:
"mo", output:
">", ttype:CONST},
4765 {input:
"\\ne", tag:
"mo", output:
"\u2260", ttype:CONST},
4766 {input:
"\\neq", tag:
"mo", output:
"\u2260", ttype:CONST},
4767 {input:
"\\le", tag:
"mo", output:
"\u2264", ttype:CONST},
4768 {input:
"\\leq", tag:
"mo", output:
"\u2264", ttype:CONST},
4769 {input:
"\\leqslant", tag:
"mo", output:
"\u2264", ttype:CONST},
4770 {input:
"\\ge", tag:
"mo", output:
"\u2265", ttype:CONST},
4771 {input:
"\\geq", tag:
"mo", output:
"\u2265", ttype:CONST},
4772 {input:
"\\geqslant", tag:
"mo", output:
"\u2265", ttype:CONST},
4773 {input:
"\\equiv", tag:
"mo", output:
"\u2261", ttype:CONST},
4774 {input:
"\\ll", tag:
"mo", output:
"\u226A", ttype:CONST},
4775 {input:
"\\gg", tag:
"mo", output:
"\u226B", ttype:CONST},
4776 {input:
"\\doteq", tag:
"mo", output:
"\u2250", ttype:CONST},
4777 {input:
"\\prec", tag:
"mo", output:
"\u227A", ttype:CONST},
4778 {input:
"\\succ", tag:
"mo", output:
"\u227B", ttype:CONST},
4779 {input:
"\\preceq", tag:
"mo", output:
"\u227C", ttype:CONST},
4780 {input:
"\\succeq", tag:
"mo", output:
"\u227D", ttype:CONST},
4781 {input:
"\\subset", tag:
"mo", output:
"\u2282", ttype:CONST},
4782 {input:
"\\supset", tag:
"mo", output:
"\u2283", ttype:CONST},
4783 {input:
"\\subseteq", tag:
"mo", output:
"\u2286", ttype:CONST},
4784 {input:
"\\supseteq", tag:
"mo", output:
"\u2287", ttype:CONST},
4785 {input:
"\\subsetneq", tag:
"mo", output:
"\u228A", ttype:CONST},
4786 {input:
"\\supsetneq", tag:
"mo", output:
"\u228B", ttype:CONST},
4787 {input:
"\\sqsubset", tag:
"mo", output:
"\u228F", ttype:CONST},
4788 {input:
"\\sqsupset", tag:
"mo", output:
"\u2290", ttype:CONST},
4789 {input:
"\\sqsubseteq", tag:
"mo", output:
"\u2291", ttype:CONST},
4790 {input:
"\\sqsupseteq", tag:
"mo", output:
"\u2292", ttype:CONST},
4791 {input:
"\\sim", tag:
"mo", output:
"\u223C", ttype:CONST},
4792 {input:
"\\simeq", tag:
"mo", output:
"\u2243", ttype:CONST},
4793 {input:
"\\approx", tag:
"mo", output:
"\u2248", ttype:CONST},
4794 {input:
"\\cong", tag:
"mo", output:
"\u2245", ttype:CONST},
4795 {input:
"\\Join", tag:
"mo", output:
"\u22C8", ttype:CONST},
4796 {input:
"\\bowtie", tag:
"mo", output:
"\u22C8", ttype:CONST},
4797 {input:
"\\in", tag:
"mo", output:
"\u2208", ttype:CONST},
4798 {input:
"\\ni", tag:
"mo", output:
"\u220B", ttype:CONST},
4799 {input:
"\\owns", tag:
"mo", output:
"\u220B", ttype:CONST},
4800 {input:
"\\propto", tag:
"mo", output:
"\u221D", ttype:CONST},
4801 {input:
"\\vdash", tag:
"mo", output:
"\u22A2", ttype:CONST},
4802 {input:
"\\dashv", tag:
"mo", output:
"\u22A3", ttype:CONST},
4803 {input:
"\\models", tag:
"mo", output:
"\u22A8", ttype:CONST},
4804 {input:
"\\perp", tag:
"mo", output:
"\u22A5", ttype:CONST},
4805 {input:
"\\smile", tag:
"mo", output:
"\u2323", ttype:CONST},
4806 {input:
"\\frown", tag:
"mo", output:
"\u2322", ttype:CONST},
4807 {input:
"\\asymp", tag:
"mo", output:
"\u224D", ttype:CONST},
4808 {input:
"\\notin", tag:
"mo", output:
"\u2209", ttype:CONST},
4811 {input:
"\\begin{eqnarray}", output:
"X", ttype:MATRIX, invisible:true},
4812 {input:
"\\begin{array}", output:
"X", ttype:MATRIX, invisible:true},
4813 {input:
"\\\\", output:
"}&{", ttype:DEFINITION},
4814 {input:
"\\end{eqnarray}", output:
"}}", ttype:DEFINITION},
4815 {input:
"\\end{array}", output:
"}}", ttype:DEFINITION},
4817 //grouping and literal brackets -- ieval is for IE
4818 {input:
"\\big", tag:
"mo", output:
"X", atval:
"1.2", ieval:
"2.2", ttype:BIG},
4819 {input:
"\\Big", tag:
"mo", output:
"X", atval:
"1.6", ieval:
"2.6", ttype:BIG},
4820 {input:
"\\bigg", tag:
"mo", output:
"X", atval:
"2.2", ieval:
"3.2", ttype:BIG},
4821 {input:
"\\Bigg", tag:
"mo", output:
"X", atval:
"2.9", ieval:
"3.9", ttype:BIG},
4822 {input:
"\\left", tag:
"mo", output:
"X", ttype:LEFTBRACKET},
4823 {input:
"\\right", tag:
"mo", output:
"X", ttype:RIGHTBRACKET},
4824 {input:
"{", output:
"{", ttype:LEFTBRACKET, invisible:true},
4825 {input:
"}", output:
"}", ttype:RIGHTBRACKET, invisible:true},
4827 {input:
"(", tag:
"mo", output:
"(", atval:
"1", ttype:STRETCHY},
4828 {input:
"[", tag:
"mo", output:
"[", atval:
"1", ttype:STRETCHY},
4829 {input:
"\\lbrack", tag:
"mo", output:
"[", atval:
"1", ttype:STRETCHY},
4830 {input:
"\\{", tag:
"mo", output:
"{", atval:
"1", ttype:STRETCHY},
4831 {input:
"\\lbrace", tag:
"mo", output:
"{", atval:
"1", ttype:STRETCHY},
4832 {input:
"\\langle", tag:
"mo", output:
"\u2329", atval:
"1", ttype:STRETCHY},
4833 {input:
"\\lfloor", tag:
"mo", output:
"\u230A", atval:
"1", ttype:STRETCHY},
4834 {input:
"\\lceil", tag:
"mo", output:
"\u2308", atval:
"1", ttype:STRETCHY},
4836 // rtag:
"mi" causes space to be inserted before a following sin, cos, etc.
4837 // (see function AMparseExpr() )
4838 {input:
")", tag:
"mo",output:
")", rtag:
"mi",atval:
"1",ttype:STRETCHY},
4839 {input:
"]", tag:
"mo",output:
"]", rtag:
"mi",atval:
"1",ttype:STRETCHY},
4840 {input:
"\\rbrack",tag:
"mo",output:
"]", rtag:
"mi",atval:
"1",ttype:STRETCHY},
4841 {input:
"\\}", tag:
"mo",output:
"}", rtag:
"mi",atval:
"1",ttype:STRETCHY},
4842 {input:
"\\rbrace",tag:
"mo",output:
"}", rtag:
"mi",atval:
"1",ttype:STRETCHY},
4843 {input:
"\\rangle",tag:
"mo",output:
"\u232A", rtag:
"mi",atval:
"1",ttype:STRETCHY},
4844 {input:
"\\rfloor",tag:
"mo",output:
"\u230B", rtag:
"mi",atval:
"1",ttype:STRETCHY},
4845 {input:
"\\rceil", tag:
"mo",output:
"\u2309", rtag:
"mi",atval:
"1",ttype:STRETCHY},
4847 //
"|",
"\\|",
"\\vert" and
"\\Vert" modified later: lspace = rspace =
0em
4848 {input:
"|", tag:
"mo", output:
"\u2223", atval:
"1", ttype:STRETCHY},
4849 {input:
"\\|", tag:
"mo", output:
"\u2225", atval:
"1", ttype:STRETCHY},
4850 {input:
"\\vert", tag:
"mo", output:
"\u2223", atval:
"1", ttype:STRETCHY},
4851 {input:
"\\Vert", tag:
"mo", output:
"\u2225", atval:
"1", ttype:STRETCHY},
4852 {input:
"\\mid", tag:
"mo", output:
"\u2223", atval:
"1", ttype:STRETCHY},
4853 {input:
"\\parallel", tag:
"mo", output:
"\u2225", atval:
"1", ttype:STRETCHY},
4854 {input:
"/", tag:
"mo", output:
"/", atval:
"1.01", ttype:STRETCHY},
4855 {input:
"\\backslash", tag:
"mo", output:
"\u2216", atval:
"1", ttype:STRETCHY},
4856 {input:
"\\setminus", tag:
"mo", output:
"\\", ttype:CONST},
4858 //miscellaneous symbols
4859 {input:
"\\!", tag:
"mspace", atname:
"width", atval:
"-0.167em", ttype:SPACE},
4860 {input:
"\\,", tag:
"mspace", atname:
"width", atval:
"0.167em", ttype:SPACE},
4861 {input:
"\\>", tag:
"mspace", atname:
"width", atval:
"0.222em", ttype:SPACE},
4862 {input:
"\\:", tag:
"mspace", atname:
"width", atval:
"0.222em", ttype:SPACE},
4863 {input:
"\\;", tag:
"mspace", atname:
"width", atval:
"0.278em", ttype:SPACE},
4864 {input:
"~", tag:
"mspace", atname:
"width", atval:
"0.333em", ttype:SPACE},
4865 {input:
"\\quad", tag:
"mspace", atname:
"width", atval:
"1em", ttype:SPACE},
4866 {input:
"\\qquad", tag:
"mspace", atname:
"width", atval:
"2em", ttype:SPACE},
4867 //{input:
"{}", tag:
"mo", output:
"\u200B", ttype:CONST}, // zero-width
4868 {input:
"\\prime", tag:
"mo", output:
"\u2032", ttype:CONST},
4869 {input:
"'", tag:
"mo", output:
"\u02B9", ttype:CONST},
4870 {input:
"''", tag:
"mo", output:
"\u02BA", ttype:CONST},
4871 {input:
"'''", tag:
"mo", output:
"\u2034", ttype:CONST},
4872 {input:
"''''", tag:
"mo", output:
"\u2057", ttype:CONST},
4873 {input:
"\\ldots", tag:
"mo", output:
"\u2026", ttype:CONST},
4874 {input:
"\\cdots", tag:
"mo", output:
"\u22EF", ttype:CONST},
4875 {input:
"\\vdots", tag:
"mo", output:
"\u22EE", ttype:CONST},
4876 {input:
"\\ddots", tag:
"mo", output:
"\u22F1", ttype:CONST},
4877 {input:
"\\forall", tag:
"mo", output:
"\u2200", ttype:CONST},
4878 {input:
"\\exists", tag:
"mo", output:
"\u2203", ttype:CONST},
4879 {input:
"\\Re", tag:
"mo", output:
"\u211C", ttype:CONST},
4880 {input:
"\\Im", tag:
"mo", output:
"\u2111", ttype:CONST},
4881 {input:
"\\aleph", tag:
"mo", output:
"\u2135", ttype:CONST},
4882 {input:
"\\hbar", tag:
"mo", output:
"\u210F", ttype:CONST},
4883 {input:
"\\ell", tag:
"mo", output:
"\u2113", ttype:CONST},
4884 {input:
"\\wp", tag:
"mo", output:
"\u2118", ttype:CONST},
4885 {input:
"\\emptyset", tag:
"mo", output:
"\u2205", ttype:CONST},
4886 {input:
"\\infty", tag:
"mo", output:
"\u221E", ttype:CONST},
4887 {input:
"\\surd", tag:
"mo", output:
"\\sqrt{}", ttype:DEFINITION},
4888 {input:
"\\partial", tag:
"mo", output:
"\u2202", ttype:CONST},
4889 {input:
"\\nabla", tag:
"mo", output:
"\u2207", ttype:CONST},
4890 {input:
"\\triangle", tag:
"mo", output:
"\u25B3", ttype:CONST},
4891 {input:
"\\therefore", tag:
"mo", output:
"\u2234", ttype:CONST},
4892 {input:
"\\angle", tag:
"mo", output:
"\u2220", ttype:CONST},
4893 //{input:
"\\\\ ", tag:
"mo", output:
"\u00A0", ttype:CONST},
4894 {input:
"\\diamond", tag:
"mo", output:
"\u22C4", ttype:CONST},
4895 //{input:
"\\Diamond", tag:
"mo", output:
"\u25CA", ttype:CONST},
4896 {input:
"\\Diamond", tag:
"mo", output:
"\u25C7", ttype:CONST},
4897 {input:
"\\neg", tag:
"mo", output:
"\u00AC", ttype:CONST},
4898 {input:
"\\lnot", tag:
"mo", output:
"\u00AC", ttype:CONST},
4899 {input:
"\\bot", tag:
"mo", output:
"\u22A5", ttype:CONST},
4900 {input:
"\\top", tag:
"mo", output:
"\u22A4", ttype:CONST},
4901 {input:
"\\square", tag:
"mo", output:
"\u25AB", ttype:CONST},
4902 {input:
"\\Box", tag:
"mo", output:
"\u25A1", ttype:CONST},
4903 {input:
"\\wr", tag:
"mo", output:
"\u2240", ttype:CONST},
4905 //standard functions
4906 //Note UNDEROVER *must* have tag:
"mo" to work properly
4907 {input:
"\\arccos", tag:
"mi", output:
"arccos", ttype:UNARY, func:true},
4908 {input:
"\\arcsin", tag:
"mi", output:
"arcsin", ttype:UNARY, func:true},
4909 {input:
"\\arctan", tag:
"mi", output:
"arctan", ttype:UNARY, func:true},
4910 {input:
"\\arg", tag:
"mi", output:
"arg", ttype:UNARY, func:true},
4911 {input:
"\\cos", tag:
"mi", output:
"cos", ttype:UNARY, func:true},
4912 {input:
"\\cosh", tag:
"mi", output:
"cosh", ttype:UNARY, func:true},
4913 {input:
"\\cot", tag:
"mi", output:
"cot", ttype:UNARY, func:true},
4914 {input:
"\\coth", tag:
"mi", output:
"coth", ttype:UNARY, func:true},
4915 {input:
"\\csc", tag:
"mi", output:
"csc", ttype:UNARY, func:true},
4916 {input:
"\\deg", tag:
"mi", output:
"deg", ttype:UNARY, func:true},
4917 {input:
"\\det", tag:
"mi", output:
"det", ttype:UNARY, func:true},
4918 {input:
"\\dim", tag:
"mi", output:
"dim", ttype:UNARY, func:true}, //CONST?
4919 {input:
"\\exp", tag:
"mi", output:
"exp", ttype:UNARY, func:true},
4920 {input:
"\\gcd", tag:
"mi", output:
"gcd", ttype:UNARY, func:true}, //CONST?
4921 {input:
"\\hom", tag:
"mi", output:
"hom", ttype:UNARY, func:true},
4922 {input:
"\\inf", tag:
"mo", output:
"inf", ttype:UNDEROVER},
4923 {input:
"\\ker", tag:
"mi", output:
"ker", ttype:UNARY, func:true},
4924 {input:
"\\lg", tag:
"mi", output:
"lg", ttype:UNARY, func:true},
4925 {input:
"\\lim", tag:
"mo", output:
"lim", ttype:UNDEROVER},
4926 {input:
"\\liminf", tag:
"mo", output:
"liminf", ttype:UNDEROVER},
4927 {input:
"\\limsup", tag:
"mo", output:
"limsup", ttype:UNDEROVER},
4928 {input:
"\\ln", tag:
"mi", output:
"ln", ttype:UNARY, func:true},
4929 {input:
"\\log", tag:
"mi", output:
"log", ttype:UNARY, func:true},
4930 {input:
"\\max", tag:
"mo", output:
"max", ttype:UNDEROVER},
4931 {input:
"\\min", tag:
"mo", output:
"min", ttype:UNDEROVER},
4932 {input:
"\\Pr", tag:
"mi", output:
"Pr", ttype:UNARY, func:true},
4933 {input:
"\\sec", tag:
"mi", output:
"sec", ttype:UNARY, func:true},
4934 {input:
"\\sin", tag:
"mi", output:
"sin", ttype:UNARY, func:true},
4935 {input:
"\\sinh", tag:
"mi", output:
"sinh", ttype:UNARY, func:true},
4936 {input:
"\\sup", tag:
"mo", output:
"sup", ttype:UNDEROVER},
4937 {input:
"\\tan", tag:
"mi", output:
"tan", ttype:UNARY, func:true},
4938 {input:
"\\tanh", tag:
"mi", output:
"tanh", ttype:UNARY, func:true},
4941 {input:
"\\gets", tag:
"mo", output:
"\u2190", ttype:CONST},
4942 {input:
"\\leftarrow", tag:
"mo", output:
"\u2190", ttype:CONST},
4943 {input:
"\\to", tag:
"mo", output:
"\u2192", ttype:CONST},
4944 {input:
"\\rightarrow", tag:
"mo", output:
"\u2192", ttype:CONST},
4945 {input:
"\\leftrightarrow", tag:
"mo", output:
"\u2194", ttype:CONST},
4946 {input:
"\\uparrow", tag:
"mo", output:
"\u2191", ttype:CONST},
4947 {input:
"\\downarrow", tag:
"mo", output:
"\u2193", ttype:CONST},
4948 {input:
"\\updownarrow", tag:
"mo", output:
"\u2195", ttype:CONST},
4949 {input:
"\\Leftarrow", tag:
"mo", output:
"\u21D0", ttype:CONST},
4950 {input:
"\\Rightarrow", tag:
"mo", output:
"\u21D2", ttype:CONST},
4951 {input:
"\\Leftrightarrow", tag:
"mo", output:
"\u21D4", ttype:CONST},
4952 {input:
"\\iff", tag:
"mo", output:
"~\\Longleftrightarrow~", ttype:DEFINITION},
4953 {input:
"\\Uparrow", tag:
"mo", output:
"\u21D1", ttype:CONST},
4954 {input:
"\\Downarrow", tag:
"mo", output:
"\u21D3", ttype:CONST},
4955 {input:
"\\Updownarrow", tag:
"mo", output:
"\u21D5", ttype:CONST},
4956 {input:
"\\mapsto", tag:
"mo", output:
"\u21A6", ttype:CONST},
4957 {input:
"\\longleftarrow", tag:
"mo", output:
"\u2190", ttype:LONG},
4958 {input:
"\\longrightarrow", tag:
"mo", output:
"\u2192", ttype:LONG},
4959 {input:
"\\longleftrightarrow", tag:
"mo", output:
"\u2194", ttype:LONG},
4960 {input:
"\\Longleftarrow", tag:
"mo", output:
"\u21D0", ttype:LONG},
4961 {input:
"\\Longrightarrow", tag:
"mo", output:
"\u21D2", ttype:LONG},
4962 {input:
"\\Longleftrightarrow", tag:
"mo", output:
"\u21D4", ttype:LONG},
4963 {input:
"\\longmapsto", tag:
"mo", output:
"\u21A6", ttype:CONST},
4966 //commands with argument
4967 AMsqrt, AMnot, AMroot, AMfrac, AMover, AMsub, AMsup, AMtext, AMmbox, AMatop, AMchoose,
4972 {input:
"\\acute", tag:
"mover", output:
"\u00B4", ttype:UNARY, acc:true},
4973 //{input:
"\\acute", tag:
"mover", output:
"\u0317", ttype:UNARY, acc:true},
4974 //{input:
"\\acute", tag:
"mover", output:
"\u0301", ttype:UNARY, acc:true},
4975 //{input:
"\\grave", tag:
"mover", output:
"\u0300", ttype:UNARY, acc:true},
4976 //{input:
"\\grave", tag:
"mover", output:
"\u0316", ttype:UNARY, acc:true},
4977 {input:
"\\grave", tag:
"mover", output:
"\u0060", ttype:UNARY, acc:true},
4978 {input:
"\\breve", tag:
"mover", output:
"\u02D8", ttype:UNARY, acc:true},
4979 {input:
"\\check", tag:
"mover", output:
"\u02C7", ttype:UNARY, acc:true},
4980 {input:
"\\dot", tag:
"mover", output:
".", ttype:UNARY, acc:true},
4981 {input:
"\\ddot", tag:
"mover", output:
"..", ttype:UNARY, acc:true},
4982 //{input:
"\\ddot", tag:
"mover", output:
"\u00A8", ttype:UNARY, acc:true},
4983 {input:
"\\mathring", tag:
"mover", output:
"\u00B0", ttype:UNARY, acc:true},
4984 {input:
"\\vec", tag:
"mover", output:
"\u20D7", ttype:UNARY, acc:true},
4985 {input:
"\\overrightarrow",tag:
"mover",output:
"\u20D7", ttype:UNARY, acc:true},
4986 {input:
"\\overleftarrow",tag:
"mover", output:
"\u20D6", ttype:UNARY, acc:true},
4987 {input:
"\\hat", tag:
"mover", output:
"\u005E", ttype:UNARY, acc:true},
4988 {input:
"\\widehat", tag:
"mover", output:
"\u0302", ttype:UNARY, acc:true},
4989 {input:
"\\tilde", tag:
"mover", output:
"~", ttype:UNARY, acc:true},
4990 //{input:
"\\tilde", tag:
"mover", output:
"\u0303", ttype:UNARY, acc:true},
4991 {input:
"\\widetilde", tag:
"mover", output:
"\u02DC", ttype:UNARY, acc:true},
4992 {input:
"\\bar", tag:
"mover", output:
"\u203E", ttype:UNARY, acc:true},
4993 {input:
"\\overbrace", tag:
"mover", output:
"\uFE37", ttype:UNARY, acc:true}, //Changed unicode overbrace
4994 {input:
"\\overbracket", tag:
"mover", output:
"\u23B4", ttype:UNARY, acc:true}, //old overbrace = overbracket
4995 {input:
"\\overline", tag:
"mover", output:
"\u00AF", ttype:UNARY, acc:true},
4996 {input:
"\\underbrace", tag:
"munder", output:
"\uFE38", ttype:UNARY, acc:true}, //Changed unicode underbrace
4997 {input:
"\\underbracket",tag:
"munder", output:
"\u23B5", ttype:UNARY, acc:true}, //old underbrace = underbracket
4998 {input:
"\\underline", tag:
"munder", output:
"\u00AF", ttype:UNARY, acc:true},
4999 //{input:
"underline", tag:
"munder", output:
"\u0332", ttype:UNARY, acc:true},
5001 //typestyles and fonts
5002 {input:
"\\displaystyle",tag:
"mstyle",atname:
"displaystyle",atval:
"true", ttype:UNARY},
5003 {input:
"\\textstyle",tag:
"mstyle",atname:
"displaystyle",atval:
"false", ttype:UNARY},
5004 {input:
"\\scriptstyle",tag:
"mstyle",atname:
"scriptlevel",atval:
"1", ttype:UNARY},
5005 {input:
"\\scriptscriptstyle",tag:
"mstyle",atname:
"scriptlevel",atval:
"2", ttype:UNARY},
5006 {input:
"\\textrm", tag:
"mstyle", output:
"\\mathrm", ttype: DEFINITION},
5007 {input:
"\\mathbf", tag:
"mstyle", atname:
"mathvariant", atval:
"bold", ttype:UNARY},
5008 {input:
"\\textbf", tag:
"mstyle", atname:
"mathvariant", atval:
"bold", ttype:UNARY},
5009 {input:
"\\mathit", tag:
"mstyle", atname:
"mathvariant", atval:
"italic", ttype:UNARY},
5010 {input:
"\\textit", tag:
"mstyle", atname:
"mathvariant", atval:
"italic", ttype:UNARY},
5011 {input:
"\\mathtt", tag:
"mstyle", atname:
"mathvariant", atval:
"monospace", ttype:UNARY},
5012 {input:
"\\texttt", tag:
"mstyle", atname:
"mathvariant", atval:
"monospace", ttype:UNARY},
5013 {input:
"\\mathsf", tag:
"mstyle", atname:
"mathvariant", atval:
"sans-serif", ttype:UNARY},
5014 {input:
"\\mathbb", tag:
"mstyle", atname:
"mathvariant", atval:
"double-struck", ttype:UNARY, codes:AMbbb},
5015 {input:
"\\mathcal",tag:
"mstyle", atname:
"mathvariant", atval:
"script", ttype:UNARY, codes:AMcal},
5016 {input:
"\\mathfrak",tag:
"mstyle",atname:
"mathvariant", atval:
"fraktur",ttype:UNARY, codes:AMfrk},
5017 {input:
"\\textcolor",tag:
"mstyle",atname:
"mathvariant", atval:
"mathcolor", ttype:BINARY},
5018 {input:
"\\colorbox",tag:
"mstyle",atname:
"mathvariant", atval:
"background", ttype:BINARY}
5021 function compareNames(s1,s2) {
5022 if (s1.input
> s2.input) return
1
5026 var AMnames = []; //list of input symbols
5028 function AMinitSymbols() {
5029 AMsymbols.sort(compareNames);
5030 for (i=
0; i
<AMsymbols.length; i++) AMnames[i] = AMsymbols[i].input;
5033 var AMmathml =
"http://www.w3.org/1998/Math/MathML";
5035 function AMcreateElementMathML(t) {
5036 if (isIE) return document.createElement(
"m:"+t);
5037 else return document.createElementNS(AMmathml,t);
5040 function AMcreateMmlNode(t,frag) {
5041 // var node = AMcreateElementMathML(name);
5042 if (isIE) var node = document.createElement(
"m:"+t);
5043 else var node = document.createElementNS(AMmathml,t);
5044 node.appendChild(frag);
5048 function newcommand(oldstr,newstr) {
5049 AMsymbols = AMsymbols.concat([{input:oldstr, tag:
"mo", output:newstr,
5050 ttype:DEFINITION}]);
5053 function AMremoveCharsAndBlanks(str,n) {
5054 //remove n characters and any following blanks
5057 for (var i=
0; i
<st.length && st.charCodeAt(i)<=
32; i=i+
1);
5061 function AMposition(arr, str, n) {
5062 // return position
>=n where str appears or would be inserted
5063 // assumes arr is sorted
5070 if (arr[m]
<str) n = m; else h = m;
5074 for (var i=n; i
<arr.length && arr[i]
<str; i++);
5075 return i; // i=arr.length || arr[i]
>=str
5078 function AMgetSymbol(str) {
5079 //return maximal initial substring of str that appears in names
5080 //return null if there is none
5081 var k =
0; //new pos
5082 var j =
0; //old pos
5088 for (var i=
1; i<=str.length && more; i++) {
5089 st = str.slice(
0,i); //initial substring of length i
5091 k = AMposition(AMnames, st, j);
5092 if (k
<AMnames.length && str.slice(
0,AMnames[k].length)==AMnames[k]){
5097 more = k
<AMnames.length && str.slice(
0,AMnames[k].length)
>=AMnames[k];
5099 AMpreviousSymbol=AMcurrentSymbol;
5101 AMcurrentSymbol=AMsymbols[mk].ttype;
5102 return AMsymbols[mk];
5104 AMcurrentSymbol=CONST;
5106 st = str.slice(
0,
1); //take
1 character
5107 if (
"0"<=st && st<=
"9") tagst =
"mn";
5108 else tagst = ((
"A">st || st
>"Z") && (
"a">st || st
>"z")?
"mo":
"mi");
5110 // Commented out by DRW (not fully understood, but probably to do with
5111 // use of
"/" as an INFIX version of
"\\frac", which we don't want):
5113 //if (st==
"-" && AMpreviousSymbol==INFIX) {
5114 // AMcurrentSymbol = INFIX; //trick
"/" into recognizing
"-" on second parse
5115 // return {input:st, tag:tagst, output:st, ttype:UNARY, func:true};
5118 return {input:st, tag:tagst, output:st, ttype:CONST};
5122 /*Parsing ASCII math expressions with the following grammar
5123 v ::= [A-Za-z] | greek letters | numbers | other constant symbols
5124 u ::= sqrt | text | bb | other unary symbols for font commands
5125 b ::= frac | root | stackrel binary symbols
5126 l ::= { | \left left brackets
5127 r ::= } | \right right brackets
5128 S ::= v | lEr | uS | bSS Simple expression
5129 I ::= S_S | S^S | S_S^S | S Intermediate expression
5130 E ::= IE | I/I Expression
5131 Each terminal symbol is translated into a corresponding mathml node.*/
5133 var AMpreviousSymbol,AMcurrentSymbol;
5135 function AMparseSexpr(str) { //parses str and returns [node,tailstr,(node)tag]
5136 var symbol, node, result, result2, i, st,// rightvert = false,
5137 newFrag = document.createDocumentFragment();
5138 str = AMremoveCharsAndBlanks(str,
0);
5139 symbol = AMgetSymbol(str); //either a token or a bracket or empty
5140 if (symbol == null || symbol.ttype == RIGHTBRACKET)
5141 return [null,str,null];
5142 if (symbol.ttype == DEFINITION) {
5143 str = symbol.output+AMremoveCharsAndBlanks(str,symbol.input.length);
5144 symbol = AMgetSymbol(str);
5145 if (symbol == null || symbol.ttype == RIGHTBRACKET)
5146 return [null,str,null];
5148 str = AMremoveCharsAndBlanks(str,symbol.input.length);
5149 switch (symbol.ttype) {
5151 node = AMcreateElementMathML(symbol.tag);
5152 node.setAttribute(symbol.atname,symbol.atval);
5153 return [node,str,symbol.tag];
5156 if (symbol.input.substr(
0,
4) ==
"\\big") { // botch for missing symbols
5157 str =
"\\"+symbol.input.substr(
4)+str; // make \bigcup = \cup etc.
5158 symbol = AMgetSymbol(str);
5159 symbol.ttype = UNDEROVER;
5160 str = AMremoveCharsAndBlanks(str,symbol.input.length);
5163 return [AMcreateMmlNode(symbol.tag,
5164 document.createTextNode(symbol.output)),str,symbol.tag];
5166 var output = symbol.output;
5168 if (symbol.input ==
"'")
5170 else if (symbol.input ==
"''")
5172 else if (symbol.input ==
"'''")
5173 output =
"\u2033\u2032";
5174 else if (symbol.input ==
"''''")
5175 output =
"\u2033\u2033";
5176 else if (symbol.input ==
"\\square")
5177 output =
"\u25A1"; // same as \Box
5178 else if (symbol.input.substr(
0,
5) ==
"\\frac") {
5179 // botch for missing fractions
5180 var denom = symbol.input.substr(
6,
1);
5181 if (denom ==
"5" || denom ==
"6") {
5182 str = symbol.input.replace(/\\frac/,
"\\frac ")+str;
5183 return [node,str,symbol.tag];
5187 node = AMcreateMmlNode(symbol.tag,document.createTextNode(output));
5188 return [node,str,symbol.tag];
5189 case LONG: // added by DRW
5190 node = AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output));
5191 node.setAttribute(
"minsize",
"1.5");
5192 node.setAttribute(
"maxsize",
"1.5");
5193 node = AMcreateMmlNode(
"mover",node);
5194 node.appendChild(AMcreateElementMathML(
"mspace"));
5195 return [node,str,symbol.tag];
5196 case STRETCHY: // added by DRW
5197 if (isIE && symbol.input ==
"\\backslash")
5198 symbol.output =
"\\"; // doesn't expand, but then nor does
"\u2216"
5199 node = AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output));
5200 if (symbol.input ==
"|" || symbol.input ==
"\\vert" ||
5201 symbol.input ==
"\\|" || symbol.input ==
"\\Vert") {
5202 node.setAttribute(
"lspace",
"0em");
5203 node.setAttribute(
"rspace",
"0em");
5205 node.setAttribute(
"maxsize",symbol.atval); // don't allow to stretch here
5206 if (symbol.rtag != null)
5207 return [node,str,symbol.rtag];
5209 return [node,str,symbol.tag];
5210 case BIG: // added by DRW
5211 var atval = symbol.atval;
5213 atval = symbol.ieval;
5214 symbol = AMgetSymbol(str);
5216 return [null,str,null];
5217 str = AMremoveCharsAndBlanks(str,symbol.input.length);
5218 node = AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output));
5219 if (isIE) { // to get brackets to expand
5220 var space = AMcreateElementMathML(
"mspace");
5221 space.setAttribute(
"height",atval+
"ex");
5222 node = AMcreateMmlNode(
"mrow",node);
5223 node.appendChild(space);
5224 } else { // ignored in IE
5225 node.setAttribute(
"minsize",atval);
5226 node.setAttribute(
"maxsize",atval);
5228 return [node,str,symbol.tag];
5229 case LEFTBRACKET: //read (expr+)
5230 if (symbol.input ==
"\\left") { // left what?
5231 symbol = AMgetSymbol(str);
5232 if (symbol != null) {
5233 if (symbol.input ==
".")
5234 symbol.invisible = true;
5235 str = AMremoveCharsAndBlanks(str,symbol.input.length);
5238 result = AMparseExpr(str,true,false);
5240 (typeof symbol.invisible ==
"boolean" && symbol.invisible))
5241 node = AMcreateMmlNode(
"mrow",result[
0]);
5243 node = AMcreateMmlNode(
"mo",document.createTextNode(symbol.output));
5244 node = AMcreateMmlNode(
"mrow",node);
5245 node.appendChild(result[
0]);
5247 return [node,result[
1],result[
2]];
5248 case MATRIX: //read (expr+)
5249 if (symbol.input ==
"\\begin{array}") {
5251 symbol = AMgetSymbol(str);
5252 str = AMremoveCharsAndBlanks(str,
0);
5256 str = AMremoveCharsAndBlanks(str,symbol.input.length);
5257 if (symbol.input !=
"{")
5260 symbol = AMgetSymbol(str);
5261 if (symbol != null) {
5262 str = AMremoveCharsAndBlanks(str,symbol.input.length);
5263 if (symbol.input !=
"}")
5264 mask = mask+symbol.input;
5266 } while (symbol != null && symbol.input !=
"" && symbol.input !=
"}");
5268 result = AMparseExpr(
"{"+str,true,true);
5269 // if (result[
0]==null) return [AMcreateMmlNode(
"mo",
5270 // document.createTextNode(symbol.input)),str];
5271 node = AMcreateMmlNode(
"mtable",result[
0]);
5272 mask = mask.replace(/l/g,
"left ");
5273 mask = mask.replace(/r/g,
"right ");
5274 mask = mask.replace(/c/g,
"center ");
5275 node.setAttribute(
"columnalign",mask);
5276 node.setAttribute(
"displaystyle",
"false");
5278 return [node,result[
1],null];
5279 // trying to get a *little* bit of space around the array
5280 // (IE already includes it)
5281 var lspace = AMcreateElementMathML(
"mspace");
5282 lspace.setAttribute(
"width",
"0.167em");
5283 var rspace = AMcreateElementMathML(
"mspace");
5284 rspace.setAttribute(
"width",
"0.167em");
5285 var node1 = AMcreateMmlNode(
"mrow",lspace);
5286 node1.appendChild(node);
5287 node1.appendChild(rspace);
5288 return [node1,result[
1],null];
5289 } else { // eqnarray
5290 result = AMparseExpr(
"{"+str,true,true);
5291 node = AMcreateMmlNode(
"mtable",result[
0]);
5293 node.setAttribute(
"columnspacing",
"0.25em"); // best in practice?
5295 node.setAttribute(
"columnspacing",
"0.167em"); // correct (but ignored?)
5296 node.setAttribute(
"columnalign",
"right center left");
5297 node.setAttribute(
"displaystyle",
"true");
5298 node = AMcreateMmlNode(
"mrow",node);
5299 return [node,result[
1],null];
5302 if (str.charAt(
0)==
"{") i=str.indexOf(
"}");
5306 st = str.slice(
1,i);
5307 if (st.charAt(
0) ==
" ") {
5308 node = AMcreateElementMathML(
"mspace");
5309 node.setAttribute(
"width",
"0.33em"); // was
1ex
5310 newFrag.appendChild(node);
5312 newFrag.appendChild(
5313 AMcreateMmlNode(symbol.tag,document.createTextNode(st)));
5314 if (st.charAt(st.length-
1) ==
" ") {
5315 node = AMcreateElementMathML(
"mspace");
5316 node.setAttribute(
"width",
"0.33em"); // was
1ex
5317 newFrag.appendChild(node);
5319 str = AMremoveCharsAndBlanks(str,i+
1);
5320 return [AMcreateMmlNode(
"mrow",newFrag),str,null];
5322 result = AMparseSexpr(str);
5323 if (result[
0]==null) return [AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output)),str];
5324 if (typeof symbol.func ==
"boolean" && symbol.func) { // functions hack
5326 // if (st==
"^" || st==
"_" || st==
"/" || st==
"|" || st==
",") {
5327 if (st==
"^" || st==
"_" || st==
",") {
5328 return [AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output)),str,symbol.tag];
5330 node = AMcreateMmlNode(
"mrow",AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output)));
5332 var space = AMcreateElementMathML(
"mspace");
5333 space.setAttribute(
"width",
"0.167em");
5334 node.appendChild(space);
5336 node.appendChild(result[
0]);
5337 return [node,result[
1],symbol.tag];
5340 if (symbol.input ==
"\\sqrt") { // sqrt
5341 if (isIE) { // set minsize, for \surd
5342 var space = AMcreateElementMathML(
"mspace");
5343 space.setAttribute(
"height",
"1.2ex");
5344 space.setAttribute(
"width",
"0em"); // probably no effect
5345 node = AMcreateMmlNode(symbol.tag,result[
0])
5346 // node.setAttribute(
"minsize",
"1"); // ignored
5347 // node = AMcreateMmlNode(
"mrow",node); // hopefully unnecessary
5348 node.appendChild(space);
5349 return [node,result[
1],symbol.tag];
5351 return [AMcreateMmlNode(symbol.tag,result[
0]),result[
1],symbol.tag];
5352 } else if (typeof symbol.acc ==
"boolean" && symbol.acc) { // accent
5353 node = AMcreateMmlNode(symbol.tag,result[
0]);
5354 var output = symbol.output;
5356 if (symbol.input ==
"\\hat")
5358 else if (symbol.input ==
"\\widehat")
5360 else if (symbol.input ==
"\\bar")
5362 else if (symbol.input ==
"\\grave")
5364 else if (symbol.input ==
"\\tilde")
5367 var node1 = AMcreateMmlNode(
"mo",document.createTextNode(output));
5368 if (symbol.input ==
"\\vec" || symbol.input ==
"\\check")
5369 // don't allow to stretch
5370 node1.setAttribute(
"maxsize",
"1.2");
5371 // why doesn't
"1" work? \vec nearly disappears in firefox
5372 if (isIE && symbol.input ==
"\\bar")
5373 node1.setAttribute(
"maxsize",
"0.5");
5374 if (symbol.input ==
"\\underbrace" || symbol.input ==
"\\underline")
5375 node1.setAttribute(
"accentunder",
"true");
5377 node1.setAttribute(
"accent",
"true");
5378 node.appendChild(node1);
5379 if (symbol.input ==
"\\overbrace" || symbol.input ==
"\\underbrace")
5380 node.ttype = UNDEROVER;
5381 return [node,result[
1],symbol.tag];
5382 } else if (symbol.input ==
"\\not") { // not
5383 // added by infinity0 on
2009-
12-
15 to implement \not command
5384 text = result[
0].childNodes[
0].nodeValue;
5385 if (typeof text ==
"string" && text.length ==
1 && text in AMRelationNegations) {
5386 result[
0].childNodes[
0].nodeValue = AMRelationNegations[text];
5387 return [AMcreateMmlNode(symbol.tag,result[
0]),result[
1],symbol.tag];
5389 return [AMcreateMmlNode(
"mo",document.createTextNode(
"\\")),
"not " + str,symbol.tag];
5390 } else { // font change or displaystyle command
5391 if (!isIE && typeof symbol.codes !=
"undefined") {
5392 for (i=
0; i
<result[
0].childNodes.length; i++)
5393 if (result[
0].childNodes[i].nodeName==
"mi" || result[
0].nodeName==
"mi") {
5394 st = (result[
0].nodeName==
"mi"?result[
0].firstChild.nodeValue:
5395 result[
0].childNodes[i].firstChild.nodeValue);
5397 for (var j=
0; j
<st.length; j++)
5398 if (st.charCodeAt(j)
>64 && st.charCodeAt(j)
<91)
5399 { newst = newst + symbol.codes[st.charCodeAt(j)-
65] }
5400 // String.fromCharCode(symbol.codes[st.charCodeAt(j)-
65]); alert(newst); }
5401 else newst = newst + st.charAt(j);
5402 if (result[
0].nodeName==
"mi")
5403 result[
0]=AMcreateElementMathML(
"mo").
5404 appendChild(document.createTextNode(newst));
5405 else result[
0].replaceChild(AMcreateElementMathML(
"mo").
5406 appendChild(document.createTextNode(newst)),result[
0].childNodes[i]);
5409 node = AMcreateMmlNode(symbol.tag,result[
0]);
5410 node.setAttribute(symbol.atname,symbol.atval);
5411 if (symbol.input ==
"\\scriptstyle" ||
5412 symbol.input ==
"\\scriptscriptstyle")
5413 node.setAttribute(
"displaystyle",
"false");
5414 return [node,result[
1],symbol.tag];
5417 result = AMparseSexpr(str);
5418 if (result[
0]==null) return [AMcreateMmlNode(
"mo",document.createTextNode(symbol.input)),str,null];
5419 result2 = AMparseSexpr(result[
1]);
5420 if (result2[
0]==null) return [AMcreateMmlNode(
"mo",document.createTextNode(symbol.input)),str,null];
5421 //added by J. Knisley to allow \textcolor and \colorbox within equations
5422 if (symbol.input==
"\\textcolor" || symbol.input==
"\\colorbox") {
5423 var tclr = str.match(/\{s*([#\w]+)\s*\}/); //get's color from beginning of str
5424 str = str.replace(/\{s*[#\w]+\s*\}/,
"");
5426 if(IsColorName.test(tclr[
1].toLowerCase())) {
5427 tclr=LaTeXColor[tclr[
1].toLowerCase()];
5429 tclr=tclr[
1]; // no checking for valid color!!
5431 node = AMcreateElementMathML(
"mstyle");
5432 node.setAttribute(symbol.atval,tclr);
5433 node.appendChild(result2[
0]);
5434 return [node,result2[
1],symbol.tag];
5437 if (symbol.input==
"\\root" || symbol.input==
"\\stackrel") newFrag.appendChild(result2[
0]);
5438 newFrag.appendChild(result[
0]);
5439 if (symbol.input==
"\\frac") newFrag.appendChild(result2[
0]);
5440 return [AMcreateMmlNode(symbol.tag,newFrag),result2[
1],symbol.tag];
5442 str = AMremoveCharsAndBlanks(str,symbol.input.length);
5443 return [AMcreateMmlNode(
"mo",document.createTextNode(symbol.output)),
5446 return [AMcreateMmlNode(symbol.tag, //its a constant
5447 document.createTextNode(symbol.output)),str,symbol.tag];
5451 function AMparseIexpr(str) {
5452 var symbol, sym1, sym2, node, result, tag, underover;
5453 str = AMremoveCharsAndBlanks(str,
0);
5454 sym1 = AMgetSymbol(str);
5455 result = AMparseSexpr(str);
5459 symbol = AMgetSymbol(str);
5460 if (symbol.ttype == INFIX) {
5461 str = AMremoveCharsAndBlanks(str,symbol.input.length);
5462 result = AMparseSexpr(str);
5463 if (result[
0] == null) // show box in place of missing argument
5464 result[
0] = AMcreateMmlNode(
"mo",document.createTextNode(
"\u25A1"));
5467 if (symbol.input ==
"_" || symbol.input ==
"^") {
5468 sym2 = AMgetSymbol(str);
5469 tag = null; // no space between x^
2 and a following sin, cos, etc.
5470 // This is for \underbrace and \overbrace
5471 underover = ((sym1.ttype == UNDEROVER) || (node.ttype == UNDEROVER));
5472 // underover = (sym1.ttype == UNDEROVER);
5473 if (symbol.input ==
"_" && sym2.input ==
"^") {
5474 str = AMremoveCharsAndBlanks(str,sym2.input.length);
5475 var res2 = AMparseSexpr(str);
5477 tag = res2[
2]; // leave space between x_1^
2 and a following sin etc.
5478 node = AMcreateMmlNode((underover?
"munderover":
"msubsup"),node);
5479 node.appendChild(result[
0]);
5480 node.appendChild(res2[
0]);
5481 } else if (symbol.input ==
"_") {
5482 node = AMcreateMmlNode((underover?
"munder":
"msub"),node);
5483 node.appendChild(result[
0]);
5485 node = AMcreateMmlNode((underover?
"mover":
"msup"),node);
5486 node.appendChild(result[
0]);
5488 node = AMcreateMmlNode(
"mrow",node); // so sum does not stretch
5490 node = AMcreateMmlNode(symbol.tag,node);
5491 if (symbol.input ==
"\\atop" || symbol.input ==
"\\choose")
5492 node.setAttribute(
"linethickness",
"0ex");
5493 node.appendChild(result[
0]);
5494 if (symbol.input ==
"\\choose")
5495 node = AMcreateMmlNode(
"mfenced",node);
5498 return [node,str,tag];
5501 function AMparseExpr(str,rightbracket,matrix) {
5502 var symbol, node, result, i, tag,
5503 newFrag = document.createDocumentFragment();
5505 str = AMremoveCharsAndBlanks(str,
0);
5506 result = AMparseIexpr(str);
5510 symbol = AMgetSymbol(str);
5511 if (node!=undefined) {
5512 if ((tag ==
"mn" || tag ==
"mi") && symbol!=null &&
5513 typeof symbol.func ==
"boolean" && symbol.func) {
5514 // Add space before \sin in
2\sin x or x\sin x
5515 var space = AMcreateElementMathML(
"mspace");
5516 space.setAttribute(
"width",
"0.167em");
5517 node = AMcreateMmlNode(
"mrow",node);
5518 node.appendChild(space);
5520 newFrag.appendChild(node);
5522 } while ((symbol.ttype != RIGHTBRACKET)
5523 && symbol!=null && symbol.output!=
"");
5525 if (symbol.ttype == RIGHTBRACKET) {
5526 if (symbol.input ==
"\\right") { // right what?
5527 str = AMremoveCharsAndBlanks(str,symbol.input.length);
5528 symbol = AMgetSymbol(str);
5529 if (symbol != null && symbol.input ==
".")
5530 symbol.invisible = true;
5535 str = AMremoveCharsAndBlanks(str,symbol.input.length); // ready to return
5536 var len = newFrag.childNodes.length;
5538 len
>0 && newFrag.childNodes[len-
1].nodeName ==
"mrow" && len
>1 &&
5539 newFrag.childNodes[len-
2].nodeName ==
"mo" &&
5540 newFrag.childNodes[len-
2].firstChild.nodeValue ==
"&") { //matrix
5541 var pos = []; // positions of ampersands
5542 var m = newFrag.childNodes.length;
5543 for (i=
0; matrix && i
<m; i=i+
2) {
5545 node = newFrag.childNodes[i];
5546 for (var j=
0; j
<node.childNodes.length; j++)
5547 if (node.childNodes[j].firstChild.nodeValue==
"&")
5548 pos[i][pos[i].length]=j;
5550 var row, frag, n, k, table = document.createDocumentFragment();
5551 for (i=
0; i
<m; i=i+
2) {
5552 row = document.createDocumentFragment();
5553 frag = document.createDocumentFragment();
5554 node = newFrag.firstChild; //
<mrow> -&-&...&-&-
</mrow>
5555 n = node.childNodes.length;
5557 for (j=
0; j
<n; j++) {
5558 if (typeof pos[i][k] !=
"undefined" && j==pos[i][k]){
5559 node.removeChild(node.firstChild); //remove &
5560 row.appendChild(AMcreateMmlNode(
"mtd",frag));
5562 } else frag.appendChild(node.firstChild);
5564 row.appendChild(AMcreateMmlNode(
"mtd",frag));
5565 if (newFrag.childNodes.length
>2) {
5566 newFrag.removeChild(newFrag.firstChild); //remove
<mrow> </mrow>
5567 newFrag.removeChild(newFrag.firstChild); //remove
<mo>&
</mo>
5569 table.appendChild(AMcreateMmlNode(
"mtr",row));
5573 if (typeof symbol.invisible !=
"boolean" || !symbol.invisible) {
5574 node = AMcreateMmlNode(
"mo",document.createTextNode(symbol.output));
5575 newFrag.appendChild(node);
5578 return [newFrag,str,tag];
5581 function AMparseMath(str) {
5582 var result, node = AMcreateElementMathML(
"mstyle");
5583 //added by J. Knisley to allow limited implementation of \color
5584 var cclr = str.match(/\\color\s*\{s*([#\w]+)\s*\}/);
5585 str = str.replace(/\\color\s*\{s*[#\w]+\s*\}/g,
"");
5587 if(IsColorName.test(cclr[
1].toLowerCase())) {
5588 cclr=LaTeXColor[cclr[
1].toLowerCase()];
5590 cclr=cclr[
1]; // no checking for valid color!!
5592 node.setAttribute(
"mathcolor",cclr);
5594 if (mathcolor !=
"") node.setAttribute(
"mathcolor",mathcolor);
5596 if (mathfontfamily !=
"") node.setAttribute(
"fontfamily",mathfontfamily);
5597 node.appendChild(AMparseExpr(str.replace(/^\s+/g,
""),false,false)[
0]);
5598 node = AMcreateMmlNode(
"math",node);
5599 if (showasciiformulaonhover) //fixed by djhsu so newline
5600 node.setAttribute(
"title",str.replace(/\s+/g,
" "));//does not show in Gecko
5601 if (false ) { //&& mathfontfamily !=
"" && (isIE || mathfontfamily !=
"serif")) {
5602 var fnode = AMcreateElementXHTML(
"font");
5603 fnode.setAttribute(
"face",mathfontfamily);
5604 fnode.appendChild(node);
5610 function AMstrarr2docFrag(arr, linebreaks) {
5611 var newFrag=document.createDocumentFragment();
5613 for (var i=
0; i
<arr.length; i++) {
5614 if (expr) newFrag.appendChild(AMparseMath(arr[i]));
5616 var arri = (linebreaks ? arr[i].split(
"\n\n") : [arr[i]]);
5617 newFrag.appendChild(AMcreateElementXHTML(
"span").
5618 appendChild(document.createTextNode(arri[
0])));
5619 for (var j=
1; j
<arri.length; j++) {
5620 newFrag.appendChild(AMcreateElementXHTML(
"p"));
5621 newFrag.appendChild(AMcreateElementXHTML(
"span").
5622 appendChild(document.createTextNode(arri[j])));
5630 function AMprocessNodeR(n, linebreaks) {
5631 var mtch, str, arr, frg, i;
5632 if (n.childNodes.length ==
0) {
5633 if ((n.nodeType!=
8 || linebreaks) &&
5634 n.parentNode.nodeName!=
"form" && n.parentNode.nodeName!=
"FORM" &&
5635 n.parentNode.nodeName!=
"textarea" && n.parentNode.nodeName!=
"TEXTAREA" &&
5636 n.parentNode.nodeName!=
"pre" && n.parentNode.nodeName!=
"PRE") {
5638 if (!(str == null)) {
5639 str = str.replace(/\r\n\r\n/g,
"\n\n");
5640 str = str.replace(/\x20+/g,
" ");
5641 str = str.replace(/\s*\r\n/g,
" ");
5643 mtch = (str.indexOf(
"\$")==-
1 ? false : true);
5644 str = str.replace(/([^\\])\$/g,
"$1 \$");
5645 str = str.replace(/^\$/,
" \$"); // in case \$ at start of string
5646 arr = str.split(
" \$");
5647 for (i=
0; i
<arr.length; i++)
5648 arr[i]=arr[i].replace(/\\\$/g,
"\$");
5649 if (arr.length
>1 || mtch) {
5650 if (checkForMathML) {
5651 checkForMathML = false;
5652 var nd = AMisMathMLavailable();
5653 AMnoMathML = nd != null;
5654 if (AMnoMathML && notifyIfNoMathML)
5655 if (alertIfNoMathML)
5656 alert(
"To view the ASCIIMathML notation use Internet Explorer 6 +\nMathPlayer (free from www.dessci.com)\n\
5657 or Firefox/Mozilla/Netscape");
5658 else AMbody.insertBefore(nd,AMbody.childNodes[
0]);
5661 frg = AMstrarr2docFrag(arr,n.nodeType==
8);
5662 var len = frg.childNodes.length;
5663 n.parentNode.replaceChild(frg,n);
5669 } else if (n.nodeName!=
"math") {
5670 for (i=
0; i
<n.childNodes.length; i++)
5671 i += AMprocessNodeR(n.childNodes[i], linebreaks);
5676 function AMprocessNode(n, linebreaks, spanclassAM) {
5678 if (spanclassAM!=null) {
5679 frag = document.getElementsByTagName(
"span")
5680 for (var i=
0;i
<frag.length;i++)
5681 if (frag[i].className ==
"AM")
5682 AMprocessNodeR(frag[i],linebreaks);
5688 if (st==null || st.indexOf(
"\$")!=-
1)
5689 AMprocessNodeR(n,linebreaks);
5691 if (isIE) { //needed to match size and font of formula to surrounding text
5692 frag = document.getElementsByTagName('math');
5693 for (var i=
0;i
<frag.length;i++) frag[i].update()
5697 /* Below is LaTeX pre-processing to produce CSS supported */
5698 /* standard latex structures*/
5699 /* Jeff Knisley (knisleyj@etsu.edu)
5700 /* Supported in part by the Howard Hughes Medical Institute */
5701 /* as part of the Symbiosis Project: HHMI #
52005872 */
5703 var inAppendix = false;
5704 var sectionCntr =
0;
5705 var IEcommentWarning = true;
5709 var LaTeXCounter = [];
5710 LaTeXCounter[
"definition"] =
0;
5711 LaTeXCounter[
"proposition"] =
0;
5712 LaTeXCounter[
"lemma"] =
0;
5713 LaTeXCounter[
"theorem"] =
0;
5714 LaTeXCounter[
"corollary"] =
0;
5715 LaTeXCounter[
"example"] =
0;
5716 LaTeXCounter[
"exercise"] =
0;
5717 LaTeXCounter[
"subsection"] =
0;
5718 LaTeXCounter[
"subsubsection"] =
0;
5719 LaTeXCounter[
"figure"] =
0;
5720 LaTeXCounter[
"equation"] =
0;
5721 LaTeXCounter[
"table"] =
0;
5722 LaTeXCounter[
"label"] =
0;
5724 var LaTeXColor = [];
5725 LaTeXColor[
"greenyellow"] =
"#D9FF4F";
5726 LaTeXColor[
"yellow"] =
"#FFFF00";
5727 LaTeXColor[
"goldenrod"] =
"#FFE529";
5728 LaTeXColor[
"dandelion"] =
"#FFB529";
5729 LaTeXColor[
"apricot"] =
"#FFAD7A";
5730 LaTeXColor[
"peach"] =
"#FF804D";
5731 LaTeXColor[
"melon"] =
"#FF8A80";
5732 LaTeXColor[
"yelloworange"] =
"#FF9400";
5733 LaTeXColor[
"orange"] =
"#FF6321";
5734 LaTeXColor[
"burntorange"] =
"#FF7D00";
5735 LaTeXColor[
"bittersweet"] =
"#C20300";
5736 LaTeXColor[
"redorange"] =
"#FF3B21";
5737 LaTeXColor[
"mahogany"] =
"#A60000";
5738 LaTeXColor[
"maroon"] =
"#AD0000";
5739 LaTeXColor[
"brickred"] =
"#B80000";
5740 LaTeXColor[
"red"] =
"#FF0000";
5741 LaTeXColor[
"orangered"] =
"#FF0080";
5742 LaTeXColor[
"rubinered"] =
"#FF00DE";
5743 LaTeXColor[
"wildstrawberry"] =
"#FF0A9C";
5744 LaTeXColor[
"salmon"] =
"#FF789E";
5745 LaTeXColor[
"carnationpink"] =
"#FF5EFF";
5746 LaTeXColor[
"magenta"] =
"#FF00FF";
5747 LaTeXColor[
"violetred"] =
"#FF30FF";
5748 LaTeXColor[
"rhodamine"] =
"#FF2EFF";
5749 LaTeXColor[
"mulberry"] =
"#A314FA";
5750 LaTeXColor[
"redviolet"] =
"#9600A8";
5751 LaTeXColor[
"fuchsia"] =
"#7303EB";
5752 LaTeXColor[
"lavender"] =
"#FF85FF";
5753 LaTeXColor[
"thistle"] =
"#E069FF";
5754 LaTeXColor[
"orchid"] =
"#AD5CFF";
5755 LaTeXColor[
"darkorchid"] =
"#9933CC";
5756 LaTeXColor[
"purple"] =
"#8C24FF";
5757 LaTeXColor[
"plum"] =
"#8000FF";
5758 LaTeXColor[
"violet"] =
"#361FFF";
5759 LaTeXColor[
"royalpurple"] =
"#401AFF";
5760 LaTeXColor[
"blueviolet"] =
"#1A0DF5";
5761 LaTeXColor[
"periwinkle"] =
"#6E73FF";
5762 LaTeXColor[
"cadetblue"] =
"#616EC4";
5763 LaTeXColor[
"cornflowerblue"] =
"#59DEFF";
5764 LaTeXColor[
"midnightblue"] =
"#007091";
5765 LaTeXColor[
"navyblue"] =
"#0F75FF";
5766 LaTeXColor[
"royalblue"] =
"#0080FF";
5767 LaTeXColor[
"blue"] =
"#0000FF";
5768 LaTeXColor[
"cerulean"] =
"#0FE3FF";
5769 LaTeXColor[
"cyan"] =
"#00FFFF";
5770 LaTeXColor[
"processblue"] =
"#0AFFFF";
5771 LaTeXColor[
"skyblue"] =
"#61FFE0";
5772 LaTeXColor[
"turquoise"] =
"#26FFCC";
5773 LaTeXColor[
"tealblue"] =
"#1FFAA3";
5774 LaTeXColor[
"aquamarine"] =
"#2EFFB2";
5775 LaTeXColor[
"bluegreen"] =
"#26FFAB";
5776 LaTeXColor[
"emerald"] =
"#00FF80";
5777 LaTeXColor[
"junglegreen"] =
"#03FF7A";
5778 LaTeXColor[
"seagreen"] =
"#4FFF80";
5779 LaTeXColor[
"green"] =
"#00FF00";
5780 LaTeXColor[
"forestgreen"] =
"#00E000";
5781 LaTeXColor[
"pinegreen"] =
"#00BF29";
5782 LaTeXColor[
"limegreen"] =
"#80FF00";
5783 LaTeXColor[
"yellowgreen"] =
"#8FFF42";
5784 LaTeXColor[
"springgreen"] =
"#BDFF3D";
5785 LaTeXColor[
"olivegreen"] =
"#009900";
5786 LaTeXColor[
"rawsienna"] =
"#8C0000";
5787 LaTeXColor[
"sepia"] =
"#4D0000";
5788 LaTeXColor[
"brown"] =
"#660000";
5789 LaTeXColor[
"tan"] =
"#DB9470";
5790 LaTeXColor[
"gray"] =
"#808080";
5791 LaTeXColor[
"grey"] =
"#808080";
5792 LaTeXColor[
"black"] =
"#000000";
5793 LaTeXColor[
"white"] =
"#FFFFFF";
5795 var IsColorName = /^(?:greenyellow|yellow|goldenrod|dandelion|apricot|peach|melon|yelloworange|orange|burntorange|bittersweet|redorange|mahogany|maroon|brickred|red|orangered|rubinered|wildstrawberry|salmon|carnationpink|magenta|violetred|rhodamine|mulberry|redviolet|fuchsia|lavender|thistle|orchid|darkorchid|purple|plum|violet|royalpurple|blueviolet|periwinkle|cadetblue|cornflowerblue|midnightblue|navyblue|royalblue|blue|cerulean|cyan|processblue|skyblue|turquoise|tealblue|aquamarine|bluegreen|emerald|junglegreen|seagreen|green|forestgreen|pinegreen|limegreen|yellowgreen|springgreen|olivegreen|rawsienna|sepia|brown|tan|gray|grey|black|white)$/;
5796 var IsCounter = /^(?:definition|proposition|lemma|theorem|corollary|example|exercise|subsection|subsubsection|figure|equation|table)$/ ;
5797 var IsLaTeXElement = /^(?:displayequation|title|author|address|date|abstract|keyword|section|subsection|subsubsection|ref|cite|thebibliography|definition|proposition|lemma|theorem|corollary|example|exercise|itemize|enumerate|enddefinition|endproposition|endlemma|endtheorem|endcorollary|endexample|endexercise|enditemize|endenumerate|LaTeXMathMLlabel|LaTeXMathML|smallskip|medskip|bigskip|quote|quotation|endquote|endquotation|center|endcenter|description|enddescription|inlinemath)$/;
5798 var IsTextOnlyArea = /^(?:form|textarea|pre)$/i;
5801 function makeNumberString(cntr) {
5802 if(sectionCntr
> 0) {
5804 return
"A"+sectionCntr+
"."+cntr;
5806 return sectionCntr+
"."+cntr;
5814 function LaTeXpreProcess(thebody) {
5815 var TheBody = thebody;
5816 if(TheBody.hasChildNodes()) {
5817 if(!(IsLaTeXElement.test(TheBody.className)))
5819 for(var i=
0; i
<TheBody.childNodes.length; i++) {
5820 LaTeXpreProcess(TheBody.childNodes[i]) }
5824 if( TheBody.nodeType==
3 &&
5825 !(IsTextOnlyArea.test(TheBody.parentNode.nodeName) ) )
5827 var str = TheBody.nodeValue;
5830 str = str.replace(/\\%/g,
"<per>"); // % sign
5831 str = str.replace(/%[^\n]*(?=\n)/g,
"");
5832 str = str.replace(/%[^\r]*(?=\r)/g,
""); //Used by Explorer
5833 str = str.replace(/%[^\n]*$/,
"") // End of text segment comment
5835 if(isIE && str.match(/%/g) != null && IEcommentWarning) {
5836 alert(
"Comments may not have parsed properly. Try putting in <pre class='LaTeX><div>..</div></pre> structure.");
5837 IEcommentWarning = false;
5839 str = str.replace(/
<per>/g,
"%");
5841 //if(str.match(/XXX[\s\S]*/)!=null) {
5842 // var tmp = str.match(/XXX[\s\S]*/)[
0];
5843 // var tmpstr = tmp.charCodeAt(
7)+
"::"+tmp.charCodeAt(
8)+
"::"+tmp.charCodeAt(
9)+
"::"+tmp.charCodeAt(
10)+
"::"+tmp.charCodeAt(
11)+
"::"+tmp.charCodeAt(
12)+
"::"+tmp.charCodeAt(
13);
5847 //spacing that in LaTeXMathML may cause problems because of our approach. We use purely unicode
5848 // First we remove singleton / symbols
5849 str = str.replace(/([^\\])\\(\s)/g,
"$1\u00A0$2"); // must be a space after \ for it to make an nbsp
5851 str = str.replace(/\\quad/g,
"\u2001");
5852 str = str.replace(/\\qquad/g,
"\u2001\u2001");
5853 str = str.replace(/\\enspace/g,
"\u2002");
5854 str = str.replace(/\\;/g,
"\u2004");
5855 str = str.replace(/\\:/g,
"\u2005");
5856 str = str.replace(/\\,/g,
"\u2006");
5857 str = str.replace(/\\thinspace/g,
"\u200A");
5858 str = str.replace(/([^\\])~/g,
"$1\u00A0");
5859 str = str.replace(/\\~/g,
"~");
5861 //Added \[ ... \] and $$..$$ functionality.
5862 str = str.replace(/\\\[/g,
" <DEQ> $\\displaystyle{");
5863 str = str.replace(/\\\]/g,
"}$ <DEQ> ");
5864 str = str.replace(/\$\$/g,
"${$<DEQ>$}$");
5866 // Separate replacements for begin .. end to (eventually) allow LaTeX equations with html codes mixed in
5867 // (as is the case for theorem, etc.
5868 // all variations of spaces with \begin{array} .. \end{array} -- not displayed, however
5869 str = str.replace(/\\begin\s*\{s*array\s*\}/g,
"\\begin{array}");
5870 str = str.replace(/\\end\s*\{s*array\s*\}/g,
"\\end{array}");
5872 // all variations of spaces with \begin{eqnarray} .. \end{eqnarray}
5873 str = str.replace(/\\begin\s*\{s*eqnarray\s*\}/g,
" <DEQ>eqno$\\begin{eqnarray}");
5874 str = str.replace(/\\end\s*\{s*eqnarray\s*\}/g,
"\\end{eqnarray}$<DEQ> ");
5876 // all variations of spaces with \begin{eqnarray*} .. \end{eqnarray*}
5877 str = str.replace(/\\begin\s*\{s*eqnarray\*\s*\}/g,
" <DEQ>$\\begin{eqnarray}");
5878 str = str.replace(/\\end\s*\{s*eqnarray\*\s*\}/g,
"\\end{eqnarray}$<DEQ> ");
5880 // all variations of spaces with \begin{displaymath} .. \end{displaymath}
5881 str = str.replace(/\\begin\s*\{s*displaymath\s*\}/g,
" <DEQ> $\\displaystyle{");
5882 str = str.replace(/\\end\s*\{s*displaymath\s*\}/g,
"}$ <DEQ> ");
5884 // all variations of spaces with \begin{equation*} .. \end{equation*}
5885 str = str.replace(/\\begin\s*\{s*equation\s*\*\s*\}/g,
" <DEQ> $\\displaystyle{");
5886 str = str.replace(/\\end\s*\{s*equation\s*\*\s*\}/g,
"}$ <DEQ> ");
5888 // all variations of spaces with \begin{equation} .. \end{equation}
5889 str = str.replace(/\\begin\s*\{s*equation\s*\}/g,
" <DEQ>eqno$\\displaystyle{");
5890 str = str.replace(/\\end\s*\{s*equation\s*\}/g,
"}$ <DEQ> ");
5894 //now parse to translate
<DEQ> structures to
<table class = 'dispeq'
> stuff
5895 //and to identify non-display math content (sections, etc).
5897 str = str.split(
"<DEQ>");
5898 // var ntype = TheBody.nodeType;
5899 var newFrag = document.createDocumentFragment();
5901 for(var i=
0;i
<str.length;i++) {
5903 //odd = table of type displayequation
5904 var DEQtable = document.createElement(
"table");
5905 DEQtable.className='displayequation';
5906 var DEQtbody = document.createElement(
"tbody");
5908 var DEQtr = document.createElement(
"tr");
5909 var DEQtdeq = document.createElement(
"td");
5910 DEQtdeq.className='eq';
5912 // AfterFix to repair for $$...$$
5913 str[i] = str[i].replace(/\$\}$/g,
"$\\displaystyle{");
5914 str[i] = str[i].replace(/\$\{$/g,
"}");
5916 //check for equation number via either label or eqno at beginning -- \nonumber is removed
5917 var lbl = str[i].match(/\\label\s*\{s*(\w+)\s*\}/);
5918 var ISeqno = str[i].match(/^eqno/);
5920 // append nodes into row
5921 str[i] = str[i].replace(/^eqno/,
" ");
5922 str[i] = str[i].replace(/\\label\s*\{s*\w+\s*\}/,
" ");
5923 DEQtdeq.appendChild(document.createTextNode( str[i] ) );
5924 DEQtr.appendChild(DEQtdeq);
5926 str[i] = str[i].replace(/\\nonumber/g,
"");
5928 if(ISeqno!=null || lbl !=null) {
5929 var DEQtdno = document.createElement(
"td");
5930 DEQtdno.className='eqno';
5931 LaTeXCounter[
"equation"]++;
5932 var eqnoString = makeNumberString(LaTeXCounter[
"equation"]);
5934 var DEQanchor = document.createElement(
"a");
5935 if(lbl!=null) { DEQanchor.id = lbl[
1] };
5936 DEQanchor.className =
"eqno";
5937 var anchorSpan = document.createElement(
"span");
5938 anchorSpan.className =
"eqno";
5939 anchorSpan.style.display =
"none";
5940 anchorSpan.appendChild(document.createTextNode(eqnoString));
5941 DEQanchor.appendChild(anchorSpan);
5942 DEQtdno.appendChild(DEQanchor);
5943 var DEQspan = document.createElement(
"span");
5944 DEQspan.className =
"eqno";
5945 DEQspan.appendChild(document.createTextNode(
"("+eqnoString+
")" ));
5946 DEQtdno.appendChild(DEQspan);
5947 DEQtr.appendChild(DEQtdno);
5949 DEQtbody.appendChild(DEQtr);
5950 DEQtable.appendChild(DEQtbody);
5951 newFrag.appendChild(DEQtable);
5954 //even = this is text, where we may have sections, labels, subsections, and so on
5956 // AfterFix to repair for $$...$$
5957 str[i] = str[i].replace(/\$\}$/g,
"");
5958 str[i] = str[i].replace(/\$\{$/g,
"");
5960 //Some stuff we just want to remove
5961 str[i] = str[i].replace(/\\maketitle/g,
"");
5962 str[i] = str[i].replace(/\\begin\s*\{s*document\s*\}/g,
"");
5963 str[i] = str[i].replace(/\\end\s*\{s*document\s*\}/g,
"");
5964 str[i] = str[i].replace(/\\documentclass[^\}]*?\}/g,
"");
5965 str[i] = str[i].replace(/\\usepackage[^\}]*?\}/g,
""); //ignores packages and their options
5966 str[i] = str[i].replace(/\\noindent/g,
"");
5967 str[i] = str[i].replace(/\\notag/g,
"");
5969 //Next: labels, ref's, hrefs, urls, and cites
5970 str[i] = str[i].replace(/\\ref\s*\{s*(\w+)\}/g,
" \\[ref\\]$1\\[ ");
5971 str[i] = str[i].replace (/\\url\s*\{s*([^\}n]+)\}/g,
" \\[url\\]$1\\[ ");
5972 str[i] = str[i].replace(/\\href\s*\{s*([^\}]+)\}s*\{s*([^\}]+)\}/g,
" \\[href\\]$1\\]$2\\[ ");
5973 str[i] = str[i].replace(/\\cite\s*\{s*(\w+)\}/g,
" \\[cite\\]$1\\[ ");
5975 //Miscellaneous stuff!!
5976 str[i] = str[i].replace(/\\qed/g,
"\u220E");
5977 str[i] = str[i].replace(/\\endproof/g,
"\u220E");
5978 str[i] = str[i].replace(/\\proof/g,
"\\textbf{Proof: }");
5981 str[i] = str[i].replace(/\\n(?=\s)/g,
" \\[br\\] \\[ ");
5982 str[i] = str[i].replace(/\\newline/g,
" \\[br\\] \\[ ");
5983 str[i] = str[i].replace(/\\linebreak/g,
" \\[br\\] \\[ ");
5984 str[i] = str[i].replace(/\\smallskip/g,
" \\[logicalbreak\\]smallskip\\[ ");
5985 str[i] = str[i].replace(/\\medskip/g,
" \\[logicalbreak\\]medskip\\[ ");
5986 str[i] = str[i].replace(/\\bigskip/g,
" \\[logicalbreak\\]bigskip\\[ ");
5987 str[i] = str[i].replace(/[\n\r]+[ \f\n\r\t\v\u2028\u2029]*[\n\r]+/g,
" \\[logicalbreak\\]LaTeXMathML\\[ "); // extra return replaced by
<p>
5989 str[i] = str[i].replace(/\r/g,
" "); // replace \r by a space to aid spacing!
5993 //items and appendix
5994 str[i] = str[i].replace(/\\bibitem\s*([^\{]*\{s*\w*\s*\})/g,
" \\[bibitem\\]$1\\[ ");
5995 str[i] = str[i].replace(/\\bibitem\s*/g,
" \\[bibitem\\] \\[ ");
5996 str[i] = str[i].replace(/\\item\s*\[\s*(\w+)\s*\]/g,
" \\[alistitem\\]$1\\[ ");
5997 str[i] = str[i].replace(/\\item\s*/g,
" \\[alistitem\\] \\[ ");
5998 str[i] = str[i].replace(/\\appendix/g,
" \\[appendix\\] \\[ ");
6001 // \includegraphics[][]{image} -- no processing of options. This treatment is DANGEROUS. It assumes no html will be
6002 // placed within the \begin{figure} ... \end{figure} structure, and the [\s\S] character class could lead to strange matches
6003 str[i] = str[i].replace(/\\begin\s*\{s*figure\s*\}([\s\S]+?)\\end\s*\{s*figure\s*\}/g,
" \\[figure\\]$1\\[ ");
6004 str[i] = str[i].replace(/\\begin\s*\{s*table\s*\}([\s\S]+?)\\end\s*\{s*table\s*\}/g,
" \\[table\\]$1\\[ ");
6005 //str[i] = str[i].replace(/\\begin\s*\{s*array\s*\}([\s\S]+?)\\end\s*\{s*array\s*\}/g,
" \\[array\\]$1\\[ ");
6006 //goal is to protect array \\ from being converted into linebreaks
6008 //This construction allows css classes for divs for these elements, but the CSS will have to be supplied through a
6009 //css file or (script) .. (/script) in the header. (It makes sense to me that style files in LaTeX should correspond
6010 //to css and/or xslt when translating to mathml, but \ref's are a problem).
6011 str[i] = str[i].replace(/\\begin\s*\{s*theorem\s*\}/g,
" \\[theorem\\]Theorem \\[ ");
6012 str[i] = str[i].replace(/\\end\s*\{s*theorem\s*\}/g,
" \\[endtheorem\\] \\[ ");
6014 str[i] = str[i].replace(/\\begin\s*\{s*definition\s*\}/g,
" \\[definition\\]Definition \\[ ");
6015 str[i] = str[i].replace(/\\end\s*\{s*definition\s*\}/g,
" \\[enddefinition\\] \\[ ");
6017 str[i] = str[i].replace(/\\begin\s*\{s*lemma\s*\}/g,
" \\[lemma\\]Lemma \\[ ");
6018 str[i] = str[i].replace(/\\end\s*\{s*lemma\s*\}/g,
" \\[endlemma\\] \\[ ");
6020 str[i] = str[i].replace(/\\begin\s*\{s*corollary\s*\}/g,
" \\[corollary\\]Corollary \\[ ");
6021 str[i] = str[i].replace(/\\end\s*\{s*corollary\s*\}/g,
" \\[endcorollary\\] \\[ ");
6023 str[i] = str[i].replace(/\\begin\s*\{s*proposition\s*\}/g,
" \\[proposition\\]Proposition \\[ ");
6024 str[i] = str[i].replace(/\\end\s*\{s*proposition\s*\}/g,
" \\[endproposition\\] \\[ ");
6026 str[i] = str[i].replace(/\\begin\s*\{s*example\s*\}/g,
" \\[example\\]Example \\[ ");
6027 str[i] = str[i].replace(/\\end\s*\{s*example\s*\}/g,
" \\[endexample\\] \\[ ");
6029 str[i] = str[i].replace(/\\begin\s*\{s*exercise\s*\}/g,
" \\[exercise\\]Exercise \\[ ");
6030 str[i] = str[i].replace(/\\end\s*\{s*exercise\s*\}/g,
" \\[endexercise\\] \\[ ");
6032 str[i] = str[i].replace(/\\begin\s*\{s*thebibliography\s*\}s*\{s*\w+\s*\}/g,
" \\[thebibliography\\]References \\[ ");
6033 str[i] = str[i].replace(/\\begin\s*\{s*thebibliography\s*\}/g,
" \\[thebibliography\\]References \\[ ");
6034 str[i] = str[i].replace(/\\end\s*\{s*thebibliography\s*\}/g,
" \\[endthebibliography\\]References \\[ ");
6037 str[i] = str[i].replace(/\\begin\s*\{s*proof\s*\}/g,
" \\[proof\\]Proof: \\[ ");
6038 if(isIE) { //IE is just so weird
6039 str[i] = str[i].replace(/\\end\s*\{s*proof\s*\}/g,
"\u220E \\[endproof\\] \\[ ");
6041 str[i] = str[i].replace(/\\end\s*\{s*proof\s*\}/g,
" \\[endproof\\] \\[ ");
6044 //The frontmatter -- all translated to div's to be handled by CSS
6045 str[i] = str[i].replace(/\\title\s*\{s*([^\}]+)\}/g,
" \\[title\\] \\[$1 \\[endtitle\\] \\[ ");
6046 str[i] = str[i].replace(/\\author\s*\{s*([^\}]+)\}/g,
" \\[author\\] \\[$1 \\[endauthor\\] \\[ ");
6047 str[i] = str[i].replace(/\\address\s*\{s*([^\}]+)\}/g,
" \\[address\\] \\[$1 \\[endaddress\\] \\[ ");
6048 str[i] = str[i].replace(/\\date\s*\{s*([^\}]+)\}/g,
" \\[date\\] \\[$1 \\[enddate\\] \\[ ");
6049 str[i] = str[i].replace(/\\begin\s*\{s*keyword\s*\}/g,
" \\[keyword\\] \\[ ");
6050 str[i] = str[i].replace(/\\end\s*\{s*keyword\s*\}/g,
" \\[endkeyword\\] \\[ ");
6051 str[i] = str[i].replace(/\\begin\s*\{s*abstract\s*\}/g,
" \\[abstract\\] \\[ ");
6052 str[i] = str[i].replace(/\\end\s*\{s*abstract\s*\}/g,
" \\[endabstract\\] \\[ ");
6054 //The rest of the environments -- Users can even
"make up their own" -- but it avoids the array and tabular environments
6055 str[i] = str[i].replace(/\\begin\s*\{s*(?!array|tabular)(\w+)\s*\}/g,
" \\[$1\\] \\[ ");
6056 str[i] = str[i].replace(/\\end\s*\{s*(?!array|tabular)(\w+)\s*\}/g,
" \\[end$1\\] \\[ ");
6058 //Next, we look at section--subsection stuff. This is nested -- this would be so much better if LaTeX used
6059 //some type of \begin{sectionhead}...\end{sectionhead} structure
6060 var sectionIndex = str[i].search(/\\section\s*\{s*[\s\S]+\}/);
6062 while(sectionIndex
>=
0) {
6063 str[i] = str[i].replace(/\\section\s*\{/ ,
" \\[section\\]");
6065 for(var ii=sectionIndex;ii
<str[i].length;ii++) {
6066 if(str[i].charAt(ii) ==
"{") { delimcnt++ };
6067 if(str[i].charAt(ii) ==
"}") { delimcnt-- };
6069 str[i] = str[i].substring(
0,ii)+
"\\[ "+str[i].substring(ii+
1,str[i].length) ;
6073 sectionIndex = str[i].search(/\\section\s*\{s*[\s\S]+\}/); //look for next
6076 sectionIndex = str[i].search(/\\subsection\s*\{s*[\s\S]+\}/);
6078 while(sectionIndex
>=
0) {
6079 str[i] = str[i].replace(/\\subsection\s*\{/ ,
" \\[subsection\\]");
6081 for(var ii=sectionIndex;ii
<str[i].length;ii++) {
6082 if(str[i].charAt(ii) ==
"{") { delimcnt++ };
6083 if(str[i].charAt(ii) ==
"}") { delimcnt-- };
6085 str[i] = str[i].substring(
0,ii)+
"\\[ "+str[i].substring(ii+
1,str[i].length) ;
6089 sectionIndex = str[i].search(/\\subsection\s*\{s*[\s\S]+\}/); //look for next
6092 sectionIndex = str[i].search(/\\subsubsection\s*\{s*[\s\S]+\}/);
6094 while(sectionIndex
>=
0) {
6095 str[i] = str[i].replace(/\\subsubsection\s*\{/ ,
" \\[subsubsection\\]");
6097 for(var ii=sectionIndex;ii
<str[i].length;ii++) {
6098 if(str[i].charAt(ii) ==
"{") { delimcnt++ };
6099 if(str[i].charAt(ii) ==
"}") { delimcnt-- };
6101 str[i] = str[i].substring(
0,ii)+
"\\[ "+str[i].substring(ii+
1,str[i].length) ;
6105 sectionIndex = str[i].search(/\\subsubsection\s*\{s*[\s\S]+\}/); //look for next
6108 var CatToNextEven =
"";
6109 //split into alternating text elements and
"marked" elements
6110 var strtmp = str[i].split(
"\\[");
6111 //document.write(strtmp[
0]);
6113 for(var j=
0;j
<strtmp.length;j++) {
6115 //odd = split on \\]
6116 var strtmparray = strtmp[j].split(
"\\]");
6117 switch (strtmparray[
0]) {
6119 var nodeTmp = document.createElement(
"H2");
6120 nodeTmp.className = 'section';
6123 for (var div in LaTeXCounter) { LaTeXCounter[div] =
0 };
6124 //Create Title of section
6125 var nodeAnchor = document.createElement(
"a");
6127 nodeAnchor.className='appendixsection';
6129 nodeAnchor.className='section';
6131 var nodeNumString = makeNumberString(
"");
6132 var anchorSpan = document.createElement(
"span");
6133 anchorSpan.className =
"section";
6134 anchorSpan.style.display =
"none";
6135 anchorSpan.appendChild(document.createTextNode(nodeNumString));
6136 nodeAnchor.appendChild(anchorSpan);
6137 nodeTmp.appendChild(nodeAnchor);
6139 var nodeSpan = document.createElement(
"span");
6140 nodeSpan.className = 'section';
6141 nodeSpan.appendChild(document.createTextNode(nodeNumString+
" "));
6142 nodeTmp.appendChild(nodeSpan);
6143 nodeTmp.appendChild(document.createTextNode( strtmparray[
1] ) );
6144 newFrag.appendChild(nodeTmp);
6147 var nodeTmp = document.createElement(
"H3");
6148 nodeTmp.className = 'subsection';
6150 LaTeXCounter[
"subsection"]++;
6151 LaTeXCounter[
"subsubsection"]=
0;
6152 //Create Title of section
6153 var nodeAnchor = document.createElement(
"a");
6154 nodeAnchor.className = 'subsection';
6155 var nodeNumString = makeNumberString(LaTeXCounter[
"subsection"]);
6156 var anchorSpan = document.createElement(
"span");
6157 anchorSpan.className =
"subsection";
6158 anchorSpan.style.display =
"none";
6159 anchorSpan.appendChild(document.createTextNode(nodeNumString));
6160 nodeAnchor.appendChild(anchorSpan);
6161 nodeTmp.appendChild(nodeAnchor);
6162 var nodeSpan = document.createElement(
"span");
6163 nodeSpan.className = 'subsection';
6164 nodeSpan.appendChild(document.createTextNode(nodeNumString+
". "));
6165 nodeTmp.appendChild(nodeSpan);
6166 nodeTmp.appendChild(document.createTextNode( strtmparray[
1] ) );
6167 newFrag.appendChild(nodeTmp);
6169 case
"subsubsection":
6170 var nodeTmp = document.createElement(
"H4");
6171 nodeTmp.className = 'subsubsection';
6173 LaTeXCounter[
"subsubsection"]++;
6174 //Create Title of section
6175 var nodeAnchor = document.createElement(
"a");
6176 nodeAnchor.className = 'subsubsection';
6177 var nodeNumString = makeNumberString(LaTeXCounter[
"subsection"]+
"."+LaTeXCounter[
"subsubsection"]);
6178 var anchorSpan = document.createElement(
"span");
6179 anchorSpan.className =
"subsubsection";
6180 anchorSpan.style.display =
"none";
6181 anchorSpan.appendChild(document.createTextNode(nodeNumString));
6182 nodeAnchor.appendChild(anchorSpan);
6183 nodeTmp.appendChild(nodeAnchor);
6184 var nodeSpan = document.createElement(
"span");
6185 nodeSpan.className = 'subsubsection';
6186 nodeSpan.appendChild(document.createTextNode(nodeNumString+
". "));
6187 nodeTmp.appendChild(nodeSpan);
6188 nodeTmp.appendChild(document.createTextNode( strtmparray[
1] ) );
6189 newFrag.appendChild(nodeTmp);
6192 var nodeTmp = document.createElement(
"a");
6193 nodeTmp.className = 'LaTeXMathML';
6194 nodeTmp.href = strtmparray[
1];
6195 nodeTmp.appendChild(document.createTextNode( strtmparray[
2]));
6196 newFrag.appendChild(nodeTmp);
6199 var nodeTmp = document.createElement(
"a");
6200 nodeTmp.className = 'LaTeXMathML';
6201 nodeTmp.href = strtmparray[
1];
6202 nodeTmp.appendChild(document.createTextNode( strtmparray[
1]));
6203 newFrag.appendChild(nodeTmp);
6206 var nodeTmp = document.createElement(
"table");
6207 nodeTmp.className = 'figure';
6208 var FIGtbody = document.createElement(
"tbody");
6210 var FIGlbl = strtmparray[
1].match(/\\label\s*\{s*(\w+)\s*\}/);
6211 strtmparray[
1]=strtmparray[
1].replace(/\\label\s*\{w+\}/g,
"");
6213 var capIndex = strtmparray[
1].search(/\\caption\s*\{[\s\S]+\}/);
6216 if(capIndex
>=
0) { // caption may contain other { } structures -- but not displaymath!!
6217 var tmp = strtmparray[
1];
6220 for(var pos=capIndex;pos
<tmp.length;pos++) {
6221 if(tmp.charAt(pos) ==
"{") { delimcnt++ };
6222 if(tmp.charAt(pos) ==
"}") { delimcnt-- };
6223 if(delimcnt ==
1 && capstart
<0) { capstart = pos+
1 };
6224 if(delimcnt ==
0 && capstart
>0) {
6226 FIGcap = tmp.substring(capstart,pos);
6232 var FIGtr2 = document.createElement(
"tr");
6233 var FIGtd2 = document.createElement(
"td");
6234 FIGtd2.
className=
"caption";
6237 var FIGanchor = document.createElement(
"a");
6238 FIGanchor.className =
"figure";
6239 if(FIGlbl!=null) { FIGanchor.id = FIGlbl[
1]; }
6240 LaTeXCounter[
"figure"]++;
6241 var fignmbr = makeNumberString(LaTeXCounter[
"figure"]);
6242 var anchorSpan = document.createElement(
"span");
6243 anchorSpan.className =
"figure";
6244 anchorSpan.style.display =
"none";
6245 anchorSpan.appendChild(document.createTextNode(fignmbr));
6246 FIGanchor.appendChild(anchorSpan);
6247 FIGtd2.appendChild(FIGanchor);
6249 var FIGspan = document.createElement(
"span");
6250 FIGspan.className =
"figure"; //For CSS counters, comment this line
6251 FIGspan.appendChild(document.createTextNode(
"Figure "+fignmbr+
". " ) );
6252 FIGtd2.appendChild(FIGspan);
6253 FIGtd2.appendChild(document.createTextNode(
""+FIGcap));
6254 FIGtr2.appendChild(FIGtd2);
6255 FIGtbody.appendChild(FIGtr2);
6256 var IsSpecial = false;
6258 var FIGinfo = strtmparray[
1].match(/\\includegraphics\s*\{([^\}]+)\}/);
6259 if(FIGinfo==null) { //options not processed, for now
6260 FIGinfo = strtmparray[
1].match(/\\includegraphics\s*\[[^\]]*\]\s*\{s*([^\}]+)\s*\}/);
6263 FIGinfo = strtmparray[
1].match(/\\special\s*\{s*([^\}]+)\}/);
6264 IsSpecial=true //Hook: Later can include
"special" graphics commands
6267 if(FIGinfo!=null) { //Caption will be above the image
6268 var FIGtr1 = document.createElement(
"tr");
6269 var FIGtd1 = document.createElement(
"td");
6270 FIGtd1.
className=
"image";
6271 var FIGimg = document.createElement(
"img");
6272 var FIGsrc = FIGinfo[
1]; //options not processed, for now
6273 FIGimg.src = FIGsrc;
6274 FIGimg.alt =
"Figure "+FIGsrc+
" did not load";
6275 FIGimg.title =
"Figure "+fignmbr+
". "+FIGcap;
6276 FIGimg.id =
"figure"+fignmbr;
6277 FIGtd1.appendChild(FIGimg);
6278 FIGtr1.appendChild(FIGtd1);
6279 FIGtbody.appendChild(FIGtr1);
6281 nodeTmp.appendChild(FIGtbody);
6282 newFrag.appendChild(nodeTmp);
6285 var nodeTmp = document.createElement(
"table");
6286 if(strtmparray[
1].search(/\\centering/)
>=
0) {
6287 nodeTmp.className = 'LaTeXtable centered';
6288 nodeTmp.align =
"center";
6290 nodeTmp.className = 'LaTeXtable';
6293 nodeTmp.id =
"LaTeXtable"+tableid; //unique id for each table
6295 var TABlbl = strtmparray[
1].match(/\\label\s*\{s*(\w+)\s*\}/);
6296 strtmparray[
1]=strtmparray[
1].replace(/\\label\s*\{w+\}/g,
"");
6298 var capIndex = strtmparray[
1].search(/\\caption\s*\{[\s\S]+\}/);
6301 if(capIndex
>=
0) { // caption may contain other { } structures -- but not displaymath!!
6302 var tmp = strtmparray[
1];
6305 for(var pos=capIndex;pos
<tmp.length;pos++) {
6306 if(tmp.charAt(pos) ==
"{") { delimcnt++ };
6307 if(tmp.charAt(pos) ==
"}") { delimcnt-- };
6308 if(delimcnt ==
1 && capstart
<0) { capstart = pos+
1 };
6309 if(delimcnt ==
0 && capstart
>0) {
6311 TABcap = tmp.substring(capstart,pos);
6318 var TABtbody = document.createElement(
"tbody");
6319 var TABcaption = document.createElement(
"caption");
6320 TABcaption.
className=
"LaTeXtable centered";
6321 var TABanchor = document.createElement(
"a");
6322 TABanchor.className =
"LaTeXtable";
6323 if(TABlbl!=null) { TABanchor.id = TABlbl[
1]; }
6324 LaTeXCounter[
"table"]++;
6325 var tabnmbr = makeNumberString(LaTeXCounter[
"table"]);
6326 var anchorSpan = document.createElement(
"span");
6327 anchorSpan.className =
"LaTeXtable";
6328 anchorSpan.style.display =
"none";
6329 anchorSpan.appendChild(document.createTextNode(tabnmbr));
6330 TABanchor.appendChild(anchorSpan);
6331 TABcaption.appendChild(TABanchor);
6333 var TABspan = document.createElement(
"span");
6334 TABspan.className =
"LaTeXtable"; //For CSS counters, comment this line
6335 TABspan.appendChild(document.createTextNode(
"Table "+tabnmbr+
". " ) );
6336 TABcaption.appendChild(TABspan);
6337 TABcaption.appendChild(document.createTextNode(
""+TABcap));
6338 nodeTmp.appendChild(TABcaption);
6340 var TABinfo = strtmparray[
1].match(/\\begin\s*\{s*tabular\s*\}([\s\S]+)\\end\s*\{s*tabular\s*\}/);
6342 var TABtbody = document.createElement('tbody');
6348 var TABalign = TABinfo[
1].match(/^\s*\{([^\}]+)\}/);
6349 TABinfo = TABinfo[
1].replace(/^\s*\{[^\}]+\}/,
"");
6350 TABinfo = TABinfo.replace(/\\hline/g,
""); //no horizontal bars
6351 TABalign[
1] = TABalign[
1].replace(/\|/g,
""); //no vertical bars
6352 TABalign[
1] = TABalign[
1].replace(/\s/g,
"");
6353 TABinfo = TABinfo.split(
"\\\\"); // into rows
6354 for(row=
0;row
<TABinfo.length;row++) {
6355 TABrow = document.createElement(
"tr");
6356 TABinfo[row] = TABinfo[row].split(
"&");
6357 for(col=
0;col
<TABinfo[row].length;col++) {
6358 TABcell = document.createElement(
"td");
6359 switch (TABalign[
1].charAt(col)) {
6361 TABcell.style.textAlign =
"left";
6364 TABcell.style.textAlign =
"center";
6367 TABcell.style.textAlign =
"right";
6370 TABcell.style.textAlign =
"left";
6372 TABcell.appendChild(document.createTextNode(TABinfo[row][col]));
6373 TABrow.appendChild(TABcell);
6375 TABtbody.appendChild(TABrow);
6377 nodeTmp.appendChild(TABtbody);
6379 newFrag.appendChild(nodeTmp);
6381 case
"logicalbreak":
6382 var nodeTmp = document.createElement(
"p");
6383 nodeTmp.className = strtmparray[
1];
6384 nodeTmp.appendChild(document.createTextNode(
"\u00A0"));
6385 newFrag.appendChild(nodeTmp);
6392 var EndDiv = document.createElement(
"div");
6393 EndDiv.className =
"endlistitem";
6394 newFrag.appendChild(EndDiv);
6395 var BegDiv = document.createElement(
"div");
6396 BegDiv.className =
"listitem";
6397 if(strtmparray[
1]!=
" ") {
6398 var BegSpan = document.createElement(
"span");
6399 BegSpan.
className=
"listitemmarker";
6400 var boldBegSpan = document.createElement(
"b");
6401 boldBegSpan.appendChild(document.createTextNode(strtmparray[
1]+
" "));
6402 BegSpan.appendChild(boldBegSpan);
6403 BegDiv.appendChild(BegSpan);
6405 newFrag.appendChild(BegDiv);
6408 newFrag.appendChild(document.createElement(
"br"));
6411 newFrag.appendChild(document.createElement(
"br"));
6412 var nodeTmp = document.createElement(
"a");
6413 nodeTmp.className = 'bibitem';
6414 var nodeSpan = document.createElement(
"span");
6415 nodeSpan.className = 'bibitem';
6419 var lbl = strtmparray[
1].match(/\{s*(\w+)\s*\}/);
6420 strtmparray[
1] = strtmparray[
1].replace(/\s*\{s*\w+\s*\}/g,
"");
6421 strtmparray[
1] = strtmparray[
1].replace(/^\s*\[/,
"");
6422 strtmparray[
1] = strtmparray[
1].replace(/\s*\]$/,
"");
6423 strtmparray[
1] = strtmparray[
1].replace(/^\s+|\s+$/g,
"");
6424 //We create a list of id's for the bibitems -- it seemed important at one time??
6426 biblist[bibcntr] =
"bibitem"+bibcntr
6428 biblist[bibcntr] = lbl[
1];
6430 nodeTmp.name = biblist[bibcntr];
6431 nodeTmp.id = biblist[bibcntr];
6432 // We place content into
<a> -- access it with \cite, thus allowing appropriate labels!
6433 if(strtmparray[
1]!=
"") {
6434 nodeSpan.appendChild(document.createTextNode(strtmparray[
1]));
6436 nodeSpan.appendChild(document.createTextNode(
"["+bibcntr+
"]"));
6438 nodeTmp.appendChild(nodeSpan);
6439 newFrag.appendChild(nodeTmp);
6442 var nodeTmp = document.createElement(
"a");
6443 nodeTmp.className = 'cite';
6444 nodeTmp.name = 'cite';
6445 nodeTmp.href =
"#"+strtmparray[
1];
6446 newFrag.appendChild(nodeTmp);
6449 var nodeTmp = document.createElement(
"a");
6450 nodeTmp.className = 'ref';
6451 nodeTmp.name = 'ref';
6452 nodeTmp.href =
"#"+strtmparray[
1];
6453 newFrag.appendChild(nodeTmp);
6456 var nodeTmp = document.createElement(
"div");
6457 nodeTmp.className = strtmparray[
0];
6458 if( IsCounter.test(strtmparray[
0]) ) {
6459 LaTeXCounter[strtmparray[
0]]++;
6460 var nodeAnchor = document.createElement(
"a");
6461 nodeAnchor.className = strtmparray[
0];
6462 var divnum = makeNumberString(LaTeXCounter[strtmparray[
0]]);
6463 var anchorSpan = document.createElement(
"span");
6464 anchorSpan.className = strtmparray[
0];
6465 anchorSpan.appendChild(document.createTextNode(divnum));
6466 anchorSpan.style.
display=
"none";
6467 nodeAnchor.appendChild(anchorSpan);
6468 nodeTmp.appendChild(nodeAnchor);
6470 var nodeSpan = document.createElement(
"span");
6471 nodeSpan.className = strtmparray[
0];
6472 nodeSpan.appendChild(document.createTextNode(strtmparray[
1]+
" "+divnum+
". "));
6473 nodeTmp.appendChild(nodeSpan);
6475 if(isIE) { //remove if IE supports :before and :after
6476 if(strtmparray[
0]==(
"thebibliography"||
"abstract"||
"keyword"||
"proof")) {
6477 var nodeSpan = document.createElement(
"span");
6478 nodeSpan.className = strtmparray[
0];
6479 nodeSpan.appendChild(document.createTextNode(strtmparray[
1]));
6480 nodeTmp.appendChild(nodeSpan);
6482 } //end of IE :before and :after fixes
6483 if(strtmparray[
0]==
"endenumerate" || strtmparray[
0]==
"enditemize" || strtmparray[
0]==
"enddescription") {
6484 var endDiv = document.createElement(
"div");
6485 endDiv.className =
"endlistitem";
6486 newFrag.appendChild(endDiv);
6488 newFrag.appendChild(nodeTmp);
6489 if(strtmparray[
0]==
"enumerate" || strtmparray[
0]==
"itemize" || strtmparray[
0]==
"description") {
6490 var endDiv = document.createElement(
"div");
6491 endDiv.className =
"listitem";
6492 newFrag.appendChild(endDiv);
6496 //even = text, labels, bf, and italics, and linebreaks, and math -- we now remove the math
6497 strtmp[j] = strtmp[j].replace(/\\\$/g,
"<per>");
6498 strtmp[j] = strtmp[j].replace(/\$([^\$]+)\$/g,
" \\[$1\\[ ");
6499 strtmp[j] = strtmp[j].replace(/
<per>/g,
"\\$");
6500 strtmp[j] = strtmp[j].replace(/\\begin\s*\{s*math\s*\}([\s\S]+?)\\end\s*\{s*math\s*\}/g,
" \\[$1\\[ ");
6502 var strtmptmp = strtmp[j].split(
"\\[");
6504 for(var jjj=
0;jjj
<strtmptmp.length;jjj++) {
6505 if(jjj %
2) { //odd = math
6506 var nodeTmp = document.createElement(
"span");
6507 nodeTmp.className = 'inlinemath';
6508 nodeTmp.appendChild(document.createTextNode(
"$"+strtmptmp[jjj]+
"$"));
6509 newFrag.appendChild(nodeTmp);
6511 //all other tags will be mapped to span's (most should be font-face tags) with class-names matching the tag name.
6512 //Exceptions will be textcolor, colorbox, textbf, textit, and emph. These cannot include any html tags.
6513 var TagIndex = strtmptmp[jjj].search(/\\\w+/);
6514 var tmpIndex = TagIndex;
6515 while(tmpIndex
>-
1) {
6516 if(/^\\textcolor/.test(strtmptmp[jjj].substring(TagIndex,strtmptmp[jjj].length))) {
6517 strtmptmp[jjj] = strtmptmp[jjj].replace(/\\textcolor\s*\{s*(\w+)\s*\}s*/,
" \\[textcolor\\]$1\\]|");
6519 if(/^\\colorbox/.test(strtmptmp[jjj].substring(TagIndex,strtmptmp[jjj].length))) {
6520 strtmptmp[jjj] = strtmptmp[jjj].replace(/\\colorbox\s*\{s*(\w+)\s*\}s*/,
" \\[colorbox\\]$1\\]|");
6522 strtmptmp[jjj] = strtmptmp[jjj].substring(
0,TagIndex)+strtmptmp[jjj].substring(TagIndex,strtmptmp[jjj].length).replace(/\\\s*(\w+)\s*/,
" \\[$1\\]|");
6525 TagIndex +=strtmptmp[jjj].substring(TagIndex,strtmptmp[jjj].length).search(/\|/);
6527 strtmptmp[jjj] = strtmptmp[jjj].replace(/\\\]\|/,
"\\] ");
6528 if(strtmptmp[jjj].charAt(TagIndex) ==
"{") {
6529 strtmptmp[jjj] = strtmptmp[jjj].substring(
0,TagIndex)+strtmptmp[jjj].substring(TagIndex+
1,strtmptmp[jjj].length);
6531 for(var kk = TagIndex;kk
<strtmptmp[jjj].length;kk++) {
6532 if(strtmptmp[jjj].charAt(kk) ==
"{") { delimcnt++ };
6533 if(strtmptmp[jjj].charAt(kk) ==
"}") { delimcnt-- };
6534 if(delimcnt==
0) { break; }
6536 strtmptmp[jjj] = strtmptmp[jjj].substring(
0,kk)+
"\\[ "+strtmptmp[jjj].substring(kk+
1,strtmptmp[jjj].length);
6539 strtmptmp[jjj] = strtmptmp[jjj].substring(
0,TagIndex)+
"\\[ "+strtmptmp[jjj].substring(TagIndex+
1,strtmptmp[jjj].length);
6540 TagIndex = TagIndex +
3;
6542 if(TagIndex
<strtmptmp[jjj].length) {
6543 tmpIndex = strtmptmp[jjj].substring(TagIndex,strtmptmp[jjj].length).search(/\\\w+/);
6547 TagIndex += tmpIndex;
6551 strtmptmp[jjj] = strtmptmp[jjj].replace(/\\\\\s*\\\\/g,
"\\\\");
6552 strtmptmp[jjj] = strtmptmp[jjj].replace(/\\\\/g,
" \\[br\\] \\[ ");
6553 strtmptmp[jjj] = strtmptmp[jjj].replace(/\\label\s*\{s*(\w+)\s*\}/g,
" \\[label\\]$1\\[ ");
6554 var strlbls = strtmptmp[jjj].split(
"\\[");
6556 for(var jj=
0;jj
<strlbls.length;jj++) {
6557 if(jj %
2) { //odd = labels, boldface, and breaks
6558 var strtmparray = strlbls[jj].split(
"\\]");
6559 switch(strtmparray[
0]) {
6561 var nodeTmp = document.createElement(
"span");
6562 nodeTmp.className = 'LaTeXColor';
6563 if(IsColorName.test(strtmparray[
1].toLowerCase())) {
6564 nodeTmp.style.color=LaTeXColor[strtmparray[
1].toLowerCase()];
6566 nodeTmp.style.color=strtmparray[
1];
6568 nodeTmp.appendChild(document.createTextNode(strtmparray[
2]));
6569 newFrag.appendChild(nodeTmp);
6572 var nodeTmp = document.createElement(
"span");
6573 nodeTmp.className = 'LaTeXColor';
6574 if(IsColorName.test(strtmparray[
1].toLowerCase())) {
6575 nodeTmp.style.background=LaTeXColor[strtmparray[
1].toLowerCase()];
6577 nodeTmp.style.background=strtmparray[
1];
6579 nodeTmp.appendChild(document.createTextNode(strtmparray[
2]));
6580 newFrag.appendChild(nodeTmp);
6583 newFrag.appendChild(document.createElement(
"br"));
6586 var nodeTmp = document.createElement(
"a");
6587 nodeTmp.className = 'LaTeXMathMLlabel';
6588 var lblid = strtmparray[
1].match(/\s*(\w+)\s*/);
6589 if(lblid != null) { nodeTmp.id = lblid[
1] };
6590 nodeTmp.style.display =
"none";
6592 LaTeXCounter['label']++;
6593 var lblnum = makeNumberString(LaTeXCounter['label']);
6595 var anchorSpan = document.createElement(
"span");
6596 anchorSpan.className = 'LaTeXMathMLlabel';
6597 anchorSpan.appendChild(document.createTextNode(lblnum));
6598 anchorSpan.style.
display=
"none";
6599 nodeTmp.appendChild(anchorSpan);
6600 newFrag.appendChild(nodeTmp);
6603 var nodeTmp = document.createElement(
"span");
6604 nodeTmp.className = strtmparray[
0];
6605 nodeTmp.appendChild(document.createTextNode(strtmparray[
1]))
6606 newFrag.appendChild(nodeTmp);
6609 newFrag.appendChild(document.createTextNode(strlbls[jj]));
6614 } // end else for even splits of strtmp
6617 }; //else sections and labels
6618 TheBody.parentNode.replaceChild(newFrag,TheBody);
6619 } //str nodevalue is not empty
6621 } // split off recursion
6625 function LaTeXDivsAndRefs(thebody) {
6626 var TheBody = thebody;
6628 var EndDivClass = null;
6629 var AllDivs = TheBody.getElementsByTagName(
"div");
6632 for(var i=AllDivs.length-
1;i
>=
0;i--) {
6633 EndDivClass = AllDivs[i].className.match(/end\w+/ );
6634 if(EndDivClass!=null) {
6635 EndDivClass = EndDivClass[
0];
6636 var DivClass = EndDivClass.substring(
3,EndDivClass.length);
6637 var EndDivNode = AllDivs[i];
6641 while(EndDivClass!=null) {
6642 // TrackBack to Beginning, appending to newfrag as we go
6643 var newFrag = document.createDocumentFragment();
6644 var RootNode = EndDivNode.parentNode;
6645 var ClassCount =
1; // because of EndDivNode
6646 while(EndDivNode.previousSibling!=null && ClassCount
>0) {
6647 switch(EndDivNode.previousSibling.className) {
6650 newFrag.insertBefore(EndDivNode.previousSibling,newFrag.firstChild);
6653 if(EndDivNode.previousSibling.nodeName==
"DIV") {
6655 //Must check to see if we need a label here!
6657 EndDivNode.previousSibling.id = lbl2id;
6661 RootNode = EndDivNode.previousSibling;
6663 newFrag.insertBefore(EndDivNode.previousSibling,newFrag.firstChild);
6667 case 'LaTeXMathMLlabel':
6668 lbl2id = EndDivNode.previousSibling.id;
6669 EndDivNode.parentNode.removeChild(EndDivNode.previousSibling);
6672 newFrag.insertBefore(EndDivNode.previousSibling,newFrag.firstChild);
6675 RootNode.appendChild(newFrag);
6676 EndDivNode.parentNode.removeChild(EndDivNode);
6678 //Look for more end div items
6679 AllDivs = TheBody.getElementsByTagName(
"DIV");
6680 for(i=AllDivs.length-
1;i
>=
0;i--) {
6681 EndDivClass = AllDivs[i].className.match(/end\w+/ );
6682 if(EndDivClass!=null) {
6684 EndDivClass = EndDivClass[
0];
6685 DivClass = EndDivClass.substring(
3,EndDivClass.length);
6686 EndDivNode = AllDivs[i];
6687 RootNode = EndDivNode.parentNode;
6696 var AllDivs = TheBody.getElementsByTagName(
"div"); //Convert itemize and enumerate to html lists:
6699 for(var i=
0;i
<AllDivs.length;i++) {
6700 if( AllDivs[i].className==
"itemize" || AllDivs[i].className==
"enumerate" || AllDivs[i].className==
"description") {
6701 if(AllDivs[i].className==
"itemize") {
6702 RootNode = document.createElement(
"UL");
6704 RootNode = document.createElement(
"OL");
6706 RootNode.className = 'LaTeXMathML';
6707 if(AllDivs[i].hasChildNodes()) { AllDivs[i].removeChild(AllDivs[i].firstChild) };
6708 while(AllDivs[i].hasChildNodes()) {
6709 if(AllDivs[i].firstChild.hasChildNodes()) {
6710 DIV2LI = document.createElement(
"LI");
6711 while(AllDivs[i].firstChild.hasChildNodes()) {
6712 DIV2LI.appendChild(AllDivs[i].firstChild.firstChild);
6714 if(DIV2LI.firstChild.className==
"listitemmarker") {
6715 DIV2LI.style.listStyleType =
"none";
6717 RootNode.appendChild(DIV2LI)
6719 AllDivs[i].removeChild(AllDivs[i].firstChild);
6721 AllDivs[i].appendChild(RootNode);
6725 // From here to 'end for AllAnchors is necessary only because CSS3 is not implemented yet.
6726 // Once CSS3 target-text is available, this can be done using CSS
6727 var AllAnchors = TheBody.getElementsByTagName(
"a");
6728 for(var i=
0;i
<AllAnchors.length;i++) {
6729 if(AllAnchors[i].className ==
"ref" || AllAnchors[i].className ==
"cite" ) {
6730 var label = AllAnchors[i].href.match(/\#(\w+)/);
6732 var labelNode = document.getElementById(label[
1]);
6733 if(labelNode!=null) {
6734 var TheSpans = labelNode.getElementsByTagName(
"SPAN");
6735 if(TheSpans!=null) {
6736 var refNode = TheSpans[
0].cloneNode(true);
6737 refNode.style.
display=
"inline"
6738 refNode.className = AllAnchors[i].className;
6739 AllAnchors[i].appendChild(refNode);
6745 } // end for AllAnchors
6747 // Eventually: Collapsible Sections
6753 var AMnoMathML = false, AMtranslated = false;
6755 function translate(spanclassAM) {
6756 if (!AMtranslated) { // run this only once
6757 AMtranslated = true;
6759 var LaTeXContainers = [];
6760 var AllContainers = document.getElementsByTagName('*');
6761 var ExtendName =
"";
6763 for (var k =
0,l=
0; k < AllContainers.length; k++) {
6764 ExtendName =
" "+AllContainers[k].className+
" ";
6765 if(ExtendName.match(/\sLaTeX\s/)!=null) {
6766 LaTeXContainers[l] = AllContainers[k];
6770 if(LaTeXContainers.length
>0) {
6771 for(var m=
0;m
<LaTeXContainers.length;m++) {
6772 AMbody = LaTeXContainers[m];
6774 AMbody = LaTeXDivsAndRefs(LaTeXpreProcess(AMbody)); //
6776 alert(
"Unknown Error: Defaulting to Original LaTeXMathML");
6778 if(AMbody.tagName==
"PRE") {
6779 var PreChilds = document.createDocumentFragment();
6780 var DivChilds = document.createElement(
"DIV");
6781 while(AMbody.hasChildNodes()) {
6782 DivChilds.appendChild(AMbody.firstChild);
6784 PreChilds.appendChild(DivChilds);
6785 AMbody.parentNode.replaceChild(PreChilds,AMbody);
6786 AMbody = DivChilds; //Leaves empty pre -- may be useful??
6789 AMprocessNode(AMbody, false, spanclassAM);
6791 } else { //Default to entire page
6792 AMbody = document.getElementsByTagName(
"body")[
0];
6794 AMbody = LaTeXDivsAndRefs(LaTeXpreProcess(AMbody)); //
6796 alert(
"Unknown Error: Defaulting to Original LaTeXMathML");
6798 AMprocessNode(AMbody, false, spanclassAM);
6804 // avoid adding MathPlayer info explicitly to each webpage
6805 document.write(
"<object id=\"mathplayer\
"\
6806 classid=\"clsid:
32F66A20-
7614-
11D4-BD11-
00104BD3F987\
"></object>");
6807 document.write(
"<?import namespace=\"m\
" implementation=\"#mathplayer\
"?>");
6810 // GO1.1 Generic onload by Brothercake
6811 // http://www.brothercake.com/
6812 //onload function (replaces the
onload=
"translate()" in the
<body> tag)
6817 //setup onload function
6818 if(typeof window.addEventListener != 'undefined')
6820 //.. gecko, safari, konqueror and standard
6821 window.addEventListener('load', generic, false);
6823 else if(typeof document.addEventListener != 'undefined')
6826 document.addEventListener('load', generic, false);
6828 else if(typeof window.attachEvent != 'undefined')
6831 window.attachEvent('onload', generic);
6833 //** remove this condition to degrade older browsers
6836 //.. mac/ie5 and anything else that gets this far
6837 //if there's an existing onload function
6838 if(typeof window.onload == 'function')
6841 var existing = onload;
6842 //add new onload handler
6843 window.onload = function()
6845 //call existing onload function
6847 //call generic onload function
6853 //setup onload function
6854 window.onload = generic;
6860 <body class=
"article">
6861 <div id=
"header" class=
"slide hledgersplash">
6862 <h1>Informatiser une comptabilité avec confiance
</h1>
6863 <span id=
"author">git://git.autogeree.net/tool/hledger
</span><br />
6864 <span id=
"revnumber">version
6ca58eb
</span>
6865 <br /><span id=
"revremark"></span>
6868 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
6869 </div><div class=
"slide">
6872 <h1 id=
"_le_code_ledger_code_un_format_de_em_grand_livre_em_ouvert_et_simple">1. Le
<code>.ledger
</code> : un format de
<em>Grand Livre
</em> ouvert.. et simple
</h1>
6873 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect1";
nexttitle=
"1. Le <code>.ledger</code> : un format de <em>Grand Livre</em> ouvert.. et simple";
slidefootnotes=
"";/*]]
>*/
</script>
6874 <div class=
"sectionbody">
6875 <div class=
"listingblock incremental">
6876 <div class=
"content"><pre>
6877 <span class=
"hledgerTransactionDate">2014/
05/
01</span> <span class=
"hledgerTransactionDescription">Stand manif
</span>
6878 <span class=
"hledgerPostingAccount"> Don
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">Anonyme
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">42</span>
6879 <span class=
"hledgerPostingAccountOdd"> Caisse
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerPostingAccountOdd">Grève
</span><span class=
"hledgerPostingAmountOdd"> </span><span class=
"hledgerNumberOdd">42</span>
6881 <span class=
"hledgerTransactionDate">2014/
05/
08</span> <span class=
"hledgerTransactionDescription">Propagande
</span>
6882 <span class=
"hledgerPostingAccount"> Caisse
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">Grève
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">7</span>
6883 <span class=
"hledgerPostingAccountOdd"> Achat
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerPostingAccountOdd">Impression
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerPostingAccountOdd">Tracts
</span><span class=
"hledgerPostingAmountOdd"> </span><span class=
"hledgerNumberOdd">7</span>
6885 <span class=
"Comment">; Répéter ad nauseam
</span>
6888 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
6891 <h1 id=
"_les_plus">1.1. Les plus
</h1>
6892 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"1.1. Les plus";
slidefootnotes=
"";/*]]
>*/
</script>
6893 <div class=
"sectionbody">
6894 <div class=
"hdlist"><table><tbody class=
" incremental">
6896 <td class=
"hdlist1">
6900 <td class=
"hdlist2">
6901 <p style=
"margin-top: 0;">
6902 Visibilité de
<em>toutes
</em> les informations.
6907 <td class=
"hdlist1">
6911 <td class=
"hdlist2">
6912 <p style=
"margin-top: 0;">
6913 Compréhensible sans peine.
6918 <td class=
"hdlist1">
6922 <td class=
"hdlist2">
6923 <p style=
"margin-top: 0;">
6924 Pas d’interface protectrice.
6929 <td class=
"hdlist1">
6933 <td class=
"hdlist2">
6934 <p style=
"margin-top: 0;">
6935 Pas de changement d’interface non-consenti.
6940 <td class=
"hdlist1">
6944 <td class=
"hdlist2">
6945 <p style=
"margin-top: 0;">
6946 Suivi et fusion simples des modifications.
6951 <td class=
"hdlist1">
6955 <td class=
"hdlist2">
6956 <p style=
"margin-top: 0;">
6957 Langage pour s’exprimer clairement, par exemple pour discuter dans un courriel.
6962 <td class=
"hdlist1">
6966 <td class=
"hdlist2">
6967 <p style=
"margin-top: 0;">
6968 Pas besoin de réseau.
6973 <td class=
"hdlist1">
6977 <td class=
"hdlist2">
6978 <p style=
"margin-top: 0;">
6979 Pas spécifique à un éditeur logiciel particulier
6980 (sauf fonctionnalité expérimentale).
6982 <ul class=
" incremental">
6985 <a href=
"http://ledger-cli.org/">http://ledger-cli.org/
</a>
6990 <a href=
"http://hledger.org/">http://hledger.org/
</a>
6995 <a href=
"http://furius.ca/beancount/">http://furius.ca/beancount/
</a>
7000 <a href=
"https://massysett.github.io/penny/">https://massysett.github.io/penny/
</a>
7005 <a href=
"https://github.com/hrj/abandon/">https://github.com/hrj/abandon/
</a>
7011 </tbody></table></div>
7013 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7014 </div><div class=
"slide">
7017 <h1 id=
"_les_moins">1.2. Les moins
</h1>
7018 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"1.2. Les moins";
slidefootnotes=
"";/*]]
>*/
</script>
7019 <div class=
"sectionbody">
7020 <div class=
"hdlist"><table><tbody class=
" incremental">
7022 <td class=
"hdlist1">
7026 <td class=
"hdlist2">
7027 <p style=
"margin-top: 0;">
7028 Mais pas moins que les autres logiciels
7029 et à nuancer si couplé à un gestionnaires de versions,
7030 et/ou avec signature cryptographiques.
7032 <div class=
"listingblock incremental">
7033 <div class=
"content"><pre>
7034 % git tag
<span class=
"Special">--sign
</span> v2011
<span class=
"Special">-m
</span> <span class=
"Statement">"</span><span class=
"Constant">Clôture de la comptabilité
2011</span><span class=
"Statement">"</span>
7035 % git tag
<span class=
"Special">--verify
</span> v2011
7037 <div class=
"listingblock incremental">
7038 <div class=
"content"><pre>
7039 % gpg
<span class=
"Special">--sign
</span> <span class=
"PreProc">$fichier
</span>.hledger
7040 % gpg
<span class=
"Special">--verify-files
</span> <span class=
"PreProc">$fichier
</span>.hledger.gpg
7045 <td class=
"hdlist1">
7049 <td class=
"hdlist2">
7050 <p style=
"margin-top: 0;">
7051 Préférable de bien savoir utiliser
7052 un éditeur de texte structuré.
7057 <td class=
"hdlist1">
7061 <td class=
"hdlist2">
7062 <div class=
"listingblock incremental">
7063 <div class=
"content"><pre>
7064 <span class=
"hledgerTransactionDate">2102/
03/
21</span> <span class=
"hledgerTransactionDescription">Remise chq (
1101804)
</span>
7065 <span class=
"hledgerPostingAccount"> </span><span class=
"hledgerNumber">5</span><span class=
"hledgerPostingAccount">.Finance
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">1</span><span class=
"hledgerPostingAccount">.Etablissement
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">1</span><span class=
"hledgerPostingAccount">.Valeur
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">2</span><span class=
"hledgerPostingAccount">.Chèque_à_encaisser
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">145</span><span class=
"hledgerPostingAmount">,
</span><span class=
"hledgerNumber">00</span>
7066 <span class=
"hledgerPostingAccountOdd"> </span><span class=
"hledgerNumberOdd">5</span><span class=
"hledgerPostingAccountOdd">.Finance
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">1</span><span class=
"hledgerPostingAccountOdd">.Etablissement
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">2</span><span class=
"hledgerPostingAccountOdd">.Banque
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">001</span><span class=
"hledgerPostingAccountOdd">.Courant
</span><span class=
"hledgerPostingAmountOdd"> </span><span class=
"hledgerNumberOdd">145</span><span class=
"hledgerPostingAmountOdd">,
</span><span class=
"hledgerNumberOdd">00</span>
7070 </tbody></table></div>
7071 <div class=
"admonitionblock incremental">
7074 <img src=
"./icons/note.png" alt=
"Note" />
7076 <td class=
"content">KISS
</td>
7080 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7081 </div><div class=
"slide">
7084 <h1 id=
"_code_hledger_code_un_outil_libre_et_convivial">2.
<code>hledger
</code> : un outil libre.. et convivial
</h1>
7085 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect1";
nexttitle=
"2. <code>hledger</code> : un outil libre.. et convivial";
slidefootnotes=
"";/*]]
>*/
</script>
7086 <div class=
"sectionbody">
7087 <div class=
"listingblock incremental">
7088 <div class=
"content"><pre>
7089 % hledger balance
<span class=
"Statement">'
</span><span class=
"Constant">^
6</span><span class=
"Statement">'
</span> <span class=
"Statement">'
</span><span class=
"Constant">^
7</span><span class=
"Statement">'
</span> <span class=
"Special">--depth
</span> <span class=
"Constant">2</span> <span class=
"Special">-f
</span> Paris
.2011.hledger
7090 <span class=
"Constant">770</span>,
<span class=
"Constant">58</span>€
6.Charge
7091 <span class=
"Constant">248</span>,
<span class=
"Constant">87</span>€
0.Achat
7092 <span class=
"Constant">441</span>,
<span class=
"Constant">46</span>€
1.Service
7093 <span class=
"Constant">55</span>,
<span class=
"Constant">25</span>€
2.Autre_service
7094 <span class=
"Constant">25</span>,
<span class=
"Constant">00</span>€
5.Gestion
7095 <span class=
"Constant">-
726</span>,
<span class=
"Constant">00</span>€
7.Produit
7096 <span class=
"Constant">-
700</span>,
<span class=
"Constant">00</span>€
0.Vente
7097 <span class=
"Constant">-
26</span>,
<span class=
"Constant">00</span>€
5.Autre_gestion_courante
7098 ‑-------------------
7099 <span class=
"Constant">44</span>,
<span class=
"Constant">58</span>€
7102 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7105 <h1 id=
"_les_plus_2">2.1. Les plus
</h1>
7106 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"2.1. Les plus";
slidefootnotes=
"";/*]]
>*/
</script>
7107 <div class=
"sectionbody">
7108 <div class=
"dlist"><dl class=
" incremental">
7109 <dt class=
"hdlist1">
7112 <dt class=
"hdlist1">
7115 <dt class=
"hdlist1">
7118 <dt class=
"hdlist1">
7123 Permises techniquement et légalement
<br />
7124 (« logiciel libre » sous
<code>GNU/GPLv3
</code>)
7127 <dt class=
"hdlist1">
7132 Programmé en
<a href=
"http://fr.wikipedia.org/wiki/Haskell">Haskell
</a>
7134 <div class=
"hdlist"><table><tbody class=
" incremental">
7136 <td class=
"hdlist1">
7140 <td class=
"hdlist2">
7141 <p style=
"margin-top: 0;">
7142 Aucune mutation de données externes à une fonction (effet de bord).
7147 <td class=
"hdlist1">
7151 <td class=
"hdlist2">
7152 <p style=
"margin-top: 0;">
7153 Vérification des erreurs de type avant l’exécution du programme.
7158 <td class=
"hdlist1">
7162 <td class=
"hdlist2">
7163 <p style=
"margin-top: 0;">
7164 Aucune conversion implicite de types de données.
7168 </tbody></table></div>
7170 <dt class=
"hdlist1">
7175 GNU/Linux, Apple/MacOS, Microsoft/Windows
7178 <dt class=
"hdlist1">
7183 ~
1 développeur à mi-temps
7185 <ul class=
" incremental">
7188 Simon Michael
<<a href=
"mailto:simon@joyful.com">simon@joyful.com
</a>>
7193 <dt class=
"hdlist1">
7197 <div class=
"listingblock incremental">
7198 <div class=
"content"><pre>
7199 % hledger balance
<span class=
"Special">-f
</span> <span class=
"PreProc">$fichier
</span>.hledger
7202 <dt class=
"hdlist1">
7206 <div class=
"listingblock incremental">
7207 <div class=
"content"><pre>
7208 % hledger-web
<span class=
"Special">--server
</span> <span class=
"Special">-f
</span> <span class=
"PreProc">$fichier
</span>.hledger
7209 % firefox
<span class=
"Statement">"</span><span class=
"Constant"><a href=
"http://localhost:5000">http://localhost:
5000</a></span><span class=
"Statement">"</span>
7212 <dt class=
"hdlist1">
7216 <div class=
"listingblock incremental">
7217 <div class=
"content"><pre>
7218 % ghc hledger-fait-ce-que-je-veux.hs
7219 % ./hledger-fait-ce-que-je-veux
<span class=
"Special">-f
</span> <span class=
"PreProc">$fichier
</span>.hledger
7224 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7227 <h1 id=
"_les_moins_2">2.2. Les moins
</h1>
7228 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"2.2. Les moins";
slidefootnotes=
"";/*]]
>*/
</script>
7229 <div class=
"sectionbody">
7230 <div class=
"dlist"><dl class=
" incremental">
7231 <dt class=
"hdlist1">
7235 <div class=
"paragraph">
7236 <div class=
"incremental">
7243 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7244 </div><div class=
"slide">
7247 <h1 id=
"_installer_code_hledger_code">3. Installer
<code>hledger
</code></h1>
7248 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect1";
nexttitle=
"3. Installer <code>hledger</code>";
slidefootnotes=
"";/*]]
>*/
</script>
7249 <div class=
"sectionbody">
7250 <ul class=
" incremental">
7253 <a href=
"http://hledger.org/installing">http://hledger.org/installing
</a>
7257 <div class=
"listingblock incremental">
7258 <div class=
"title">Debian/jessie
</div>
7259 <div class=
"content"><pre>
7260 % sudo apt-get install hledger hledger-web
7263 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7266 <h1 id=
"_via_code_cabal_code">3.1. Via
<code>cabal
</code></h1>
7267 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"3.1. Via <code>cabal</code>";
slidefootnotes=
"";/*]]
>*/
</script>
7268 <div class=
"sectionbody">
7269 <ul class=
" incremental">
7272 <a href=
"http://www.haskell.org/cabal/">http://www.haskell.org/cabal/
</a>
7276 <div class=
"listingblock incremental">
7277 <div class=
"title">Debian/wheezy
</div>
7278 <div class=
"content"><pre>
7279 %
<span class=
"Statement">echo
</span><span class=
"Constant"> </span><span class=
"Statement">'
</span><span class=
"Constant">PATH=
"$HOME/.cabal/bin:$PATH
"</span><span class=
"Statement">'
</span><span class=
"Constant"> </span><span class=
"Statement">>></span>~/.profile
7280 <span class=
"Comment"># NOTE: rajoute dans le chemins des exécutables
</span>
7281 <span class=
"Comment"># les exécutables installés par cabal
</span>
7282 %
<span class=
"Statement">exit
</span> <span class=
"Comment"># NOTE: recharge ~/.profile
</span>
7284 % sudo apt-get install ghc cabal-install
<span class=
"Statement">\
</span>
7285 libncurses5-dev libtinfo-dev zlib1g-dev
7287 % cabal install cabal
<span class=
"Comment"># NOTE: met à jour cabal
</span>
7288 % cabal install happy
<span class=
"Comment"># NOTE: anticipe une dépendance exécutable
</span>
7289 % cabal install hledger
7290 % cabal install alex
<span class=
"Comment"># NOTE: anticipe une dépendance exécutable
</span>
7291 % cabal install warp-
2.0.3.4 hledger-web
7292 <span class=
"Comment"># NOTE: aide cabal à sélectionner un warp qui fonctionne
</span>
7294 <div class=
"listingblock incremental">
7295 <div class=
"title">Mise-à-jour
</div>
7296 <div class=
"content"><pre>
7297 % cabal install
<span class=
"Special">--reinstall
</span> hledger hledger-web
7300 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7303 <h1 id=
"_version_de_développement">3.1.1. Version de développement
</h1>
7304 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect3";
nexttitle=
"3.1.1. Version de développement";
slidefootnotes=
"";/*]]
>*/
</script>
7305 <div class=
"sectionbody">
7306 <div class=
"listingblock incremental">
7307 <div class=
"content"><pre>
7308 % git clone
<a href=
"http://github.com/simonmichael/hledger.git">http://github.com/simonmichael/hledger.git
</a> ~/src/hledger
7309 %
<span class=
"Statement">cd
</span> ~/src/hledger
7310 % cabal install
<span class=
"Special">--reinstall
</span> <span class=
"Special">--force-reinstalls
</span> <span class=
"Statement">\
</span>
7311 ./hledger-lib ./hledger ./hledger-web
7314 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7315 </div><div class=
"slide">
7318 <h1 id=
"_écrire_en_code_ledger_code">4. Écrire en
<code>.ledger
</code></h1>
7319 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect1";
nexttitle=
"4. Écrire en <code>.ledger</code>";
slidefootnotes=
"";/*]]
>*/
</script>
7320 <div class=
"sectionbody">
7321 <div class=
"paragraph">
7322 <div class=
"incremental">
7323 <p>Un
<code>.ledger
</code> est un fichier de texte brut respectant une syntaxe préçise
7324 qui forme une succession d’écritures comptables, ordonnées librement.
</p>
7328 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7331 <h1 id=
"_exemple">4.1. Exemple
</h1>
7332 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"4.1. Exemple";
slidefootnotes=
"";/*]]
>*/
</script>
7333 <div class=
"sectionbody">
7334 <div class=
"listingblock incremental">
7335 <div class=
"content"><pre>
7336 <span class=
"Comment">; Ceci est un exemple de livre comptable « ledger »
</span>
7337 <span class=
"Comment">; NOTE: fantaisiste comptablement parlant, mais syntaxiquement correct
</span>
7339 <span class=
"hledgerTransactionDate">2014/
01/
01</span> <span class=
"hledgerTransactionDescription">Libellé de l’écriture
</span><span class=
"hledgerTransactionComment">;
</span><span class=
"hledgerTag">UN_TAG:
</span><span class=
"hledgerTransactionComment">,
</span><span class=
"hledgerTag">Autre_tag:
</span><span class=
"hledgerTagValue">Avec_Valeur
</span>
7340 <span class=
"hledgerPostingAccount"> Compte
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">Sous-Compte
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">42</span> <span class=
"hledgerTransactionComment">; flux créditant
</span>
7341 <span class=
"hledgerPostingAccountOdd"> Autre_Compte
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerPostingAccountOdd">Sous-Compte
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerPostingAccountOdd">Sous-Sous-Compte
</span><span class=
"hledgerPostingAmountOdd"> </span><span class=
"hledgerNumberOdd">42</span> <span class=
"hledgerTransactionComment">; flux débitant
</span>
7343 <span class=
"hledgerTransactionDate">2014/
01/
01</span> <span class=
"hledgerTransactionDescription">Deuxième écriture le même jour
</span>
7344 <span class=
"hledgerPostingAccount"> Vente
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">Âme
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">666</span> <span class=
"hledgerTransactionComment">; (tag de flux)
</span><span class=
"hledgerTag">Arnaque:
</span>
7345 <span class=
"hledgerPostingAccountOdd"> Kapital
</span><span class=
"hledgerPostingAmountOdd"> </span><span class=
"hledgerNumberOdd">666</span>
7347 <span class=
"hledgerTransactionDate">2014/
01/
02</span> <span class=
"hledgerTransactionDescription">Troisième écriture le jour suivant avec ventilation des flux
</span>
7348 <span class=
"hledgerPostingAccount"> Compte
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">Crédité
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">A
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">1</span>
7349 <span class=
"hledgerPostingAccountOdd"> Compte
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerPostingAccountOdd">Crédité
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerPostingAccountOdd">B
</span><span class=
"hledgerPostingAmountOdd"> -
</span><span class=
"hledgerNumberOdd">2</span>
7350 <span class=
"hledgerPostingAccount"> Compte
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">Débité
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">Z
</span><span class=
"hledgerPostingAmount"> </span><span class=
"hledgerNumber">1</span>
7351 <span class=
"hledgerPostingAccountOdd"> Compte
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerPostingAccountOdd">Débité
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerPostingAccountOdd">Y
</span><span class=
"hledgerPostingAmountOdd"> </span><span class=
"hledgerNumberOdd">1</span>
7352 <span class=
"hledgerPostingAccount"> Compte
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">Débité
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">X
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">x
</span><span class=
"hledgerPostingAmount"> </span><span class=
"hledgerNumber">1</span>
7354 <span class=
"hledgerTransactionDate">2014/
04/
12</span>
7355 <span class=
"hledgerPostingAccount"> Compte
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">Crédité
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">1234</span><span class=
"hledgerPostingAmount">,
</span><span class=
"hledgerNumber">56</span>
7356 <span class=
"hledgerPostingAccountOdd"> Compte
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerPostingAccountOdd">Débité
</span> <span class=
"hledgerTransactionComment">;
1234,
56 (montant inféré)
</span>
7358 <span class=
"hledgerTransactionDate">2014/
02/
01</span> <span class=
"hledgerTransactionDescription">Écriture non ordonnée par date
</span><span class=
"hledgerTransactionComment">; Ok, mais déconseillé
</span>
7359 <span class=
"hledgerPostingAccount"> Compte
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">Débité
</span><span class=
"hledgerPostingAmount"> </span><span class=
"hledgerNumber">1</span>
7360 <span class=
"hledgerPostingAccountOdd"> Compte
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerPostingAccountOdd">Crédité
</span><span class=
"hledgerPostingAmountOdd"> -
</span><span class=
"hledgerNumberOdd">1</span> <span class=
"hledgerTransactionComment">; Flux non ordonné par crédit/débit
</span>
7361 <span class=
"hledgerTransactionDescription"> </span><span class=
"hledgerTransactionComment">; c'est juste moins lisible...
</span>
7363 <span class=
"Comment">; Répéter ad nauseam
</span>
7366 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7367 </div><div class=
"slide">
7370 <h1 id=
"_langage">4.2. Langage
</h1>
7371 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"4.2. Langage";
slidefootnotes=
"";/*]]
>*/
</script>
7372 <div class=
"sectionbody">
7373 <div class=
"tableblock">
7377 cellspacing=
"0" cellpadding=
"4">
7382 <th align=
"center" valign=
"top">Syntaxe (grammaire
<a href=
"https://fr.wikipedia.org/wiki/Forme_de_Backus-Naur">BNF
</a>)
</th>
7383 <th align=
"center" valign=
"top">Structure (signatures fonctionnelles)
</th>
7386 <tbody class=
"incremental">
7388 <td align=
"left" valign=
"top"><div><div class=
"listingblock incremental">
7389 <div class=
"content"><pre>
7390 livre ::= (écriture | commentaire |
<span class=
"Constant">"⏎
"</span> |
<span class=
"Constant">"␣
"</span>)*
7391 </pre></div></div></div></td>
7392 <td align=
"left" valign=
"top"><div><div class=
"hdlist math"><table><tbody class=
" incremental math">
7394 <td class=
"hdlist1">
7395 <strong>livre
</strong>
7398 <td class=
"hdlist2">
7399 <p style=
"margin-top: 0;">
7400 <span class=
" LaTeX ">$
7401 :\
>f:\textcolor{#D2691E}{\textbf{fichier}} →
7402 \lbrack\textcolor{#D2691E}{\textbf{\acute{e}criture}}\rbrack$
</span>
7406 </tbody></table></div></div></td>
7409 <td align=
"left" valign=
"top"><div><div class=
"listingblock incremental">
7410 <div class=
"content"><pre>
7411 écriture ::= date
<span class=
"Constant">"␣
"</span> <span class=
"Constant">"␣
"</span>* libellé commentaire
<span class=
"Constant">"⏎
"</span>
7412 (
<span class=
"Constant">"␣
"</span> flux
<span class=
"Constant">"⏎
"</span>)*
7413 date ::= (année
<span class=
"Constant">"/
"</span>)? mois
<span class=
"Constant">"/
"</span> jour
7414 libellé ::= (· - (
<span class=
"Constant">";
"</span>|
<span class=
"Constant">"⏎
"</span>))*
7415 </pre></div></div></div></td>
7416 <td align=
"left" valign=
"top"><div><div class=
"hdlist math"><table><tbody class=
" incremental math">
7418 <td class=
"hdlist1">
7419 <strong>date
</strong>
7422 <td class=
"hdlist2">
7423 <p style=
"margin-top: 0;">
7424 <span class=
" LaTeX ">$
7425 :\
>e:\textcolor{#D2691E}{\textbf{\acute{e}criture}} →
7426 (\textcolor{#
083194}{\textbf{ann\acute{e}e}}:\textcolor{#D2691E}{\textbf{ℕ}},~
7427 \textcolor{#
083194}{\textbf{mois}}:\{\textcolor{#D2691E}{\textbf{
01}},...,\textcolor{#D2691E}{\textbf{
12}}\},~
7428 \textcolor{#
083194}{\textbf{jour}}:\{\textcolor{#D2691E}{\textbf{
01}},...,\textcolor{#D2691E}{\textbf{
31}}\})$
</span>
7433 <td class=
"hdlist1">
7434 <strong>libellé
</strong>
7437 <td class=
"hdlist2">
7438 <p style=
"margin-top: 0;">
7439 <span class=
" LaTeX ">$
7440 :\
>e:\textcolor{#D2691E}{\textbf{\acute{e}criture}} →
7441 \textcolor{#D2691E}{\textbf{texte}}$
</span>
7446 <td class=
"hdlist1">
7447 <strong>commentaire
</strong>
7450 <td class=
"hdlist2">
7451 <p style=
"margin-top: 0;">
7452 <span class=
" LaTeX ">$
7453 :\
>e:\textcolor{#D2691E}{\textbf{\acute{e}criture}} →
7454 \textcolor{#D2691E}{\textbf{texte}}$
</span>
7459 <td class=
"hdlist1">
7460 <strong>tags
</strong>
7463 <td class=
"hdlist2">
7464 <p style=
"margin-top: 0;">
7465 <span class=
" LaTeX ">$
7466 :\
>e:\textcolor{#D2691E}{\textbf{\acute{e}criture}} →
7467 \lbrack\textcolor{#D2691E}{\textbf{tag}}\rbrack
7468 \ =\ \textbf{tags}~(\textbf{commentaire}~e)$
</span>
7473 <td class=
"hdlist1">
7474 <strong>flux
</strong>
7477 <td class=
"hdlist2">
7478 <p style=
"margin-top: 0;">
7479 <span class=
" LaTeX ">$
7480 :\
>e:\textcolor{#D2691E}{\textbf{\acute{e}criture}} →
7481 \lbrack\textcolor{#D2691E}{\textbf{flux}}\rbrack$
</span>
7485 </tbody></table></div></div></td>
7488 <td align=
"left" valign=
"top"><div><div class=
"listingblock incremental">
7489 <div class=
"content"><pre>
7490 flux ::= compte
<span class=
"Constant">"␣␣
"</span> <span class=
"Constant">"␣
"</span>* (
<span class=
"Constant">"-
"</span> crédit | débit) (
<span class=
"Constant">"␣
"</span>|
<span class=
"Constant">"⏎
"</span>)* commentaire
7491 compte ::= nom (
<span class=
"Constant">":
"</span> nom )*
7492 nom ::= (· - (
<span class=
"Constant">":
"</span>|
<span class=
"Constant">"⏎
"</span>)) (· - (
<span class=
"Constant">":
"</span>|
<span class=
"Constant">"⏎
"</span>))*
7495 </pre></div></div></div></td>
7496 <td align=
"left" valign=
"top"><div><div class=
"hdlist math"><table><tbody class=
" incremental math">
7498 <td class=
"hdlist1">
7499 <strong>compte
</strong>
7502 <td class=
"hdlist2">
7503 <p style=
"margin-top: 0;">
7504 <span class=
" LaTeX ">$
7505 :\
>f:\textcolor{#D2691E}{\textbf{flux}} →
7506 \lbrack\textcolor{#D2691E}{\textbf{nom}}\rbrack$
</span>
7511 <td class=
"hdlist1">
7512 <strong>montant
</strong>
7515 <td class=
"hdlist2">
7516 <p style=
"margin-top: 0;">
7517 <span class=
" LaTeX ">$
7518 :\
>f:\textcolor{#D2691E}{\textbf{flux}} → \textcolor{#D2691E}{ℚ} = \displaystyle{
7519 \left\{\begin{array}{ll} -~(\textbf{cr\acute{e}dit}~f)
& \mathit{\mbox{si défini}} \\
7520 (\textbf{d\acute{e}bit}~f)
& \mathit{\mbox{sinon}}
7521 \end{array}\right}$
</span>
7526 <td class=
"hdlist1">
7527 <strong>tags
</strong>
7530 <td class=
"hdlist2">
7531 <p style=
"margin-top: 0;">
7532 <span class=
" LaTeX ">$
7533 :\
>f:\textcolor{#D2691E}{\textbf{flux}} →
7534 \lbrack\textcolor{#D2691E}{\textbf{tag}}\rbrack
7535 \ =\ \textbf{tags}~(\textbf{commentaire}~f)$
</span>
7539 </tbody></table></div></div></td>
7542 <td align=
"left" valign=
"top"><div><div class=
"listingblock incremental">
7543 <div class=
"content"><pre>
7544 commentaire ::= (
<span class=
"Constant">";
"</span> (tag
<span class=
"Constant">":
"</span> valeur? | ·)* )
7545 ( (
<span class=
"Constant">"⏎
"</span>|
<span class=
"Constant">"␣
"</span>)*
<span class=
"Constant">";
"</span> (tag
<span class=
"Constant">":
"</span> valeur? | ·)* )*
7546 </pre></div></div></div></td>
7547 <td align=
"left" valign=
"top"><div><div class=
"hdlist math"><table><tbody class=
" incremental math">
7549 <td class=
"hdlist1">
7550 <strong>tags
</strong>
7553 <td class=
"hdlist2">
7554 <p style=
"margin-top: 0;">
7555 <span class=
" LaTeX ">$
7556 :\
>m:\textcolor{#D2691E}{\textbf{commentaire}} →
7557 \lbrack\textcolor{#D2691E}{\textbf{tag}}\rbrack$
</span>
7562 <td class=
"hdlist1">
7563 <strong>tag
</strong>
7566 <td class=
"hdlist2">
7567 <p style=
"margin-top: 0;">
7568 <span class=
" LaTeX ">$
7569 :\
>(\textcolor{#
083194}{\textbf{tag}}:\textcolor{#D2691E}{\textbf{texte}},%
7570 ~\textcolor{#
083194}{\textbf{valeur}}:\textcolor{#D2691E}{\textbf{\mbox{texte}}\
>?})$
</span>
7574 </tbody></table></div></div></td>
7579 <div class=
"admonitionblock incremental">
7582 <img src=
"./icons/note.png" alt=
"Note" />
7584 <td class=
"content">RTFM @
<a href=
"http://hledger.org/manual/">http://hledger.org/manual/
</a>.
</td>
7588 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7589 </div><div class=
"slide">
7592 <h1 id=
"_calculs">4.3. Calculs
</h1>
7593 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"4.3. Calculs";
slidefootnotes=
"";/*]]
>*/
</script>
7594 <div class=
"sectionbody">
7595 <div class=
"hdlist"><table><tbody class=
" incremental">
7597 <td class=
"hdlist1">
7598 <strong>compte_parent
</strong>
7601 <td class=
"hdlist2">
7602 <p style=
"margin-top: 0;">
7603 <span class=
" LaTeX ">$:\
>c : \textcolor{#D2691E}{\textbf{compte}} → \textcolor{#D2691E}{\textbf{compte}}\
>?$
</span><br />
7604 <span class=
" LaTeX ">$=\
>c_{\lbrack0,\cdots,|c|-
2\rbrack}\ \mbox{si}\ |c| \ge
2$
</span>
7609 <td class=
"hdlist1">
7610 <strong>hiérarchie_de_compte
</strong>
7613 <td class=
"hdlist2">
7614 <p style=
"margin-top: 0;">
7615 <span class=
" LaTeX ">$:\
>\mathbb c : \textcolor{#D2691E}{\textbf{compte}} → \lbrack\textcolor{#D2691E}{\textbf{compte}}\rbrack$
</span><br />
7616 <span class=
" LaTeX ">$=\
>\lbrack{\ c\ :\ \lbrack{\ c\ |\ c ← (\mathbf{compte\mbox{_}parent}\
>{c})}\ \rbrack}\ \rbrack$
</span>
7621 <td class=
"hdlist1">
7622 <strong>comptes
</strong>
7625 <td class=
"hdlist2">
7626 <p style=
"margin-top: 0;">
7627 <span class=
" LaTeX ">$:\
>\mathbb E : \lbrack\textcolor{#D2691E}{\textbf{\acute{e}criture}}\rbrack → \{\textcolor{#D2691E}{\textbf{compte}}\}$
</span><br />
7628 <span class=
" LaTeX ">$\{\ (\textbf{compte}\
>f)\ |\ f ← (\textbf{flux}\
>e)\ |\ e ← \mathbb E\ \}$
</span>
7633 <td class=
"hdlist1">
7634 <strong>balance
</strong>
7637 <td class=
"hdlist2">
7638 <p style=
"margin-top: 0;">
7639 <span class=
" LaTeX ">$:\
>\mathbb F : \lbrack\textcolor{#D2691E}{\textbf{flux}}\rbrack → ℚ$
</span><br />
7640 <span class=
" LaTeX ">$=\
>{(\ m\ |\ m ← m + (\textbf{montant}\
>f)\ |\ f ← \mathbb F\ |\ m ←
0\ )$
</span><br />
7645 <td class=
"hdlist1">
7646 <strong>solde_de_compte
</strong>
7649 <td class=
"hdlist2">
7650 <p style=
"margin-top: 0;">
7651 <span class=
" LaTeX ">$:\
>\mathbb E : \lbrack\textcolor{#D2691E}{\textbf{\acute{e}criture}}\rbrack → c : \textcolor{#D2691E}{\textbf{compte}} → ℚ$
</span><br />
7652 <span class=
" LaTeX ">$=\
>{\textbf{balance}\
>\lbrack{\ f\ |\ f ← (\textbf{flux}\
>e),\ c\
>≼\
>(\textbf{compte}\
>f)\ |\ e ← \mathbb E\ }\rbrack$
</span><br />
7657 <td class=
"hdlist1">
7658 <strong>solde
</strong>
7661 <td class=
"hdlist2">
7662 <p style=
"margin-top: 0;">
7663 <span class=
" LaTeX ">$:\
>\mathbb E : \lbrack\textcolor{#D2691E}{\textbf{\acute{e}criture}}\rbrack →
7664 \lbrack\textcolor{#D2691E}{\textbf{flux}}\rbrack$
</span><br />
7665 <span class=
" LaTeX ">$=\
>\displaystyle{\left\lbrack
7667 (\textcolor{#
083194}{\textbf{compte}}=c´, \textcolor{#
083194}{\textbf{montant}}=m) \\
7668 |\ m ← (\mathbf{\mbox{solde_de_compte}}\,\mathbb E\,c´) \\
7669 |\ c´ ← (\mathbf{hi\acute{e}rarchie\mbox{_}de\mbox{_}compte}\,c) \\
7670 |\ c ← (\mathbf{comptes}\,\mathbb E)
7671 \end{array}}\right\rbrack$
</span>
7675 </tbody></table></div>
7677 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7678 </div><div class=
"slide">
7681 <h1 id=
"_utiliser_un_éditeur_de_texte_structuré_code_vim_code">4.4. Utiliser un éditeur de texte structuré (
<code>vim
</code>)
</h1>
7682 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"4.4. Utiliser un éditeur de texte structuré (<code>vim</code>)";
slidefootnotes=
"";/*]]
>*/
</script>
7683 <div class=
"sectionbody">
7684 <div class=
"dlist"><dl class=
" incremental">
7685 <dt class=
"hdlist1">
7686 Coloration syntaxique sur mesure
7689 <ul class=
" incremental">
7692 <code>hledger.vim
</code>
7694 <div class=
"listingblock incremental">
7695 <div class=
"title">~/.vimrc
</div>
7696 <div class=
"content"><pre>
7697 <span class=
"Statement">autocmd
</span> <span class=
"Type">BufNewFile
</span>,
<span class=
"Type">BufRead
</span> *.hledger,*.ledger
<span class=
"Statement">setfiletype
</span> hledger
7702 <dt class=
"hdlist1">
7703 Complètement automatique des comptes (
<code><Tab
></code>)
7706 <ul class=
" incremental">
7709 <a href=
"https://github.com/Shougo/neocomplete.vim">https://github.com/Shougo/neocomplete.vim
</a>
7714 <a href=
"https://github.com/Shougo/neocomplcache.vim">https://github.com/Shougo/neocomplcache.vim
</a>
7716 <div class=
"listingblock incremental">
7717 <div class=
"title">~/.vimrc
</div>
7718 <div class=
"content"><pre>
7719 <span class=
"Statement">autocmd
</span> <span class=
"Type">Filetype
</span> hledger
<span class=
"Statement">set
</span> <span class=
"PreProc">iskeyword
</span>+=.
<span class=
"Statement">,
</span>38<span class=
"Statement">,
</span>39<span class=
"Statement">,
</span>40<span class=
"Statement">,
</span>41<span class=
"Statement">,
</span>44<span class=
"Statement">,
</span>45<span class=
"Statement">,
</span>58 "
7724 <dt class=
"hdlist1">
7725 Alignement automatique des montants
7728 <ul class=
" incremental">
7731 <a href=
"https://github.com/junegunn/vim-easy-align">https://github.com/junegunn/vim-easy-align
</a>
7733 <div class=
"listingblock incremental">
7734 <div class=
"title">~/.vimrc
</div>
7735 <div class=
"content"><pre>
7736 <span class=
"Statement">let
</span> <span class=
"Identifier">g
</span>:easy_align_ignore_groups
<span class=
"Statement">=
</span> [
<span class=
"Constant">'Comment'
</span>,
<span class=
"Constant">'String'
</span>,
<span class=
"Constant">'hledgerTransaction'
</span>]
7743 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7746 <h1 id=
"_suivre_les_modifications_à_plusieurs_et_ou_à_distance_code_git_code">4.4.1. Suivre les modifications à plusieurs et/ou à distance (
<code>git
</code>)
</h1>
7747 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect3";
nexttitle=
"4.4.1. Suivre les modifications à plusieurs et/ou à distance (<code>git</code>)";
slidefootnotes=
"";/*]]
>*/
</script>
7748 <div class=
"sectionbody">
7749 <div class=
"paragraph">
7750 <div class=
"incremental">
7755 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7756 </div><div class=
"slide">
7759 <h1 id=
"_commandes_code_hledger_code">5. Commandes
<code>hledger
</code></h1>
7760 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect1";
nexttitle=
"5. Commandes <code>hledger</code>";
slidefootnotes=
"";/*]]
>*/
</script>
7761 <div class=
"sectionbody">
7763 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7766 <h1 id=
"_calculer_des_soldes_code_balance_code">5.1. Calculer des soldes (
<code>balance
</code>)
</h1>
7767 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"5.1. Calculer des soldes (<code>balance</code>)";
slidefootnotes=
"";/*]]
>*/
</script>
7768 <div class=
"sectionbody">
7769 <div class=
"listingblock incremental">
7770 <div class=
"content"><pre>
7771 % hledger balance
<span class=
"Special">-f
</span> <span class=
"PreProc">$fichier
</span>.ledger
<span class=
"PreProc">$filtre
</span>
7773 <div class=
"listingblock incremental">
7774 <div class=
"title">Suivi des comptes
</div>
7775 <div class=
"content"><pre>
7776 % hledger balance
<span class=
"Special">-b
</span> <span class=
"Constant">2012</span>/
<span class=
"Constant">02</span>/
<span class=
"Constant">01</span> <span class=
"Special">-e
</span> <span class=
"Constant">2012</span>/
<span class=
"Constant">04</span>/
<span class=
"Constant">30</span> <span class=
"Special">--monthly
</span> <span class=
"Special">-f
</span> <span class=
"PreProc">$fichier
</span>.ledger
<span class=
"Statement">></span>/tmp/bal.flow
7777 % hledger balance
<span class=
"Special">-b
</span> <span class=
"Constant">2012</span>/
<span class=
"Constant">02</span>/
<span class=
"Constant">01</span> <span class=
"Special">-e
</span> <span class=
"Constant">2012</span>/
<span class=
"Constant">04</span>/
<span class=
"Constant">30</span> <span class=
"Special">--cumulative
</span> <span class=
"Special">--monthly
</span> <span class=
"Special">-f
</span> <span class=
"PreProc">$fichier
</span>.ledger
<span class=
"Statement">></span>/tmp/bal.cumulative
7778 % hledger balance
<span class=
"Special">-b
</span> <span class=
"Constant">2012</span>/
<span class=
"Constant">02</span>/
<span class=
"Constant">01</span> <span class=
"Special">-e
</span> <span class=
"Constant">2012</span>/
<span class=
"Constant">04</span>/
<span class=
"Constant">30</span> <span class=
"Special">--historical
</span> <span class=
"Special">--monthly
</span> <span class=
"Special">-f
</span> <span class=
"PreProc">$fichier
</span>.ledger
<span class=
"Statement">></span>/tmp/bal.historical
7779 % gvimdiff
<span class=
"Special">-o
</span> /tmp/bal.
<span class=
"Special">{
</span>cumulative,historical
<span class=
"Special">}
</span>
7781 <div class=
"imageblock incremental">
7782 <div class=
"content">
7783 <img src=
"data/gvimdiff-cumulative-historical.png" alt=
"data/gvimdiff-cumulative-historical.png" />
7787 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7790 <h1 id=
"_filtrer_des_écritures_code_print_code">5.2. Filtrer des écritures (
<code>print
</code>)
</h1>
7791 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"5.2. Filtrer des écritures (<code>print</code>)";
slidefootnotes=
"";/*]]
>*/
</script>
7792 <div class=
"sectionbody">
7793 <div class=
"paragraph">
7794 <div class=
"incremental">
7799 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7802 <h1 id=
"_suivre_un_compte_code_register_code">5.3. Suivre un compte (
<code>register
</code>)
</h1>
7803 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"5.3. Suivre un compte (<code>register</code>)";
slidefootnotes=
"";/*]]
>*/
</script>
7804 <div class=
"sectionbody">
7805 <div class=
"paragraph">
7806 <div class=
"incremental">
7811 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7814 <h1 id=
"_observer_des_statistiques_code_stats_code_code_activity_code">5.4. Observer des statistiques (
<code>stats
</code>,
<code>activity
</code>)
</h1>
7815 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"5.4. Observer des statistiques (<code>stats</code>, <code>activity</code>)";
slidefootnotes=
"";/*]]
>*/
</script>
7816 <div class=
"sectionbody">
7817 <div class=
"paragraph">
7818 <div class=
"incremental">
7823 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7824 </div><div class=
"slide">
7827 <h1 id=
"_exercice_comptable">6. Exercice comptable
</h1>
7828 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect1";
nexttitle=
"6. Exercice comptable";
slidefootnotes=
"";/*]]
>*/
</script>
7829 <div class=
"sectionbody">
7831 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7834 <h1 id=
"_plan_comptable_d_une_association">6.1. Plan comptable d’une association
</h1>
7835 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"6.1. Plan comptable d’une association";
slidefootnotes=
"";/*]]
>*/
</script>
7836 <div class=
"sectionbody">
7837 <ul class=
" incremental">
7840 DOC :
<a href=
"https://wiki.cyclocoop.org/Comptabilité/Document/Plan_comptable/">https://wiki.cyclocoop.org/Comptabilité/Document/Plan_comptable/
</a>
7844 <div class=
"listingblock incremental">
7845 <div class=
"content"><pre>
7846 #include::data/Cyclofficine.Plan_comptable.hledger[]
7849 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7850 </div><div class=
"slide">
7853 <h1 id=
"_comptabiliser_en_partie_double">6.2. Comptabiliser en partie double
</h1>
7854 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"6.2. Comptabiliser en partie double";
slidefootnotes=
"";/*]]
>*/
</script>
7855 <div class=
"sectionbody">
7856 <div class=
"dlist"><dl class=
" incremental">
7857 <dt class=
"hdlist1">
7858 Solde nul de toute écriture
7861 <div class=
"dlist"><dl class=
" incremental">
7862 <dt class=
"hdlist1">
7867 Tout ce qui est
<em>débité
</em> (
<code>+
</code>) dans ses comptes
<br />
7868 est forcément
<em>crédité
</em> (
<code>-
</code>) dans ses autres comptes.
7870 <ul class=
" incremental">
7873 <span class=
" LaTeX ">$\forall e : \textcolor{#D2691E}{\textbf{\acute{e}criture}},
7874 \ \textbf{balance}\
>(\textbf{flux}\
>{e}) =
0$
</span>
7881 <dt class=
"hdlist1">
7882 Relation de Chasles par écritures d’engagement et de paiement
7885 <div class=
"listingblock incremental">
7886 <div class=
"content"><pre>
7887 <span class=
"hledgerTransactionDate">01/
01</span> <span class=
"hledgerTransactionDescription">Écriture d’engagement
</span>
7888 <span class=
"hledgerPostingAccount"> </span><span class=
"hledgerNumber">7</span><span class=
"hledgerPostingAccount">.Produit
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">0</span><span class=
"hledgerPostingAccount">.Vente
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">1</span><span class=
"hledgerPostingAccount">.Produit_fini
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">1</span><span class=
"hledgerPostingAccount">.Vélo
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">80</span>
7889 <span class=
"hledgerPostingAccountOdd"> </span><span class=
"hledgerNumberOdd">5</span><span class=
"hledgerPostingAccountOdd">.Finance
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">1</span><span class=
"hledgerPostingAccountOdd">.Etablissement
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">1</span><span class=
"hledgerPostingAccountOdd">.Valeur
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">2</span><span class=
"hledgerPostingAccountOdd">.Chèque_à_encaisser
</span><span class=
"hledgerPostingAmountOdd"> </span><span class=
"hledgerNumberOdd">80</span>
7891 <span class=
"hledgerTransactionDate">01/
02</span> <span class=
"hledgerTransactionDescription">Écriture de paiement
</span>
7892 <span class=
"hledgerPostingAccount"> </span><span class=
"hledgerNumber">5</span><span class=
"hledgerPostingAccount">.Finance
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">1</span><span class=
"hledgerPostingAccount">.Etablissement
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">1</span><span class=
"hledgerPostingAccount">.Valeur
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">2</span><span class=
"hledgerPostingAccount">.Chèque_à_encaisser
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">80</span>
7893 <span class=
"hledgerPostingAccountOdd"> </span><span class=
"hledgerNumberOdd">5</span><span class=
"hledgerPostingAccountOdd">.Finance
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">1</span><span class=
"hledgerPostingAccountOdd">.Etablissement
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">2</span><span class=
"hledgerPostingAccountOdd">.Banque
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">001</span><span class=
"hledgerPostingAccountOdd">.Courant
</span><span class=
"hledgerPostingAmountOdd"> </span><span class=
"hledgerNumberOdd">80</span>
7895 <div class=
"admonitionblock incremental">
7898 <img src=
"./icons/note.png" alt=
"Note" />
7900 <td class=
"content">pour des espèces, transiter par :
<code>5.Finance:
3.Caisse:
1.Siège
</code></td>
7906 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7907 </div><div class=
"slide">
7910 <h1 id=
"_soldes_nuls_souhaitables">6.2.1. Soldes nuls souhaitables
</h1>
7911 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect3";
nexttitle=
"6.2.1. Soldes nuls souhaitables";
slidefootnotes=
"";/*]]
>*/
</script>
7912 <div class=
"sectionbody">
7913 <ul class=
" incremental">
7916 Écritures des recettes
7918 <ol class=
"arabic incremental">
7921 <span class=
" LaTeX ">$\sum{\mbox{ventes}} + \sum{\mbox{dons}} = \sum{\mbox{espèces entrées en caisse}} + \sum{\mbox{Chèques à encaisser}}$
</span><br />
7922 (Total des ventes + dons == Total d’espèces entrée en caisse + Chèques à encaisser (
5112))
7927 Total chèques à encaisser (
5112) == Total remises de chèques à la banque (
512) (+/- argent non déposé en banque)
7932 Solde du compte caisse (
531) == Total entrées espèces en caisse - Total des sorties (remises d’espèces en banque - sorties d’achats - erreur de caisse)
7937 Solde compte caisse (
531) == Total entrées en caisse - Dépôt espèce en banque - Achat en espèce
7946 <div class=
"paragraph">
7947 <div class=
"incremental">
7954 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
7955 </div><div class=
"slide">
7958 <h1 id=
"_journaux_filtres">6.3. Journaux (filtres)
</h1>
7959 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"6.3. Journaux (filtres)";
slidefootnotes=
"";/*]]
>*/
</script>
7960 <div class=
"sectionbody">
7961 <div class=
"hdlist"><table><tbody class=
" incremental">
7963 <td class=
"hdlist1">
7964 <strong>Banque
</strong>
7967 <td class=
"hdlist2">
7968 <div class=
"listingblock incremental">
7969 <div class=
"content"><pre>
7970 hledger
<span class=
"Statement">print
</span><span class=
"Constant"> -f
</span><span class=
"PreProc">$fichier
</span><span class=
"Constant">.ledger
</span><span class=
"Statement">'
</span><span class=
"Constant">^
5.Finance:
1.Etablissement:
2.Banque:
</span><span class=
"Statement">'
</span>
7975 <td class=
"hdlist1">
7976 <strong>Achats
</strong>
7979 <td class=
"hdlist2">
7980 <div class=
"listingblock incremental">
7981 <div class=
"content"><pre>
7982 hledger
<span class=
"Statement">print
</span><span class=
"Constant"> -f
</span><span class=
"PreProc">$fichier
</span><span class=
"Constant">.ledger
</span><span class=
"Statement">'
</span><span class=
"Constant">^(
2.Immobilisation:
1.Corporelle:|
6.Charge:(
0.Achat|
1.Service|
2.Autre_service):)
</span><span class=
"Statement">'
</span>
7987 <td class=
"hdlist1">
7988 <strong>Vente
</strong>
7991 <td class=
"hdlist2">
7992 <div class=
"listingblock incremental">
7993 <div class=
"content"><pre>
7994 hledger
<span class=
"Statement">print
</span><span class=
"Constant"> -f
</span><span class=
"PreProc">$fichier
</span><span class=
"Constant">.ledger
</span><span class=
"Statement">'
</span><span class=
"Constant">^
7.Produit:
0.Vente:
</span><span class=
"Statement">'
</span>
7999 <td class=
"hdlist1">
8000 <strong>Caisse
</strong>
8003 <td class=
"hdlist2">
8004 <div class=
"listingblock incremental">
8005 <div class=
"content"><pre>
8006 hledger
<span class=
"Statement">print
</span><span class=
"Constant"> -f
</span><span class=
"PreProc">$fichier
</span><span class=
"Constant">.ledger
</span><span class=
"Statement">'
</span><span class=
"Constant">^
5.Finance:
3.Caisse:
</span><span class=
"Statement">'
</span>
8011 <td class=
"hdlist1">
8012 <strong>Paye
</strong>
8015 <td class=
"hdlist2">
8016 <div class=
"listingblock incremental">
8017 <div class=
"content"><pre>
8018 hledger
<span class=
"Statement">print
</span><span class=
"Constant"> -f
</span><span class=
"PreProc">$fichier
</span><span class=
"Constant">.ledger
</span><span class=
"Statement">'
</span><span class=
"Constant">6.Charge:(
3.Impôt:(
1.|
3.):|
4.Personnel:)
</span><span class=
"Statement">'
</span>
8023 <td class=
"hdlist1">
8024 <strong>À NouVeaux
</strong>
8027 <td class=
"hdlist2">
8028 <div class=
"listingblock incremental">
8029 <div class=
"content"><pre>
8030 hledger
<span class=
"Statement">print
</span><span class=
"Constant"> -f
</span><span class=
"PreProc">$fichier
</span><span class=
"Constant">.ledger tag:ANV
</span>
8035 <td class=
"hdlist1">
8036 <strong>Opération_Diverses
</strong>
8039 <td class=
"hdlist2">
8040 <div class=
"listingblock incremental">
8041 <div class=
"content"><pre>
8042 hledger
<span class=
"Statement">print
</span><span class=
"Constant"> -f
</span><span class=
"PreProc">$fichier
</span><span class=
"Constant">.ledger tag:OD
</span>
8046 </tbody></table></div>
8048 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
8049 </div><div class=
"slide">
8052 <h1 id=
"_clôture_ouverture_code_equity_code">6.4. Clôture / Ouverture (
<code>equity
</code>)
</h1>
8053 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"6.4. Clôture / Ouverture (<code>equity</code>)";
slidefootnotes=
"";/*]]
>*/
</script>
8054 <div class=
"sectionbody">
8055 <div class=
"paragraph">
8056 <div class=
"incremental">
8057 <p><code>hledger-equity
</code> calcule une balance de comptes
8058 et en fait deux écritures, respectivement :
</p>
8061 <div class=
"hdlist"><table><tbody class=
" incremental">
8063 <td class=
"hdlist1">
8067 <td class=
"hdlist2">
8068 <p style=
"margin-top: 0;">
8069 pour les solder à zéro en fin d’exercice ;
8074 <td class=
"hdlist1">
8078 <td class=
"hdlist2">
8079 <p style=
"margin-top: 0;">
8080 pour les réinitialiser à leur solde du précédent exercice.
8084 </tbody></table></div>
8085 <div class=
"listingblock incremental">
8086 <div class=
"content"><pre>
8087 % hledger-equity
<span class=
"Special">-f
</span> <span class=
"PreProc">$fichier
</span>.ledger
<span class=
"PreProc">$filtre
</span>
8089 <div class=
"listingblock incremental">
8090 <div class=
"title">Solde des compte de gestion
</div>
8091 <div class=
"content"><pre>
8092 % hledger-equity '^
6' '^
7' -f Paris
.2011.hledger
8093 <span class=
"hledgerTransactionDate">2014/
07/
29</span>
8094 <span class=
"hledgerPostingAccount"> </span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Charge
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">0</span><span class=
"hledgerPostingAccount">.Achat
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Non_stocké
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">8</span><span class=
"hledgerPostingAccount">.Autre_Matière,Fourniture
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">1</span><span class=
"hledgerPostingAccount">.Atelier
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">248</span><span class=
"hledgerPostingAmount">,
</span><span class=
"hledgerNumber">87</span><span class=
"hledgerPostingAmount">€
</span>
8095 <span class=
"hledgerPostingAccountOdd"> </span><span class=
"hledgerNumberOdd">6</span><span class=
"hledgerPostingAccountOdd">.Charge
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">1</span><span class=
"hledgerPostingAccountOdd">.Service
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">3</span><span class=
"hledgerPostingAccountOdd">.Location
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">2</span><span class=
"hledgerPostingAccountOdd">.Immobilière
</span><span class=
"hledgerPostingAmountOdd"> -
</span><span class=
"hledgerNumberOdd">441</span><span class=
"hledgerPostingAmountOdd">,
</span><span class=
"hledgerNumberOdd">46</span><span class=
"hledgerPostingAmountOdd">€
</span>
8096 <span class=
"hledgerPostingAccount"> </span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Charge
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">2</span><span class=
"hledgerPostingAccount">.Autre_service
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">3</span><span class=
"hledgerPostingAccount">.Communication
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Catalogue,Imprimé
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">24</span><span class=
"hledgerPostingAmount">,
</span><span class=
"hledgerNumber">00</span><span class=
"hledgerPostingAmount">€
</span>
8097 <span class=
"hledgerPostingAccountOdd"> </span><span class=
"hledgerNumberOdd">6</span><span class=
"hledgerPostingAccountOdd">.Charge
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">2</span><span class=
"hledgerPostingAccountOdd">.Autre_service
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">7</span><span class=
"hledgerPostingAccountOdd">.Service_bancaire
</span><span class=
"hledgerPostingAmountOdd"> -
</span><span class=
"hledgerNumberOdd">31</span><span class=
"hledgerPostingAmountOdd">,
</span><span class=
"hledgerNumberOdd">25</span><span class=
"hledgerPostingAmountOdd">€
</span>
8098 <span class=
"hledgerPostingAccount"> </span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Charge
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">5</span><span class=
"hledgerPostingAccount">.Gestion
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">8</span><span class=
"hledgerPostingAccount">.Divers
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Cotisation_(vie_statutaire)
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">25</span><span class=
"hledgerPostingAmount">,
</span><span class=
"hledgerNumber">00</span><span class=
"hledgerPostingAmount">€
</span>
8099 <span class=
"hledgerPostingAccountOdd"> </span><span class=
"hledgerNumberOdd">7</span><span class=
"hledgerPostingAccountOdd">.Produit
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">0</span><span class=
"hledgerPostingAccountOdd">.Vente
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">6</span><span class=
"hledgerPostingAccountOdd">.Prest'action
</span><span class=
"hledgerPostingAmountOdd"> </span><span class=
"hledgerNumberOdd">700</span><span class=
"hledgerPostingAmountOdd">,
</span><span class=
"hledgerNumberOdd">00</span><span class=
"hledgerPostingAmountOdd">€
</span>
8100 <span class=
"hledgerPostingAccount"> </span><span class=
"hledgerNumber">7</span><span class=
"hledgerPostingAccount">.Produit
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">5</span><span class=
"hledgerPostingAccount">.Autre_gestion_courante
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Cotisation
</span><span class=
"hledgerPostingAmount"> </span><span class=
"hledgerNumber">20</span><span class=
"hledgerPostingAmount">,
</span><span class=
"hledgerNumber">00</span><span class=
"hledgerPostingAmount">€
</span>
8101 <span class=
"hledgerPostingAccountOdd"> </span><span class=
"hledgerNumberOdd">7</span><span class=
"hledgerPostingAccountOdd">.Produit
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">5</span><span class=
"hledgerPostingAccountOdd">.Autre_gestion_courante
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">8</span><span class=
"hledgerPostingAccountOdd">.Divers
</span><span class=
"hledgerPostingAmountOdd"> </span><span class=
"hledgerNumberOdd">6</span><span class=
"hledgerPostingAmountOdd">,
</span><span class=
"hledgerNumberOdd">00</span><span class=
"hledgerPostingAmountOdd">€
</span>
8102 <span class=
"hledgerPostingAccount"> equity
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">closing balances
</span><span class=
"hledgerPostingAmount"> </span><span class=
"hledgerNumber">44</span><span class=
"hledgerPostingAmount">,
</span><span class=
"hledgerNumber">58</span><span class=
"hledgerPostingAmount">€
</span>
8104 <span class=
"hledgerTransactionDate">2014/
07/
29</span>
8105 <span class=
"hledgerPostingAccount"> </span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Charge
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">0</span><span class=
"hledgerPostingAccount">.Achat
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Non_stocké
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">8</span><span class=
"hledgerPostingAccount">.Autre_Matière,Fourniture
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">1</span><span class=
"hledgerPostingAccount">.Atelier
</span><span class=
"hledgerPostingAmount"> </span><span class=
"hledgerNumber">248</span><span class=
"hledgerPostingAmount">,
</span><span class=
"hledgerNumber">87</span><span class=
"hledgerPostingAmount">€
</span>
8106 <span class=
"hledgerPostingAccountOdd"> </span><span class=
"hledgerNumberOdd">6</span><span class=
"hledgerPostingAccountOdd">.Charge
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">1</span><span class=
"hledgerPostingAccountOdd">.Service
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">3</span><span class=
"hledgerPostingAccountOdd">.Location
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">2</span><span class=
"hledgerPostingAccountOdd">.Immobilière
</span><span class=
"hledgerPostingAmountOdd"> </span><span class=
"hledgerNumberOdd">441</span><span class=
"hledgerPostingAmountOdd">,
</span><span class=
"hledgerNumberOdd">46</span><span class=
"hledgerPostingAmountOdd">€
</span>
8107 <span class=
"hledgerPostingAccount"> </span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Charge
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">2</span><span class=
"hledgerPostingAccount">.Autre_service
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">3</span><span class=
"hledgerPostingAccount">.Communication
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Catalogue,Imprimé
</span><span class=
"hledgerPostingAmount"> </span><span class=
"hledgerNumber">24</span><span class=
"hledgerPostingAmount">,
</span><span class=
"hledgerNumber">00</span><span class=
"hledgerPostingAmount">€
</span>
8108 <span class=
"hledgerPostingAccountOdd"> </span><span class=
"hledgerNumberOdd">6</span><span class=
"hledgerPostingAccountOdd">.Charge
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">2</span><span class=
"hledgerPostingAccountOdd">.Autre_service
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">7</span><span class=
"hledgerPostingAccountOdd">.Service_bancaire
</span><span class=
"hledgerPostingAmountOdd"> </span><span class=
"hledgerNumberOdd">31</span><span class=
"hledgerPostingAmountOdd">,
</span><span class=
"hledgerNumberOdd">25</span><span class=
"hledgerPostingAmountOdd">€
</span>
8109 <span class=
"hledgerPostingAccount"> </span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Charge
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">5</span><span class=
"hledgerPostingAccount">.Gestion
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">8</span><span class=
"hledgerPostingAccount">.Divers
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Cotisation_(vie_statutaire)
</span><span class=
"hledgerPostingAmount"> </span><span class=
"hledgerNumber">25</span><span class=
"hledgerPostingAmount">,
</span><span class=
"hledgerNumber">00</span><span class=
"hledgerPostingAmount">€
</span>
8110 <span class=
"hledgerPostingAccountOdd"> </span><span class=
"hledgerNumberOdd">7</span><span class=
"hledgerPostingAccountOdd">.Produit
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">0</span><span class=
"hledgerPostingAccountOdd">.Vente
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">6</span><span class=
"hledgerPostingAccountOdd">.Prest'action
</span><span class=
"hledgerPostingAmountOdd"> -
</span><span class=
"hledgerNumberOdd">700</span><span class=
"hledgerPostingAmountOdd">,
</span><span class=
"hledgerNumberOdd">00</span><span class=
"hledgerPostingAmountOdd">€
</span>
8111 <span class=
"hledgerPostingAccount"> </span><span class=
"hledgerNumber">7</span><span class=
"hledgerPostingAccount">.Produit
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">5</span><span class=
"hledgerPostingAccount">.Autre_gestion_courante
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerNumber">6</span><span class=
"hledgerPostingAccount">.Cotisation
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">20</span><span class=
"hledgerPostingAmount">,
</span><span class=
"hledgerNumber">00</span><span class=
"hledgerPostingAmount">€
</span>
8112 <span class=
"hledgerPostingAccountOdd"> </span><span class=
"hledgerNumberOdd">7</span><span class=
"hledgerPostingAccountOdd">.Produit
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">5</span><span class=
"hledgerPostingAccountOdd">.Autre_gestion_courante
</span><span class=
"hledgerAccountSeparatorOdd">:
</span><span class=
"hledgerNumberOdd">8</span><span class=
"hledgerPostingAccountOdd">.Divers
</span><span class=
"hledgerPostingAmountOdd"> -
</span><span class=
"hledgerNumberOdd">6</span><span class=
"hledgerPostingAmountOdd">,
</span><span class=
"hledgerNumberOdd">00</span><span class=
"hledgerPostingAmountOdd">€
</span>
8113 <span class=
"hledgerPostingAccount"> equity
</span><span class=
"hledgerAccountSeparator">:
</span><span class=
"hledgerPostingAccount">opening balances
</span><span class=
"hledgerPostingAmount"> -
</span><span class=
"hledgerNumber">44</span><span class=
"hledgerPostingAmount">,
</span><span class=
"hledgerNumber">58</span><span class=
"hledgerPostingAmount">€
</span>
8116 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
8117 </div><div class=
"slide">
8120 <h1 id=
"_import_et_export_avec_code_hledger_code">7. Import et export avec
<code>hledger
</code></h1>
8121 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect1";
nexttitle=
"7. Import et export avec <code>hledger</code>";
slidefootnotes=
"";/*]]
>*/
</script>
8122 <div class=
"sectionbody">
8123 <ul class=
" incremental">
8126 <a href=
"https://github.com/eval/total_recall">https://github.com/eval/total_recall
</a>
8131 <a href=
"https://github.com/quentinsf/icsv2ledger">https://github.com/quentinsf/icsv2ledger
</a>
8136 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
8137 </div><div class=
"slide">
8140 <h1 id=
"_feuilles_de_calculs_des_documents_comptables">7.1. Feuilles de calculs des documents comptables
</h1>
8141 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"7.1. Feuilles de calculs des documents comptables";
slidefootnotes=
"";/*]]
>*/
</script>
8142 <div class=
"sectionbody">
8144 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
8147 <h1 id=
"_bilan_financier">7.1.1. Bilan financier
</h1>
8148 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect3";
nexttitle=
"7.1.1. Bilan financier";
slidefootnotes=
"";/*]]
>*/
</script>
8149 <div class=
"sectionbody">
8150 <div class=
"paragraph">
8151 <div class=
"incremental">
8156 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
8159 <h1 id=
"_comptes_de_résultats">7.1.2. Comptes de résultats
</h1>
8160 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect3";
nexttitle=
"7.1.2. Comptes de résultats";
slidefootnotes=
"";/*]]
>*/
</script>
8161 <div class=
"sectionbody">
8162 <div class=
"paragraph">
8163 <div class=
"incremental">
8168 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
8169 </div><div class=
"slide">
8172 <h1 id=
"_code_hledger_web_code">8.
<code>hledger-web
</code></h1>
8173 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect1";
nexttitle=
"8. <code>hledger-web</code>";
slidefootnotes=
"";/*]]
>*/
</script>
8174 <div class=
"sectionbody">
8175 <div class=
"paragraph">
8176 <div class=
"incremental">
8181 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
8182 </div><div class=
"slide">
8185 <h1 id=
"_bonus_scripter_code_hledger_code">9. (bonus) Scripter
<code>hledger
</code></h1>
8186 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect1";
nexttitle=
"9. (bonus) Scripter <code>hledger</code>";
slidefootnotes=
"";/*]]
>*/
</script>
8187 <div class=
"sectionbody">
8188 <div class=
"paragraph">
8189 <div class=
"incremental">
8194 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
8197 <h1 id=
"_installer_un_script_code_hledger_code">9.1. Installer un script
<code>hledger
</code></h1>
8198 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect2";
nexttitle=
"9.1. Installer un script <code>hledger</code>";
slidefootnotes=
"";/*]]
>*/
</script>
8199 <div class=
"sectionbody">
8200 <div class=
"listingblock incremental">
8201 <div class=
"content"><pre>
8202 %
<span class=
"Statement">echo
</span><span class=
"Constant"> </span><span class=
"Statement">'
</span><span class=
"Constant">PATH=
"$HOME/src/hledger/extra:$PATH
"</span><span class=
"Statement">'
</span><span class=
"Constant"> </span><span class=
"Statement">>></span>~/.profile
8203 %
<span class=
"Statement">exit
</span> <span class=
"Comment"># NOTE: recharge ~/.profile
</span>
8204 % ghc ~/src/hledger/extra/hledger-SCRIPT.hs
8207 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
8208 </div><div class=
"slide">
8211 <h1 id=
"_communauté">10. Communauté
</h1>
8212 <script type=
"text/javascript">/*<![CDATA[*/subslide=
1;
nextclass=
"sect1";
nexttitle=
"10. Communauté";
slidefootnotes=
"";/*]]
>*/
</script>
8213 <div class=
"sectionbody">
8214 <div class=
"hdlist"><table><tbody class=
" incremental">
8216 <td class=
"hdlist1">
8220 <td class=
"hdlist2">
8221 <p style=
"margin-top: 0;">
8222 <a href=
"irc://irc.freenode.net#ledger">irc://irc.freenode.net#ledger
</a>
8227 <td class=
"hdlist1">
8231 <td class=
"hdlist2">
8232 <p style=
"margin-top: 0;">
8233 <<a href=
"mailto:hledger+subscribe@googlegroups.com">hledger+subscribe@googlegroups.com
</a>>
8237 </tbody></table></div>
8238 <div class=
"background hledgersplash" style=
"position: absolute; left: 50%; top: 10%;">
8239 <div class=
"imageblock incremental">
8240 <div class=
"content">
8241 <img src=
"data/hledger.splash.png" alt=
"hledgersplash" />
8245 <div id=
"footer" style=
"position: absolute; left: 5%; top: 80%; width: 90%;">
8246 <div id=
"footer-text">
8247 Version
6ca58eb
<br />
8248 Dernière mise à jour
2014-
07-
29 21:
47:
32 CEST
8252 <script type=
"text/javascript">/*<![CDATA[*/if (slidefootnotes != ''){document.write(
"<hr/><p>"+slidefootnotes+
"</p>");}/*]]
>*/
</script>
8254 <script type=
"text/javascript">
8256 // move the div
class=
"background" elements immediately
8257 // as document.body children
8258 var re = new RegExp(
"(^| )background\W*");
8259 var divs = document.body.getElementsByTagName(
"div");
8260 for (var i = (divs.length -
1); i
>=
0 ; --i)
8263 if ( re.test(div.getAttribute(
"class")) )
8265 div2 = div.cloneNode(true);
8266 div.parentNode.removeChild(div);
8267 document.body.appendChild(div2);