{
"tiddlers": {
"$:/Acknowledgements": {
"title": "$:/Acknowledgements",
"type": "text/vnd.tiddlywiki",
"text": "TiddlyWiki incorporates code from these fine OpenSource projects:\n\n* [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]]\n* [[The Jasmine JavaScript Test Framework|http://pivotal.github.io/jasmine/]]\n* [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]]\n\nAnd media from these projects:\n\n* World flag icons from [[Wikipedia|http://commons.wikimedia.org/wiki/Category:SVG_flags_by_country]]\n"
},
"$:/core/copyright.txt": {
"title": "$:/core/copyright.txt",
"type": "text/plain",
"text": "TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)\n\nCopyright © Jeremy Ruston 2004-2007\nCopyright © UnaMesa Association 2007-2016\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice, this\nlist of conditions and the following disclaimer in the documentation and/or other\nmaterials provided with the distribution.\n\nNeither the name of the UnaMesa Association nor the names of its contributors may be\nused to endorse or promote products derived from this software without specific\nprior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\nSHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\nTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\nBUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\nANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGE.\n"
},
"$:/core/icon": {
"title": "$:/core/icon",
"tags": "$:/tags/Image",
"text": "<svg width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\"><path d=\"M64 0l54.56 32v64L64 128 9.44 96V32L64 0zm21.127 95.408c-3.578-.103-5.15-.094-6.974-3.152l-1.42.042c-1.653-.075-.964-.04-2.067-.097-1.844-.07-1.548-1.86-1.873-2.8-.52-3.202.687-6.43.65-9.632-.014-1.14-1.593-5.17-2.157-6.61-1.768.34-3.546.406-5.34.497-4.134-.01-8.24-.527-12.317-1.183-.8 3.35-3.16 8.036-1.21 11.44 2.37 3.52 4.03 4.495 6.61 4.707 2.572.212 3.16 3.18 2.53 4.242-.55.73-1.52.864-2.346 1.04l-1.65.08c-1.296-.046-2.455-.404-3.61-.955-1.93-1.097-3.925-3.383-5.406-5.024.345.658.55 1.938.24 2.53-.878 1.27-4.665 1.26-6.4.47-1.97-.89-6.73-7.162-7.468-11.86 1.96-3.78 4.812-7.07 6.255-11.186-3.146-2.05-4.83-5.384-4.61-9.16l.08-.44c-3.097.59-1.49.37-4.82.628-10.608-.032-19.935-7.37-14.68-18.774.34-.673.664-1.287 1.243-.994.466.237.4 1.18.166 2.227-3.005 13.627 11.67 13.732 20.69 11.21.89-.25 2.67-1.936 3.905-2.495 2.016-.91 4.205-1.282 6.376-1.55 5.4-.63 11.893 2.276 15.19 2.37 3.3.096 7.99-.805 10.87-.615 2.09.098 4.143.483 6.16 1.03 1.306-6.49 1.4-11.27 4.492-12.38 1.814.293 3.213 2.818 4.25 4.167 2.112-.086 4.12.46 6.115 1.066 3.61-.522 6.642-2.593 9.833-4.203-3.234 2.69-3.673 7.075-3.303 11.127.138 2.103-.444 4.386-1.164 6.54-1.348 3.507-3.95 7.204-6.97 7.014-1.14-.036-1.805-.695-2.653-1.4-.164 1.427-.81 2.7-1.434 3.96-1.44 2.797-5.203 4.03-8.687 7.016-3.484 2.985 1.114 13.65 2.23 15.594 1.114 1.94 4.226 2.652 3.02 4.406-.37.58-.936.785-1.54 1.01l-.82.11zm-40.097-8.85l.553.14c.694-.27 2.09.15 2.83.353-1.363-1.31-3.417-3.24-4.897-4.46-.485-1.47-.278-2.96-.174-4.46l.02-.123c-.582 1.205-1.322 2.376-1.72 3.645-.465 1.71 2.07 3.557 3.052 4.615l.336.3z\" fill-rule=\"evenodd\"/></svg>"
},
"$:/core/images/advanced-search-button": {
"title": "$:/core/images/advanced-search-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-advanced-search-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M74.5651535,87.9848361 C66.9581537,93.0488876 57.8237115,96 48,96 C21.490332,96 0,74.509668 0,48 C0,21.490332 21.490332,0 48,0 C74.509668,0 96,21.490332 96,48 C96,57.8541369 93.0305793,67.0147285 87.9377231,74.6357895 L122.284919,108.982985 C125.978897,112.676963 125.973757,118.65366 122.284271,122.343146 C118.593975,126.033442 112.613238,126.032921 108.92411,122.343793 L74.5651535,87.9848361 Z M48,80 C65.673112,80 80,65.673112 80,48 C80,30.326888 65.673112,16 48,16 C30.326888,16 16,30.326888 16,48 C16,65.673112 30.326888,80 48,80 Z\"></path>\n <circle cx=\"48\" cy=\"48\" r=\"8\"></circle>\n <circle cx=\"28\" cy=\"48\" r=\"8\"></circle>\n <circle cx=\"68\" cy=\"48\" r=\"8\"></circle>\n </g>\n</svg>"
},
"$:/core/images/blank": {
"title": "$:/core/images/blank",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-blank tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\"></svg>"
},
"$:/core/images/cancel-button": {
"title": "$:/core/images/cancel-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-cancel-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n\t<g fill-rule=\"evenodd\">\n\t <path d=\"M64,76.3137085 L47.0294734,93.2842351 C43.9038742,96.4098343 38.8399231,96.4084656 35.7157288,93.2842712 C32.5978915,90.166434 32.5915506,85.0947409 35.7157649,81.9705266 L52.6862915,65 L35.7157649,48.0294734 C32.5901657,44.9038742 32.5915344,39.8399231 35.7157288,36.7157288 C38.833566,33.5978915 43.9052591,33.5915506 47.0294734,36.7157649 L64,53.6862915 L80.9705266,36.7157649 C84.0961258,33.5901657 89.1600769,33.5915344 92.2842712,36.7157288 C95.4021085,39.833566 95.4084494,44.9052591 92.2842351,48.0294734 L75.3137085,65 L92.2842351,81.9705266 C95.4098343,85.0961258 95.4084656,90.1600769 92.2842712,93.2842712 C89.166434,96.4021085 84.0947409,96.4084494 80.9705266,93.2842351 L64,76.3137085 Z M64,129 C99.346224,129 128,100.346224 128,65 C128,29.653776 99.346224,1 64,1 C28.653776,1 1.13686838e-13,29.653776 1.13686838e-13,65 C1.13686838e-13,100.346224 28.653776,129 64,129 Z M64,113 C90.509668,113 112,91.509668 112,65 C112,38.490332 90.509668,17 64,17 C37.490332,17 16,38.490332 16,65 C16,91.509668 37.490332,113 64,113 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/chevron-down": {
"title": "$:/core/images/chevron-down",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-chevron-down tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n\t<g fill-rule=\"evenodd\" transform=\"translate(64.000000, 40.500000) rotate(-270.000000) translate(-64.000000, -40.500000) translate(-22.500000, -26.500000)\">\n <path d=\"M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z\" transform=\"translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) \"></path>\n <path d=\"M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z\" transform=\"translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) \"></path>\n\t</g>\n</svg>"
},
"$:/core/images/chevron-left": {
"title": "$:/core/images/chevron-left",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-chevron-left tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\" version=\"1.1\">\n <g fill-rule=\"evenodd\" transform=\"translate(92.500000, 64.000000) rotate(-180.000000) translate(-92.500000, -64.000000) translate(6.000000, -3.000000)\">\n <path d=\"M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z\" transform=\"translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) \"></path>\n <path d=\"M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z\" transform=\"translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) \"></path>\n </g>\n</svg>"
},
"$:/core/images/chevron-right": {
"title": "$:/core/images/chevron-right",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-chevron-right tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\" transform=\"translate(-48.000000, -3.000000)\">\n <path d=\"M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z\" transform=\"translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) \"></path>\n <path d=\"M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z\" transform=\"translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) \"></path>\n </g>\n</svg>"
},
"$:/core/images/chevron-up": {
"title": "$:/core/images/chevron-up",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-chevron-up tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n\t<g fill-rule=\"evenodd\" transform=\"translate(64.000000, 89.500000) rotate(-90.000000) translate(-64.000000, -89.500000) translate(-22.500000, 22.500000)\">\n <path d=\"M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z\" transform=\"translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) \"></path>\n <path d=\"M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z\" transform=\"translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) \"></path>\n\t</g>\n</svg>"
},
"$:/core/images/clone-button": {
"title": "$:/core/images/clone-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-clone-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M32.2650915,96 L32.2650915,120.002359 C32.2650915,124.419334 35.8432884,128 40.2627323,128 L120.002359,128 C124.419334,128 128,124.421803 128,120.002359 L128,40.2627323 C128,35.8457573 124.421803,32.2650915 120.002359,32.2650915 L96,32.2650915 L96,48 L108.858899,48 C110.519357,48 111.853018,49.3405131 111.853018,50.9941198 L111.853018,108.858899 C111.853018,110.519357 110.512505,111.853018 108.858899,111.853018 L50.9941198,111.853018 C49.333661,111.853018 48,110.512505 48,108.858899 L48,96 L32.2650915,96 Z\"></path>\n <path d=\"M40,56 L32.0070969,56 C27.5881712,56 24,52.418278 24,48 C24,43.5907123 27.5848994,40 32.0070969,40 L40,40 L40,32.0070969 C40,27.5881712 43.581722,24 48,24 C52.4092877,24 56,27.5848994 56,32.0070969 L56,40 L63.9929031,40 C68.4118288,40 72,43.581722 72,48 C72,52.4092877 68.4151006,56 63.9929031,56 L56,56 L56,63.9929031 C56,68.4118288 52.418278,72 48,72 C43.5907123,72 40,68.4151006 40,63.9929031 L40,56 Z M7.9992458,0 C3.58138434,0 0,3.5881049 0,7.9992458 L0,88.0007542 C0,92.4186157 3.5881049,96 7.9992458,96 L88.0007542,96 C92.4186157,96 96,92.4118951 96,88.0007542 L96,7.9992458 C96,3.58138434 92.4118951,0 88.0007542,0 L7.9992458,0 Z M19.0010118,16 C17.3435988,16 16,17.336731 16,19.0010118 L16,76.9989882 C16,78.6564012 17.336731,80 19.0010118,80 L76.9989882,80 C78.6564012,80 80,78.663269 80,76.9989882 L80,19.0010118 C80,17.3435988 78.663269,16 76.9989882,16 L19.0010118,16 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/close-all-button": {
"title": "$:/core/images/close-all-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-close-all-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\" transform=\"translate(-23.000000, -23.000000)\">\n <path d=\"M43,131 L22.9976794,131 C18.5827987,131 15,127.418278 15,123 C15,118.590712 18.5806831,115 22.9976794,115 L43,115 L43,94.9976794 C43,90.5827987 46.581722,87 51,87 C55.4092877,87 59,90.5806831 59,94.9976794 L59,115 L79.0023206,115 C83.4172013,115 87,118.581722 87,123 C87,127.409288 83.4193169,131 79.0023206,131 L59,131 L59,151.002321 C59,155.417201 55.418278,159 51,159 C46.5907123,159 43,155.419317 43,151.002321 L43,131 Z\" transform=\"translate(51.000000, 123.000000) rotate(-45.000000) translate(-51.000000, -123.000000) \"></path>\n <path d=\"M43,59 L22.9976794,59 C18.5827987,59 15,55.418278 15,51 C15,46.5907123 18.5806831,43 22.9976794,43 L43,43 L43,22.9976794 C43,18.5827987 46.581722,15 51,15 C55.4092877,15 59,18.5806831 59,22.9976794 L59,43 L79.0023206,43 C83.4172013,43 87,46.581722 87,51 C87,55.4092877 83.4193169,59 79.0023206,59 L59,59 L59,79.0023206 C59,83.4172013 55.418278,87 51,87 C46.5907123,87 43,83.4193169 43,79.0023206 L43,59 Z\" transform=\"translate(51.000000, 51.000000) rotate(-45.000000) translate(-51.000000, -51.000000) \"></path>\n <path d=\"M115,59 L94.9976794,59 C90.5827987,59 87,55.418278 87,51 C87,46.5907123 90.5806831,43 94.9976794,43 L115,43 L115,22.9976794 C115,18.5827987 118.581722,15 123,15 C127.409288,15 131,18.5806831 131,22.9976794 L131,43 L151.002321,43 C155.417201,43 159,46.581722 159,51 C159,55.4092877 155.419317,59 151.002321,59 L131,59 L131,79.0023206 C131,83.4172013 127.418278,87 123,87 C118.590712,87 115,83.4193169 115,79.0023206 L115,59 Z\" transform=\"translate(123.000000, 51.000000) rotate(-45.000000) translate(-123.000000, -51.000000) \"></path>\n <path d=\"M115,131 L94.9976794,131 C90.5827987,131 87,127.418278 87,123 C87,118.590712 90.5806831,115 94.9976794,115 L115,115 L115,94.9976794 C115,90.5827987 118.581722,87 123,87 C127.409288,87 131,90.5806831 131,94.9976794 L131,115 L151.002321,115 C155.417201,115 159,118.581722 159,123 C159,127.409288 155.419317,131 151.002321,131 L131,131 L131,151.002321 C131,155.417201 127.418278,159 123,159 C118.590712,159 115,155.419317 115,151.002321 L115,131 Z\" transform=\"translate(123.000000, 123.000000) rotate(-45.000000) translate(-123.000000, -123.000000) \"></path>\n </g>\n</svg>"
},
"$:/core/images/close-button": {
"title": "$:/core/images/close-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-close-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M65.0864256,75.4091629 L14.9727349,125.522854 C11.8515951,128.643993 6.78104858,128.64922 3.65685425,125.525026 C0.539017023,122.407189 0.5336324,117.334539 3.65902635,114.209145 L53.7727171,64.0954544 L3.65902635,13.9817637 C0.537886594,10.8606239 0.532659916,5.79007744 3.65685425,2.6658831 C6.77469148,-0.451954124 11.8473409,-0.457338747 14.9727349,2.66805521 L65.0864256,52.7817459 L115.200116,2.66805521 C118.321256,-0.453084553 123.391803,-0.458311231 126.515997,2.6658831 C129.633834,5.78372033 129.639219,10.8563698 126.513825,13.9817637 L76.4001341,64.0954544 L126.513825,114.209145 C129.634965,117.330285 129.640191,122.400831 126.515997,125.525026 C123.39816,128.642863 118.32551,128.648248 115.200116,125.522854 L65.0864256,75.4091629 L65.0864256,75.4091629 Z\"></path>\n </g>\n</svg>\n"
},
"$:/core/images/close-others-button": {
"title": "$:/core/images/close-others-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-close-others-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M64,128 C99.346224,128 128,99.346224 128,64 C128,28.653776 99.346224,0 64,0 C28.653776,0 0,28.653776 0,64 C0,99.346224 28.653776,128 64,128 Z M64,112 C90.509668,112 112,90.509668 112,64 C112,37.490332 90.509668,16 64,16 C37.490332,16 16,37.490332 16,64 C16,90.509668 37.490332,112 64,112 Z M64,96 C81.673112,96 96,81.673112 96,64 C96,46.326888 81.673112,32 64,32 C46.326888,32 32,46.326888 32,64 C32,81.673112 46.326888,96 64,96 Z M64,80 C72.836556,80 80,72.836556 80,64 C80,55.163444 72.836556,48 64,48 C55.163444,48 48,55.163444 48,64 C48,72.836556 55.163444,80 64,80 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/delete-button": {
"title": "$:/core/images/delete-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-delete-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\" transform=\"translate(12.000000, 0.000000)\">\n <rect x=\"0\" y=\"11\" width=\"105\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"28\" y=\"0\" width=\"48\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"8\" y=\"16\" width=\"16\" height=\"112\" rx=\"8\"></rect>\n <rect x=\"8\" y=\"112\" width=\"88\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"80\" y=\"16\" width=\"16\" height=\"112\" rx=\"8\"></rect>\n <rect x=\"56\" y=\"16\" width=\"16\" height=\"112\" rx=\"8\"></rect>\n <rect x=\"32\" y=\"16\" width=\"16\" height=\"112\" rx=\"8\"></rect>\n </g>\n</svg>"
},
"$:/core/images/done-button": {
"title": "$:/core/images/done-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-done-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M3.52445141,76.8322939 C2.07397484,75.3828178 1.17514421,73.3795385 1.17514421,71.1666288 L1.17514421,23.1836596 C1.17514421,18.7531992 4.75686621,15.1751442 9.17514421,15.1751442 C13.5844319,15.1751442 17.1751442,18.7606787 17.1751442,23.1836596 L17.1751442,63.1751442 L119.173716,63.1751442 C123.590457,63.1751442 127.175144,66.7568662 127.175144,71.1751442 C127.175144,75.5844319 123.592783,79.1751442 119.173716,79.1751442 L9.17657227,79.1751442 C6.96796403,79.1751442 4.9674142,78.279521 3.51911285,76.8315312 Z\" id=\"Rectangle-285\" transform=\"translate(64.175144, 47.175144) rotate(-45.000000) translate(-64.175144, -47.175144) \"></path>\n </g>\n</svg>"
},
"$:/core/images/down-arrow": {
"title": "$:/core/images/down-arrow",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-down-arrow tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <path d=\"M109.35638,81.3533152 C107.923899,82.7869182 105.94502,83.6751442 103.759224,83.6751442 L24.5910645,83.6751442 C20.225873,83.6751442 16.6751442,80.1307318 16.6751442,75.7584775 C16.6751442,71.3951199 20.2192225,67.8418109 24.5910645,67.8418109 L95.8418109,67.8418109 L95.8418109,-3.40893546 C95.8418109,-7.77412698 99.3862233,-11.3248558 103.758478,-11.3248558 C108.121835,-11.3248558 111.675144,-7.78077754 111.675144,-3.40893546 L111.675144,75.7592239 C111.675144,77.9416955 110.789142,79.9205745 109.356651,81.3538862 Z\" transform=\"translate(64.175144, 36.175144) rotate(45.000000) translate(-64.175144, -36.175144) \"></path>\n</svg>"
},
"$:/core/images/download-button": {
"title": "$:/core/images/download-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-download-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path class=\"tc-image-download-button-ring\" d=\"M64,128 C99.346224,128 128,99.346224 128,64 C128,28.653776 99.346224,0 64,0 C28.653776,0 0,28.653776 0,64 C0,99.346224 28.653776,128 64,128 Z M64,112 C90.509668,112 112,90.509668 112,64 C112,37.490332 90.509668,16 64,16 C37.490332,16 16,37.490332 16,64 C16,90.509668 37.490332,112 64,112 Z\"/><path d=\"M34.3496823,66.4308767 L61.2415823,93.634668 C63.0411536,95.4551107 65.9588502,95.4551107 67.7584215,93.634668 L94.6503215,66.4308767 C96.4498928,64.610434 96.4498928,61.6588981 94.6503215,59.8384554 C93.7861334,58.9642445 92.6140473,58.4731195 91.3919019,58.4731195 L82.9324098,58.4731195 C80.3874318,58.4731195 78.3243078,56.3860674 78.3243078,53.8115729 L78.3243078,38.6615466 C78.3243078,36.0870521 76.2611837,34 73.7162058,34 L55.283798,34 C52.7388201,34 50.675696,36.0870521 50.675696,38.6615466 L50.675696,38.6615466 L50.675696,53.8115729 C50.675696,56.3860674 48.612572,58.4731195 46.0675941,58.4731195 L37.608102,58.4731195 C35.063124,58.4731195 33,60.5601716 33,63.134666 C33,64.3709859 33.4854943,65.5566658 34.3496823,66.4308767 L34.3496823,66.4308767 Z\"/></g></svg>"
},
"$:/core/images/edit-button": {
"title": "$:/core/images/edit-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-edit-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M116.870058,45.3431458 L108.870058,45.3431458 L108.870058,45.3431458 L108.870058,61.3431458 L116.870058,61.3431458 L116.870058,45.3431458 Z M124.870058,45.3431458 L127.649881,45.3431458 C132.066101,45.3431458 135.656854,48.9248678 135.656854,53.3431458 C135.656854,57.7524334 132.07201,61.3431458 127.649881,61.3431458 L124.870058,61.3431458 L124.870058,45.3431458 Z M100.870058,45.3431458 L15.6638275,45.3431458 C15.5064377,45.3431458 15.3501085,45.3476943 15.1949638,45.3566664 L15.1949638,45.3566664 C15.0628002,45.3477039 14.928279,45.3431458 14.7913977,45.3431458 C6.68160973,45.3431458 -8.34314575,53.3431458 -8.34314575,53.3431458 C-8.34314575,53.3431458 6.85614548,61.3431458 14.7913977,61.3431458 C14.9266533,61.3431458 15.0596543,61.3384973 15.190398,61.3293588 C15.3470529,61.3385075 15.5049057,61.3431458 15.6638275,61.3431458 L100.870058,61.3431458 L100.870058,45.3431458 L100.870058,45.3431458 Z\" transform=\"translate(63.656854, 53.343146) rotate(-45.000000) translate(-63.656854, -53.343146) \"></path>\n <path d=\"M35.1714596,124.189544 C41.9594858,123.613403 49.068777,121.917633 58.85987,118.842282 C60.6854386,118.268877 62.4306907,117.705515 65.1957709,116.802278 C81.1962861,111.575575 87.0734839,109.994907 93.9414474,109.655721 C102.29855,109.242993 107.795169,111.785371 111.520478,118.355045 C112.610163,120.276732 115.051363,120.951203 116.97305,119.861518 C118.894737,118.771832 119.569207,116.330633 118.479522,114.408946 C113.146151,105.003414 104.734907,101.112919 93.5468356,101.66546 C85.6716631,102.054388 79.4899908,103.716944 62.7116783,109.197722 C59.9734132,110.092199 58.2519873,110.64787 56.4625698,111.20992 C37.002649,117.322218 25.6914684,118.282267 16.8654804,112.957098 C14.9739614,111.815848 12.5154166,112.424061 11.3741667,114.31558 C10.2329168,116.207099 10.84113,118.665644 12.7326489,119.806894 C19.0655164,123.627836 26.4866335,124.926678 35.1714596,124.189544 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/export-button": {
"title": "$:/core/images/export-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-export-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M8.00348646,127.999999 C8.00464867,128 8.00581094,128 8.00697327,128 L119.993027,128 C122.205254,128 124.207939,127.101378 125.657096,125.651198 L125.656838,125.65759 C127.104563,124.210109 128,122.21009 128,119.999949 L128,56.0000511 C128,51.5817449 124.409288,48 120,48 C115.581722,48 112,51.5797863 112,56.0000511 L112,112 L16,112 L16,56.0000511 C16,51.5817449 12.4092877,48 8,48 C3.581722,48 7.10542736e-15,51.5797863 7.10542736e-15,56.0000511 L7.10542736e-15,119.999949 C7.10542736e-15,124.418255 3.59071231,128 8,128 C8.00116233,128 8.0023246,128 8.00348681,127.999999 Z M56.6235633,27.3113724 L47.6580188,36.2769169 C44.5333664,39.4015692 39.4634864,39.4061295 36.339292,36.2819351 C33.2214548,33.1640979 33.2173444,28.0901742 36.3443103,24.9632084 L58.9616908,2.34582788 C60.5248533,0.782665335 62.5748436,0.000361191261 64.624516,2.38225238e-14 L64.6193616,0.00151809229 C66.6695374,0.000796251595 68.7211167,0.781508799 70.2854358,2.34582788 L92.9028163,24.9632084 C96.0274686,28.0878607 96.0320289,33.1577408 92.9078345,36.2819351 C89.7899973,39.3997724 84.7160736,39.4038827 81.5891078,36.2769169 L72.6235633,27.3113724 L72.6235633,88.5669606 C72.6235633,92.9781015 69.0418413,96.5662064 64.6235633,96.5662064 C60.2142756,96.5662064 56.6235633,92.984822 56.6235633,88.5669606 L56.6235633,27.3113724 L56.6235633,27.3113724 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/file": {
"title": "$:/core/images/file",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-file tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"nonzero\">\n <path d=\"M111.96811,30.5 L112,30.5 L112,119.999079 C112,124.417866 108.419113,128 104.000754,128 L23.9992458,128 C19.5813843,128 16,124.417687 16,119.999079 L16,8.00092105 C16,3.58213437 19.5808867,0 23.9992458,0 L81,0 L81,0.0201838424 C83.1589869,-0.071534047 85.3482153,0.707077645 86.9982489,2.35711116 L109.625176,24.9840387 C111.151676,26.510538 111.932942,28.4998414 111.96811,30.5 L111.96811,30.5 Z M81,8 L24,8 L24,120 L104,120 L104,30.5 L89.0003461,30.5 C84.5818769,30.5 81,26.9216269 81,22.4996539 L81,8 Z\"></path>\n <rect x=\"32\" y=\"36\" width=\"64\" height=\"8\" rx=\"8\"></rect>\n <rect x=\"32\" y=\"52\" width=\"64\" height=\"8\" rx=\"8\"></rect>\n <rect x=\"32\" y=\"68\" width=\"64\" height=\"8\" rx=\"8\"></rect>\n <rect x=\"32\" y=\"84\" width=\"64\" height=\"8\" rx=\"8\"></rect>\n <rect x=\"32\" y=\"100\" width=\"64\" height=\"8\" rx=\"8\"></rect>\n <rect x=\"32\" y=\"20\" width=\"40\" height=\"8\" rx=\"8\"></rect>\n </g>\n</svg>"
},
"$:/core/images/fold-all-button": {
"title": "$:/core/images/fold-all-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-fold-all tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <rect x=\"0\" y=\"0\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"0\" y=\"64\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <path d=\"M64.0292774,58.6235628 C61.9791013,58.6242848 59.9275217,57.8435723 58.3632024,56.279253 L35.7458219,33.6618725 C32.6211696,30.5372202 32.6166093,25.4673401 35.7408036,22.3431458 C38.8586409,19.2253085 43.9325646,19.2211982 47.0595304,22.348164 L64.0250749,39.3137085 L80.9906194,22.348164 C84.1152717,19.2235117 89.1851518,19.2189514 92.3093461,22.3431458 C95.4271834,25.460983 95.4312937,30.5349067 92.3043279,33.6618725 L69.6869474,56.279253 C68.1237851,57.8424153 66.0737951,58.6247195 64.0241231,58.6250809 Z\" transform=\"translate(64.024316, 39.313708) scale(1, -1) translate(-64.024316, -39.313708) \"></path>\n <path d=\"M64.0292774,123.621227 C61.9791013,123.621949 59.9275217,122.841236 58.3632024,121.276917 L35.7458219,98.6595365 C32.6211696,95.5348842 32.6166093,90.4650041 35.7408036,87.3408098 C38.8586409,84.2229725 43.9325646,84.2188622 47.0595304,87.345828 L64.0250749,104.311373 L80.9906194,87.345828 C84.1152717,84.2211757 89.1851518,84.2166154 92.3093461,87.3408098 C95.4271834,90.458647 95.4312937,95.5325707 92.3043279,98.6595365 L69.6869474,121.276917 C68.1237851,122.840079 66.0737951,123.622383 64.0241231,123.622745 Z\" transform=\"translate(64.024316, 104.311372) scale(1, -1) translate(-64.024316, -104.311372) \"></path>\n </g>\n</svg>"
},
"$:/core/images/fold-button": {
"title": "$:/core/images/fold-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-fold tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <rect x=\"0\" y=\"0\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <path d=\"M64.0292774,63.6235628 C61.9791013,63.6242848 59.9275217,62.8435723 58.3632024,61.279253 L35.7458219,38.6618725 C32.6211696,35.5372202 32.6166093,30.4673401 35.7408036,27.3431458 C38.8586409,24.2253085 43.9325646,24.2211982 47.0595304,27.348164 L64.0250749,44.3137085 L80.9906194,27.348164 C84.1152717,24.2235117 89.1851518,24.2189514 92.3093461,27.3431458 C95.4271834,30.460983 95.4312937,35.5349067 92.3043279,38.6618725 L69.6869474,61.279253 C68.1237851,62.8424153 66.0737951,63.6247195 64.0241231,63.6250809 Z\" transform=\"translate(64.024316, 44.313708) scale(1, -1) translate(-64.024316, -44.313708) \"></path>\n <path d=\"M64.0049614,105.998482 C61.9547853,105.999204 59.9032057,105.218491 58.3388864,103.654172 L35.7215059,81.0367916 C32.5968535,77.9121393 32.5922933,72.8422592 35.7164876,69.7180649 C38.8343248,66.6002276 43.9082485,66.5961173 47.0352144,69.7230831 L64.0007589,86.6886276 L80.9663034,69.7230831 C84.0909557,66.5984308 89.1608358,66.5938705 92.2850301,69.7180649 C95.4028673,72.8359021 95.4069777,77.9098258 92.2800119,81.0367916 L69.6626314,103.654172 C68.099469,105.217334 66.0494791,105.999639 63.999807,106 Z\" transform=\"translate(64.000000, 86.688628) scale(1, -1) translate(-64.000000, -86.688628) \"></path>\n </g>\n</svg>"
},
"$:/core/images/fold-others-button": {
"title": "$:/core/images/fold-others-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-fold-others tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <rect x=\"0\" y=\"56.0314331\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <path d=\"M101.657101,104.948818 C100.207918,103.498614 98.2051847,102.599976 95.9929031,102.599976 L72,102.599976 L72,78.6070725 C72,76.3964271 71.1036108,74.3936927 69.6545293,72.9441002 L69.6571005,72.9488183 C68.2079177,71.4986143 66.2051847,70.5999756 63.9929031,70.5999756 L32.0070969,70.5999756 C27.5881712,70.5999756 24,74.1816976 24,78.5999756 C24,83.0092633 27.5848994,86.5999756 32.0070969,86.5999756 L56,86.5999756 L56,110.592879 C56,112.803524 56.8963895,114.806259 58.3454713,116.255852 L58.3429,116.251133 C59.7920828,117.701337 61.7948156,118.599976 64.0070969,118.599976 L88,118.599976 L88,142.592879 C88,147.011804 91.581722,150.599976 96,150.599976 C100.409288,150.599976 104,147.015076 104,142.592879 L104,110.607072 C104,108.396427 103.103611,106.393693 101.654529,104.9441 Z\" transform=\"translate(64.000000, 110.599976) rotate(-45.000000) translate(-64.000000, -110.599976) \"></path>\n <path d=\"M101.725643,11.7488671 C100.27646,10.2986632 98.2737272,9.40002441 96.0614456,9.40002441 L72.0685425,9.40002441 L72.0685425,-14.5928787 C72.0685425,-16.8035241 71.1721533,-18.8062584 69.7230718,-20.255851 L69.725643,-20.2511329 C68.2764602,-21.7013368 66.2737272,-22.5999756 64.0614456,-22.5999756 L32.0756394,-22.5999756 C27.6567137,-22.5999756 24.0685425,-19.0182536 24.0685425,-14.5999756 C24.0685425,-10.1906879 27.6534419,-6.59997559 32.0756394,-6.59997559 L56.0685425,-6.59997559 L56.0685425,17.3929275 C56.0685425,19.6035732 56.964932,21.6063078 58.4140138,23.0559004 L58.4114425,23.0511823 C59.8606253,24.5013859 61.8633581,25.4000244 64.0756394,25.4000244 L88.0685425,25.4000244 L88.0685425,49.3929275 C88.0685425,53.8118532 91.6502645,57.4000244 96.0685425,57.4000244 C100.47783,57.4000244 104.068542,53.815125 104.068542,49.3929275 L104.068542,17.4071213 C104.068542,15.1964759 103.172153,13.1937416 101.723072,11.744149 Z\" transform=\"translate(64.068542, 17.400024) scale(1, -1) rotate(-45.000000) translate(-64.068542, -17.400024) \"></path>\n </g>\n</svg>"
},
"$:/core/images/folder": {
"title": "$:/core/images/folder",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-folder tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M55.6943257,128.000004 L7.99859666,128.000004 C3.5810937,128.000004 0,124.413822 0,119.996384 L0,48.0036243 C0,43.5833471 3.58387508,40.0000044 7.99859666,40.0000044 L16,40.0000044 L16,31.9999914 C16,27.5817181 19.5783731,24 24.0003461,24 L55.9996539,24 C60.4181231,24 64,27.5800761 64,31.9999914 L64,40.0000044 L104.001403,40.0000044 C108.418906,40.0000044 112,43.5861868 112,48.0036243 L112,59.8298353 L104,59.7475921 L104,51.9994189 C104,49.7887607 102.207895,48.0000044 99.9972215,48.0000044 L56,48.0000044 L56,36.0000255 C56,33.7898932 54.2072328,32 51.9957423,32 L28.0042577,32 C25.7890275,32 24,33.7908724 24,36.0000255 L24,48.0000044 L12.0027785,48.0000044 C9.78987688,48.0000044 8,49.7906032 8,51.9994189 L8,116.00059 C8,118.211248 9.79210499,120.000004 12.0027785,120.000004 L58.7630167,120.000004 L55.6943257,128.000004 L55.6943257,128.000004 Z\"></path>\n <path d=\"M23.8728955,55.5 L119.875702,55.5 C124.293205,55.5 126.87957,59.5532655 125.650111,64.5630007 L112.305967,118.936999 C111.077582,123.942356 106.497904,128 102.083183,128 L6.08037597,128 C1.66287302,128 -0.923492342,123.946735 0.305967145,118.936999 L13.650111,64.5630007 C14.878496,59.5576436 19.4581739,55.5 23.8728955,55.5 L23.8728955,55.5 L23.8728955,55.5 Z M25.6530124,64 L113.647455,64 C115.858129,64 117.151473,66.0930612 116.538306,68.6662267 L105.417772,115.333773 C104.803671,117.910859 102.515967,120 100.303066,120 L12.3086228,120 C10.0979492,120 8.8046054,117.906939 9.41777189,115.333773 L20.5383062,68.6662267 C21.1524069,66.0891409 23.4401107,64 25.6530124,64 L25.6530124,64 L25.6530124,64 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/full-screen-button": {
"title": "$:/core/images/full-screen-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-full-screen-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g>\n <g>\n <path d=\"M5.29777586e-31,8 C1.59060409e-15,3.581722 3.581722,0 8,0 L40,0 C44.418278,0 48,3.581722 48,8 C48,12.418278 44.418278,16 40,16 L16,16 L16,40 C16,44.418278 12.418278,48 8,48 C3.581722,48 -3.55271368e-15,44.418278 0,40 L3.55271368e-15,8 Z\"></path>\n </g>\n <g transform=\"translate(104.000000, 104.000000) rotate(-180.000000) translate(-104.000000, -104.000000) translate(80.000000, 80.000000)\">\n <path d=\"M5.29777586e-31,8 C1.59060409e-15,3.581722 3.581722,0 8,0 L40,0 C44.418278,0 48,3.581722 48,8 C48,12.418278 44.418278,16 40,16 L16,16 L16,40 C16,44.418278 12.418278,48 8,48 C3.581722,48 -3.55271368e-15,44.418278 0,40 L3.55271368e-15,8 Z\"></path>\n </g>\n <g transform=\"translate(24.000000, 104.000000) rotate(-90.000000) translate(-24.000000, -104.000000) translate(0.000000, 80.000000)\">\n <path d=\"M5.29777586e-31,8 C1.59060409e-15,3.581722 3.581722,0 8,0 L40,0 C44.418278,0 48,3.581722 48,8 C48,12.418278 44.418278,16 40,16 L16,16 L16,40 C16,44.418278 12.418278,48 8,48 C3.581722,48 -3.55271368e-15,44.418278 0,40 L3.55271368e-15,8 Z\"></path>\n </g>\n <g transform=\"translate(104.000000, 24.000000) rotate(90.000000) translate(-104.000000, -24.000000) translate(80.000000, 0.000000)\">\n <path d=\"M5.29777586e-31,8 C1.59060409e-15,3.581722 3.581722,0 8,0 L40,0 C44.418278,0 48,3.581722 48,8 C48,12.418278 44.418278,16 40,16 L16,16 L16,40 C16,44.418278 12.418278,48 8,48 C3.581722,48 -3.55271368e-15,44.418278 0,40 L3.55271368e-15,8 Z\"></path>\n </g>\n </g>\n</svg>"
},
"$:/core/images/github": {
"title": "$:/core/images/github",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-github tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M63.9383506,1.60695328 C28.6017227,1.60695328 -0.055756057,30.2970814 -0.055756057,65.6906208 C-0.055756057,94.003092 18.2804728,118.019715 43.7123154,126.493393 C46.9143781,127.083482 48.0812647,125.104717 48.0812647,123.405261 C48.0812647,121.886765 48.02626,117.85449 47.9948287,112.508284 C30.1929317,116.379268 26.4368926,103.916587 26.4368926,103.916587 C23.5255693,96.5129372 19.3294921,94.5420399 19.3294921,94.5420399 C13.5186324,90.5687739 19.7695302,90.6474524 19.7695302,90.6474524 C26.1933001,91.099854 29.5721638,97.2525155 29.5721638,97.2525155 C35.2808718,107.044059 44.5531024,104.215566 48.1991321,102.575118 C48.7806109,98.4366275 50.4346826,95.612068 52.2616263,94.0109598 C38.0507543,92.3941159 23.1091047,86.8944862 23.1091047,62.3389152 C23.1091047,55.3443933 25.6039634,49.6205298 29.6978889,45.1437211 C29.0378318,43.5229433 26.8415704,37.0044266 30.3265147,28.1845627 C30.3265147,28.1845627 35.6973364,26.4615028 47.9241083,34.7542205 C53.027764,33.330139 58.5046663,32.6220321 63.9462084,32.5944947 C69.3838216,32.6220321 74.856795,33.330139 79.9683085,34.7542205 C92.1872225,26.4615028 97.5501864,28.1845627 97.5501864,28.1845627 C101.042989,37.0044266 98.8467271,43.5229433 98.190599,45.1437211 C102.292382,49.6205298 104.767596,55.3443933 104.767596,62.3389152 C104.767596,86.9574291 89.8023734,92.3744463 75.5482834,93.9598188 C77.8427675,95.9385839 79.8897303,99.8489072 79.8897303,105.828476 C79.8897303,114.392635 79.8111521,121.304544 79.8111521,123.405261 C79.8111521,125.120453 80.966252,127.114954 84.2115327,126.489459 C109.623731,117.996111 127.944244,93.9952241 127.944244,65.6906208 C127.944244,30.2970814 99.2867652,1.60695328 63.9383506,1.60695328\"></path>\n </g>\n </svg>\n"
},
"$:/core/images/globe": {
"title": "$:/core/images/globe",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-globe tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M72.8111354,37.1275855 C72.8111354,37.9789875 72.8111354,38.8303894 72.8111354,39.6817913 C72.8111354,41.8784743 73.7885604,46.5631866 72.8111354,48.5143758 C71.3445471,51.4420595 68.1617327,52.0543531 66.4170946,54.3812641 C65.2352215,55.9575873 61.7987417,64.9821523 62.7262858,67.3005778 C66.6959269,77.2228204 74.26087,70.4881886 80.6887657,76.594328 C81.5527211,77.415037 83.5758191,78.8666631 83.985137,79.8899578 C87.2742852,88.1128283 76.4086873,94.8989524 87.7419325,106.189751 C88.9872885,107.430443 91.555495,102.372895 91.8205061,101.575869 C92.6726866,99.0129203 98.5458765,96.1267309 100.908882,94.5234439 C102.928056,93.1534443 105.782168,91.8557166 107.236936,89.7775886 C109.507391,86.5342557 108.717505,82.2640435 110.334606,79.0328716 C112.473794,74.7585014 114.163418,69.3979002 116.332726,65.0674086 C120.230862,57.2857361 121.054075,67.1596684 121.400359,67.5059523 C121.757734,67.8633269 122.411167,67.5059523 122.916571,67.5059523 C123.011132,67.5059523 124.364019,67.6048489 124.432783,67.5059523 C125.0832,66.5705216 123.390209,49.5852316 123.114531,48.2089091 C121.710578,41.1996597 116.17083,32.4278331 111.249523,27.7092761 C104.975994,21.6942076 104.160516,11.5121686 92.9912146,12.7547535 C92.7872931,12.7774397 87.906794,22.9027026 85.2136766,26.2672064 C81.486311,30.9237934 82.7434931,22.1144904 78.6876623,22.1144904 C78.6065806,22.1144904 77.5045497,22.0107615 77.4353971,22.1144904 C76.8488637,22.9942905 75.9952305,26.0101404 75.1288269,26.5311533 C74.8635477,26.6906793 73.4071369,26.2924966 73.2826811,26.5311533 C71.0401728,30.8313939 81.5394677,28.7427264 79.075427,34.482926 C76.7225098,39.9642538 72.747373,32.4860199 72.747373,43.0434079\"></path>\n <path d=\"M44.4668556,7.01044608 C54.151517,13.1403033 45.1489715,19.2084878 47.1611905,23.2253896 C48.8157833,26.5283781 51.4021933,28.6198851 48.8753629,33.038878 C46.8123257,36.6467763 42.0052989,37.0050492 39.251679,39.7621111 C36.2115749,42.8060154 33.7884281,48.7028116 32.4624592,52.6732691 C30.8452419,57.5158356 47.0088721,59.5388126 44.5246867,63.6811917 C43.1386839,65.9923513 37.7785192,65.1466282 36.0880227,63.8791519 C34.9234453,63.0059918 32.4946425,63.3331166 31.6713597,62.0997342 C29.0575851,58.1839669 29.4107339,54.0758543 28.0457962,49.9707786 C27.1076833,47.1493864 21.732611,47.8501656 20.2022714,49.3776393 C19.6790362,49.8998948 19.8723378,51.1703278 19.8723378,51.8829111 C19.8723378,57.1682405 26.9914913,55.1986414 26.9914913,58.3421973 C26.9914913,72.9792302 30.9191897,64.8771867 38.1313873,69.6793121 C48.1678018,76.3618966 45.9763926,76.981595 53.0777543,84.0829567 C56.7511941,87.7563965 60.8192437,87.7689005 62.503478,93.3767069 C64.1046972,98.7081071 53.1759798,98.7157031 50.786754,100.825053 C49.663965,101.816317 47.9736094,104.970571 46.5680513,105.439676 C44.7757187,106.037867 43.334221,105.93607 41.6242359,107.219093 C39.1967302,109.040481 37.7241465,112.151588 37.6034934,112.030935 C35.4555278,109.88297 34.0848666,96.5511248 33.7147244,93.7726273 C33.1258872,89.3524817 28.1241923,88.2337027 26.7275443,84.7420826 C25.1572737,80.8164061 28.2518481,75.223612 25.599097,70.9819941 C19.0797019,60.557804 13.7775712,56.4811506 10.2493953,44.6896152 C9.3074899,41.5416683 13.5912267,38.1609942 15.1264825,35.8570308 C17.0029359,33.0410312 17.7876232,30.0028946 19.8723378,27.2224065 C22.146793,24.1888519 40.8551166,9.46076832 43.8574051,8.63490613 L44.4668556,7.01044608 Z\"></path>\n <path d=\"M64,126 C98.2416545,126 126,98.2416545 126,64 C126,29.7583455 98.2416545,2 64,2 C29.7583455,2 2,29.7583455 2,64 C2,98.2416545 29.7583455,126 64,126 Z M64,120 C94.927946,120 120,94.927946 120,64 C120,33.072054 94.927946,8 64,8 C33.072054,8 8,33.072054 8,64 C8,94.927946 33.072054,120 64,120 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/help": {
"title": "$:/core/images/help",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-help tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M36.0548906,111.44117 C30.8157418,115.837088 20.8865444,118.803477 9.5,118.803477 C7.86465619,118.803477 6.25937294,118.742289 4.69372699,118.624467 C12.612543,115.984876 18.7559465,110.02454 21.0611049,102.609942 C8.74739781,92.845129 1.04940554,78.9359851 1.04940554,63.5 C1.04940554,33.9527659 29.2554663,10 64.0494055,10 C98.8433448,10 127.049406,33.9527659 127.049406,63.5 C127.049406,93.0472341 98.8433448,117 64.0494055,117 C53.9936953,117 44.48824,114.999337 36.0548906,111.44117 L36.0548906,111.44117 Z M71.4042554,77.5980086 C71.406883,77.2865764 71.4095079,76.9382011 71.4119569,76.5610548 C71.4199751,75.3262169 71.4242825,74.0811293 71.422912,72.9158546 C71.4215244,71.736154 71.4143321,70.709635 71.4001396,69.8743525 C71.4078362,68.5173028 71.9951951,67.7870427 75.1273009,65.6385471 C75.2388969,65.5619968 76.2124091,64.8981068 76.5126553,64.6910879 C79.6062455,62.5580654 81.5345849,60.9050204 83.2750652,58.5038955 C85.6146327,55.2762841 86.8327108,51.426982 86.8327108,46.8554323 C86.8327108,33.5625756 76.972994,24.9029551 65.3778484,24.9029551 C54.2752771,24.9029551 42.8794554,34.5115163 41.3121702,47.1975534 C40.9043016,50.4989536 43.2499725,53.50591 46.5513726,53.9137786 C49.8527728,54.3216471 52.8597292,51.9759763 53.2675978,48.6745761 C54.0739246,42.1479456 60.2395837,36.9492759 65.3778484,36.9492759 C70.6427674,36.9492759 74.78639,40.5885487 74.78639,46.8554323 C74.78639,50.4892974 73.6853224,52.008304 69.6746221,54.7736715 C69.4052605,54.9593956 68.448509,55.6118556 68.3131127,55.7047319 C65.6309785,57.5445655 64.0858213,58.803255 62.6123358,60.6352315 C60.5044618,63.2559399 59.3714208,66.3518252 59.3547527,69.9487679 C59.3684999,70.8407274 59.3752803,71.8084521 59.3765995,72.9300232 C59.3779294,74.0607297 59.3737237,75.2764258 59.36589,76.482835 C59.3634936,76.8518793 59.3609272,77.1924914 59.3583633,77.4963784 C59.3568319,77.6778944 59.3556368,77.8074256 59.3549845,77.8730928 C59.3219814,81.1994287 61.9917551,83.9227111 65.318091,83.9557142 C68.644427,83.9887173 71.3677093,81.3189435 71.4007124,77.9926076 C71.4014444,77.9187458 71.402672,77.7856841 71.4042554,77.5980086 Z M65.3778489,102.097045 C69.5359735,102.097045 72.9067994,98.7262189 72.9067994,94.5680944 C72.9067994,90.4099698 69.5359735,87.0391439 65.3778489,87.0391439 C61.2197243,87.0391439 57.8488984,90.4099698 57.8488984,94.5680944 C57.8488984,98.7262189 61.2197243,102.097045 65.3778489,102.097045 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/home-button": {
"title": "$:/core/images/home-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-home-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M112.9847,119.501583 C112.99485,119.336814 113,119.170705 113,119.003406 L113,67.56802 C116.137461,70.5156358 121.076014,70.4518569 124.133985,67.3938855 C127.25818,64.2696912 127.260618,59.2068102 124.131541,56.0777326 L70.3963143,2.34250601 C68.8331348,0.779326498 66.7828947,-0.000743167069 64.7337457,1.61675364e-05 C62.691312,-0.00409949529 60.6426632,0.777559815 59.077717,2.34250601 L33,28.420223 L33,28.420223 L33,8.00697327 C33,3.58484404 29.4092877,0 25,0 C20.581722,0 17,3.59075293 17,8.00697327 L17,44.420223 L5.3424904,56.0777326 C2.21694607,59.2032769 2.22220878,64.2760483 5.34004601,67.3938855 C8.46424034,70.5180798 13.5271213,70.5205187 16.6561989,67.3914411 L17,67.04764 L17,119.993027 C17,119.994189 17.0000002,119.995351 17.0000007,119.996514 C17.0000002,119.997675 17,119.998838 17,120 C17,124.418278 20.5881049,128 24.9992458,128 L105.000754,128 C109.418616,128 113,124.409288 113,120 C113,119.832611 112.99485,119.666422 112.9847,119.501583 Z M97,112 L97,51.5736087 L97,51.5736087 L64.7370156,19.3106244 L33,51.04764 L33,112 L97,112 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/import-button": {
"title": "$:/core/images/import-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-import-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M105.449437,94.2138951 C105.449437,94.2138951 110.049457,94.1897106 110.049457,99.4026111 C110.049457,104.615512 105.163246,104.615511 105.163246,104.615511 L45.0075072,105.157833 C45.0075072,105.157833 0.367531803,106.289842 0.367532368,66.6449212 C0.367532934,27.0000003 45.0428249,27.0000003 45.0428249,27.0000003 L105.532495,27.0000003 C105.532495,27.0000003 138.996741,25.6734987 138.996741,55.1771866 C138.996741,84.6808745 105.727102,82.8457535 105.727102,82.8457535 L56.1735087,82.8457535 C56.1735087,82.8457535 22.6899229,85.1500223 22.6899229,66.0913753 C22.6899229,47.0327282 56.1735087,49.3383013 56.1735087,49.3383013 L105.727102,49.3383013 C105.727102,49.3383013 111.245209,49.3383024 111.245209,54.8231115 C111.245209,60.3079206 105.727102,60.5074524 105.727102,60.5074524 L56.1735087,60.5074524 C56.1735087,60.5074524 37.48913,60.5074528 37.48913,66.6449195 C37.48913,72.7823862 56.1735087,71.6766023 56.1735087,71.6766023 L105.727102,71.6766029 C105.727102,71.6766029 127.835546,73.1411469 127.835546,55.1771866 C127.835546,35.5304025 105.727102,38.3035317 105.727102,38.3035317 L45.0428249,38.3035317 C45.0428249,38.3035317 11.5287276,38.3035313 11.5287276,66.6449208 C11.5287276,94.9863103 45.0428244,93.9579678 45.0428244,93.9579678 L105.449437,94.2138951 Z\" transform=\"translate(69.367532, 66.000000) rotate(-45.000000) translate(-69.367532, -66.000000) \"></path>\n </g>\n</svg>"
},
"$:/core/images/info-button": {
"title": "$:/core/images/info-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-info-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <g transform=\"translate(0.049406, 0.000000)\">\n <path d=\"M64,128 C99.346224,128 128,99.346224 128,64 C128,28.653776 99.346224,0 64,0 C28.653776,0 0,28.653776 0,64 C0,99.346224 28.653776,128 64,128 Z M64,112 C90.509668,112 112,90.509668 112,64 C112,37.490332 90.509668,16 64,16 C37.490332,16 16,37.490332 16,64 C16,90.509668 37.490332,112 64,112 Z\"></path>\n <circle cx=\"64\" cy=\"32\" r=\"8\"></circle>\n <rect x=\"56\" y=\"48\" width=\"16\" height=\"56\" rx=\"8\"></rect>\n </g>\n </g>\n </g>\n</svg>"
},
"$:/core/images/left-arrow": {
"created": "20150315234410875",
"modified": "20150315235324760",
"tags": "$:/tags/Image",
"title": "$:/core/images/left-arrow",
"text": "<svg class=\"tc-image-left-arrow tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <path transform=\"rotate(135, 63.8945, 64.1752)\" d=\"m109.07576,109.35336c-1.43248,1.43361 -3.41136,2.32182 -5.59717,2.32182l-79.16816,0c-4.36519,0 -7.91592,-3.5444 -7.91592,-7.91666c0,-4.36337 3.54408,-7.91667 7.91592,-7.91667l71.25075,0l0,-71.25075c0,-4.3652 3.54442,-7.91592 7.91667,-7.91592c4.36336,0 7.91667,3.54408 7.91667,7.91592l0,79.16815c0,2.1825 -0.88602,4.16136 -2.3185,5.59467l-0.00027,-0.00056z\"/>\n</svg>\n"
},
"$:/core/images/locked-padlock": {
"title": "$:/core/images/locked-padlock",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-locked-padlock tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M96.4723753,64 L105,64 L105,96.0097716 C105,113.673909 90.6736461,128 73.001193,128 L55.998807,128 C38.3179793,128 24,113.677487 24,96.0097716 L24,64 L32.0000269,64 C32.0028554,48.2766389 32.3030338,16.2688026 64.1594984,16.2688041 C95.9543927,16.2688056 96.4648869,48.325931 96.4723753,64 Z M80.5749059,64 L48.4413579,64 C48.4426205,47.71306 48.5829272,31.9999996 64.1595001,31.9999996 C79.8437473,31.9999996 81.1369461,48.1359182 80.5749059,64 Z M67.7315279,92.3641717 C70.8232551,91.0923621 73,88.0503841 73,84.5 C73,79.8055796 69.1944204,76 64.5,76 C59.8055796,76 56,79.8055796 56,84.5 C56,87.947435 58.0523387,90.9155206 61.0018621,92.2491029 L55.9067479,115.020857 L72.8008958,115.020857 L67.7315279,92.3641717 L67.7315279,92.3641717 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/mail": {
"title": "$:/core/images/mail",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-mail tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M122.826782,104.894066 C121.945525,105.22777 120.990324,105.41043 119.993027,105.41043 L8.00697327,105.41043 C7.19458381,105.41043 6.41045219,105.289614 5.67161357,105.064967 L5.67161357,105.064967 L39.8346483,70.9019325 L60.6765759,91.7438601 C61.6118278,92.679112 62.8865166,93.0560851 64.0946097,92.8783815 C65.2975108,93.0473238 66.5641085,92.6696979 67.4899463,91.7438601 L88.5941459,70.6396605 C88.6693095,70.7292352 88.7490098,70.8162939 88.8332479,70.9005321 L122.826782,104.894066 Z M127.903244,98.6568194 C127.966933,98.2506602 128,97.8343714 128,97.4103789 L128,33.410481 C128,32.7414504 127.917877,32.0916738 127.763157,31.4706493 L94.2292399,65.0045665 C94.3188145,65.0797417 94.4058701,65.1594458 94.4901021,65.2436778 L127.903244,98.6568194 Z M0.205060636,99.2178117 C0.0709009529,98.6370366 0,98.0320192 0,97.4103789 L0,33.410481 C0,32.694007 0.0944223363,31.9995312 0.27147538,31.3387595 L0.27147538,31.3387595 L34.1777941,65.2450783 L0.205060636,99.2178117 L0.205060636,99.2178117 Z M5.92934613,25.6829218 C6.59211333,25.5051988 7.28862283,25.4104299 8.00697327,25.4104299 L119.993027,25.4104299 C120.759109,25.4104299 121.500064,25.5178649 122.201605,25.7184927 L122.201605,25.7184927 L64.0832611,83.8368368 L5.92934613,25.6829218 L5.92934613,25.6829218 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/menu-button": {
"title": "$:/core/images/menu-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-menu-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <rect x=\"0\" y=\"16\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"0\" y=\"56\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"0\" y=\"96\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n</svg>"
},
"$:/core/images/new-button": {
"title": "$:/core/images/new-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-new-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M56,72 L8.00697327,72 C3.59075293,72 0,68.418278 0,64 C0,59.5907123 3.58484404,56 8.00697327,56 L56,56 L56,8.00697327 C56,3.59075293 59.581722,0 64,0 C68.4092877,0 72,3.58484404 72,8.00697327 L72,56 L119.993027,56 C124.409247,56 128,59.581722 128,64 C128,68.4092877 124.415156,72 119.993027,72 L72,72 L72,119.993027 C72,124.409247 68.418278,128 64,128 C59.5907123,128 56,124.415156 56,119.993027 L56,72 L56,72 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/new-here-button": {
"title": "$:/core/images/new-here-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-new-here-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n \t<g transform=\"translate(52.233611, 64.389922) rotate(75.000000) translate(-52.233611, -64.389922) translate(-7.734417, 3.702450)\">\n\t <path d=\"M18.9270186,45.959338 L18.9080585,49.6521741 C18.8884833,53.4648378 21.0574548,58.7482162 23.7526408,61.4434022 L78.5671839,116.257945 C81.2617332,118.952495 85.6348701,118.950391 88.3334363,116.251825 L115.863237,88.7220241 C118.555265,86.0299959 118.564544,81.6509578 115.869358,78.9557717 L61.0548144,24.1412286 C58.3602652,21.4466794 53.0787224,19.2788426 49.2595808,19.3006519 L25.9781737,19.4336012 C22.1633003,19.4553862 19.0471195,22.5673232 19.0275223,26.3842526 L18.9871663,34.2443819 C19.0818862,34.255617 19.1779758,34.2665345 19.2754441,34.2771502 C22.6891275,34.6489512 27.0485594,34.2348566 31.513244,33.2285542 C31.7789418,32.8671684 32.075337,32.5211298 32.4024112,32.1940556 C34.8567584,29.7397084 38.3789778,29.0128681 41.4406288,30.0213822 C41.5958829,29.9543375 41.7503946,29.8866669 41.9041198,29.8183808 L42.1110981,30.2733467 C43.1114373,30.6972371 44.0473796,31.3160521 44.8614145,32.1300869 C48.2842088,35.5528813 48.2555691,41.130967 44.7974459,44.5890903 C41.4339531,47.952583 36.0649346,48.0717177 32.6241879,44.9262969 C27.8170558,45.8919233 23.0726921,46.2881596 18.9270186,45.959338 Z\"></path>\n\t <path d=\"M45.4903462,38.8768094 C36.7300141,42.6833154 26.099618,44.7997354 18.1909048,43.9383587 C7.2512621,42.7468685 1.50150083,35.8404432 4.66865776,24.7010202 C7.51507386,14.6896965 15.4908218,6.92103848 24.3842626,4.38423012 C34.1310219,1.60401701 42.4070208,6.15882777 42.4070209,16.3101169 L34.5379395,16.310117 C34.5379394,11.9285862 31.728784,10.3825286 26.5666962,11.8549876 C20.2597508,13.6540114 14.3453742,19.4148216 12.2444303,26.8041943 C10.4963869,32.9523565 12.6250796,35.5092726 19.0530263,36.2093718 C25.5557042,36.9176104 35.0513021,34.9907189 42.7038419,31.5913902 L42.7421786,31.6756595 C44.3874154,31.5384763 47.8846101,37.3706354 45.9274416,38.6772897 L45.9302799,38.6835285 C45.9166992,38.6895612 45.9031139,38.6955897 45.8895238,38.7016142 C45.8389288,38.7327898 45.7849056,38.7611034 45.7273406,38.7863919 C45.6506459,38.8200841 45.571574,38.8501593 45.4903462,38.8768094 Z\"></path>\n </g>\n <rect x=\"96\" y=\"80\" width=\"16\" height=\"48\" rx=\"8\"></rect>\n <rect x=\"80\" y=\"96\" width=\"48\" height=\"16\" rx=\"8\"></rect>\n </g>\n </g>\n</svg>"
},
"$:/core/images/new-journal-button": {
"title": "$:/core/images/new-journal-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-new-journal-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M102.545455,112.818182 L102.545455,124.636364 L102.545455,124.636364 L102.545455,124.636364 C102.545455,125.941761 103.630828,127 104.969697,127 L111.030303,127 C112.369172,127 113.454545,125.941761 113.454545,124.636364 L113.454545,112.818182 L125.575758,112.818182 C126.914626,112.818182 128,111.759982 128,110.454545 L128,104.545455 C128,103.240018 126.914626,102.181818 125.575758,102.181818 L113.454545,102.181818 L113.454545,90.3636364 C113.454545,89.0582 112.369172,88 111.030303,88 L104.969697,88 L104.969697,88 C103.630828,88 102.545455,89.0582 102.545455,90.3636364 L102.545455,102.181818 L90.4242424,102.181818 L90.4242424,102.181818 C89.0853705,102.181818 88,103.240018 88,104.545455 L88,110.454545 L88,110.454545 L88,110.454545 C88,111.759982 89.0853705,112.818182 90.4242424,112.818182 L102.545455,112.818182 Z\"></path>\n <g transform=\"translate(59.816987, 64.316987) rotate(30.000000) translate(-59.816987, -64.316987) translate(20.316987, 12.816987)\">\n <g transform=\"translate(0.000000, 0.000000)\">\n <path d=\"M9.99631148,0 C4.4755011,0 -2.27373675e-13,4.48070044 -2.27373675e-13,9.99759461 L-2.27373675e-13,91.6128884 C-2.27373675e-13,97.1344074 4.46966773,101.610483 9.99631148,101.610483 L68.9318917,101.610483 C74.4527021,101.610483 78.9282032,97.1297826 78.9282032,91.6128884 L78.9282032,9.99759461 C78.9282032,4.47607557 74.4585355,0 68.9318917,0 L9.99631148,0 Z M20.8885263,26 C24.2022348,26 26.8885263,23.3137085 26.8885263,20 C26.8885263,16.6862915 24.2022348,14 20.8885263,14 C17.5748178,14 14.8885263,16.6862915 14.8885263,20 C14.8885263,23.3137085 17.5748178,26 20.8885263,26 Z M57.3033321,25.6783342 C60.6170406,25.6783342 63.3033321,22.9920427 63.3033321,19.6783342 C63.3033321,16.3646258 60.6170406,13.6783342 57.3033321,13.6783342 C53.9896236,13.6783342 51.3033321,16.3646258 51.3033321,19.6783342 C51.3033321,22.9920427 53.9896236,25.6783342 57.3033321,25.6783342 Z\"></path>\n <text font-family=\"Helvetica\" font-size=\"47.1724138\" font-weight=\"bold\" fill=\"#FFFFFF\">\n <tspan x=\"42\" y=\"77.4847912\" text-anchor=\"middle\"><<now \"DD\">></tspan>\n </text>\n </g>\n </g>\n </g>\n</svg>"
},
"$:/core/images/open-window": {
"title": "$:/core/images/open-window",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-open-window tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M16,112 L104.993898,112 C108.863261,112 112,115.590712 112,120 C112,124.418278 108.858091,128 104.993898,128 L7.00610161,128 C3.13673853,128 0,124.409288 0,120 C0,119.998364 4.30952878e-07,119.996727 1.29273572e-06,119.995091 C4.89579306e-07,119.993456 0,119.99182 0,119.990183 L0,24.0098166 C0,19.586117 3.59071231,16 8,16 C12.418278,16 16,19.5838751 16,24.0098166 L16,112 Z\"></path>\n <path d=\"M96,43.1959595 L96,56 C96,60.418278 99.581722,64 104,64 C108.418278,64 112,60.418278 112,56 L112,24 C112,19.5907123 108.415101,16 103.992903,16 L72.0070969,16 C67.5881712,16 64,19.581722 64,24 C64,28.4092877 67.5848994,32 72.0070969,32 L84.5685425,32 L48.2698369,68.2987056 C45.1421332,71.4264093 45.1434327,76.4904296 48.267627,79.614624 C51.3854642,82.7324612 56.4581306,82.7378289 59.5835454,79.6124141 L96,43.1959595 Z M32,7.9992458 C32,3.58138434 35.5881049,0 39.9992458,0 L120.000754,0 C124.418616,0 128,3.5881049 128,7.9992458 L128,88.0007542 C128,92.4186157 124.411895,96 120.000754,96 L39.9992458,96 C35.5813843,96 32,92.4118951 32,88.0007542 L32,7.9992458 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/options-button": {
"title": "$:/core/images/options-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-options-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M110.48779,76.0002544 C109.354214,80.4045063 107.611262,84.5641217 105.354171,88.3838625 L105.354171,88.3838625 L112.07833,95.1080219 C115.20107,98.2307613 115.210098,103.299824 112.089164,106.420759 L106.420504,112.089418 C103.301049,115.208874 98.2346851,115.205502 95.1077675,112.078585 L88.3836082,105.354425 C84.5638673,107.611516 80.4042519,109.354468 76,110.488045 L76,110.488045 L76,119.993281 C76,124.409501 72.4220153,128.000254 68.0083475,128.000254 L59.9916525,128.000254 C55.5800761,128.000254 52,124.41541 52,119.993281 L52,110.488045 C47.5957481,109.354468 43.4361327,107.611516 39.6163918,105.354425 L32.8922325,112.078585 C29.7694931,115.201324 24.7004301,115.210353 21.5794957,112.089418 L15.9108363,106.420759 C12.7913807,103.301303 12.7947522,98.2349395 15.9216697,95.1080219 L22.6458291,88.3838625 C20.3887383,84.5641217 18.6457859,80.4045063 17.5122098,76.0002544 L8.00697327,76.0002544 C3.59075293,76.0002544 2.19088375e-16,72.4222697 4.89347582e-16,68.0086019 L9.80228577e-16,59.9919069 C1.25035972e-15,55.5803305 3.58484404,52.0002544 8.00697327,52.0002544 L17.5122098,52.0002544 C18.6457859,47.5960025 20.3887383,43.4363871 22.6458291,39.6166462 L15.9216697,32.8924868 C12.7989304,29.7697475 12.7899019,24.7006845 15.9108363,21.5797501 L21.5794957,15.9110907 C24.6989513,12.7916351 29.7653149,12.7950065 32.8922325,15.9219241 L39.6163918,22.6460835 C43.4361327,20.3889927 47.5957481,18.6460403 52,17.5124642 L52,8.00722764 C52,3.5910073 55.5779847,0.000254375069 59.9916525,0.000254375069 L68.0083475,0.000254375069 C72.4199239,0.000254375069 76,3.58509841 76,8.00722764 L76,17.5124642 C80.4042519,18.6460403 84.5638673,20.3889927 88.3836082,22.6460835 L95.1077675,15.9219241 C98.2305069,12.7991848 103.29957,12.7901562 106.420504,15.9110907 L112.089164,21.5797501 C115.208619,24.6992057 115.205248,29.7655693 112.07833,32.8924868 L105.354171,39.6166462 L105.354171,39.6166462 C107.611262,43.4363871 109.354214,47.5960025 110.48779,52.0002544 L119.993027,52.0002544 C124.409247,52.0002544 128,55.5782391 128,59.9919069 L128,68.0086019 C128,72.4201783 124.415156,76.0002544 119.993027,76.0002544 L110.48779,76.0002544 L110.48779,76.0002544 Z M64,96.0002544 C81.673112,96.0002544 96,81.6733664 96,64.0002544 C96,46.3271424 81.673112,32.0002544 64,32.0002544 C46.326888,32.0002544 32,46.3271424 32,64.0002544 C32,81.6733664 46.326888,96.0002544 64,96.0002544 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/palette": {
"title": "$:/core/images/palette",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-palette tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M80.2470434,39.1821571 C75.0645698,38.2680897 69.6261555,37.7814854 64.0193999,37.7814854 C28.6624616,37.7814854 0,57.1324214 0,81.0030106 C0,90.644534 4.67604329,99.5487133 12.5805659,106.738252 C23.5031767,91.1899067 26.3405471,72.3946229 36.8885698,63.5622337 C52.0716764,50.8486559 63.4268694,55.7343343 63.4268694,55.7343343 L80.2470434,39.1821571 Z M106.781666,48.8370714 C119.830962,56.749628 128.0388,68.229191 128.0388,81.0030106 C128.0388,90.3534932 128.557501,98.4142085 116.165191,106.082518 C105.367708,112.763955 112.341384,99.546808 104.321443,95.1851533 C96.3015017,90.8234987 84.3749007,96.492742 86.1084305,103.091059 C89.3087234,115.272303 105.529892,114.54645 92.4224435,119.748569 C79.3149955,124.950687 74.2201582,124.224536 64.0193999,124.224536 C56.1979176,124.224536 48.7040365,123.277578 41.7755684,121.544216 C51.620343,117.347916 69.6563669,109.006202 75.129737,102.088562 C82.7876655,92.4099199 87.3713218,80.0000002 83.3235694,72.4837191 C83.1303943,72.1250117 94.5392656,60.81569 106.781666,48.8370714 Z M1.13430476,123.866563 C0.914084026,123.867944 0.693884185,123.868637 0.473712455,123.868637 C33.9526848,108.928928 22.6351223,59.642592 59.2924543,59.6425917 C59.6085574,61.0606542 59.9358353,62.5865065 60.3541977,64.1372318 C34.4465025,59.9707319 36.7873124,112.168427 1.13429588,123.866563 L1.13430476,123.866563 Z M1.84669213,123.859694 C40.7185279,123.354338 79.9985412,101.513051 79.9985401,79.0466836 C70.7284906,79.0466835 65.9257264,75.5670082 63.1833375,71.1051511 C46.585768,64.1019718 32.81846,116.819636 1.84665952,123.859695 L1.84669213,123.859694 Z M67.1980193,59.8524981 C62.748213,63.9666823 72.0838429,76.2846822 78.5155805,71.1700593 C89.8331416,59.8524993 112.468264,37.2173758 123.785825,25.8998146 C135.103386,14.5822535 123.785825,3.26469247 112.468264,14.5822535 C101.150703,25.8998144 78.9500931,48.9868127 67.1980193,59.8524981 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/permalink-button": {
"title": "$:/core/images/permalink-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-permalink-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M80.4834582,48 L73.0956761,80 L73.0956761,80 L47.5165418,80 L54.9043239,48 L80.4834582,48 Z M84.1773493,32 L89.8007299,7.64246248 C90.7941633,3.33942958 95.0918297,0.64641956 99.3968675,1.64031585 C103.693145,2.63218977 106.385414,6.93288901 105.390651,11.2416793 L100.598215,32 L104.000754,32 C108.411895,32 112,35.581722 112,40 C112,44.4092877 108.418616,48 104.000754,48 L96.9043239,48 L89.5165418,80 L104.000754,80 C108.411895,80 112,83.581722 112,88 C112,92.4092877 108.418616,96 104.000754,96 L85.8226507,96 L80.1992701,120.357538 C79.2058367,124.66057 74.9081703,127.35358 70.6031325,126.359684 C66.3068546,125.36781 63.6145865,121.067111 64.6093491,116.758321 L69.401785,96 L43.8226507,96 L38.1992701,120.357538 C37.2058367,124.66057 32.9081703,127.35358 28.6031325,126.359684 C24.3068546,125.36781 21.6145865,121.067111 22.6093491,116.758321 L27.401785,96 L23.9992458,96 C19.5881049,96 16,92.418278 16,88 C16,83.5907123 19.5813843,80 23.9992458,80 L31.0956761,80 L38.4834582,48 L23.9992458,48 C19.5881049,48 16,44.418278 16,40 C16,35.5907123 19.5813843,32 23.9992458,32 L42.1773493,32 L47.8007299,7.64246248 C48.7941633,3.33942958 53.0918297,0.64641956 57.3968675,1.64031585 C61.6931454,2.63218977 64.3854135,6.93288901 63.3906509,11.2416793 L58.598215,32 L84.1773493,32 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/permaview-button": {
"title": "$:/core/images/permaview-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-permaview-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M81.4834582,48 L79.6365127,56 L79.6365127,56 L74.0573784,56 L75.9043239,48 L81.4834582,48 Z M85.1773493,32 L90.8007299,7.64246248 C91.7941633,3.33942958 96.0918297,0.64641956 100.396867,1.64031585 C104.693145,2.63218977 107.385414,6.93288901 106.390651,11.2416793 L101.598215,32 L104.000754,32 C108.411895,32 112,35.581722 112,40 C112,44.4092877 108.418616,48 104.000754,48 L97.9043239,48 L96.0573784,56 L104.000754,56 C108.411895,56 112,59.581722 112,64 C112,68.4092877 108.418616,72 104.000754,72 L92.3634873,72 L90.5165418,80 L104.000754,80 C108.411895,80 112,83.581722 112,88 C112,92.4092877 108.418616,96 104.000754,96 L86.8226507,96 L81.1992701,120.357538 C80.2058367,124.66057 75.9081703,127.35358 71.6031325,126.359684 C67.3068546,125.36781 64.6145865,121.067111 65.6093491,116.758321 L70.401785,96 L64.8226507,96 L59.1992701,120.357538 C58.2058367,124.66057 53.9081703,127.35358 49.6031325,126.359684 C45.3068546,125.36781 42.6145865,121.067111 43.6093491,116.758321 L48.401785,96 L42.8226507,96 L37.1992701,120.357538 C36.2058367,124.66057 31.9081703,127.35358 27.6031325,126.359684 C23.3068546,125.36781 20.6145865,121.067111 21.6093491,116.758321 L26.401785,96 L23.9992458,96 C19.5881049,96 16,92.418278 16,88 C16,83.5907123 19.5813843,80 23.9992458,80 L30.0956761,80 L31.9426216,72 L23.9992458,72 C19.5881049,72 16,68.418278 16,64 C16,59.5907123 19.5813843,56 23.9992458,56 L35.6365127,56 L37.4834582,48 L23.9992458,48 C19.5881049,48 16,44.418278 16,40 C16,35.5907123 19.5813843,32 23.9992458,32 L41.1773493,32 L46.8007299,7.64246248 C47.7941633,3.33942958 52.0918297,0.64641956 56.3968675,1.64031585 C60.6931454,2.63218977 63.3854135,6.93288901 62.3906509,11.2416793 L57.598215,32 L63.1773493,32 L68.8007299,7.64246248 C69.7941633,3.33942958 74.0918297,0.64641956 78.3968675,1.64031585 C82.6931454,2.63218977 85.3854135,6.93288901 84.3906509,11.2416793 L79.598215,32 L85.1773493,32 Z M53.9043239,48 L52.0573784,56 L57.6365127,56 L59.4834582,48 L53.9043239,48 Z M75.9426216,72 L74.0956761,80 L74.0956761,80 L68.5165418,80 L70.3634873,72 L75.9426216,72 L75.9426216,72 Z M48.3634873,72 L46.5165418,80 L52.0956761,80 L53.9426216,72 L48.3634873,72 L48.3634873,72 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/plugin-generic-language": {
"title": "$:/core/images/plugin-generic-language",
"tags": "$:/tags/Image",
"text": "<svg width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M61.2072232,68.1369825 C56.8829239,70.9319564 54.2082892,74.793177 54.2082892,79.0581634 C54.2082892,86.9638335 63.3980995,93.4821994 75.2498076,94.3940006 C77.412197,98.2964184 83.8475284,101.178858 91.5684735,101.403106 C86.4420125,100.27851 82.4506393,97.6624107 80.9477167,94.3948272 C92.8046245,93.4861461 102,86.9662269 102,79.0581634 C102,70.5281905 91.3014611,63.6132813 78.1041446,63.6132813 C71.5054863,63.6132813 65.5315225,65.3420086 61.2072232,68.1369825 Z M74.001066,53.9793443 C69.6767667,56.7743182 63.7028029,58.5030456 57.1041446,58.5030456 C54.4851745,58.5030456 51.9646095,58.2307276 49.6065315,57.7275105 C46.2945155,59.9778212 41.2235699,61.4171743 35.5395922,61.4171743 C35.4545771,61.4171743 35.3696991,61.4168523 35.2849622,61.4162104 C39.404008,60.5235193 42.7961717,58.6691298 44.7630507,56.286533 C37.8379411,53.5817651 33.2082892,48.669413 33.2082892,43.0581634 C33.2082892,34.5281905 43.9068281,27.6132812 57.1041446,27.6132812 C70.3014611,27.6132812 81,34.5281905 81,43.0581634 C81,47.3231498 78.3253653,51.1843704 74.001066,53.9793443 Z M64,0 L118.5596,32 L118.5596,96 L64,128 L9.44039956,96 L9.44039956,32 L64,0 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/plugin-generic-plugin": {
"title": "$:/core/images/plugin-generic-plugin",
"tags": "$:/tags/Image",
"text": "<svg width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M40.3972881,76.4456988 L40.3972881,95.3404069 L54.5170166,95.3404069 L54.5170166,95.3404069 C54.5165526,95.3385183 54.516089,95.3366295 54.515626,95.3347404 C54.6093153,95.3385061 54.7034848,95.3404069 54.7980982,95.3404069 C58.6157051,95.3404069 61.710487,92.245625 61.710487,88.4280181 C61.710487,86.6197822 61.01617,84.9737128 59.8795929,83.7418666 L59.8795929,83.7418666 C59.8949905,83.7341665 59.9104102,83.7265043 59.925852,83.7188798 C58.8840576,82.5086663 58.2542926,80.9336277 58.2542926,79.2114996 C58.2542926,75.3938927 61.3490745,72.2991108 65.1666814,72.2991108 C68.9842884,72.2991108 72.0790703,75.3938927 72.0790703,79.2114996 C72.0790703,81.1954221 71.2432806,82.9841354 69.9045961,84.2447446 L69.9045961,84.2447446 C69.9333407,84.2629251 69.9619885,84.281245 69.9905383,84.2997032 L69.9905383,84.2997032 C69.1314315,85.4516923 68.6228758,86.8804654 68.6228758,88.4280181 C68.6228758,91.8584969 71.1218232,94.7053153 74.3986526,95.2474079 C74.3913315,95.2784624 74.3838688,95.3094624 74.3762652,95.3404069 L95.6963988,95.3404069 L95.6963988,75.5678578 L95.6963988,75.5678578 C95.6466539,75.5808558 95.5967614,75.5934886 95.5467242,75.6057531 C95.5504899,75.5120637 95.5523907,75.4178943 95.5523907,75.3232809 C95.5523907,71.505674 92.4576088,68.4108921 88.6400019,68.4108921 C86.831766,68.4108921 85.1856966,69.105209 83.9538504,70.2417862 L83.9538504,70.2417862 C83.9461503,70.2263886 83.938488,70.2109688 83.9308636,70.1955271 C82.7206501,71.2373215 81.1456115,71.8670865 79.4234834,71.8670865 C75.6058765,71.8670865 72.5110946,68.7723046 72.5110946,64.9546976 C72.5110946,61.1370907 75.6058765,58.0423088 79.4234834,58.0423088 C81.4074059,58.0423088 83.1961192,58.8780985 84.4567284,60.2167829 L84.4567284,60.2167829 C84.4749089,60.1880383 84.4932288,60.1593906 84.511687,60.1308407 L84.511687,60.1308407 C85.6636761,60.9899475 87.0924492,61.4985032 88.6400019,61.4985032 C92.0704807,61.4985032 94.9172991,58.9995558 95.4593917,55.7227265 C95.538755,55.7414363 95.6177614,55.761071 95.6963988,55.7816184 L95.6963988,40.0412962 L74.3762652,40.0412962 L74.3762652,40.0412962 C74.3838688,40.0103516 74.3913315,39.9793517 74.3986526,39.9482971 L74.3986526,39.9482971 C71.1218232,39.4062046 68.6228758,36.5593862 68.6228758,33.1289073 C68.6228758,31.5813547 69.1314315,30.1525815 69.9905383,29.0005925 C69.9619885,28.9821342 69.9333407,28.9638143 69.9045961,28.9456339 C71.2432806,27.6850247 72.0790703,25.8963113 72.0790703,23.9123888 C72.0790703,20.0947819 68.9842884,17 65.1666814,17 C61.3490745,17 58.2542926,20.0947819 58.2542926,23.9123888 C58.2542926,25.6345169 58.8840576,27.2095556 59.925852,28.419769 L59.925852,28.419769 C59.9104102,28.4273935 59.8949905,28.4350558 59.8795929,28.4427558 C61.01617,29.674602 61.710487,31.3206715 61.710487,33.1289073 C61.710487,36.9465143 58.6157051,40.0412962 54.7980982,40.0412962 C54.7034848,40.0412962 54.6093153,40.0393953 54.515626,40.0356296 L54.515626,40.0356296 C54.516089,40.0375187 54.5165526,40.0394075 54.5170166,40.0412962 L40.3972881,40.0412962 L40.3972881,52.887664 L40.3972881,52.887664 C40.4916889,53.3430132 40.5412962,53.8147625 40.5412962,54.2980982 C40.5412962,58.1157051 37.4465143,61.210487 33.6289073,61.210487 C32.0813547,61.210487 30.6525815,60.7019313 29.5005925,59.8428245 C29.4821342,59.8713744 29.4638143,59.9000221 29.4456339,59.9287667 C28.1850247,58.5900823 26.3963113,57.7542926 24.4123888,57.7542926 C20.5947819,57.7542926 17.5,60.8490745 17.5,64.6666814 C17.5,68.4842884 20.5947819,71.5790703 24.4123888,71.5790703 C26.134517,71.5790703 27.7095556,70.9493053 28.919769,69.9075109 L28.919769,69.9075109 C28.9273935,69.9229526 28.9350558,69.9383724 28.9427558,69.95377 C30.174602,68.8171928 31.8206715,68.1228758 33.6289073,68.1228758 C37.4465143,68.1228758 40.5412962,71.2176578 40.5412962,75.0352647 C40.5412962,75.5186004 40.4916889,75.9903496 40.3972881,76.4456988 Z M64,0 L118.5596,32 L118.5596,96 L64,128 L9.44039956,96 L9.44039956,32 L64,0 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/plugin-generic-theme": {
"title": "$:/core/images/plugin-generic-theme",
"tags": "$:/tags/Image",
"text": "<svg width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M29.4078519,91.4716406 L51.4693474,69.4101451 L51.4646675,69.4054652 C50.5969502,68.5377479 50.5929779,67.1348725 51.4693474,66.2585029 C52.3396494,65.3882009 53.7499654,65.3874786 54.6163097,66.2538229 L64.0805963,75.7181095 C64.9483136,76.5858268 64.9522859,77.9887022 64.0759163,78.8650718 C63.2056143,79.7353737 61.7952984,79.736096 60.9289541,78.8697517 L60.9242741,78.8650718 L60.9242741,78.8650718 L38.8627786,100.926567 C36.2518727,103.537473 32.0187578,103.537473 29.4078519,100.926567 C26.796946,98.3156614 26.796946,94.0825465 29.4078519,91.4716406 Z M60.8017407,66.3810363 C58.3659178,63.6765806 56.3370667,61.2899536 54.9851735,59.5123615 C48.1295381,50.4979488 44.671561,55.2444054 40.7586738,59.5123614 C36.8457866,63.7803174 41.789473,67.2384487 38.0759896,70.2532832 C34.3625062,73.2681177 34.5917646,74.3131575 28.3243876,68.7977024 C22.0570105,63.2822473 21.6235306,61.7636888 24.5005999,58.6166112 C27.3776691,55.4695337 29.7823103,60.4247912 35.6595047,54.8320442 C41.5366991,49.2392972 36.5996215,44.2825646 36.5996215,44.2825646 C36.5996215,44.2825646 48.8365511,19.267683 65.1880231,21.1152173 C81.5394952,22.9627517 59.0022276,18.7228947 53.3962199,38.3410355 C50.9960082,46.7405407 53.8429162,44.7613399 58.3941742,48.3090467 C59.7875202,49.3951602 64.4244828,52.7100463 70.1884353,56.9943417 L90.8648751,36.3179019 L92.4795866,31.5515482 L100.319802,26.8629752 L103.471444,30.0146174 L98.782871,37.8548326 L94.0165173,39.4695441 L73.7934912,59.6925702 C86.4558549,69.2403631 102.104532,81.8392557 102.104532,86.4016913 C102.104533,93.6189834 99.0337832,97.9277545 92.5695848,95.5655717 C87.8765989,93.8506351 73.8015497,80.3744087 63.8173444,69.668717 L60.9242741,72.5617873 L57.7726319,69.4101451 L60.8017407,66.3810363 L60.8017407,66.3810363 Z M63.9533761,1.42108547e-13 L118.512977,32 L118.512977,96 L63.9533761,128 L9.39377563,96 L9.39377563,32 L63.9533761,1.42108547e-13 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/refresh-button": {
"title": "$:/core/images/refresh-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-refresh-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M106.369002,39.4325143 C116.529932,60.3119371 112.939592,86.1974934 95.5979797,103.539105 C73.7286194,125.408466 38.2713806,125.408466 16.4020203,103.539105 C-5.46734008,81.6697449 -5.46734008,46.2125061 16.4020203,24.3431458 C19.5262146,21.2189514 24.5915344,21.2189514 27.7157288,24.3431458 C30.8399231,27.4673401 30.8399231,32.5326599 27.7157288,35.6568542 C12.0947571,51.2778259 12.0947571,76.6044251 27.7157288,92.2253967 C43.3367004,107.846368 68.6632996,107.846368 84.2842712,92.2253967 C97.71993,78.7897379 99.5995262,58.1740623 89.9230597,42.729491 L83.4844861,54.9932839 C81.4307001,58.9052072 76.5945372,60.4115251 72.682614,58.3577391 C68.7706907,56.3039532 67.2643728,51.4677903 69.3181587,47.555867 L84.4354914,18.7613158 C86.4966389,14.8353707 91.3577499,13.3347805 95.273202,15.415792 L124.145886,30.7612457 C128.047354,32.8348248 129.52915,37.6785572 127.455571,41.5800249 C125.381992,45.4814927 120.53826,46.9632892 116.636792,44.8897102 L106.369002,39.4325143 Z M98.1470904,27.0648707 C97.9798954,26.8741582 97.811187,26.6843098 97.6409651,26.4953413 L98.6018187,26.1987327 L98.1470904,27.0648707 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/right-arrow": {
"title": "$:/core/images/right-arrow",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-right-arrow tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <path d=\"M80.3563798,109.353315 C78.9238993,110.786918 76.9450203,111.675144 74.7592239,111.675144 L-4.40893546,111.675144 C-8.77412698,111.675144 -12.3248558,108.130732 -12.3248558,103.758478 C-12.3248558,99.3951199 -8.78077754,95.8418109 -4.40893546,95.8418109 L66.8418109,95.8418109 L66.8418109,24.5910645 C66.8418109,20.225873 70.3862233,16.6751442 74.7584775,16.6751442 C79.1218352,16.6751442 82.6751442,20.2192225 82.6751442,24.5910645 L82.6751442,103.759224 C82.6751442,105.941695 81.7891419,107.920575 80.3566508,109.353886 Z\" transform=\"translate(35.175144, 64.175144) rotate(-45.000000) translate(-35.175144, -64.175144) \"></path>\n</svg>"
},
"$:/core/images/save-button": {
"title": "$:/core/images/save-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-save-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M120.78304,34.329058 C125.424287,43.1924006 128.049406,53.2778608 128.049406,63.9764502 C128.049406,99.3226742 99.3956295,127.97645 64.0494055,127.97645 C28.7031816,127.97645 0.0494055385,99.3226742 0.0494055385,63.9764502 C0.0494055385,28.6302262 28.7031816,-0.0235498012 64.0494055,-0.0235498012 C82.8568763,-0.0235498012 99.769563,8.08898558 111.479045,21.0056358 L114.159581,18.3250998 C117.289194,15.1954866 122.356036,15.1939641 125.480231,18.3181584 C128.598068,21.4359957 128.601317,26.5107804 125.473289,29.6388083 L120.78304,34.329058 Z M108.72451,46.3875877 C110.870571,51.8341374 112.049406,57.767628 112.049406,63.9764502 C112.049406,90.4861182 90.5590735,111.97645 64.0494055,111.97645 C37.5397375,111.97645 16.0494055,90.4861182 16.0494055,63.9764502 C16.0494055,37.4667822 37.5397375,15.9764502 64.0494055,15.9764502 C78.438886,15.9764502 91.3495036,22.308215 100.147097,32.3375836 L58.9411255,73.5435552 L41.975581,56.5780107 C38.8486152,53.4510448 33.7746915,53.4551552 30.6568542,56.5729924 C27.5326599,59.6971868 27.5372202,64.7670668 30.6618725,67.8917192 L53.279253,90.5090997 C54.8435723,92.073419 56.8951519,92.8541315 58.9380216,92.8558261 C60.987971,92.8559239 63.0389578,92.0731398 64.6049211,90.5071765 L108.72451,46.3875877 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/spiral": {
"title": "$:/core/images/spiral",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-spiral tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"nonzero\">\n <path d=\"M64.534 68.348c3.39 0 6.097-2.62 6.476-5.968l-4.755-.538 4.75.583c.377-3.07-1.194-6.054-3.89-7.78-2.757-1.773-6.34-2.01-9.566-.7-3.46 1.403-6.14 4.392-7.35 8.148l-.01.026c-1.3 4.08-.72 8.64 1.58 12.52 2.5 4.2 6.77 7.2 11.76 8.27 5.37 1.15 11.11-.05 15.83-3.31 5.04-3.51 8.46-9.02 9.45-15.3 1.05-6.7-.72-13.63-4.92-19.19l.02.02c-4.42-5.93-11.2-9.82-18.78-10.78-7.96-1.01-16.13 1.31-22.59 6.43-6.81 5.39-11.18 13.41-12.11 22.26-.98 9.27 1.87 18.65 7.93 26.02 6.32 7.69 15.6 12.56 25.74 13.48 10.54.96 21.15-2.42 29.45-9.4l.01-.01c8.58-7.25 13.94-17.78 14.86-29.21.94-11.84-2.96-23.69-10.86-32.9-8.19-9.5-19.95-15.36-32.69-16.27-13.16-.94-26.24 3.49-36.34 12.34l.01-.01c-10.41 9.08-16.78 22.1-17.68 36.15-.93 14.44 4.03 28.77 13.79 39.78 10.03 11.32 24.28 18.2 39.6 19.09 15.73.92 31.31-4.56 43.24-15.234 12.23-10.954 19.61-26.44 20.5-43.074.14-2.64-1.89-4.89-4.52-5.03-2.64-.14-4.89 1.88-5.03 4.52-.75 14.1-7 27.2-17.33 36.45-10.03 8.98-23.11 13.58-36.3 12.81-12.79-.75-24.67-6.48-33-15.89-8.07-9.11-12.17-20.94-11.41-32.827.74-11.52 5.942-22.15 14.43-29.54l.01-.01c8.18-7.17 18.74-10.75 29.35-9.998 10.21.726 19.6 5.41 26.11 12.96 6.24 7.273 9.32 16.61 8.573 25.894-.718 8.9-4.88 17.064-11.504 22.66l.01-.007c-6.36 5.342-14.44 7.92-22.425 7.19-7.604-.68-14.52-4.314-19.21-10.027-4.44-5.4-6.517-12.23-5.806-18.94.67-6.3 3.76-11.977 8.54-15.766 4.46-3.54 10.05-5.128 15.44-4.44 5.03.63 9.46 3.18 12.32 7.01l.02.024c2.65 3.5 3.75 7.814 3.1 11.92-.59 3.71-2.58 6.925-5.45 8.924-2.56 1.767-5.61 2.403-8.38 1.81-2.42-.516-4.42-1.92-5.53-3.79-.93-1.56-1.15-3.3-.69-4.75l-4.56-1.446L59.325 65c.36-1.12 1.068-1.905 1.84-2.22.25-.103.48-.14.668-.13.06.006.11.015.14.025.01 0 .01 0-.01-.01-.02-.015-.054-.045-.094-.088-.06-.064-.12-.145-.17-.244-.15-.29-.23-.678-.18-1.11l-.005.04c.15-1.332 1.38-2.523 3.035-2.523-2.65 0-4.79 2.144-4.79 4.787s2.14 4.785 4.78 4.785z\"></path>\n </g>\n</svg>"
},
"$:/core/images/star-filled": {
"title": "$:/core/images/star-filled",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-star-filled tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"nonzero\">\n <path d=\"M61.8361286,96.8228569 L99.1627704,124.110219 C101.883827,126.099427 105.541968,123.420868 104.505636,120.198072 L90.2895569,75.9887263 L89.0292911,79.8977279 L126.314504,52.5528988 C129.032541,50.5595011 127.635256,46.2255025 124.273711,46.2229134 L78.1610486,46.1873965 L81.4604673,48.6032923 L67.1773543,4.41589688 C66.1361365,1.19470104 61.6144265,1.19470104 60.5732087,4.41589688 L46.2900957,48.6032923 L49.5895144,46.1873965 L3.47685231,46.2229134 C0.115307373,46.2255025 -1.28197785,50.5595011 1.43605908,52.5528988 L38.7212719,79.8977279 L37.4610061,75.9887263 L23.2449266,120.198072 C22.2085954,123.420868 25.8667356,126.099427 28.5877926,124.110219 L65.9144344,96.8228569 L61.8361286,96.8228569 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/storyview-classic": {
"title": "$:/core/images/storyview-classic",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-storyview-classic tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M8.00697327,0 C3.58484404,0 0,3.59075293 0,8.00697327 L0,119.993027 C0,124.415156 3.59075293,128 8.00697327,128 L119.993027,128 C124.415156,128 128,124.409247 128,119.993027 L128,8.00697327 C128,3.58484404 124.409247,0 119.993027,0 L8.00697327,0 L8.00697327,0 Z M23.9992458,16 C19.5813843,16 16,19.5776607 16,23.9924054 L16,40.0075946 C16,44.4216782 19.5881049,48 23.9992458,48 L104.000754,48 C108.418616,48 112,44.4223393 112,40.0075946 L112,23.9924054 C112,19.5783218 108.411895,16 104.000754,16 L23.9992458,16 L23.9992458,16 Z M23.9992458,64 C19.5813843,64 16,67.5907123 16,72 C16,76.418278 19.5881049,80 23.9992458,80 L104.000754,80 C108.418616,80 112,76.4092877 112,72 C112,67.581722 108.411895,64 104.000754,64 L23.9992458,64 L23.9992458,64 Z M23.9992458,96 C19.5813843,96 16,99.5907123 16,104 C16,108.418278 19.5881049,112 23.9992458,112 L104.000754,112 C108.418616,112 112,108.409288 112,104 C112,99.581722 108.411895,96 104.000754,96 L23.9992458,96 L23.9992458,96 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/storyview-pop": {
"title": "$:/core/images/storyview-pop",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-storyview-pop tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M8.00697327,0 C3.58484404,0 0,3.59075293 0,8.00697327 L0,119.993027 C0,124.415156 3.59075293,128 8.00697327,128 L119.993027,128 C124.415156,128 128,124.409247 128,119.993027 L128,8.00697327 C128,3.58484404 124.409247,0 119.993027,0 L8.00697327,0 L8.00697327,0 Z M23.9992458,16 C19.5813843,16 16,19.5776607 16,23.9924054 L16,40.0075946 C16,44.4216782 19.5881049,48 23.9992458,48 L104.000754,48 C108.418616,48 112,44.4223393 112,40.0075946 L112,23.9924054 C112,19.5783218 108.411895,16 104.000754,16 L23.9992458,16 L23.9992458,16 Z M16.0098166,56 C11.586117,56 8,59.5776607 8,63.9924054 L8,80.0075946 C8,84.4216782 11.5838751,88 16.0098166,88 L111.990183,88 C116.413883,88 120,84.4223393 120,80.0075946 L120,63.9924054 C120,59.5783218 116.416125,56 111.990183,56 L16.0098166,56 L16.0098166,56 Z M23.9992458,96 C19.5813843,96 16,99.5907123 16,104 C16,108.418278 19.5881049,112 23.9992458,112 L104.000754,112 C108.418616,112 112,108.409288 112,104 C112,99.581722 108.411895,96 104.000754,96 L23.9992458,96 L23.9992458,96 Z M23.9992458,64 C19.5813843,64 16,67.5907123 16,72 C16,76.418278 19.5881049,80 23.9992458,80 L104.000754,80 C108.418616,80 112,76.4092877 112,72 C112,67.581722 108.411895,64 104.000754,64 L23.9992458,64 L23.9992458,64 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/storyview-zoomin": {
"title": "$:/core/images/storyview-zoomin",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-storyview-zoomin tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M8.00697327,0 C3.58484404,0 0,3.59075293 0,8.00697327 L0,119.993027 C0,124.415156 3.59075293,128 8.00697327,128 L119.993027,128 C124.415156,128 128,124.409247 128,119.993027 L128,8.00697327 C128,3.58484404 124.409247,0 119.993027,0 L8.00697327,0 L8.00697327,0 Z M23.9992458,16 C19.5813843,16 16,19.578055 16,24.0085154 L16,71.9914846 C16,76.4144655 19.5881049,80 23.9992458,80 L104.000754,80 C108.418616,80 112,76.421945 112,71.9914846 L112,24.0085154 C112,19.5855345 108.411895,16 104.000754,16 L23.9992458,16 L23.9992458,16 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/tag-button": {
"title": "$:/core/images/tag-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-tag-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M18.1643182,47.6600756 L18.1677196,51.7651887 C18.1708869,55.5878829 20.3581578,60.8623899 23.0531352,63.5573673 L84.9021823,125.406414 C87.5996731,128.103905 91.971139,128.096834 94.6717387,125.396234 L125.766905,94.3010679 C128.473612,91.5943612 128.472063,87.2264889 125.777085,84.5315115 L63.9280381,22.6824644 C61.2305472,19.9849735 55.9517395,17.801995 52.1318769,17.8010313 L25.0560441,17.7942007 C21.2311475,17.7932358 18.1421354,20.8872832 18.1452985,24.7049463 L18.1535504,34.6641936 C18.2481119,34.6754562 18.3439134,34.6864294 18.4409623,34.6971263 C22.1702157,35.1081705 26.9295004,34.6530132 31.806204,33.5444844 C32.1342781,33.0700515 32.5094815,32.6184036 32.9318197,32.1960654 C35.6385117,29.4893734 39.5490441,28.718649 42.94592,29.8824694 C43.0432142,29.8394357 43.1402334,29.7961748 43.2369683,29.7526887 L43.3646982,30.0368244 C44.566601,30.5115916 45.6933052,31.2351533 46.6655958,32.2074439 C50.4612154,36.0030635 50.4663097,42.1518845 46.6769742,45.94122 C43.0594074,49.5587868 37.2914155,49.7181264 33.4734256,46.422636 C28.1082519,47.5454734 22.7987486,48.0186448 18.1643182,47.6600756 Z\"></path>\n <path d=\"M47.6333528,39.5324628 L47.6562932,39.5834939 C37.9670934,43.9391617 26.0718874,46.3819521 17.260095,45.4107025 C5.27267473,44.0894301 -1.02778744,36.4307276 2.44271359,24.0779512 C5.56175386,12.9761516 14.3014034,4.36129832 24.0466405,1.54817001 C34.7269254,-1.53487574 43.7955833,3.51606438 43.7955834,14.7730751 L35.1728168,14.7730752 C35.1728167,9.91428944 32.0946059,8.19982862 26.4381034,9.83267419 C19.5270911,11.8276553 13.046247,18.2159574 10.7440788,26.4102121 C8.82861123,33.2280582 11.161186,36.0634845 18.2047888,36.8398415 C25.3302805,37.6252244 35.7353482,35.4884477 44.1208333,31.7188498 L44.1475077,31.7781871 C44.159701,31.7725635 44.1718402,31.7671479 44.1839238,31.7619434 C45.9448098,31.0035157 50.4503245,38.3109156 47.7081571,39.5012767 C47.6834429,39.512005 47.6585061,39.5223987 47.6333528,39.5324628 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/theme-button": {
"title": "$:/core/images/theme-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-theme-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M55.854113,66.9453198 C54.3299482,65.1432292 53.0133883,63.518995 51.9542746,62.1263761 C40.8899947,47.578055 35.3091807,55.2383404 28.9941893,62.1263758 C22.6791979,69.0144112 30.6577916,74.5954741 24.6646171,79.4611023 C18.6714426,84.3267304 19.0414417,86.0133155 8.92654943,77.1119468 C-1.18834284,68.2105781 -1.88793412,65.7597832 2.7553553,60.6807286 C7.39864472,55.601674 11.2794845,63.5989423 20.7646627,54.5728325 C30.2498409,45.5467226 22.2819131,37.5470737 22.2819131,37.5470737 C22.2819131,37.5470737 42.0310399,-2.82433362 68.4206088,0.157393922 C94.8101776,3.13912147 58.4373806,-3.70356506 49.3898693,27.958066 C45.5161782,41.5139906 50.1107906,38.3197672 57.4560458,44.0453955 C59.1625767,45.3756367 63.8839488,48.777453 70.127165,53.3625321 C63.9980513,59.2416709 58.9704753,64.0315459 55.854113,66.9453198 Z M67.4952439,79.8919946 C83.5082212,96.9282402 105.237121,117.617674 112.611591,120.312493 C123.044132,124.12481 128.000001,117.170903 128,105.522947 C127.999999,98.3705516 104.170675,78.980486 84.0760493,63.7529565 C76.6683337,70.9090328 70.7000957,76.7055226 67.4952439,79.8919946 Z\"></path>\n <path d=\"M58.2852966,138.232794 L58.2852966,88.3943645 C56.318874,88.3923153 54.7254089,86.7952906 54.7254089,84.8344788 C54.7254089,82.8684071 56.3175932,81.2745911 58.2890859,81.2745911 L79.6408336,81.2745911 C81.608998,81.2745911 83.2045105,82.8724076 83.2045105,84.8344788 C83.2045105,86.7992907 81.614366,88.3923238 79.6446228,88.3943645 L79.6446228,88.3943646 L79.6446228,138.232794 C79.6446228,144.131009 74.8631748,148.912457 68.9649597,148.912457 C63.0667446,148.912457 58.2852966,144.131009 58.2852966,138.232794 Z M65.405072,-14.8423767 L72.5248474,-14.8423767 L76.0847351,-0.690681892 L72.5248474,6.51694947 L72.5248474,81.2745911 L65.405072,81.2745911 L65.405072,6.51694947 L61.8451843,-0.690681892 L65.405072,-14.8423767 Z\" transform=\"translate(68.964960, 67.035040) rotate(45.000000) translate(-68.964960, -67.035040) \"></path>\n </g>\n</svg>"
},
"$:/core/images/tip": {
"title": "$:/core/images/tip",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-tip tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M64,128.241818 C99.346224,128.241818 128,99.5880417 128,64.2418177 C128,28.8955937 99.346224,0.241817675 64,0.241817675 C28.653776,0.241817675 0,28.8955937 0,64.2418177 C0,99.5880417 28.653776,128.241818 64,128.241818 Z M75.9358659,91.4531941 C75.3115438,95.581915 70.2059206,98.8016748 64,98.8016748 C57.7940794,98.8016748 52.6884562,95.581915 52.0641341,91.4531941 C54.3299053,94.0502127 58.8248941,95.8192805 64,95.8192805 C69.1751059,95.8192805 73.6700947,94.0502127 75.9358659,91.4531941 L75.9358659,91.4531941 Z M75.9358659,95.9453413 C75.3115438,100.074062 70.2059206,103.293822 64,103.293822 C57.7940794,103.293822 52.6884562,100.074062 52.0641341,95.9453413 C54.3299053,98.5423599 58.8248941,100.311428 64,100.311428 C69.1751059,100.311428 73.6700947,98.5423599 75.9358659,95.9453413 L75.9358659,95.9453413 Z M75.9358659,100.40119 C75.3115438,104.529911 70.2059206,107.74967 64,107.74967 C57.7940794,107.74967 52.6884562,104.529911 52.0641341,100.40119 C54.3299053,102.998208 58.8248941,104.767276 64,104.767276 C69.1751059,104.767276 73.6700947,102.998208 75.9358659,100.40119 L75.9358659,100.40119 Z M75.9358659,104.893337 C75.3115438,109.022058 70.2059206,112.241818 64,112.241818 C57.7940794,112.241818 52.6884562,109.022058 52.0641341,104.893337 C54.3299053,107.490356 58.8248941,109.259423 64,109.259423 C69.1751059,109.259423 73.6700947,107.490356 75.9358659,104.893337 L75.9358659,104.893337 Z M64.3010456,24.2418177 C75.9193117,24.2418188 88.0000013,32.0619847 88,48.4419659 C87.9999987,64.8219472 75.9193018,71.7540963 75.9193021,83.5755932 C75.9193022,89.4486648 70.0521957,92.8368862 63.9999994,92.8368862 C57.947803,92.8368862 51.9731007,89.8295115 51.9731007,83.5755932 C51.9731007,71.1469799 39.9999998,65.4700602 40,48.4419647 C40.0000002,31.4138691 52.6827796,24.2418166 64.3010456,24.2418177 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/twitter": {
"title": "$:/core/images/twitter",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-twitter tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M41.6263422,115.803477 C27.0279663,115.803477 13.4398394,111.540813 1.99987456,104.234833 C4.02221627,104.472643 6.08004574,104.594302 8.16644978,104.594302 C20.277456,104.594302 31.4238403,100.47763 40.270894,93.5715185 C28.9590538,93.3635501 19.4123842,85.9189246 16.1230832,75.6885328 C17.7011365,75.9892376 19.320669,76.1503787 20.9862896,76.1503787 C23.344152,76.1503787 25.6278127,75.8359011 27.7971751,75.247346 C15.9709927,72.8821073 7.06079851,62.4745062 7.06079851,49.9982394 C7.06079851,49.8898938 7.06079851,49.7820074 7.06264203,49.67458 C10.5482779,51.6032228 14.5339687,52.7615103 18.7717609,52.8951059 C11.8355159,48.277565 7.2714207,40.3958845 7.2714207,31.4624258 C7.2714207,26.7434257 8.54621495,22.3200804 10.7713439,18.5169676 C23.5211299,34.0957738 42.568842,44.3472839 64.0532269,45.4210985 C63.6126256,43.5365285 63.3835682,41.5711584 63.3835682,39.5529928 C63.3835682,25.3326379 74.95811,13.8034766 89.2347917,13.8034766 C96.6697089,13.8034766 103.387958,16.930807 108.103682,21.9353619 C113.991886,20.780288 119.52429,18.6372496 124.518847,15.6866694 C122.588682,21.6993889 118.490075,26.7457211 113.152623,29.9327334 C118.381769,29.3102055 123.363882,27.926045 127.999875,25.8780385 C124.534056,31.0418981 120.151087,35.5772616 115.100763,39.2077561 C115.150538,40.3118708 115.175426,41.4224128 115.175426,42.538923 C115.175426,76.5663154 89.1744164,115.803477 41.6263422,115.803477\"></path>\n </g>\n</svg>\n"
},
"$:/core/images/unfold-all-button": {
"title": "$:/core/images/unfold-all-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-unfold-all tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <rect x=\"0\" y=\"0\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"0\" y=\"64\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <path d=\"M85.598226,8.34884273 C84.1490432,6.89863875 82.1463102,6 79.9340286,6 L47.9482224,6 C43.5292967,6 39.9411255,9.581722 39.9411255,14 C39.9411255,18.4092877 43.5260249,22 47.9482224,22 L71.9411255,22 L71.9411255,45.9929031 C71.9411255,50.4118288 75.5228475,54 79.9411255,54 C84.3504132,54 87.9411255,50.4151006 87.9411255,45.9929031 L87.9411255,14.0070969 C87.9411255,11.7964515 87.0447363,9.79371715 85.5956548,8.34412458 Z\" transform=\"translate(63.941125, 30.000000) scale(1, -1) rotate(-45.000000) translate(-63.941125, -30.000000) \"></path>\n <path d=\"M85.6571005,72.2899682 C84.2079177,70.8397642 82.2051847,69.9411255 79.9929031,69.9411255 L48.0070969,69.9411255 C43.5881712,69.9411255 40,73.5228475 40,77.9411255 C40,82.3504132 43.5848994,85.9411255 48.0070969,85.9411255 L72,85.9411255 L72,109.934029 C72,114.352954 75.581722,117.941125 80,117.941125 C84.4092877,117.941125 88,114.356226 88,109.934029 L88,77.9482224 C88,75.737577 87.1036108,73.7348426 85.6545293,72.2852501 Z\" transform=\"translate(64.000000, 93.941125) scale(1, -1) rotate(-45.000000) translate(-64.000000, -93.941125) \"></path>\n </g>\n</svg>"
},
"$:/core/images/unfold-button": {
"title": "$:/core/images/unfold-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-unfold tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <rect x=\"0\" y=\"0\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <path d=\"M85.598226,11.3488427 C84.1490432,9.89863875 82.1463102,9 79.9340286,9 L47.9482224,9 C43.5292967,9 39.9411255,12.581722 39.9411255,17 C39.9411255,21.4092877 43.5260249,25 47.9482224,25 L71.9411255,25 L71.9411255,48.9929031 C71.9411255,53.4118288 75.5228475,57 79.9411255,57 C84.3504132,57 87.9411255,53.4151006 87.9411255,48.9929031 L87.9411255,17.0070969 C87.9411255,14.7964515 87.0447363,12.7937171 85.5956548,11.3441246 Z\" transform=\"translate(63.941125, 33.000000) scale(1, -1) rotate(-45.000000) translate(-63.941125, -33.000000) \"></path>\n <path d=\"M85.6571005,53.4077172 C84.2079177,51.9575133 82.2051847,51.0588745 79.9929031,51.0588745 L48.0070969,51.0588745 C43.5881712,51.0588745 40,54.6405965 40,59.0588745 C40,63.4681622 43.5848994,67.0588745 48.0070969,67.0588745 L72,67.0588745 L72,91.0517776 C72,95.4707033 75.581722,99.0588745 80,99.0588745 C84.4092877,99.0588745 88,95.4739751 88,91.0517776 L88,59.0659714 C88,56.855326 87.1036108,54.8525917 85.6545293,53.4029991 Z\" transform=\"translate(64.000000, 75.058875) scale(1, -1) rotate(-45.000000) translate(-64.000000, -75.058875) \"></path>\n </g>\n</svg>"
},
"$:/core/images/unlocked-padlock": {
"title": "$:/core/images/unlocked-padlock",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-unlocked-padlock tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M48.6266053,64 L105,64 L105,96.0097716 C105,113.673909 90.6736461,128 73.001193,128 L55.998807,128 C38.3179793,128 24,113.677487 24,96.0097716 L24,64 L30.136303,64 C19.6806213,51.3490406 2.77158986,28.2115132 25.8366966,8.85759246 C50.4723026,-11.8141335 71.6711028,13.2108337 81.613302,25.0594855 C91.5555012,36.9081373 78.9368488,47.4964439 69.1559674,34.9513593 C59.375086,22.4062748 47.9893192,10.8049522 35.9485154,20.9083862 C23.9077117,31.0118202 34.192312,43.2685325 44.7624679,55.8655518 C47.229397,58.805523 48.403443,61.5979188 48.6266053,64 Z M67.7315279,92.3641717 C70.8232551,91.0923621 73,88.0503841 73,84.5 C73,79.8055796 69.1944204,76 64.5,76 C59.8055796,76 56,79.8055796 56,84.5 C56,87.947435 58.0523387,90.9155206 61.0018621,92.2491029 L55.9067479,115.020857 L72.8008958,115.020857 L67.7315279,92.3641717 L67.7315279,92.3641717 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/up-arrow": {
"created": "20150316000544368",
"modified": "20150316000831867",
"tags": "$:/tags/Image",
"title": "$:/core/images/up-arrow",
"text": "<svg class=\"tc-image-up-arrow tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n<path transform=\"rotate(-135, 63.8945, 64.1752)\" d=\"m109.07576,109.35336c-1.43248,1.43361 -3.41136,2.32182 -5.59717,2.32182l-79.16816,0c-4.36519,0 -7.91592,-3.5444 -7.91592,-7.91666c0,-4.36337 3.54408,-7.91667 7.91592,-7.91667l71.25075,0l0,-71.25074c0,-4.3652 3.54442,-7.91592 7.91667,-7.91592c4.36336,0 7.91667,3.54408 7.91667,7.91592l0,79.16815c0,2.1825 -0.88602,4.16136 -2.3185,5.59467l-0.00027,-0.00056l0.00001,-0.00001z\" />\n</svg>\n \n"
},
"$:/core/images/video": {
"title": "$:/core/images/video",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-video tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M64,12 C29.0909091,12 8.72727273,14.9166667 5.81818182,17.8333333 C2.90909091,20.75 1.93784382e-15,41.1666667 0,64.5 C1.93784382e-15,87.8333333 2.90909091,108.25 5.81818182,111.166667 C8.72727273,114.083333 29.0909091,117 64,117 C98.9090909,117 119.272727,114.083333 122.181818,111.166667 C125.090909,108.25 128,87.8333333 128,64.5 C128,41.1666667 125.090909,20.75 122.181818,17.8333333 C119.272727,14.9166667 98.9090909,12 64,12 Z M54.9161194,44.6182253 C51.102648,42.0759111 48.0112186,43.7391738 48.0112186,48.3159447 L48.0112186,79.6840553 C48.0112186,84.2685636 51.109784,85.9193316 54.9161194,83.3817747 L77.0838806,68.6032672 C80.897352,66.0609529 80.890216,61.9342897 77.0838806,59.3967328 L54.9161194,44.6182253 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/warning": {
"title": "$:/core/images/warning",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-warning tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M57.0717968,11 C60.1509982,5.66666667 67.8490018,5.66666667 70.9282032,11 L126.353829,107 C129.433031,112.333333 125.584029,119 119.425626,119 L8.57437416,119 C2.41597129,119 -1.43303051,112.333333 1.64617093,107 L57.0717968,11 Z M64,37 C59.581722,37 56,40.5820489 56,44.9935776 L56,73.0064224 C56,77.4211534 59.5907123,81 64,81 C68.418278,81 72,77.4179511 72,73.0064224 L72,44.9935776 C72,40.5788466 68.4092877,37 64,37 Z M64,104 C68.418278,104 72,100.418278 72,96 C72,91.581722 68.418278,88 64,88 C59.581722,88 56,91.581722 56,96 C56,100.418278 59.581722,104 64,104 Z\"></path>\n </g>\n</svg>"
},
"$:/language/Buttons/AdvancedSearch/Caption": {
"title": "$:/language/Buttons/AdvancedSearch/Caption",
"text": "advanced search"
},
"$:/language/Buttons/AdvancedSearch/Hint": {
"title": "$:/language/Buttons/AdvancedSearch/Hint",
"text": "Advanced search"
},
"$:/language/Buttons/Cancel/Caption": {
"title": "$:/language/Buttons/Cancel/Caption",
"text": "cancel"
},
"$:/language/Buttons/Cancel/Hint": {
"title": "$:/language/Buttons/Cancel/Hint",
"text": "Discard changes to this tiddler"
},
"$:/language/Buttons/Clone/Caption": {
"title": "$:/language/Buttons/Clone/Caption",
"text": "clone"
},
"$:/language/Buttons/Clone/Hint": {
"title": "$:/language/Buttons/Clone/Hint",
"text": "Clone this tiddler"
},
"$:/language/Buttons/Close/Caption": {
"title": "$:/language/Buttons/Close/Caption",
"text": "close"
},
"$:/language/Buttons/Close/Hint": {
"title": "$:/language/Buttons/Close/Hint",
"text": "Close this tiddler"
},
"$:/language/Buttons/CloseAll/Caption": {
"title": "$:/language/Buttons/CloseAll/Caption",
"text": "close all"
},
"$:/language/Buttons/CloseAll/Hint": {
"title": "$:/language/Buttons/CloseAll/Hint",
"text": "Close all tiddlers"
},
"$:/language/Buttons/CloseOthers/Caption": {
"title": "$:/language/Buttons/CloseOthers/Caption",
"text": "close others"
},
"$:/language/Buttons/CloseOthers/Hint": {
"title": "$:/language/Buttons/CloseOthers/Hint",
"text": "Close other tiddlers"
},
"$:/language/Buttons/ControlPanel/Caption": {
"title": "$:/language/Buttons/ControlPanel/Caption",
"text": "control panel"
},
"$:/language/Buttons/ControlPanel/Hint": {
"title": "$:/language/Buttons/ControlPanel/Hint",
"text": "Open control panel"
},
"$:/language/Buttons/Delete/Caption": {
"title": "$:/language/Buttons/Delete/Caption",
"text": "delete"
},
"$:/language/Buttons/Delete/Hint": {
"title": "$:/language/Buttons/Delete/Hint",
"text": "Delete this tiddler"
},
"$:/language/Buttons/Edit/Caption": {
"title": "$:/language/Buttons/Edit/Caption",
"text": "edit"
},
"$:/language/Buttons/Edit/Hint": {
"title": "$:/language/Buttons/Edit/Hint",
"text": "Edit this tiddler"
},
"$:/language/Buttons/Encryption/Caption": {
"title": "$:/language/Buttons/Encryption/Caption",
"text": "encryption"
},
"$:/language/Buttons/Encryption/Hint": {
"title": "$:/language/Buttons/Encryption/Hint",
"text": "Set or clear a password for saving this wiki"
},
"$:/language/Buttons/Encryption/ClearPassword/Caption": {
"title": "$:/language/Buttons/Encryption/ClearPassword/Caption",
"text": "clear password"
},
"$:/language/Buttons/Encryption/ClearPassword/Hint": {
"title": "$:/language/Buttons/Encryption/ClearPassword/Hint",
"text": "Clear the password and save this wiki without encryption"
},
"$:/language/Buttons/Encryption/SetPassword/Caption": {
"title": "$:/language/Buttons/Encryption/SetPassword/Caption",
"text": "set password"
},
"$:/language/Buttons/Encryption/SetPassword/Hint": {
"title": "$:/language/Buttons/Encryption/SetPassword/Hint",
"text": "Set a password for saving this wiki with encryption"
},
"$:/language/Buttons/ExportPage/Caption": {
"title": "$:/language/Buttons/ExportPage/Caption",
"text": "export all"
},
"$:/language/Buttons/ExportPage/Hint": {
"title": "$:/language/Buttons/ExportPage/Hint",
"text": "Export all tiddlers"
},
"$:/language/Buttons/ExportTiddler/Caption": {
"title": "$:/language/Buttons/ExportTiddler/Caption",
"text": "export tiddler"
},
"$:/language/Buttons/ExportTiddler/Hint": {
"title": "$:/language/Buttons/ExportTiddler/Hint",
"text": "Export tiddler"
},
"$:/language/Buttons/ExportTiddlers/Caption": {
"title": "$:/language/Buttons/ExportTiddlers/Caption",
"text": "export tiddlers"
},
"$:/language/Buttons/ExportTiddlers/Hint": {
"title": "$:/language/Buttons/ExportTiddlers/Hint",
"text": "Export tiddlers"
},
"$:/language/Buttons/Fold/Caption": {
"title": "$:/language/Buttons/Fold/Caption",
"text": "fold tiddler"
},
"$:/language/Buttons/Fold/Hint": {
"title": "$:/language/Buttons/Fold/Hint",
"text": "Fold the body of this tiddler"
},
"$:/language/Buttons/Fold/FoldBar/Caption": {
"title": "$:/language/Buttons/Fold/FoldBar/Caption",
"text": "fold-bar"
},
"$:/language/Buttons/Fold/FoldBar/Hint": {
"title": "$:/language/Buttons/Fold/FoldBar/Hint",
"text": "Optional bars to fold and unfold tiddlers"
},
"$:/language/Buttons/Unfold/Caption": {
"title": "$:/language/Buttons/Unfold/Caption",
"text": "unfold tiddler"
},
"$:/language/Buttons/Unfold/Hint": {
"title": "$:/language/Buttons/Unfold/Hint",
"text": "Unfold the body of this tiddler"
},
"$:/language/Buttons/FoldOthers/Caption": {
"title": "$:/language/Buttons/FoldOthers/Caption",
"text": "fold other tiddlers"
},
"$:/language/Buttons/FoldOthers/Hint": {
"title": "$:/language/Buttons/FoldOthers/Hint",
"text": "Fold the bodies of other opened tiddlers"
},
"$:/language/Buttons/FoldAll/Caption": {
"title": "$:/language/Buttons/FoldAll/Caption",
"text": "fold all tiddlers"
},
"$:/language/Buttons/FoldAll/Hint": {
"title": "$:/language/Buttons/FoldAll/Hint",
"text": "Fold the bodies of all opened tiddlers"
},
"$:/language/Buttons/UnfoldAll/Caption": {
"title": "$:/language/Buttons/UnfoldAll/Caption",
"text": "unfold all tiddlers"
},
"$:/language/Buttons/UnfoldAll/Hint": {
"title": "$:/language/Buttons/UnfoldAll/Hint",
"text": "Unfold the bodies of all opened tiddlers"
},
"$:/language/Buttons/FullScreen/Caption": {
"title": "$:/language/Buttons/FullScreen/Caption",
"text": "full-screen"
},
"$:/language/Buttons/FullScreen/Hint": {
"title": "$:/language/Buttons/FullScreen/Hint",
"text": "Enter or leave full-screen mode"
},
"$:/language/Buttons/Help/Caption": {
"title": "$:/language/Buttons/Help/Caption",
"text": "help"
},
"$:/language/Buttons/Help/Hint": {
"title": "$:/language/Buttons/Help/Hint",
"text": "Show help panel"
},
"$:/language/Buttons/Import/Caption": {
"title": "$:/language/Buttons/Import/Caption",
"text": "import"
},
"$:/language/Buttons/Import/Hint": {
"title": "$:/language/Buttons/Import/Hint",
"text": "Import many types of file including text, image, TiddlyWiki or JSON"
},
"$:/language/Buttons/Info/Caption": {
"title": "$:/language/Buttons/Info/Caption",
"text": "info"
},
"$:/language/Buttons/Info/Hint": {
"title": "$:/language/Buttons/Info/Hint",
"text": "Show information for this tiddler"
},
"$:/language/Buttons/Home/Caption": {
"title": "$:/language/Buttons/Home/Caption",
"text": "home"
},
"$:/language/Buttons/Home/Hint": {
"title": "$:/language/Buttons/Home/Hint",
"text": "Open the default tiddlers"
},
"$:/language/Buttons/Language/Caption": {
"title": "$:/language/Buttons/Language/Caption",
"text": "language"
},
"$:/language/Buttons/Language/Hint": {
"title": "$:/language/Buttons/Language/Hint",
"text": "Choose the user interface language"
},
"$:/language/Buttons/More/Caption": {
"title": "$:/language/Buttons/More/Caption",
"text": "more"
},
"$:/language/Buttons/More/Hint": {
"title": "$:/language/Buttons/More/Hint",
"text": "More actions"
},
"$:/language/Buttons/NewHere/Caption": {
"title": "$:/language/Buttons/NewHere/Caption",
"text": "new here"
},
"$:/language/Buttons/NewHere/Hint": {
"title": "$:/language/Buttons/NewHere/Hint",
"text": "Create a new tiddler tagged with this one"
},
"$:/language/Buttons/NewJournal/Caption": {
"title": "$:/language/Buttons/NewJournal/Caption",
"text": "new journal"
},
"$:/language/Buttons/NewJournal/Hint": {
"title": "$:/language/Buttons/NewJournal/Hint",
"text": "Create a new journal tiddler"
},
"$:/language/Buttons/NewJournalHere/Caption": {
"title": "$:/language/Buttons/NewJournalHere/Caption",
"text": "new journal here"
},
"$:/language/Buttons/NewJournalHere/Hint": {
"title": "$:/language/Buttons/NewJournalHere/Hint",
"text": "Create a new journal tiddler tagged with this one"
},
"$:/language/Buttons/NewTiddler/Caption": {
"title": "$:/language/Buttons/NewTiddler/Caption",
"text": "new tiddler"
},
"$:/language/Buttons/NewTiddler/Hint": {
"title": "$:/language/Buttons/NewTiddler/Hint",
"text": "Create a new tiddler"
},
"$:/language/Buttons/OpenWindow/Caption": {
"title": "$:/language/Buttons/OpenWindow/Caption",
"text": "open in new window"
},
"$:/language/Buttons/OpenWindow/Hint": {
"title": "$:/language/Buttons/OpenWindow/Hint",
"text": "Open tiddler in new window"
},
"$:/language/Buttons/Palette/Caption": {
"title": "$:/language/Buttons/Palette/Caption",
"text": "palette"
},
"$:/language/Buttons/Palette/Hint": {
"title": "$:/language/Buttons/Palette/Hint",
"text": "Choose the colour palette"
},
"$:/language/Buttons/Permalink/Caption": {
"title": "$:/language/Buttons/Permalink/Caption",
"text": "permalink"
},
"$:/language/Buttons/Permalink/Hint": {
"title": "$:/language/Buttons/Permalink/Hint",
"text": "Set browser address bar to a direct link to this tiddler"
},
"$:/language/Buttons/Permaview/Caption": {
"title": "$:/language/Buttons/Permaview/Caption",
"text": "permaview"
},
"$:/language/Buttons/Permaview/Hint": {
"title": "$:/language/Buttons/Permaview/Hint",
"text": "Set browser address bar to a direct link to all the tiddlers in this story"
},
"$:/language/Buttons/Refresh/Caption": {
"title": "$:/language/Buttons/Refresh/Caption",
"text": "refresh"
},
"$:/language/Buttons/Refresh/Hint": {
"title": "$:/language/Buttons/Refresh/Hint",
"text": "Perform a full refresh of the wiki"
},
"$:/language/Buttons/Save/Caption": {
"title": "$:/language/Buttons/Save/Caption",
"text": "ok"
},
"$:/language/Buttons/Save/Hint": {
"title": "$:/language/Buttons/Save/Hint",
"text": "Confirm changes to this tiddler"
},
"$:/language/Buttons/SaveWiki/Caption": {
"title": "$:/language/Buttons/SaveWiki/Caption",
"text": "save changes"
},
"$:/language/Buttons/SaveWiki/Hint": {
"title": "$:/language/Buttons/SaveWiki/Hint",
"text": "Save changes"
},
"$:/language/Buttons/StoryView/Caption": {
"title": "$:/language/Buttons/StoryView/Caption",
"text": "storyview"
},
"$:/language/Buttons/StoryView/Hint": {
"title": "$:/language/Buttons/StoryView/Hint",
"text": "Choose the story visualisation"
},
"$:/language/Buttons/HideSideBar/Caption": {
"title": "$:/language/Buttons/HideSideBar/Caption",
"text": "hide sidebar"
},
"$:/language/Buttons/HideSideBar/Hint": {
"title": "$:/language/Buttons/HideSideBar/Hint",
"text": "Hide sidebar"
},
"$:/language/Buttons/ShowSideBar/Caption": {
"title": "$:/language/Buttons/ShowSideBar/Caption",
"text": "show sidebar"
},
"$:/language/Buttons/ShowSideBar/Hint": {
"title": "$:/language/Buttons/ShowSideBar/Hint",
"text": "Show sidebar"
},
"$:/language/Buttons/TagManager/Caption": {
"title": "$:/language/Buttons/TagManager/Caption",
"text": "tag manager"
},
"$:/language/Buttons/TagManager/Hint": {
"title": "$:/language/Buttons/TagManager/Hint",
"text": "Open tag manager"
},
"$:/language/Buttons/Theme/Caption": {
"title": "$:/language/Buttons/Theme/Caption",
"text": "theme"
},
"$:/language/Buttons/Theme/Hint": {
"title": "$:/language/Buttons/Theme/Hint",
"text": "Choose the display theme"
},
"$:/language/ControlPanel/Advanced/Caption": {
"title": "$:/language/ControlPanel/Advanced/Caption",
"text": "Advanced"
},
"$:/language/ControlPanel/Advanced/Hint": {
"title": "$:/language/ControlPanel/Advanced/Hint",
"text": "Internal information about this TiddlyWiki"
},
"$:/language/ControlPanel/Appearance/Caption": {
"title": "$:/language/ControlPanel/Appearance/Caption",
"text": "Appearance"
},
"$:/language/ControlPanel/Appearance/Hint": {
"title": "$:/language/ControlPanel/Appearance/Hint",
"text": "Ways to customise the appearance of your TiddlyWiki."
},
"$:/language/ControlPanel/Basics/AnimDuration/Prompt": {
"title": "$:/language/ControlPanel/Basics/AnimDuration/Prompt",
"text": "Animation duration:"
},
"$:/language/ControlPanel/Basics/Caption": {
"title": "$:/language/ControlPanel/Basics/Caption",
"text": "Basics"
},
"$:/language/ControlPanel/Basics/DefaultTiddlers/BottomHint": {
"title": "$:/language/ControlPanel/Basics/DefaultTiddlers/BottomHint",
"text": "Use [[double square brackets]] for titles with spaces. Or you can choose to <$button set=\"$:/DefaultTiddlers\" setTo=\"[list[$:/StoryList]]\">retain story ordering</$button>"
},
"$:/language/ControlPanel/Basics/DefaultTiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/DefaultTiddlers/Prompt",
"text": "Default tiddlers:"
},
"$:/language/ControlPanel/Basics/DefaultTiddlers/TopHint": {
"title": "$:/language/ControlPanel/Basics/DefaultTiddlers/TopHint",
"text": "Choose which tiddlers are displayed at startup:"
},
"$:/language/ControlPanel/Basics/Language/Prompt": {
"title": "$:/language/ControlPanel/Basics/Language/Prompt",
"text": "Hello! Current language:"
},
"$:/language/ControlPanel/Basics/NewJournal/Title/Prompt": {
"title": "$:/language/ControlPanel/Basics/NewJournal/Title/Prompt",
"text": "Title of new journal tiddlers"
},
"$:/language/ControlPanel/Basics/NewJournal/Tags/Prompt": {
"title": "$:/language/ControlPanel/Basics/NewJournal/Tags/Prompt",
"text": "Tags for new journal tiddlers"
},
"$:/language/ControlPanel/Basics/OverriddenShadowTiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/OverriddenShadowTiddlers/Prompt",
"text": "Number of overridden shadow tiddlers:"
},
"$:/language/ControlPanel/Basics/ShadowTiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/ShadowTiddlers/Prompt",
"text": "Number of shadow tiddlers:"
},
"$:/language/ControlPanel/Basics/Subtitle/Prompt": {
"title": "$:/language/ControlPanel/Basics/Subtitle/Prompt",
"text": "Subtitle:"
},
"$:/language/ControlPanel/Basics/SystemTiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/SystemTiddlers/Prompt",
"text": "Number of system tiddlers:"
},
"$:/language/ControlPanel/Basics/Tags/Prompt": {
"title": "$:/language/ControlPanel/Basics/Tags/Prompt",
"text": "Number of tags:"
},
"$:/language/ControlPanel/Basics/Tiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/Tiddlers/Prompt",
"text": "Number of tiddlers:"
},
"$:/language/ControlPanel/Basics/Title/Prompt": {
"title": "$:/language/ControlPanel/Basics/Title/Prompt",
"text": "Title of this ~TiddlyWiki:"
},
"$:/language/ControlPanel/Basics/Username/Prompt": {
"title": "$:/language/ControlPanel/Basics/Username/Prompt",
"text": "Username for signing edits:"
},
"$:/language/ControlPanel/Basics/Version/Prompt": {
"title": "$:/language/ControlPanel/Basics/Version/Prompt",
"text": "~TiddlyWiki version:"
},
"$:/language/ControlPanel/EditorTypes/Caption": {
"title": "$:/language/ControlPanel/EditorTypes/Caption",
"text": "Editor Types"
},
"$:/language/ControlPanel/EditorTypes/Editor/Caption": {
"title": "$:/language/ControlPanel/EditorTypes/Editor/Caption",
"text": "Editor"
},
"$:/language/ControlPanel/EditorTypes/Hint": {
"title": "$:/language/ControlPanel/EditorTypes/Hint",
"text": "These tiddlers determine which editor is used to edit specific tiddler types."
},
"$:/language/ControlPanel/EditorTypes/Type/Caption": {
"title": "$:/language/ControlPanel/EditorTypes/Type/Caption",
"text": "Type"
},
"$:/language/ControlPanel/Info/Caption": {
"title": "$:/language/ControlPanel/Info/Caption",
"text": "Info"
},
"$:/language/ControlPanel/Info/Hint": {
"title": "$:/language/ControlPanel/Info/Hint",
"text": "Information about this TiddlyWiki"
},
"$:/language/ControlPanel/LoadedModules/Caption": {
"title": "$:/language/ControlPanel/LoadedModules/Caption",
"text": "Loaded Modules"
},
"$:/language/ControlPanel/LoadedModules/Hint": {
"title": "$:/language/ControlPanel/LoadedModules/Hint",
"text": "These are the currently loaded tiddler modules linked to their source tiddlers. Any italicised modules lack a source tiddler, typically because they were setup during the boot process."
},
"$:/language/ControlPanel/Palette/Caption": {
"title": "$:/language/ControlPanel/Palette/Caption",
"text": "Palette"
},
"$:/language/ControlPanel/Palette/Editor/Clone/Caption": {
"title": "$:/language/ControlPanel/Palette/Editor/Clone/Caption",
"text": "clone"
},
"$:/language/ControlPanel/Palette/Editor/Clone/Prompt": {
"title": "$:/language/ControlPanel/Palette/Editor/Clone/Prompt",
"text": "It is recommended that you clone this shadow palette before editing it"
},
"$:/language/ControlPanel/Palette/Editor/Prompt/Modified": {
"title": "$:/language/ControlPanel/Palette/Editor/Prompt/Modified",
"text": "This shadow palette has been modified"
},
"$:/language/ControlPanel/Palette/Editor/Prompt": {
"title": "$:/language/ControlPanel/Palette/Editor/Prompt",
"text": "Editing"
},
"$:/language/ControlPanel/Palette/Editor/Reset/Caption": {
"title": "$:/language/ControlPanel/Palette/Editor/Reset/Caption",
"text": "reset"
},
"$:/language/ControlPanel/Palette/HideEditor/Caption": {
"title": "$:/language/ControlPanel/Palette/HideEditor/Caption",
"text": "hide editor"
},
"$:/language/ControlPanel/Palette/Prompt": {
"title": "$:/language/ControlPanel/Palette/Prompt",
"text": "Current palette:"
},
"$:/language/ControlPanel/Palette/ShowEditor/Caption": {
"title": "$:/language/ControlPanel/Palette/ShowEditor/Caption",
"text": "show editor"
},
"$:/language/ControlPanel/Parsing/Caption": {
"title": "$:/language/ControlPanel/Parsing/Caption",
"text": "Parsing"
},
"$:/language/ControlPanel/Parsing/Hint": {
"title": "$:/language/ControlPanel/Parsing/Hint",
"text": "Here you can globally disable individual wiki parser rules. Take care as disabling some parser rules can prevent ~TiddlyWiki functioning correctly (you can restore normal operation with [[safe mode|http://tiddlywiki.com/#SafeMode]] )"
},
"$:/language/ControlPanel/Parsing/Block/Caption": {
"title": "$:/language/ControlPanel/Parsing/Block/Caption",
"text": "Block Parse Rules"
},
"$:/language/ControlPanel/Parsing/Inline/Caption": {
"title": "$:/language/ControlPanel/Parsing/Inline/Caption",
"text": "Inline Parse Rules"
},
"$:/language/ControlPanel/Parsing/Pragma/Caption": {
"title": "$:/language/ControlPanel/Parsing/Pragma/Caption",
"text": "Pragma Parse Rules"
},
"$:/language/ControlPanel/Plugins/Add/Hint": {
"title": "$:/language/ControlPanel/Plugins/Add/Hint",
"text": "Install plugins from the official library"
},
"$:/language/ControlPanel/Plugins/Add/Caption": {
"title": "$:/language/ControlPanel/Plugins/Add/Caption",
"text": "Get more plugins"
},
"$:/language/ControlPanel/Plugins/Caption": {
"title": "$:/language/ControlPanel/Plugins/Caption",
"text": "Plugins"
},
"$:/language/ControlPanel/Plugins/Disable/Caption": {
"title": "$:/language/ControlPanel/Plugins/Disable/Caption",
"text": "disable"
},
"$:/language/ControlPanel/Plugins/Disable/Hint": {
"title": "$:/language/ControlPanel/Plugins/Disable/Hint",
"text": "Disable this plugin when reloading page"
},
"$:/language/ControlPanel/Plugins/Disabled/Status": {
"title": "$:/language/ControlPanel/Plugins/Disabled/Status",
"text": "(disabled)"
},
"$:/language/ControlPanel/Plugins/Empty/Hint": {
"title": "$:/language/ControlPanel/Plugins/Empty/Hint",
"text": "None"
},
"$:/language/ControlPanel/Plugins/Enable/Caption": {
"title": "$:/language/ControlPanel/Plugins/Enable/Caption",
"text": "enable"
},
"$:/language/ControlPanel/Plugins/Enable/Hint": {
"title": "$:/language/ControlPanel/Plugins/Enable/Hint",
"text": "Enable this plugin when reloading page"
},
"$:/language/ControlPanel/Plugins/Install": {
"title": "$:/language/ControlPanel/Plugins/Install",
"text": "install"
},
"$:/language/ControlPanel/Plugins/Installed/Hint": {
"title": "$:/language/ControlPanel/Plugins/Installed/Hint",
"text": "Currently installed plugins:"
},
"$:/language/ControlPanel/Plugins/Languages/Caption": {
"title": "$:/language/ControlPanel/Plugins/Languages/Caption",
"text": "Languages"
},
"$:/language/ControlPanel/Plugins/Languages/Hint": {
"title": "$:/language/ControlPanel/Plugins/Languages/Hint",
"text": "Language pack plugins"
},
"$:/language/ControlPanel/Plugins/OpenPluginLibrary": {
"title": "$:/language/ControlPanel/Plugins/OpenPluginLibrary",
"text": "open plugin library"
},
"$:/language/ControlPanel/Plugins/Plugins/Caption": {
"title": "$:/language/ControlPanel/Plugins/Plugins/Caption",
"text": "Plugins"
},
"$:/language/ControlPanel/Plugins/Plugins/Hint": {
"title": "$:/language/ControlPanel/Plugins/Plugins/Hint",
"text": "Plugins"
},
"$:/language/ControlPanel/Plugins/Reinstall": {
"title": "$:/language/ControlPanel/Plugins/Reinstall",
"text": "reinstall"
},
"$:/language/ControlPanel/Plugins/Themes/Caption": {
"title": "$:/language/ControlPanel/Plugins/Themes/Caption",
"text": "Themes"
},
"$:/language/ControlPanel/Plugins/Themes/Hint": {
"title": "$:/language/ControlPanel/Plugins/Themes/Hint",
"text": "Theme plugins"
},
"$:/language/ControlPanel/Saving/Caption": {
"title": "$:/language/ControlPanel/Saving/Caption",
"text": "Saving"
},
"$:/language/ControlPanel/Saving/Heading": {
"title": "$:/language/ControlPanel/Saving/Heading",
"text": "Saving"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Advanced/Heading": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Advanced/Heading",
"text": "Advanced Settings"
},
"$:/language/ControlPanel/Saving/TiddlySpot/BackupDir": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/BackupDir",
"text": "Backup Directory"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Backups": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Backups",
"text": "Backups"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Description": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Description",
"text": "These settings are only used when saving to http://tiddlyspot.com or a compatible remote server"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Filename": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Filename",
"text": "Upload Filename"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Heading": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Heading",
"text": "~TiddlySpot"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Hint": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Hint",
"text": "//The server URL defaults to `http://<wikiname>.tiddlyspot.com/store.cgi` and can be changed to use a custom server address, e.g. `http://example.com/store.php`.//"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Password": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Password",
"text": "Password"
},
"$:/language/ControlPanel/Saving/TiddlySpot/ServerURL": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/ServerURL",
"text": "Server URL"
},
"$:/language/ControlPanel/Saving/TiddlySpot/UploadDir": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/UploadDir",
"text": "Upload Directory"
},
"$:/language/ControlPanel/Saving/TiddlySpot/UserName": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/UserName",
"text": "Wiki Name"
},
"$:/language/ControlPanel/Settings/AutoSave/Caption": {
"title": "$:/language/ControlPanel/Settings/AutoSave/Caption",
"text": "Autosave"
},
"$:/language/ControlPanel/Settings/AutoSave/Disabled/Description": {
"title": "$:/language/ControlPanel/Settings/AutoSave/Disabled/Description",
"text": "Do not save changes automatically"
},
"$:/language/ControlPanel/Settings/AutoSave/Enabled/Description": {
"title": "$:/language/ControlPanel/Settings/AutoSave/Enabled/Description",
"text": "Save changes automatically"
},
"$:/language/ControlPanel/Settings/AutoSave/Hint": {
"title": "$:/language/ControlPanel/Settings/AutoSave/Hint",
"text": "Automatically save changes during editing"
},
"$:/language/ControlPanel/Settings/CamelCase/Caption": {
"title": "$:/language/ControlPanel/Settings/CamelCase/Caption",
"text": "Camel Case Wiki Links"
},
"$:/language/ControlPanel/Settings/CamelCase/Hint": {
"title": "$:/language/ControlPanel/Settings/CamelCase/Hint",
"text": "You can globally disable automatic linking of ~CamelCase phrases. Requires reload to take effect"
},
"$:/language/ControlPanel/Settings/CamelCase/Description": {
"title": "$:/language/ControlPanel/Settings/CamelCase/Description",
"text": "Enable automatic ~CamelCase linking"
},
"$:/language/ControlPanel/Settings/Caption": {
"title": "$:/language/ControlPanel/Settings/Caption",
"text": "Settings"
},
"$:/language/ControlPanel/Settings/Hint": {
"title": "$:/language/ControlPanel/Settings/Hint",
"text": "These settings let you customise the behaviour of TiddlyWiki."
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/Caption": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/Caption",
"text": "Navigation Address Bar"
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/Hint": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/Hint",
"text": "Behaviour of the browser address bar when navigating to a tiddler:"
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/No/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/No/Description",
"text": "Do not update the address bar"
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/Permalink/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/Permalink/Description",
"text": "Include the target tiddler"
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/Permaview/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/Permaview/Description",
"text": "Include the target tiddler and the current story sequence"
},
"$:/language/ControlPanel/Settings/NavigationHistory/Caption": {
"title": "$:/language/ControlPanel/Settings/NavigationHistory/Caption",
"text": "Navigation History"
},
"$:/language/ControlPanel/Settings/NavigationHistory/Hint": {
"title": "$:/language/ControlPanel/Settings/NavigationHistory/Hint",
"text": "Update browser history when navigating to a tiddler:"
},
"$:/language/ControlPanel/Settings/NavigationHistory/No/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationHistory/No/Description",
"text": "Do not update history"
},
"$:/language/ControlPanel/Settings/NavigationHistory/Yes/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationHistory/Yes/Description",
"text": "Update history"
},
"$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption": {
"title": "$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption",
"text": "Performance Instrumentation"
},
"$:/language/ControlPanel/Settings/PerformanceInstrumentation/Hint": {
"title": "$:/language/ControlPanel/Settings/PerformanceInstrumentation/Hint",
"text": "Displays performance statistics in the browser developer console. Requires reload to take effect"
},
"$:/language/ControlPanel/Settings/PerformanceInstrumentation/Description": {
"title": "$:/language/ControlPanel/Settings/PerformanceInstrumentation/Description",
"text": "Enable performance instrumentation"
},
"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption",
"text": "Toolbar Button Style"
},
"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Hint": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtonStyle/Hint",
"text": "Choose the style for toolbar buttons:"
},
"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Borderless": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Borderless",
"text": "Borderless"
},
"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Boxed": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Boxed",
"text": "Boxed"
},
"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Rounded": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Rounded",
"text": "Rounded"
},
"$:/language/ControlPanel/Settings/ToolbarButtons/Caption": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtons/Caption",
"text": "Toolbar Buttons"
},
"$:/language/ControlPanel/Settings/ToolbarButtons/Hint": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtons/Hint",
"text": "Default toolbar button appearance:"
},
"$:/language/ControlPanel/Settings/ToolbarButtons/Icons/Description": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtons/Icons/Description",
"text": "Include icon"
},
"$:/language/ControlPanel/Settings/ToolbarButtons/Text/Description": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtons/Text/Description",
"text": "Include text"
},
"$:/language/ControlPanel/Settings/DefaultSidebarTab/Caption": {
"title": "$:/language/ControlPanel/Settings/DefaultSidebarTab/Caption",
"text": "Default Sidebar Tab"
},
"$:/language/ControlPanel/Settings/DefaultSidebarTab/Hint": {
"title": "$:/language/ControlPanel/Settings/DefaultSidebarTab/Hint",
"text": "Specify which sidebar tab is displayed by default"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/Caption": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/Caption",
"text": "Tiddler Opening Behaviour"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/InsideRiver/Hint": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/InsideRiver/Hint",
"text": "Navigation from //within// the story river"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/OutsideRiver/Hint": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/OutsideRiver/Hint",
"text": "Navigation from //outside// the story river"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAbove": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAbove",
"text": "Open above the current tiddler"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenBelow": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/OpenBelow",
"text": "Open below the current tiddler"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAtTop": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAtTop",
"text": "Open at the top of the story river"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAtBottom": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAtBottom",
"text": "Open at the bottom of the story river"
},
"$:/language/ControlPanel/Settings/TitleLinks/Caption": {
"title": "$:/language/ControlPanel/Settings/TitleLinks/Caption",
"text": "Tiddler Titles"
},
"$:/language/ControlPanel/Settings/TitleLinks/Hint": {
"title": "$:/language/ControlPanel/Settings/TitleLinks/Hint",
"text": "Optionally display tiddler titles as links"
},
"$:/language/ControlPanel/Settings/TitleLinks/No/Description": {
"title": "$:/language/ControlPanel/Settings/TitleLinks/No/Description",
"text": "Do not display tiddler titles as links"
},
"$:/language/ControlPanel/Settings/TitleLinks/Yes/Description": {
"title": "$:/language/ControlPanel/Settings/TitleLinks/Yes/Description",
"text": "Display tiddler titles as links"
},
"$:/language/ControlPanel/StoryView/Caption": {
"title": "$:/language/ControlPanel/StoryView/Caption",
"text": "Story View"
},
"$:/language/ControlPanel/StoryView/Prompt": {
"title": "$:/language/ControlPanel/StoryView/Prompt",
"text": "Current view:"
},
"$:/language/ControlPanel/Theme/Caption": {
"title": "$:/language/ControlPanel/Theme/Caption",
"text": "Theme"
},
"$:/language/ControlPanel/Theme/Prompt": {
"title": "$:/language/ControlPanel/Theme/Prompt",
"text": "Current theme:"
},
"$:/language/ControlPanel/TiddlerFields/Caption": {
"title": "$:/language/ControlPanel/TiddlerFields/Caption",
"text": "Tiddler Fields"
},
"$:/language/ControlPanel/TiddlerFields/Hint": {
"title": "$:/language/ControlPanel/TiddlerFields/Hint",
"text": "This is the full set of TiddlerFields in use in this wiki (including system tiddlers but excluding shadow tiddlers)."
},
"$:/language/ControlPanel/Toolbars/Caption": {
"title": "$:/language/ControlPanel/Toolbars/Caption",
"text": "Toolbars"
},
"$:/language/ControlPanel/Toolbars/EditToolbar/Caption": {
"title": "$:/language/ControlPanel/Toolbars/EditToolbar/Caption",
"text": "Edit Toolbar"
},
"$:/language/ControlPanel/Toolbars/EditToolbar/Hint": {
"title": "$:/language/ControlPanel/Toolbars/EditToolbar/Hint",
"text": "Choose which buttons are displayed for tiddlers in edit mode"
},
"$:/language/ControlPanel/Toolbars/Hint": {
"title": "$:/language/ControlPanel/Toolbars/Hint",
"text": "Select which toolbar buttons are displayed"
},
"$:/language/ControlPanel/Toolbars/PageControls/Caption": {
"title": "$:/language/ControlPanel/Toolbars/PageControls/Caption",
"text": "Page Toolbar"
},
"$:/language/ControlPanel/Toolbars/PageControls/Hint": {
"title": "$:/language/ControlPanel/Toolbars/PageControls/Hint",
"text": "Choose which buttons are displayed on the main page toolbar"
},
"$:/language/ControlPanel/Toolbars/ViewToolbar/Caption": {
"title": "$:/language/ControlPanel/Toolbars/ViewToolbar/Caption",
"text": "View Toolbar"
},
"$:/language/ControlPanel/Toolbars/ViewToolbar/Hint": {
"title": "$:/language/ControlPanel/Toolbars/ViewToolbar/Hint",
"text": "Choose which buttons are displayed for tiddlers in view mode"
},
"$:/language/ControlPanel/Tools/Download/Full/Caption": {
"title": "$:/language/ControlPanel/Tools/Download/Full/Caption",
"text": "Download full wiki"
},
"$:/language/Date/DaySuffix/1": {
"title": "$:/language/Date/DaySuffix/1",
"text": "st"
},
"$:/language/Date/DaySuffix/2": {
"title": "$:/language/Date/DaySuffix/2",
"text": "nd"
},
"$:/language/Date/DaySuffix/3": {
"title": "$:/language/Date/DaySuffix/3",
"text": "rd"
},
"$:/language/Date/DaySuffix/4": {
"title": "$:/language/Date/DaySuffix/4",
"text": "th"
},
"$:/language/Date/DaySuffix/5": {
"title": "$:/language/Date/DaySuffix/5",
"text": "th"
},
"$:/language/Date/DaySuffix/6": {
"title": "$:/language/Date/DaySuffix/6",
"text": "th"
},
"$:/language/Date/DaySuffix/7": {
"title": "$:/language/Date/DaySuffix/7",
"text": "th"
},
"$:/language/Date/DaySuffix/8": {
"title": "$:/language/Date/DaySuffix/8",
"text": "th"
},
"$:/language/Date/DaySuffix/9": {
"title": "$:/language/Date/DaySuffix/9",
"text": "th"
},
"$:/language/Date/DaySuffix/10": {
"title": "$:/language/Date/DaySuffix/10",
"text": "th"
},
"$:/language/Date/DaySuffix/11": {
"title": "$:/language/Date/DaySuffix/11",
"text": "th"
},
"$:/language/Date/DaySuffix/12": {
"title": "$:/language/Date/DaySuffix/12",
"text": "th"
},
"$:/language/Date/DaySuffix/13": {
"title": "$:/language/Date/DaySuffix/13",
"text": "th"
},
"$:/language/Date/DaySuffix/14": {
"title": "$:/language/Date/DaySuffix/14",
"text": "th"
},
"$:/language/Date/DaySuffix/15": {
"title": "$:/language/Date/DaySuffix/15",
"text": "th"
},
"$:/language/Date/DaySuffix/16": {
"title": "$:/language/Date/DaySuffix/16",
"text": "th"
},
"$:/language/Date/DaySuffix/17": {
"title": "$:/language/Date/DaySuffix/17",
"text": "th"
},
"$:/language/Date/DaySuffix/18": {
"title": "$:/language/Date/DaySuffix/18",
"text": "th"
},
"$:/language/Date/DaySuffix/19": {
"title": "$:/language/Date/DaySuffix/19",
"text": "th"
},
"$:/language/Date/DaySuffix/20": {
"title": "$:/language/Date/DaySuffix/20",
"text": "th"
},
"$:/language/Date/DaySuffix/21": {
"title": "$:/language/Date/DaySuffix/21",
"text": "st"
},
"$:/language/Date/DaySuffix/22": {
"title": "$:/language/Date/DaySuffix/22",
"text": "nd"
},
"$:/language/Date/DaySuffix/23": {
"title": "$:/language/Date/DaySuffix/23",
"text": "rd"
},
"$:/language/Date/DaySuffix/24": {
"title": "$:/language/Date/DaySuffix/24",
"text": "th"
},
"$:/language/Date/DaySuffix/25": {
"title": "$:/language/Date/DaySuffix/25",
"text": "th"
},
"$:/language/Date/DaySuffix/26": {
"title": "$:/language/Date/DaySuffix/26",
"text": "th"
},
"$:/language/Date/DaySuffix/27": {
"title": "$:/language/Date/DaySuffix/27",
"text": "th"
},
"$:/language/Date/DaySuffix/28": {
"title": "$:/language/Date/DaySuffix/28",
"text": "th"
},
"$:/language/Date/DaySuffix/29": {
"title": "$:/language/Date/DaySuffix/29",
"text": "th"
},
"$:/language/Date/DaySuffix/30": {
"title": "$:/language/Date/DaySuffix/30",
"text": "th"
},
"$:/language/Date/DaySuffix/31": {
"title": "$:/language/Date/DaySuffix/31",
"text": "st"
},
"$:/language/Date/Long/Day/0": {
"title": "$:/language/Date/Long/Day/0",
"text": "Sunday"
},
"$:/language/Date/Long/Day/1": {
"title": "$:/language/Date/Long/Day/1",
"text": "Monday"
},
"$:/language/Date/Long/Day/2": {
"title": "$:/language/Date/Long/Day/2",
"text": "Tuesday"
},
"$:/language/Date/Long/Day/3": {
"title": "$:/language/Date/Long/Day/3",
"text": "Wednesday"
},
"$:/language/Date/Long/Day/4": {
"title": "$:/language/Date/Long/Day/4",
"text": "Thursday"
},
"$:/language/Date/Long/Day/5": {
"title": "$:/language/Date/Long/Day/5",
"text": "Friday"
},
"$:/language/Date/Long/Day/6": {
"title": "$:/language/Date/Long/Day/6",
"text": "Saturday"
},
"$:/language/Date/Long/Month/1": {
"title": "$:/language/Date/Long/Month/1",
"text": "January"
},
"$:/language/Date/Long/Month/2": {
"title": "$:/language/Date/Long/Month/2",
"text": "February"
},
"$:/language/Date/Long/Month/3": {
"title": "$:/language/Date/Long/Month/3",
"text": "March"
},
"$:/language/Date/Long/Month/4": {
"title": "$:/language/Date/Long/Month/4",
"text": "April"
},
"$:/language/Date/Long/Month/5": {
"title": "$:/language/Date/Long/Month/5",
"text": "May"
},
"$:/language/Date/Long/Month/6": {
"title": "$:/language/Date/Long/Month/6",
"text": "June"
},
"$:/language/Date/Long/Month/7": {
"title": "$:/language/Date/Long/Month/7",
"text": "July"
},
"$:/language/Date/Long/Month/8": {
"title": "$:/language/Date/Long/Month/8",
"text": "August"
},
"$:/language/Date/Long/Month/9": {
"title": "$:/language/Date/Long/Month/9",
"text": "September"
},
"$:/language/Date/Long/Month/10": {
"title": "$:/language/Date/Long/Month/10",
"text": "October"
},
"$:/language/Date/Long/Month/11": {
"title": "$:/language/Date/Long/Month/11",
"text": "November"
},
"$:/language/Date/Long/Month/12": {
"title": "$:/language/Date/Long/Month/12",
"text": "December"
},
"$:/language/Date/Period/am": {
"title": "$:/language/Date/Period/am",
"text": "am"
},
"$:/language/Date/Period/pm": {
"title": "$:/language/Date/Period/pm",
"text": "pm"
},
"$:/language/Date/Short/Day/0": {
"title": "$:/language/Date/Short/Day/0",
"text": "Sun"
},
"$:/language/Date/Short/Day/1": {
"title": "$:/language/Date/Short/Day/1",
"text": "Mon"
},
"$:/language/Date/Short/Day/2": {
"title": "$:/language/Date/Short/Day/2",
"text": "Tue"
},
"$:/language/Date/Short/Day/3": {
"title": "$:/language/Date/Short/Day/3",
"text": "Wed"
},
"$:/language/Date/Short/Day/4": {
"title": "$:/language/Date/Short/Day/4",
"text": "Thu"
},
"$:/language/Date/Short/Day/5": {
"title": "$:/language/Date/Short/Day/5",
"text": "Fri"
},
"$:/language/Date/Short/Day/6": {
"title": "$:/language/Date/Short/Day/6",
"text": "Sat"
},
"$:/language/Date/Short/Month/1": {
"title": "$:/language/Date/Short/Month/1",
"text": "Jan"
},
"$:/language/Date/Short/Month/2": {
"title": "$:/language/Date/Short/Month/2",
"text": "Feb"
},
"$:/language/Date/Short/Month/3": {
"title": "$:/language/Date/Short/Month/3",
"text": "Mar"
},
"$:/language/Date/Short/Month/4": {
"title": "$:/language/Date/Short/Month/4",
"text": "Apr"
},
"$:/language/Date/Short/Month/5": {
"title": "$:/language/Date/Short/Month/5",
"text": "May"
},
"$:/language/Date/Short/Month/6": {
"title": "$:/language/Date/Short/Month/6",
"text": "Jun"
},
"$:/language/Date/Short/Month/7": {
"title": "$:/language/Date/Short/Month/7",
"text": "Jul"
},
"$:/language/Date/Short/Month/8": {
"title": "$:/language/Date/Short/Month/8",
"text": "Aug"
},
"$:/language/Date/Short/Month/9": {
"title": "$:/language/Date/Short/Month/9",
"text": "Sep"
},
"$:/language/Date/Short/Month/10": {
"title": "$:/language/Date/Short/Month/10",
"text": "Oct"
},
"$:/language/Date/Short/Month/11": {
"title": "$:/language/Date/Short/Month/11",
"text": "Nov"
},
"$:/language/Date/Short/Month/12": {
"title": "$:/language/Date/Short/Month/12",
"text": "Dec"
},
"$:/language/RelativeDate/Future/Days": {
"title": "$:/language/RelativeDate/Future/Days",
"text": "<<period>> days from now"
},
"$:/language/RelativeDate/Future/Hours": {
"title": "$:/language/RelativeDate/Future/Hours",
"text": "<<period>> hours from now"
},
"$:/language/RelativeDate/Future/Minutes": {
"title": "$:/language/RelativeDate/Future/Minutes",
"text": "<<period>> minutes from now"
},
"$:/language/RelativeDate/Future/Months": {
"title": "$:/language/RelativeDate/Future/Months",
"text": "<<period>> months from now"
},
"$:/language/RelativeDate/Future/Second": {
"title": "$:/language/RelativeDate/Future/Second",
"text": "1 second from now"
},
"$:/language/RelativeDate/Future/Seconds": {
"title": "$:/language/RelativeDate/Future/Seconds",
"text": "<<period>> seconds from now"
},
"$:/language/RelativeDate/Future/Years": {
"title": "$:/language/RelativeDate/Future/Years",
"text": "<<period>> years from now"
},
"$:/language/RelativeDate/Past/Days": {
"title": "$:/language/RelativeDate/Past/Days",
"text": "<<period>> days ago"
},
"$:/language/RelativeDate/Past/Hours": {
"title": "$:/language/RelativeDate/Past/Hours",
"text": "<<period>> hours ago"
},
"$:/language/RelativeDate/Past/Minutes": {
"title": "$:/language/RelativeDate/Past/Minutes",
"text": "<<period>> minutes ago"
},
"$:/language/RelativeDate/Past/Months": {
"title": "$:/language/RelativeDate/Past/Months",
"text": "<<period>> months ago"
},
"$:/language/RelativeDate/Past/Second": {
"title": "$:/language/RelativeDate/Past/Second",
"text": "1 second ago"
},
"$:/language/RelativeDate/Past/Seconds": {
"title": "$:/language/RelativeDate/Past/Seconds",
"text": "<<period>> seconds ago"
},
"$:/language/RelativeDate/Past/Years": {
"title": "$:/language/RelativeDate/Past/Years",
"text": "<<period>> years ago"
},
"$:/language/Docs/ModuleTypes/animation": {
"title": "$:/language/Docs/ModuleTypes/animation",
"text": "Animations that may be used with the RevealWidget."
},
"$:/language/Docs/ModuleTypes/command": {
"title": "$:/language/Docs/ModuleTypes/command",
"text": "Commands that can be executed under Node.js."
},
"$:/language/Docs/ModuleTypes/config": {
"title": "$:/language/Docs/ModuleTypes/config",
"text": "Data to be inserted into `$tw.config`."
},
"$:/language/Docs/ModuleTypes/filteroperator": {
"title": "$:/language/Docs/ModuleTypes/filteroperator",
"text": "Individual filter operator methods."
},
"$:/language/Docs/ModuleTypes/global": {
"title": "$:/language/Docs/ModuleTypes/global",
"text": "Global data to be inserted into `$tw`."
},
"$:/language/Docs/ModuleTypes/isfilteroperator": {
"title": "$:/language/Docs/ModuleTypes/isfilteroperator",
"text": "Operands for the ''is'' filter operator."
},
"$:/language/Docs/ModuleTypes/macro": {
"title": "$:/language/Docs/ModuleTypes/macro",
"text": "JavaScript macro definitions."
},
"$:/language/Docs/ModuleTypes/parser": {
"title": "$:/language/Docs/ModuleTypes/parser",
"text": "Parsers for different content types."
},
"$:/language/Docs/ModuleTypes/saver": {
"title": "$:/language/Docs/ModuleTypes/saver",
"text": "Savers handle different methods for saving files from the browser."
},
"$:/language/Docs/ModuleTypes/startup": {
"title": "$:/language/Docs/ModuleTypes/startup",
"text": "Startup functions."
},
"$:/language/Docs/ModuleTypes/storyview": {
"title": "$:/language/Docs/ModuleTypes/storyview",
"text": "Story views customise the animation and behaviour of list widgets."
},
"$:/language/Docs/ModuleTypes/tiddlerdeserializer": {
"title": "$:/language/Docs/ModuleTypes/tiddlerdeserializer",
"text": "Converts different content types into tiddlers."
},
"$:/language/Docs/ModuleTypes/tiddlerfield": {
"title": "$:/language/Docs/ModuleTypes/tiddlerfield",
"text": "Defines the behaviour of an individual tiddler field."
},
"$:/language/Docs/ModuleTypes/tiddlermethod": {
"title": "$:/language/Docs/ModuleTypes/tiddlermethod",
"text": "Adds methods to the `$tw.Tiddler` prototype."
},
"$:/language/Docs/ModuleTypes/upgrader": {
"title": "$:/language/Docs/ModuleTypes/upgrader",
"text": "Applies upgrade processing to tiddlers during an upgrade/import."
},
"$:/language/Docs/ModuleTypes/utils": {
"title": "$:/language/Docs/ModuleTypes/utils",
"text": "Adds methods to `$tw.utils`."
},
"$:/language/Docs/ModuleTypes/utils-node": {
"title": "$:/language/Docs/ModuleTypes/utils-node",
"text": "Adds Node.js-specific methods to `$tw.utils`."
},
"$:/language/Docs/ModuleTypes/widget": {
"title": "$:/language/Docs/ModuleTypes/widget",
"text": "Widgets encapsulate DOM rendering and refreshing."
},
"$:/language/Docs/ModuleTypes/wikimethod": {
"title": "$:/language/Docs/ModuleTypes/wikimethod",
"text": "Adds methods to `$tw.Wiki`."
},
"$:/language/Docs/ModuleTypes/wikirule": {
"title": "$:/language/Docs/ModuleTypes/wikirule",
"text": "Individual parser rules for the main WikiText parser."
},
"$:/language/Docs/PaletteColours/alert-background": {
"title": "$:/language/Docs/PaletteColours/alert-background",
"text": "Alert background"
},
"$:/language/Docs/PaletteColours/alert-border": {
"title": "$:/language/Docs/PaletteColours/alert-border",
"text": "Alert border"
},
"$:/language/Docs/PaletteColours/alert-highlight": {
"title": "$:/language/Docs/PaletteColours/alert-highlight",
"text": "Alert highlight"
},
"$:/language/Docs/PaletteColours/alert-muted-foreground": {
"title": "$:/language/Docs/PaletteColours/alert-muted-foreground",
"text": "Alert muted foreground"
},
"$:/language/Docs/PaletteColours/background": {
"title": "$:/language/Docs/PaletteColours/background",
"text": "General background"
},
"$:/language/Docs/PaletteColours/blockquote-bar": {
"title": "$:/language/Docs/PaletteColours/blockquote-bar",
"text": "Blockquote bar"
},
"$:/language/Docs/PaletteColours/button-background": {
"title": "$:/language/Docs/PaletteColours/button-background",
"text": "Default button background"
},
"$:/language/Docs/PaletteColours/button-border": {
"title": "$:/language/Docs/PaletteColours/button-border",
"text": "Default button border"
},
"$:/language/Docs/PaletteColours/button-foreground": {
"title": "$:/language/Docs/PaletteColours/button-foreground",
"text": "Default button foreground"
},
"$:/language/Docs/PaletteColours/dirty-indicator": {
"title": "$:/language/Docs/PaletteColours/dirty-indicator",
"text": "Unsaved changes indicator"
},
"$:/language/Docs/PaletteColours/code-background": {
"title": "$:/language/Docs/PaletteColours/code-background",
"text": "Code background"
},
"$:/language/Docs/PaletteColours/code-border": {
"title": "$:/language/Docs/PaletteColours/code-border",
"text": "Code border"
},
"$:/language/Docs/PaletteColours/code-foreground": {
"title": "$:/language/Docs/PaletteColours/code-foreground",
"text": "Code foreground"
},
"$:/language/Docs/PaletteColours/download-background": {
"title": "$:/language/Docs/PaletteColours/download-background",
"text": "Download button background"
},
"$:/language/Docs/PaletteColours/download-foreground": {
"title": "$:/language/Docs/PaletteColours/download-foreground",
"text": "Download button foreground"
},
"$:/language/Docs/PaletteColours/dragger-background": {
"title": "$:/language/Docs/PaletteColours/dragger-background",
"text": "Dragger background"
},
"$:/language/Docs/PaletteColours/dragger-foreground": {
"title": "$:/language/Docs/PaletteColours/dragger-foreground",
"text": "Dragger foreground"
},
"$:/language/Docs/PaletteColours/dropdown-background": {
"title": "$:/language/Docs/PaletteColours/dropdown-background",
"text": "Dropdown background"
},
"$:/language/Docs/PaletteColours/dropdown-border": {
"title": "$:/language/Docs/PaletteColours/dropdown-border",
"text": "Dropdown border"
},
"$:/language/Docs/PaletteColours/dropdown-tab-background-selected": {
"title": "$:/language/Docs/PaletteColours/dropdown-tab-background-selected",
"text": "Dropdown tab background for selected tabs"
},
"$:/language/Docs/PaletteColours/dropdown-tab-background": {
"title": "$:/language/Docs/PaletteColours/dropdown-tab-background",
"text": "Dropdown tab background"
},
"$:/language/Docs/PaletteColours/dropzone-background": {
"title": "$:/language/Docs/PaletteColours/dropzone-background",
"text": "Dropzone background"
},
"$:/language/Docs/PaletteColours/external-link-background-hover": {
"title": "$:/language/Docs/PaletteColours/external-link-background-hover",
"text": "External link background hover"
},
"$:/language/Docs/PaletteColours/external-link-background-visited": {
"title": "$:/language/Docs/PaletteColours/external-link-background-visited",
"text": "External link background visited"
},
"$:/language/Docs/PaletteColours/external-link-background": {
"title": "$:/language/Docs/PaletteColours/external-link-background",
"text": "External link background"
},
"$:/language/Docs/PaletteColours/external-link-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/external-link-foreground-hover",
"text": "External link foreground hover"
},
"$:/language/Docs/PaletteColours/external-link-foreground-visited": {
"title": "$:/language/Docs/PaletteColours/external-link-foreground-visited",
"text": "External link foreground visited"
},
"$:/language/Docs/PaletteColours/external-link-foreground": {
"title": "$:/language/Docs/PaletteColours/external-link-foreground",
"text": "External link foreground"
},
"$:/language/Docs/PaletteColours/foreground": {
"title": "$:/language/Docs/PaletteColours/foreground",
"text": "General foreground"
},
"$:/language/Docs/PaletteColours/message-background": {
"title": "$:/language/Docs/PaletteColours/message-background",
"text": "Message box background"
},
"$:/language/Docs/PaletteColours/message-border": {
"title": "$:/language/Docs/PaletteColours/message-border",
"text": "Message box border"
},
"$:/language/Docs/PaletteColours/message-foreground": {
"title": "$:/language/Docs/PaletteColours/message-foreground",
"text": "Message box foreground"
},
"$:/language/Docs/PaletteColours/modal-backdrop": {
"title": "$:/language/Docs/PaletteColours/modal-backdrop",
"text": "Modal backdrop"
},
"$:/language/Docs/PaletteColours/modal-background": {
"title": "$:/language/Docs/PaletteColours/modal-background",
"text": "Modal background"
},
"$:/language/Docs/PaletteColours/modal-border": {
"title": "$:/language/Docs/PaletteColours/modal-border",
"text": "Modal border"
},
"$:/language/Docs/PaletteColours/modal-footer-background": {
"title": "$:/language/Docs/PaletteColours/modal-footer-background",
"text": "Modal footer background"
},
"$:/language/Docs/PaletteColours/modal-footer-border": {
"title": "$:/language/Docs/PaletteColours/modal-footer-border",
"text": "Modal footer border"
},
"$:/language/Docs/PaletteColours/modal-header-border": {
"title": "$:/language/Docs/PaletteColours/modal-header-border",
"text": "Modal header border"
},
"$:/language/Docs/PaletteColours/muted-foreground": {
"title": "$:/language/Docs/PaletteColours/muted-foreground",
"text": "General muted foreground"
},
"$:/language/Docs/PaletteColours/notification-background": {
"title": "$:/language/Docs/PaletteColours/notification-background",
"text": "Notification background"
},
"$:/language/Docs/PaletteColours/notification-border": {
"title": "$:/language/Docs/PaletteColours/notification-border",
"text": "Notification border"
},
"$:/language/Docs/PaletteColours/page-background": {
"title": "$:/language/Docs/PaletteColours/page-background",
"text": "Page background"
},
"$:/language/Docs/PaletteColours/pre-background": {
"title": "$:/language/Docs/PaletteColours/pre-background",
"text": "Preformatted code background"
},
"$:/language/Docs/PaletteColours/pre-border": {
"title": "$:/language/Docs/PaletteColours/pre-border",
"text": "Preformatted code border"
},
"$:/language/Docs/PaletteColours/primary": {
"title": "$:/language/Docs/PaletteColours/primary",
"text": "General primary"
},
"$:/language/Docs/PaletteColours/sidebar-button-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-button-foreground",
"text": "Sidebar button foreground"
},
"$:/language/Docs/PaletteColours/sidebar-controls-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/sidebar-controls-foreground-hover",
"text": "Sidebar controls foreground hover"
},
"$:/language/Docs/PaletteColours/sidebar-controls-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-controls-foreground",
"text": "Sidebar controls foreground"
},
"$:/language/Docs/PaletteColours/sidebar-foreground-shadow": {
"title": "$:/language/Docs/PaletteColours/sidebar-foreground-shadow",
"text": "Sidebar foreground shadow"
},
"$:/language/Docs/PaletteColours/sidebar-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-foreground",
"text": "Sidebar foreground"
},
"$:/language/Docs/PaletteColours/sidebar-muted-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/sidebar-muted-foreground-hover",
"text": "Sidebar muted foreground hover"
},
"$:/language/Docs/PaletteColours/sidebar-muted-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-muted-foreground",
"text": "Sidebar muted foreground"
},
"$:/language/Docs/PaletteColours/sidebar-tab-background-selected": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-background-selected",
"text": "Sidebar tab background for selected tabs"
},
"$:/language/Docs/PaletteColours/sidebar-tab-background": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-background",
"text": "Sidebar tab background"
},
"$:/language/Docs/PaletteColours/sidebar-tab-border-selected": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-border-selected",
"text": "Sidebar tab border for selected tabs"
},
"$:/language/Docs/PaletteColours/sidebar-tab-border": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-border",
"text": "Sidebar tab border"
},
"$:/language/Docs/PaletteColours/sidebar-tab-divider": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-divider",
"text": "Sidebar tab divider"
},
"$:/language/Docs/PaletteColours/sidebar-tab-foreground-selected": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-foreground-selected",
"text": "Sidebar tab foreground for selected tabs"
},
"$:/language/Docs/PaletteColours/sidebar-tab-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-foreground",
"text": "Sidebar tab foreground"
},
"$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground-hover",
"text": "Sidebar tiddler link foreground hover"
},
"$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground",
"text": "Sidebar tiddler link foreground"
},
"$:/language/Docs/PaletteColours/site-title-foreground": {
"title": "$:/language/Docs/PaletteColours/site-title-foreground",
"text": "Site title foreground"
},
"$:/language/Docs/PaletteColours/static-alert-foreground": {
"title": "$:/language/Docs/PaletteColours/static-alert-foreground",
"text": "Static alert foreground"
},
"$:/language/Docs/PaletteColours/tab-background-selected": {
"title": "$:/language/Docs/PaletteColours/tab-background-selected",
"text": "Tab background for selected tabs"
},
"$:/language/Docs/PaletteColours/tab-background": {
"title": "$:/language/Docs/PaletteColours/tab-background",
"text": "Tab background"
},
"$:/language/Docs/PaletteColours/tab-border-selected": {
"title": "$:/language/Docs/PaletteColours/tab-border-selected",
"text": "Tab border for selected tabs"
},
"$:/language/Docs/PaletteColours/tab-border": {
"title": "$:/language/Docs/PaletteColours/tab-border",
"text": "Tab border"
},
"$:/language/Docs/PaletteColours/tab-divider": {
"title": "$:/language/Docs/PaletteColours/tab-divider",
"text": "Tab divider"
},
"$:/language/Docs/PaletteColours/tab-foreground-selected": {
"title": "$:/language/Docs/PaletteColours/tab-foreground-selected",
"text": "Tab foreground for selected tabs"
},
"$:/language/Docs/PaletteColours/tab-foreground": {
"title": "$:/language/Docs/PaletteColours/tab-foreground",
"text": "Tab foreground"
},
"$:/language/Docs/PaletteColours/table-border": {
"title": "$:/language/Docs/PaletteColours/table-border",
"text": "Table border"
},
"$:/language/Docs/PaletteColours/table-footer-background": {
"title": "$:/language/Docs/PaletteColours/table-footer-background",
"text": "Table footer background"
},
"$:/language/Docs/PaletteColours/table-header-background": {
"title": "$:/language/Docs/PaletteColours/table-header-background",
"text": "Table header background"
},
"$:/language/Docs/PaletteColours/tag-background": {
"title": "$:/language/Docs/PaletteColours/tag-background",
"text": "Tag background"
},
"$:/language/Docs/PaletteColours/tag-foreground": {
"title": "$:/language/Docs/PaletteColours/tag-foreground",
"text": "Tag foreground"
},
"$:/language/Docs/PaletteColours/tiddler-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-background",
"text": "Tiddler background"
},
"$:/language/Docs/PaletteColours/tiddler-border": {
"title": "$:/language/Docs/PaletteColours/tiddler-border",
"text": "Tiddler border"
},
"$:/language/Docs/PaletteColours/tiddler-controls-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/tiddler-controls-foreground-hover",
"text": "Tiddler controls foreground hover"
},
"$:/language/Docs/PaletteColours/tiddler-controls-foreground-selected": {
"title": "$:/language/Docs/PaletteColours/tiddler-controls-foreground-selected",
"text": "Tiddler controls foreground for selected controls"
},
"$:/language/Docs/PaletteColours/tiddler-controls-foreground": {
"title": "$:/language/Docs/PaletteColours/tiddler-controls-foreground",
"text": "Tiddler controls foreground"
},
"$:/language/Docs/PaletteColours/tiddler-editor-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-background",
"text": "Tiddler editor background"
},
"$:/language/Docs/PaletteColours/tiddler-editor-border-image": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-border-image",
"text": "Tiddler editor border image"
},
"$:/language/Docs/PaletteColours/tiddler-editor-border": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-border",
"text": "Tiddler editor border"
},
"$:/language/Docs/PaletteColours/tiddler-editor-fields-even": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-fields-even",
"text": "Tiddler editor background for even fields"
},
"$:/language/Docs/PaletteColours/tiddler-editor-fields-odd": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-fields-odd",
"text": "Tiddler editor background for odd fields"
},
"$:/language/Docs/PaletteColours/tiddler-info-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-info-background",
"text": "Tiddler info panel background"
},
"$:/language/Docs/PaletteColours/tiddler-info-border": {
"title": "$:/language/Docs/PaletteColours/tiddler-info-border",
"text": "Tiddler info panel border"
},
"$:/language/Docs/PaletteColours/tiddler-info-tab-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-info-tab-background",
"text": "Tiddler info panel tab background"
},
"$:/language/Docs/PaletteColours/tiddler-link-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-link-background",
"text": "Tiddler link background"
},
"$:/language/Docs/PaletteColours/tiddler-link-foreground": {
"title": "$:/language/Docs/PaletteColours/tiddler-link-foreground",
"text": "Tiddler link foreground"
},
"$:/language/Docs/PaletteColours/tiddler-subtitle-foreground": {
"title": "$:/language/Docs/PaletteColours/tiddler-subtitle-foreground",
"text": "Tiddler subtitle foreground"
},
"$:/language/Docs/PaletteColours/tiddler-title-foreground": {
"title": "$:/language/Docs/PaletteColours/tiddler-title-foreground",
"text": "Tiddler title foreground"
},
"$:/language/Docs/PaletteColours/toolbar-new-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-new-button",
"text": "Toolbar 'new tiddler' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-options-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-options-button",
"text": "Toolbar 'options' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-save-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-save-button",
"text": "Toolbar 'save' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-info-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-info-button",
"text": "Toolbar 'info' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-edit-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-edit-button",
"text": "Toolbar 'edit' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-close-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-close-button",
"text": "Toolbar 'close' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-delete-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-delete-button",
"text": "Toolbar 'delete' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-cancel-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-cancel-button",
"text": "Toolbar 'cancel' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-done-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-done-button",
"text": "Toolbar 'done' button foreground"
},
"$:/language/Docs/PaletteColours/untagged-background": {
"title": "$:/language/Docs/PaletteColours/untagged-background",
"text": "Untagged pill background"
},
"$:/language/Docs/PaletteColours/very-muted-foreground": {
"title": "$:/language/Docs/PaletteColours/very-muted-foreground",
"text": "Very muted foreground"
},
"$:/language/EditTemplate/Body/External/Hint": {
"title": "$:/language/EditTemplate/Body/External/Hint",
"text": "This is an external tiddler stored outside of the main TiddlyWiki file. You can edit the tags and fields but cannot directly edit the content itself"
},
"$:/language/EditTemplate/Body/Hint": {
"title": "$:/language/EditTemplate/Body/Hint",
"text": "Use [[wiki text|http://tiddlywiki.com/static/WikiText.html]] to add formatting, images, and dynamic features"
},
"$:/language/EditTemplate/Body/Placeholder": {
"title": "$:/language/EditTemplate/Body/Placeholder",
"text": "Type the text for this tiddler"
},
"$:/language/EditTemplate/Body/Preview/Button/Hide": {
"title": "$:/language/EditTemplate/Body/Preview/Button/Hide",
"text": "hide preview"
},
"$:/language/EditTemplate/Body/Preview/Button/Show": {
"title": "$:/language/EditTemplate/Body/Preview/Button/Show",
"text": "show preview"
},
"$:/language/EditTemplate/Field/Remove/Caption": {
"title": "$:/language/EditTemplate/Field/Remove/Caption",
"text": "remove field"
},
"$:/language/EditTemplate/Field/Remove/Hint": {
"title": "$:/language/EditTemplate/Field/Remove/Hint",
"text": "Remove field"
},
"$:/language/EditTemplate/Fields/Add/Button": {
"title": "$:/language/EditTemplate/Fields/Add/Button",
"text": "add"
},
"$:/language/EditTemplate/Fields/Add/Name/Placeholder": {
"title": "$:/language/EditTemplate/Fields/Add/Name/Placeholder",
"text": "field name"
},
"$:/language/EditTemplate/Fields/Add/Prompt": {
"title": "$:/language/EditTemplate/Fields/Add/Prompt",
"text": "Add a new field:"
},
"$:/language/EditTemplate/Fields/Add/Value/Placeholder": {
"title": "$:/language/EditTemplate/Fields/Add/Value/Placeholder",
"text": "field value"
},
"$:/language/EditTemplate/Fields/Add/Dropdown/System": {
"title": "$:/language/EditTemplate/Fields/Add/Dropdown/System",
"text": "System fields"
},
"$:/language/EditTemplate/Fields/Add/Dropdown/User": {
"title": "$:/language/EditTemplate/Fields/Add/Dropdown/User",
"text": "User fields"
},
"$:/language/EditTemplate/Shadow/Warning": {
"title": "$:/language/EditTemplate/Shadow/Warning",
"text": "This is a shadow tiddler. Any changes you make will override the default version from the plugin <<pluginLink>>"
},
"$:/language/EditTemplate/Shadow/OverriddenWarning": {
"title": "$:/language/EditTemplate/Shadow/OverriddenWarning",
"text": "This is a modified shadow tiddler. You can revert to the default version in the plugin <<pluginLink>> by deleting this tiddler"
},
"$:/language/EditTemplate/Tags/Add/Button": {
"title": "$:/language/EditTemplate/Tags/Add/Button",
"text": "add"
},
"$:/language/EditTemplate/Tags/Add/Placeholder": {
"title": "$:/language/EditTemplate/Tags/Add/Placeholder",
"text": "tag name"
},
"$:/language/EditTemplate/Tags/Dropdown/Caption": {
"title": "$:/language/EditTemplate/Tags/Dropdown/Caption",
"text": "tag list"
},
"$:/language/EditTemplate/Tags/Dropdown/Hint": {
"title": "$:/language/EditTemplate/Tags/Dropdown/Hint",
"text": "Show tag list"
},
"$:/language/EditTemplate/Type/Dropdown/Caption": {
"title": "$:/language/EditTemplate/Type/Dropdown/Caption",
"text": "content type list"
},
"$:/language/EditTemplate/Type/Dropdown/Hint": {
"title": "$:/language/EditTemplate/Type/Dropdown/Hint",
"text": "Show content type list"
},
"$:/language/EditTemplate/Type/Delete/Caption": {
"title": "$:/language/EditTemplate/Type/Delete/Caption",
"text": "delete content type"
},
"$:/language/EditTemplate/Type/Delete/Hint": {
"title": "$:/language/EditTemplate/Type/Delete/Hint",
"text": "Delete content type"
},
"$:/language/EditTemplate/Type/Placeholder": {
"title": "$:/language/EditTemplate/Type/Placeholder",
"text": "content type"
},
"$:/language/EditTemplate/Type/Prompt": {
"title": "$:/language/EditTemplate/Type/Prompt",
"text": "Type:"
},
"$:/language/Exporters/StaticRiver": {
"title": "$:/language/Exporters/StaticRiver",
"text": "Static HTML"
},
"$:/language/Exporters/JsonFile": {
"title": "$:/language/Exporters/JsonFile",
"text": "JSON file"
},
"$:/language/Exporters/CsvFile": {
"title": "$:/language/Exporters/CsvFile",
"text": "CSV file"
},
"$:/language/Exporters/TidFile": {
"title": "$:/language/Exporters/TidFile",
"text": "\".tid\" file"
},
"$:/language/Docs/Fields/_canonical_uri": {
"title": "$:/language/Docs/Fields/_canonical_uri",
"text": "The full URI of an external image tiddler"
},
"$:/language/Docs/Fields/bag": {
"title": "$:/language/Docs/Fields/bag",
"text": "The name of the bag from which a tiddler came"
},
"$:/language/Docs/Fields/caption": {
"title": "$:/language/Docs/Fields/caption",
"text": "The text to be displayed on a tab or button"
},
"$:/language/Docs/Fields/color": {
"title": "$:/language/Docs/Fields/color",
"text": "The CSS color value associated with a tiddler"
},
"$:/language/Docs/Fields/component": {
"title": "$:/language/Docs/Fields/component",
"text": "The name of the component responsible for an [[alert tiddler|AlertMechanism]]"
},
"$:/language/Docs/Fields/current-tiddler": {
"title": "$:/language/Docs/Fields/current-tiddler",
"text": "Used to cache the top tiddler in a [[history list|HistoryMechanism]]"
},
"$:/language/Docs/Fields/created": {
"title": "$:/language/Docs/Fields/created",
"text": "The date a tiddler was created"
},
"$:/language/Docs/Fields/creator": {
"title": "$:/language/Docs/Fields/creator",
"text": "The name of the person who created a tiddler"
},
"$:/language/Docs/Fields/dependents": {
"title": "$:/language/Docs/Fields/dependents",
"text": "For a plugin, lists the dependent plugin titles"
},
"$:/language/Docs/Fields/description": {
"title": "$:/language/Docs/Fields/description",
"text": "The descriptive text for a plugin, or a modal dialogue"
},
"$:/language/Docs/Fields/draft.of": {
"title": "$:/language/Docs/Fields/draft.of",
"text": "For draft tiddlers, contains the title of the tiddler of which this is a draft"
},
"$:/language/Docs/Fields/draft.title": {
"title": "$:/language/Docs/Fields/draft.title",
"text": "For draft tiddlers, contains the proposed new title of the tiddler"
},
"$:/language/Docs/Fields/footer": {
"title": "$:/language/Docs/Fields/footer",
"text": "The footer text for a wizard"
},
"$:/language/Docs/Fields/hack-to-give-us-something-to-compare-against": {
"title": "$:/language/Docs/Fields/hack-to-give-us-something-to-compare-against",
"text": "A temporary storage field used in [[$:/core/templates/static.content]]"
},
"$:/language/Docs/Fields/icon": {
"title": "$:/language/Docs/Fields/icon",
"text": "The title of the tiddler containing the icon associated with a tiddler"
},
"$:/language/Docs/Fields/library": {
"title": "$:/language/Docs/Fields/library",
"text": "If set to \"yes\" indicates that a tiddler should be saved as a JavaScript library"
},
"$:/language/Docs/Fields/list": {
"title": "$:/language/Docs/Fields/list",
"text": "An ordered list of tiddler titles associated with a tiddler"
},
"$:/language/Docs/Fields/list-before": {
"title": "$:/language/Docs/Fields/list-before",
"text": "If set, the title of a tiddler before which this tiddler should be added to the ordered list of tiddler titles, or at the start of the list if this field is present but empty"
},
"$:/language/Docs/Fields/list-after": {
"title": "$:/language/Docs/Fields/list-after",
"text": "If set, the title of the tiddler after which this tiddler should be added to the ordered list of tiddler titles"
},
"$:/language/Docs/Fields/modified": {
"title": "$:/language/Docs/Fields/modified",
"text": "The date and time at which a tiddler was last modified"
},
"$:/language/Docs/Fields/modifier": {
"title": "$:/language/Docs/Fields/modifier",
"text": "The tiddler title associated with the person who last modified a tiddler"
},
"$:/language/Docs/Fields/name": {
"title": "$:/language/Docs/Fields/name",
"text": "The human readable name associated with a plugin tiddler"
},
"$:/language/Docs/Fields/plugin-priority": {
"title": "$:/language/Docs/Fields/plugin-priority",
"text": "A numerical value indicating the priority of a plugin tiddler"
},
"$:/language/Docs/Fields/plugin-type": {
"title": "$:/language/Docs/Fields/plugin-type",
"text": "The type of plugin in a plugin tiddler"
},
"$:/language/Docs/Fields/revision": {
"title": "$:/language/Docs/Fields/revision",
"text": "The revision of the tiddler held at the server"
},
"$:/language/Docs/Fields/released": {
"title": "$:/language/Docs/Fields/released",
"text": "Date of a TiddlyWiki release"
},
"$:/language/Docs/Fields/source": {
"title": "$:/language/Docs/Fields/source",
"text": "The source URL associated with a tiddler"
},
"$:/language/Docs/Fields/subtitle": {
"title": "$:/language/Docs/Fields/subtitle",
"text": "The subtitle text for a wizard"
},
"$:/language/Docs/Fields/tags": {
"title": "$:/language/Docs/Fields/tags",
"text": "A list of tags associated with a tiddler"
},
"$:/language/Docs/Fields/text": {
"title": "$:/language/Docs/Fields/text",
"text": "The body text of a tiddler"
},
"$:/language/Docs/Fields/title": {
"title": "$:/language/Docs/Fields/title",
"text": "The unique name of a tiddler"
},
"$:/language/Docs/Fields/type": {
"title": "$:/language/Docs/Fields/type",
"text": "The content type of a tiddler"
},
"$:/language/Docs/Fields/version": {
"title": "$:/language/Docs/Fields/version",
"text": "Version information for a plugin"
},
"$:/language/Filters/AllTiddlers": {
"title": "$:/language/Filters/AllTiddlers",
"text": "All tiddlers except system tiddlers"
},
"$:/language/Filters/RecentSystemTiddlers": {
"title": "$:/language/Filters/RecentSystemTiddlers",
"text": "Recently modified tiddlers, including system tiddlers"
},
"$:/language/Filters/RecentTiddlers": {
"title": "$:/language/Filters/RecentTiddlers",
"text": "Recently modified tiddlers"
},
"$:/language/Filters/AllTags": {
"title": "$:/language/Filters/AllTags",
"text": "All tags except system tags"
},
"$:/language/Filters/Missing": {
"title": "$:/language/Filters/Missing",
"text": "Missing tiddlers"
},
"$:/language/Filters/Drafts": {
"title": "$:/language/Filters/Drafts",
"text": "Draft tiddlers"
},
"$:/language/Filters/Orphans": {
"title": "$:/language/Filters/Orphans",
"text": "Orphan tiddlers"
},
"$:/language/Filters/SystemTiddlers": {
"title": "$:/language/Filters/SystemTiddlers",
"text": "System tiddlers"
},
"$:/language/Filters/ShadowTiddlers": {
"title": "$:/language/Filters/ShadowTiddlers",
"text": "Shadow tiddlers"
},
"$:/language/Filters/OverriddenShadowTiddlers": {
"title": "$:/language/Filters/OverriddenShadowTiddlers",
"text": "Overridden shadow tiddlers"
},
"$:/language/Filters/SystemTags": {
"title": "$:/language/Filters/SystemTags",
"text": "System tags"
},
"$:/language/Filters/TypedTiddlers": {
"title": "$:/language/Filters/TypedTiddlers",
"text": "Non wiki-text tiddlers"
},
"GettingStarted": {
"title": "GettingStarted",
"text": "\\define lingo-base() $:/language/ControlPanel/Basics/\nWelcome to ~TiddlyWiki and the ~TiddlyWiki community\n\nBefore you start storing important information in ~TiddlyWiki it is important to make sure that you can reliably save changes. See http://tiddlywiki.com/#GettingStarted for details\n\n!! Set up this ~TiddlyWiki\n\n<div class=\"tc-control-panel\">\n\n|<$link to=\"$:/SiteTitle\"><<lingo Title/Prompt>></$link> |<$edit-text tiddler=\"$:/SiteTitle\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/SiteSubtitle\"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler=\"$:/SiteSubtitle\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/DefaultTiddlers\"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit-text tag=\"textarea\" tiddler=\"$:/DefaultTiddlers\"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |\n</div>\n\nSee the [[control panel|$:/ControlPanel]] for more options.\n"
},
"$:/language/Help/build": {
"title": "$:/language/Help/build",
"description": "Automatically run configured commands",
"text": "Build the specified build targets for the current wiki. If no build targets are specified then all available targets will be built.\n\n```\n--build <target> [<target> ...]\n```\n\nBuild targets are defined in the `tiddlywiki.info` file of a wiki folder.\n\n"
},
"$:/language/Help/clearpassword": {
"title": "$:/language/Help/clearpassword",
"description": "Clear a password for subsequent crypto operations",
"text": "Clear the password for subsequent crypto operations\n\n```\n--clearpassword\n```\n"
},
"$:/language/Help/default": {
"title": "$:/language/Help/default",
"text": "\\define commandTitle()\n$:/language/Help/$(command)$\n\\end\n```\nusage: tiddlywiki [<wikifolder>] [--<command> [<args>...]...]\n```\n\nAvailable commands:\n\n<ul>\n<$list filter=\"[commands[]sort[title]]\" variable=\"command\">\n<li><$link to=<<commandTitle>>><$macrocall $name=\"command\" $type=\"text/plain\" $output=\"text/plain\"/></$link>: <$transclude tiddler=<<commandTitle>> field=\"description\"/></li>\n</$list>\n</ul>\n\nTo get detailed help on a command:\n\n```\ntiddlywiki --help <command>\n```\n"
},
"$:/language/Help/editions": {
"title": "$:/language/Help/editions",
"description": "Lists the available editions of TiddlyWiki",
"text": "Lists the names and descriptions of the available editions. You can create a new wiki of a specified edition with the `--init` command.\n\n```\n--editions\n```\n"
},
"$:/language/Help/help": {
"title": "$:/language/Help/help",
"description": "Display help for TiddlyWiki commands",
"text": "Displays help text for a command:\n\n```\n--help [<command>]\n```\n\nIf the command name is omitted then a list of available commands is displayed.\n"
},
"$:/language/Help/init": {
"title": "$:/language/Help/init",
"description": "Initialise a new wiki folder",
"text": "Initialise an empty [[WikiFolder|WikiFolders]] with a copy of the specified edition.\n\n```\n--init <edition> [<edition> ...]\n```\n\nFor example:\n\n```\ntiddlywiki ./MyWikiFolder --init empty\n```\n\nNote:\n\n* The wiki folder directory will be created if necessary\n* The \"edition\" defaults to ''empty''\n* The init command will fail if the wiki folder is not empty\n* The init command removes any `includeWikis` definitions in the edition's `tiddlywiki.info` file\n* When multiple editions are specified, editions initialised later will overwrite any files shared with earlier editions (so, the final `tiddlywiki.info` file will be copied from the last edition)\n* `--editions` returns a list of available editions\n"
},
"$:/language/Help/load": {
"title": "$:/language/Help/load",
"description": "Load tiddlers from a file",
"text": "Load tiddlers from 2.x.x TiddlyWiki files (`.html`), `.tiddler`, `.tid`, `.json` or other files\n\n```\n--load <filepath>\n```\n\nTo load tiddlers from an encrypted TiddlyWiki file you should first specify the password with the PasswordCommand. For example:\n\n```\ntiddlywiki ./MyWiki --password pa55w0rd --load my_encrypted_wiki.html\n```\n\nNote that TiddlyWiki will not load an older version of an already loaded plugin.\n"
},
"$:/language/Help/makelibrary": {
"title": "$:/language/Help/makelibrary",
"description": "Construct library plugin required by upgrade process",
"text": "Constructs the `$:/UpgradeLibrary` tiddler for the upgrade process.\n\nThe upgrade library is formatted as an ordinary plugin tiddler with the plugin type `library`. It contains a copy of each of the plugins, themes and language packs available within the TiddlyWiki5 repository.\n\nThis command is intended for internal use; it is only relevant to users constructing a custom upgrade procedure.\n\n```\n--makelibrary <title>\n```\n\nThe title argument defaults to `$:/UpgradeLibrary`.\n"
},
"$:/language/Help/notfound": {
"title": "$:/language/Help/notfound",
"text": "No such help item"
},
"$:/language/Help/output": {
"title": "$:/language/Help/output",
"description": "Set the base output directory for subsequent commands",
"text": "Sets the base output directory for subsequent commands. The default output directory is the `output` subdirectory of the edition directory.\n\n```\n--output <pathname>\n```\n\nIf the specified pathname is relative then it is resolved relative to the current working directory. For example `--output .` sets the output directory to the current working directory.\n\n"
},
"$:/language/Help/password": {
"title": "$:/language/Help/password",
"description": "Set a password for subsequent crypto operations",
"text": "Set a password for subsequent crypto operations\n\n```\n--password <password>\n```\n\n''Note'': This should not be used for serving TiddlyWiki with password protection. Instead, see the password option under the [[ServerCommand]].\n"
},
"$:/language/Help/rendertiddler": {
"title": "$:/language/Help/rendertiddler",
"description": "Render an individual tiddler as a specified ContentType",
"text": "Render an individual tiddler as a specified ContentType, defaulting to `text/html` and save it to the specified filename. Optionally a template can be specified, in which case the template tiddler is rendered with the \"currentTiddler\" variable set to the tiddler that is being rendered (the first parameter value).\n\n```\n--rendertiddler <title> <filename> [<type>] [<template>]\n```\n\nBy default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny missing directories in the path to the filename are automatically created.\n"
},
"$:/language/Help/rendertiddlers": {
"title": "$:/language/Help/rendertiddlers",
"description": "Render tiddlers matching a filter to a specified ContentType",
"text": "Render a set of tiddlers matching a filter to separate files of a specified ContentType (defaults to `text/html`) and extension (defaults to `.html`).\n\n```\n--rendertiddlers <filter> <template> <pathname> [<type>] [<extension>] [\"noclean\"]\n```\n\nFor example:\n\n```\n--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain\n```\n\nBy default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny files in the target directory are deleted unless the ''noclean'' flag is specified. The target directory is recursively created if it is missing.\n"
},
"$:/language/Help/savetiddler": {
"title": "$:/language/Help/savetiddler",
"description": "Saves a raw tiddler to a file",
"text": "Saves an individual tiddler in its raw text or binary format to the specified filename.\n\n```\n--savetiddler <title> <filename>\n```\n\nBy default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny missing directories in the path to the filename are automatically created.\n"
},
"$:/language/Help/savetiddlers": {
"title": "$:/language/Help/savetiddlers",
"description": "Saves a group of raw tiddlers to a directory",
"text": "Saves a group of tiddlers in their raw text or binary format to the specified directory.\n\n```\n--savetiddlers <filter> <pathname> [\"noclean\"]\n```\n\nBy default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nThe output directory is cleared of existing files before saving the specified files. The deletion can be disabled by specifying the ''noclean'' flag.\n\nAny missing directories in the pathname are automatically created.\n"
},
"$:/language/Help/server": {
"title": "$:/language/Help/server",
"description": "Provides an HTTP server interface to TiddlyWiki",
"text": "The server built in to TiddlyWiki5 is very simple. Although compatible with TiddlyWeb it doesn't support many of the features needed for robust Internet-facing usage.\n\nAt the root, it serves a rendering of a specified tiddler. Away from the root, it serves individual tiddlers encoded in JSON, and supports the basic HTTP operations for `GET`, `PUT` and `DELETE`.\n\n```\n--server <port> <roottiddler> <rendertype> <servetype> <username> <password> <host> <pathprefix>\n```\n\nThe parameters are:\n\n* ''port'' - port number to serve from (defaults to \"8080\")\n* ''roottiddler'' - the tiddler to serve at the root (defaults to \"$:/core/save/all\")\n* ''rendertype'' - the content type to which the root tiddler should be rendered (defaults to \"text/plain\")\n* ''servetype'' - the content type with which the root tiddler should be served (defaults to \"text/html\")\n* ''username'' - the default username for signing edits\n* ''password'' - optional password for basic authentication\n* ''host'' - optional hostname to serve from (defaults to \"127.0.0.1\" aka \"localhost\")\n* ''pathprefix'' - optional prefix for paths\n\nIf the password parameter is specified then the browser will prompt the user for the username and password. Note that the password is transmitted in plain text so this implementation isn't suitable for general use.\n\nFor example:\n\n```\n--server 8080 $:/core/save/all text/plain text/html MyUserName passw0rd\n```\n\nThe username and password can be specified as empty strings if you need to set the hostname or pathprefix and don't want to require a password:\n\n```\n--server 8080 $:/core/save/all text/plain text/html \"\" \"\" 192.168.0.245\n```\n\nTo run multiple TiddlyWiki servers at the same time you'll need to put each one on a different port.\n"
},
"$:/language/Help/setfield": {
"title": "$:/language/Help/setfield",
"description": "Prepares external tiddlers for use",
"text": "//Note that this command is experimental and may change or be replaced before being finalised//\n\nSets the specified field of a group of tiddlers to the result of wikifying a template tiddler with the `currentTiddler` variable set to the tiddler.\n\n```\n--setfield <filter> <fieldname> <templatetitle> <rendertype>\n```\n\nThe parameters are:\n\n* ''filter'' - filter identifying the tiddlers to be affected\n* ''fieldname'' - the field to modify (defaults to \"text\")\n* ''templatetitle'' - the tiddler to wikify into the specified field. If blank or missing then the specified field is deleted\n* ''rendertype'' - the text type to render (defaults to \"text/plain\"; \"text/html\" can be used to include HTML tags)\n"
},
"$:/language/Help/unpackplugin": {
"title": "$:/language/Help/unpackplugin",
"description": "Unpack the payload tiddlers from a plugin",
"text": "Extract the payload tiddlers from a plugin, creating them as ordinary tiddlers:\n\n```\n--unpackplugin <title>\n```\n"
},
"$:/language/Help/verbose": {
"title": "$:/language/Help/verbose",
"description": "Triggers verbose output mode",
"text": "Triggers verbose output, useful for debugging\n\n```\n--verbose\n```\n"
},
"$:/language/Help/version": {
"title": "$:/language/Help/version",
"description": "Displays the version number of TiddlyWiki",
"text": "Displays the version number of TiddlyWiki.\n\n```\n--version\n```\n"
},
"$:/language/Import/Imported": {
"title": "$:/language/Import/Imported",
"text": "The following tiddlers were imported:"
},
"$:/language/Import/Listing/Cancel/Caption": {
"title": "$:/language/Import/Listing/Cancel/Caption",
"text": "Cancel"
},
"$:/language/Import/Listing/Hint": {
"title": "$:/language/Import/Listing/Hint",
"text": "These tiddlers are ready to import:"
},
"$:/language/Import/Listing/Import/Caption": {
"title": "$:/language/Import/Listing/Import/Caption",
"text": "Import"
},
"$:/language/Import/Listing/Select/Caption": {
"title": "$:/language/Import/Listing/Select/Caption",
"text": "Select"
},
"$:/language/Import/Listing/Status/Caption": {
"title": "$:/language/Import/Listing/Status/Caption",
"text": "Status"
},
"$:/language/Import/Listing/Title/Caption": {
"title": "$:/language/Import/Listing/Title/Caption",
"text": "Title"
},
"$:/language/Import/Upgrader/Plugins/Suppressed/Incompatible": {
"title": "$:/language/Import/Upgrader/Plugins/Suppressed/Incompatible",
"text": "Blocked incompatible or obsolete plugin"
},
"$:/language/Import/Upgrader/Plugins/Suppressed/Version": {
"title": "$:/language/Import/Upgrader/Plugins/Suppressed/Version",
"text": "Blocked plugin (due to incoming <<incoming>> being older than existing <<existing>>)"
},
"$:/language/Import/Upgrader/Plugins/Upgraded": {
"title": "$:/language/Import/Upgrader/Plugins/Upgraded",
"text": "Upgraded plugin from <<incoming>> to <<upgraded>>"
},
"$:/language/Import/Upgrader/State/Suppressed": {
"title": "$:/language/Import/Upgrader/State/Suppressed",
"text": "Blocked temporary state tiddler"
},
"$:/language/Import/Upgrader/System/Suppressed": {
"title": "$:/language/Import/Upgrader/System/Suppressed",
"text": "Blocked system tiddler"
},
"$:/language/Import/Upgrader/ThemeTweaks/Created": {
"title": "$:/language/Import/Upgrader/ThemeTweaks/Created",
"text": "Migrated theme tweak from <$text text=<<from>>/>"
},
"$:/language/AboveStory/ClassicPlugin/Warning": {
"title": "$:/language/AboveStory/ClassicPlugin/Warning",
"text": "It looks like you are trying to load a plugin designed for ~TiddlyWiki Classic. Please note that [[these plugins do not work with TiddlyWiki version 5.x.x|http://tiddlywiki.com/#TiddlyWikiClassic]]. ~TiddlyWiki Classic plugins detected:"
},
"$:/language/BinaryWarning/Prompt": {
"title": "$:/language/BinaryWarning/Prompt",
"text": "This tiddler contains binary data"
},
"$:/language/ClassicWarning/Hint": {
"title": "$:/language/ClassicWarning/Hint",
"text": "This tiddler is written in TiddlyWiki Classic wiki text format, which is not fully compatible with TiddlyWiki version 5. See http://tiddlywiki.com/static/Upgrading.html for more details."
},
"$:/language/ClassicWarning/Upgrade/Caption": {
"title": "$:/language/ClassicWarning/Upgrade/Caption",
"text": "upgrade"
},
"$:/language/CloseAll/Button": {
"title": "$:/language/CloseAll/Button",
"text": "close all"
},
"$:/language/ConfirmCancelTiddler": {
"title": "$:/language/ConfirmCancelTiddler",
"text": "Do you wish to discard changes to the tiddler \"<$text text=<<title>>/>\"?"
},
"$:/language/ConfirmDeleteTiddler": {
"title": "$:/language/ConfirmDeleteTiddler",
"text": "Do you wish to delete the tiddler \"<$text text=<<title>>/>\"?"
},
"$:/language/ConfirmOverwriteTiddler": {
"title": "$:/language/ConfirmOverwriteTiddler",
"text": "Do you wish to overwrite the tiddler \"<$text text=<<title>>/>\"?"
},
"$:/language/ConfirmEditShadowTiddler": {
"title": "$:/language/ConfirmEditShadowTiddler",
"text": "You are about to edit a ShadowTiddler. Any changes will override the default system making future upgrades non-trivial. Are you sure you want to edit \"<$text text=<<title>>/>\"?"
},
"$:/language/DefaultNewTiddlerTitle": {
"title": "$:/language/DefaultNewTiddlerTitle",
"text": "New Tiddler"
},
"$:/language/DropMessage": {
"title": "$:/language/DropMessage",
"text": "Drop here (or use the 'Escape' key to cancel)"
},
"$:/language/Encryption/Cancel": {
"title": "$:/language/Encryption/Cancel",
"text": "Cancel"
},
"$:/language/Encryption/ConfirmClearPassword": {
"title": "$:/language/Encryption/ConfirmClearPassword",
"text": "Do you wish to clear the password? This will remove the encryption applied when saving this wiki"
},
"$:/language/Encryption/PromptSetPassword": {
"title": "$:/language/Encryption/PromptSetPassword",
"text": "Set a new password for this TiddlyWiki"
},
"$:/language/Encryption/Username": {
"title": "$:/language/Encryption/Username",
"text": "Username"
},
"$:/language/Encryption/Password": {
"title": "$:/language/Encryption/Password",
"text": "Password"
},
"$:/language/Encryption/RepeatPassword": {
"title": "$:/language/Encryption/RepeatPassword",
"text": "Repeat password"
},
"$:/language/Encryption/PasswordNoMatch": {
"title": "$:/language/Encryption/PasswordNoMatch",
"text": "Passwords do not match"
},
"$:/language/Encryption/SetPassword": {
"title": "$:/language/Encryption/SetPassword",
"text": "Set password"
},
"$:/language/InternalJavaScriptError/Title": {
"title": "$:/language/InternalJavaScriptError/Title",
"text": "Internal JavaScript Error"
},
"$:/language/InternalJavaScriptError/Hint": {
"title": "$:/language/InternalJavaScriptError/Hint",
"text": "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser"
},
"$:/language/InvalidFieldName": {
"title": "$:/language/InvalidFieldName",
"text": "Illegal characters in field name \"<$text text=<<fieldName>>/>\". Fields can only contain lowercase letters, digits and the characters underscore (`_`), hyphen (`-`) and period (`.`)"
},
"$:/language/LazyLoadingWarning": {
"title": "$:/language/LazyLoadingWarning",
"text": "<p>Loading external text from ''<$text text={{!!_canonical_uri}}/>''</p><p>If this message doesn't disappear you may be using a browser that doesn't support external text in this configuration. See http://tiddlywiki.com/#ExternalText</p>"
},
"$:/language/MissingTiddler/Hint": {
"title": "$:/language/MissingTiddler/Hint",
"text": "Missing tiddler \"<$text text=<<currentTiddler>>/>\" - click {{$:/core/images/edit-button}} to create"
},
"$:/language/OfficialPluginLibrary": {
"title": "$:/language/OfficialPluginLibrary",
"text": "Official ~TiddlyWiki Plugin Library"
},
"$:/language/OfficialPluginLibrary/Hint": {
"title": "$:/language/OfficialPluginLibrary/Hint",
"text": "The official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team."
},
"$:/language/PluginReloadWarning": {
"title": "$:/language/PluginReloadWarning",
"text": "Please save {{$:/core/ui/Buttons/save-wiki}} and reload {{$:/core/ui/Buttons/refresh}} to allow changes to plugins to take effect"
},
"$:/language/RecentChanges/DateFormat": {
"title": "$:/language/RecentChanges/DateFormat",
"text": "DDth MMM YYYY"
},
"$:/language/SystemTiddler/Tooltip": {
"title": "$:/language/SystemTiddler/Tooltip",
"text": "This is a system tiddler"
},
"$:/language/TagManager/Colour/Heading": {
"title": "$:/language/TagManager/Colour/Heading",
"text": "Colour"
},
"$:/language/TagManager/Count/Heading": {
"title": "$:/language/TagManager/Count/Heading",
"text": "Count"
},
"$:/language/TagManager/Icon/Heading": {
"title": "$:/language/TagManager/Icon/Heading",
"text": "Icon"
},
"$:/language/TagManager/Info/Heading": {
"title": "$:/language/TagManager/Info/Heading",
"text": "Info"
},
"$:/language/TagManager/Tag/Heading": {
"title": "$:/language/TagManager/Tag/Heading",
"text": "Tag"
},
"$:/language/Tiddler/DateFormat": {
"title": "$:/language/Tiddler/DateFormat",
"text": "DDth MMM YYYY at hh12:0mmam"
},
"$:/language/UnsavedChangesWarning": {
"title": "$:/language/UnsavedChangesWarning",
"text": "You have unsaved changes in TiddlyWiki"
},
"$:/language/Modals/Download": {
"title": "$:/language/Modals/Download",
"type": "text/vnd.tiddlywiki",
"subtitle": "Download changes",
"footer": "<$button message=\"tm-close-tiddler\">Close</$button>",
"help": "http://tiddlywiki.com/static/DownloadingChanges.html",
"text": "Your browser only supports manual saving.\n\nTo save your modified wiki, right click on the download link below and select \"Download file\" or \"Save file\", and then choose the folder and filename.\n\n//You can marginally speed things up by clicking the link with the control key (Windows) or the options/alt key (Mac OS X). You will not be prompted for the folder or filename, but your browser is likely to give it an unrecognisable name -- you may need to rename the file to include an `.html` extension before you can do anything useful with it.//\n\nOn smartphones that do not allow files to be downloaded you can instead bookmark the link, and then sync your bookmarks to a desktop computer from where the wiki can be saved normally.\n"
},
"$:/language/Modals/SaveInstructions": {
"title": "$:/language/Modals/SaveInstructions",
"type": "text/vnd.tiddlywiki",
"subtitle": "Save your work",
"footer": "<$button message=\"tm-close-tiddler\">Close</$button>",
"help": "http://tiddlywiki.com/static/SavingChanges.html",
"text": "Your changes to this wiki need to be saved as a ~TiddlyWiki HTML file.\n\n!!! Desktop browsers\n\n# Select ''Save As'' from the ''File'' menu\n# Choose a filename and location\n#* Some browsers also require you to explicitly specify the file saving format as ''Webpage, HTML only'' or similar\n# Close this tab\n\n!!! Smartphone browsers\n\n# Create a bookmark to this page\n#* If you've got iCloud or Google Sync set up then the bookmark will automatically sync to your desktop where you can open it and save it as above\n# Close this tab\n\n//If you open the bookmark again in Mobile Safari you will see this message again. If you want to go ahead and use the file, just click the ''close'' button below//\n"
},
"$:/config/NewJournal/Title": {
"title": "$:/config/NewJournal/Title",
"text": "DDth MMM YYYY"
},
"$:/config/NewJournal/Tags": {
"title": "$:/config/NewJournal/Tags",
"text": "Journal"
},
"$:/language/Notifications/Save/Done": {
"title": "$:/language/Notifications/Save/Done",
"text": "Saved wiki"
},
"$:/language/Notifications/Save/Starting": {
"title": "$:/language/Notifications/Save/Starting",
"text": "Starting to save wiki"
},
"$:/language/Search/DefaultResults/Caption": {
"title": "$:/language/Search/DefaultResults/Caption",
"text": "List"
},
"$:/language/Search/Filter/Caption": {
"title": "$:/language/Search/Filter/Caption",
"text": "Filter"
},
"$:/language/Search/Filter/Hint": {
"title": "$:/language/Search/Filter/Hint",
"text": "Search via a [[filter expression|http://tiddlywiki.com/static/Filters.html]]"
},
"$:/language/Search/Filter/Matches": {
"title": "$:/language/Search/Filter/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/Search/Matches": {
"title": "$:/language/Search/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/Search/Matches/All": {
"title": "$:/language/Search/Matches/All",
"text": "All matches:"
},
"$:/language/Search/Matches/Title": {
"title": "$:/language/Search/Matches/Title",
"text": "Title matches:"
},
"$:/language/Search/Search": {
"title": "$:/language/Search/Search",
"text": "Search"
},
"$:/language/Search/Shadows/Caption": {
"title": "$:/language/Search/Shadows/Caption",
"text": "Shadows"
},
"$:/language/Search/Shadows/Hint": {
"title": "$:/language/Search/Shadows/Hint",
"text": "Search for shadow tiddlers"
},
"$:/language/Search/Shadows/Matches": {
"title": "$:/language/Search/Shadows/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/Search/Standard/Caption": {
"title": "$:/language/Search/Standard/Caption",
"text": "Standard"
},
"$:/language/Search/Standard/Hint": {
"title": "$:/language/Search/Standard/Hint",
"text": "Search for standard tiddlers"
},
"$:/language/Search/Standard/Matches": {
"title": "$:/language/Search/Standard/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/Search/System/Caption": {
"title": "$:/language/Search/System/Caption",
"text": "System"
},
"$:/language/Search/System/Hint": {
"title": "$:/language/Search/System/Hint",
"text": "Search for system tiddlers"
},
"$:/language/Search/System/Matches": {
"title": "$:/language/Search/System/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/SideBar/All/Caption": {
"title": "$:/language/SideBar/All/Caption",
"text": "All"
},
"$:/language/SideBar/Contents/Caption": {
"title": "$:/language/SideBar/Contents/Caption",
"text": "Contents"
},
"$:/language/SideBar/Drafts/Caption": {
"title": "$:/language/SideBar/Drafts/Caption",
"text": "Drafts"
},
"$:/language/SideBar/Missing/Caption": {
"title": "$:/language/SideBar/Missing/Caption",
"text": "Missing"
},
"$:/language/SideBar/More/Caption": {
"title": "$:/language/SideBar/More/Caption",
"text": "More"
},
"$:/language/SideBar/Open/Caption": {
"title": "$:/language/SideBar/Open/Caption",
"text": "Open"
},
"$:/language/SideBar/Orphans/Caption": {
"title": "$:/language/SideBar/Orphans/Caption",
"text": "Orphans"
},
"$:/language/SideBar/Recent/Caption": {
"title": "$:/language/SideBar/Recent/Caption",
"text": "Recent"
},
"$:/language/SideBar/Shadows/Caption": {
"title": "$:/language/SideBar/Shadows/Caption",
"text": "Shadows"
},
"$:/language/SideBar/System/Caption": {
"title": "$:/language/SideBar/System/Caption",
"text": "System"
},
"$:/language/SideBar/Tags/Caption": {
"title": "$:/language/SideBar/Tags/Caption",
"text": "Tags"
},
"$:/language/SideBar/Tags/Untagged/Caption": {
"title": "$:/language/SideBar/Tags/Untagged/Caption",
"text": "untagged"
},
"$:/language/SideBar/Tools/Caption": {
"title": "$:/language/SideBar/Tools/Caption",
"text": "Tools"
},
"$:/language/SideBar/Types/Caption": {
"title": "$:/language/SideBar/Types/Caption",
"text": "Types"
},
"$:/SiteSubtitle": {
"title": "$:/SiteSubtitle",
"text": "a non-linear personal web notebook"
},
"$:/SiteTitle": {
"title": "$:/SiteTitle",
"text": "My ~TiddlyWiki"
},
"$:/language/TiddlerInfo/Advanced/Caption": {
"title": "$:/language/TiddlerInfo/Advanced/Caption",
"text": "Advanced"
},
"$:/language/TiddlerInfo/Advanced/PluginInfo/Empty/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/PluginInfo/Empty/Hint",
"text": "none"
},
"$:/language/TiddlerInfo/Advanced/PluginInfo/Heading": {
"title": "$:/language/TiddlerInfo/Advanced/PluginInfo/Heading",
"text": "Plugin Details"
},
"$:/language/TiddlerInfo/Advanced/PluginInfo/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/PluginInfo/Hint",
"text": "This plugin contains the following shadow tiddlers:"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/Heading": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/Heading",
"text": "Shadow Status"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/NotShadow/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/NotShadow/Hint",
"text": "The tiddler <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> is not a shadow tiddler"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Hint",
"text": "The tiddler <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> is a shadow tiddler"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Source": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Source",
"text": "It is defined in the plugin <$link to=<<pluginTiddler>>><$text text=<<pluginTiddler>>/></$link>"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/OverriddenShadow/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/OverriddenShadow/Hint",
"text": "It is overridden by an ordinary tiddler"
},
"$:/language/TiddlerInfo/Fields/Caption": {
"title": "$:/language/TiddlerInfo/Fields/Caption",
"text": "Fields"
},
"$:/language/TiddlerInfo/List/Caption": {
"title": "$:/language/TiddlerInfo/List/Caption",
"text": "List"
},
"$:/language/TiddlerInfo/List/Empty": {
"title": "$:/language/TiddlerInfo/List/Empty",
"text": "This tiddler does not have a list"
},
"$:/language/TiddlerInfo/Listed/Caption": {
"title": "$:/language/TiddlerInfo/Listed/Caption",
"text": "Listed"
},
"$:/language/TiddlerInfo/Listed/Empty": {
"title": "$:/language/TiddlerInfo/Listed/Empty",
"text": "This tiddler is not listed by any others"
},
"$:/language/TiddlerInfo/References/Caption": {
"title": "$:/language/TiddlerInfo/References/Caption",
"text": "References"
},
"$:/language/TiddlerInfo/References/Empty": {
"title": "$:/language/TiddlerInfo/References/Empty",
"text": "No tiddlers link to this one"
},
"$:/language/TiddlerInfo/Tagging/Caption": {
"title": "$:/language/TiddlerInfo/Tagging/Caption",
"text": "Tagging"
},
"$:/language/TiddlerInfo/Tagging/Empty": {
"title": "$:/language/TiddlerInfo/Tagging/Empty",
"text": "No tiddlers are tagged with this one"
},
"$:/language/TiddlerInfo/Tools/Caption": {
"title": "$:/language/TiddlerInfo/Tools/Caption",
"text": "Tools"
},
"$:/language/Docs/Types/application/javascript": {
"title": "$:/language/Docs/Types/application/javascript",
"description": "JavaScript code",
"name": "application/javascript",
"group": "Developer"
},
"$:/language/Docs/Types/application/json": {
"title": "$:/language/Docs/Types/application/json",
"description": "JSON data",
"name": "application/json",
"group": "Developer"
},
"$:/language/Docs/Types/application/x-tiddler-dictionary": {
"title": "$:/language/Docs/Types/application/x-tiddler-dictionary",
"description": "Data dictionary",
"name": "application/x-tiddler-dictionary",
"group": "Developer"
},
"$:/language/Docs/Types/image/gif": {
"title": "$:/language/Docs/Types/image/gif",
"description": "GIF image",
"name": "image/gif",
"group": "Image"
},
"$:/language/Docs/Types/image/jpeg": {
"title": "$:/language/Docs/Types/image/jpeg",
"description": "JPEG image",
"name": "image/jpeg",
"group": "Image"
},
"$:/language/Docs/Types/image/png": {
"title": "$:/language/Docs/Types/image/png",
"description": "PNG image",
"name": "image/png",
"group": "Image"
},
"$:/language/Docs/Types/image/svg+xml": {
"title": "$:/language/Docs/Types/image/svg+xml",
"description": "Structured Vector Graphics image",
"name": "image/svg+xml",
"group": "Image"
},
"$:/language/Docs/Types/image/x-icon": {
"title": "$:/language/Docs/Types/image/x-icon",
"description": "ICO format icon file",
"name": "image/x-icon",
"group": "Image"
},
"$:/language/Docs/Types/text/css": {
"title": "$:/language/Docs/Types/text/css",
"description": "Static stylesheet",
"name": "text/css",
"group": "Developer"
},
"$:/language/Docs/Types/text/html": {
"title": "$:/language/Docs/Types/text/html",
"description": "HTML markup",
"name": "text/html",
"group": "Text"
},
"$:/language/Docs/Types/text/plain": {
"title": "$:/language/Docs/Types/text/plain",
"description": "Plain text",
"name": "text/plain",
"group": "Text"
},
"$:/language/Docs/Types/text/vnd.tiddlywiki": {
"title": "$:/language/Docs/Types/text/vnd.tiddlywiki",
"description": "TiddlyWiki 5",
"name": "text/vnd.tiddlywiki",
"group": "Text"
},
"$:/language/Docs/Types/text/x-tiddlywiki": {
"title": "$:/language/Docs/Types/text/x-tiddlywiki",
"description": "TiddlyWiki Classic",
"name": "text/x-tiddlywiki",
"group": "Text"
},
"$:/languages/en-GB/icon": {
"title": "$:/languages/en-GB/icon",
"type": "image/svg+xml",
"text": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 60 30\" width=\"1200\" height=\"600\">\n<clipPath id=\"t\">\n\t<path d=\"M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z\"/>\n</clipPath>\n<path d=\"M0,0 v30 h60 v-30 z\" fill=\"#00247d\"/>\n<path d=\"M0,0 L60,30 M60,0 L0,30\" stroke=\"#fff\" stroke-width=\"6\"/>\n<path d=\"M0,0 L60,30 M60,0 L0,30\" clip-path=\"url(#t)\" stroke=\"#cf142b\" stroke-width=\"4\"/>\n<path d=\"M30,0 v30 M0,15 h60\" stroke=\"#fff\" stroke-width=\"10\"/>\n<path d=\"M30,0 v30 M0,15 h60\" stroke=\"#cf142b\" stroke-width=\"6\"/>\n</svg>\n"
},
"$:/languages/en-GB": {
"title": "$:/languages/en-GB",
"name": "en-GB",
"description": "English (British)",
"author": "JeremyRuston",
"core-version": ">=5.0.0\"",
"text": "Stub pseudo-plugin for the default language"
},
"$:/core/modules/commander.js": {
"text": "/*\\\ntitle: $:/core/modules/commander.js\ntype: application/javascript\nmodule-type: global\n\nThe $tw.Commander class is a command interpreter\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nParse a sequence of commands\n\tcommandTokens: an array of command string tokens\n\twiki: reference to the wiki store object\n\tstreams: {output:, error:}, each of which has a write(string) method\n\tcallback: a callback invoked as callback(err) where err is null if there was no error\n*/\nvar Commander = function(commandTokens,callback,wiki,streams) {\n\tvar path = require(\"path\");\n\tthis.commandTokens = commandTokens;\n\tthis.nextToken = 0;\n\tthis.callback = callback;\n\tthis.wiki = wiki;\n\tthis.streams = streams;\n\tthis.outputPath = path.resolve($tw.boot.wikiPath,$tw.config.wikiOutputSubDir);\n};\n\n/*\nAdd a string of tokens to the command queue\n*/\nCommander.prototype.addCommandTokens = function(commandTokens) {\n\tvar params = commandTokens.slice(0);\n\tparams.unshift(0);\n\tparams.unshift(this.nextToken);\n\tArray.prototype.splice.apply(this.commandTokens,params);\n};\n\n/*\nExecute the sequence of commands and invoke a callback on completion\n*/\nCommander.prototype.execute = function() {\n\tthis.executeNextCommand();\n};\n\n/*\nExecute the next command in the sequence\n*/\nCommander.prototype.executeNextCommand = function() {\n\tvar self = this;\n\t// Invoke the callback if there are no more commands\n\tif(this.nextToken >= this.commandTokens.length) {\n\t\tthis.callback(null);\n\t} else {\n\t\t// Get and check the command token\n\t\tvar commandName = this.commandTokens[this.nextToken++];\n\t\tif(commandName.substr(0,2) !== \"--\") {\n\t\t\tthis.callback(\"Missing command: \" + commandName);\n\t\t} else {\n\t\t\tcommandName = commandName.substr(2); // Trim off the --\n\t\t\t// Accumulate the parameters to the command\n\t\t\tvar params = [];\n\t\t\twhile(this.nextToken < this.commandTokens.length && \n\t\t\t\tthis.commandTokens[this.nextToken].substr(0,2) !== \"--\") {\n\t\t\t\tparams.push(this.commandTokens[this.nextToken++]);\n\t\t\t}\n\t\t\t// Get the command info\n\t\t\tvar command = $tw.commands[commandName],\n\t\t\t\tc,err;\n\t\t\tif(!command) {\n\t\t\t\tthis.callback(\"Unknown command: \" + commandName);\n\t\t\t} else {\n\t\t\t\tif(this.verbose) {\n\t\t\t\t\tthis.streams.output.write(\"Executing command: \" + commandName + \" \" + params.join(\" \") + \"\\n\");\n\t\t\t\t}\n\t\t\t\tif(command.info.synchronous) {\n\t\t\t\t\t// Synchronous command\n\t\t\t\t\tc = new command.Command(params,this);\n\t\t\t\t\terr = c.execute();\n\t\t\t\t\tif(err) {\n\t\t\t\t\t\tthis.callback(err);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.executeNextCommand();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Asynchronous command\n\t\t\t\t\tc = new command.Command(params,this,function(err) {\n\t\t\t\t\t\tif(err) {\n\t\t\t\t\t\t\tself.callback(err);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself.executeNextCommand();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\terr = c.execute();\n\t\t\t\t\tif(err) {\n\t\t\t\t\t\tthis.callback(err);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nCommander.initCommands = function(moduleType) {\n\tmoduleType = moduleType || \"command\";\n\t$tw.commands = {};\n\t$tw.modules.forEachModuleOfType(moduleType,function(title,module) {\n\t\tvar c = $tw.commands[module.info.name] = {};\n\t\t// Add the methods defined by the module\n\t\tfor(var f in module) {\n\t\t\tif($tw.utils.hop(module,f)) {\n\t\t\t\tc[f] = module[f];\n\t\t\t}\n\t\t}\n\t});\n};\n\nexports.Commander = Commander;\n\n})();\n",
"title": "$:/core/modules/commander.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/commands/build.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/build.js\ntype: application/javascript\nmodule-type: command\n\nCommand to build a build target\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"build\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\t// Get the build targets defined in the wiki\n\tvar buildTargets = $tw.boot.wikiInfo.build;\n\tif(!buildTargets) {\n\t\treturn \"No build targets defined\";\n\t}\n\t// Loop through each of the specified targets\n\tvar targets;\n\tif(this.params.length > 0) {\n\t\ttargets = this.params;\n\t} else {\n\t\ttargets = Object.keys(buildTargets);\n\t}\n\tfor(var targetIndex=0; targetIndex<targets.length; targetIndex++) {\n\t\tvar target = targets[targetIndex],\n\t\t\tcommands = buildTargets[target];\n\t\tif(!commands) {\n\t\t\treturn \"Build target '\" + target + \"' not found\";\n\t\t}\n\t\t// Add the commands to the queue\n\t\tthis.commander.addCommandTokens(commands);\n\t}\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/build.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/clearpassword.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/clearpassword.js\ntype: application/javascript\nmodule-type: command\n\nClear password for crypto operations\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"clearpassword\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\t$tw.crypto.setPassword(null);\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/clearpassword.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/editions.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/editions.js\ntype: application/javascript\nmodule-type: command\n\nCommand to list the available editions\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"editions\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tvar self = this;\n\t// Output the list\n\tthis.commander.streams.output.write(\"Available editions:\\n\\n\");\n\tvar editionInfo = $tw.utils.getEditionInfo();\n\t$tw.utils.each(editionInfo,function(info,name) {\n\t\tself.commander.streams.output.write(\" \" + name + \": \" + info.description + \"\\n\");\n\t});\n\tthis.commander.streams.output.write(\"\\n\");\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/editions.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/help.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/help.js\ntype: application/javascript\nmodule-type: command\n\nHelp command\n\n\\*/\n(function(){\n\n/*jshint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"help\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tvar subhelp = this.params[0] || \"default\",\n\t\thelpBase = \"$:/language/Help/\",\n\t\ttext;\n\tif(!this.commander.wiki.getTiddler(helpBase + subhelp)) {\n\t\tsubhelp = \"notfound\";\n\t}\n\t// Wikify the help as formatted text (ie block elements generate newlines)\n\ttext = this.commander.wiki.renderTiddler(\"text/plain-formatted\",helpBase + subhelp);\n\t// Remove any leading linebreaks\n\ttext = text.replace(/^(\\r?\\n)*/g,\"\");\n\tthis.commander.streams.output.write(text);\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/help.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/init.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/init.js\ntype: application/javascript\nmodule-type: command\n\nCommand to initialise an empty wiki folder\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"init\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tvar fs = require(\"fs\"),\n\t\tpath = require(\"path\");\n\t// Check that we don't already have a valid wiki folder\n\tif($tw.boot.wikiTiddlersPath || ($tw.utils.isDirectory($tw.boot.wikiPath) && !$tw.utils.isDirectoryEmpty($tw.boot.wikiPath))) {\n\t\treturn \"Wiki folder is not empty\";\n\t}\n\t// Loop through each of the specified editions\n\tvar editions = this.params.length > 0 ? this.params : [\"empty\"];\n\tfor(var editionIndex=0; editionIndex<editions.length; editionIndex++) {\n\t\tvar editionName = editions[editionIndex];\n\t\t// Check the edition exists\n\t\tvar editionPath = $tw.findLibraryItem(editionName,$tw.getLibraryItemSearchPaths($tw.config.editionsPath,$tw.config.editionsEnvVar));\n\t\tif(!$tw.utils.isDirectory(editionPath)) {\n\t\t\treturn \"Edition '\" + editionName + \"' not found\";\n\t\t}\n\t\t// Copy the edition content\n\t\tvar err = $tw.utils.copyDirectory(editionPath,$tw.boot.wikiPath);\n\t\tif(!err) {\n\t\t\tthis.commander.streams.output.write(\"Copied edition '\" + editionName + \"' to \" + $tw.boot.wikiPath + \"\\n\");\n\t\t} else {\n\t\t\treturn err;\n\t\t}\n\t}\n\t// Tweak the tiddlywiki.info to remove any included wikis\n\tvar packagePath = $tw.boot.wikiPath + \"/tiddlywiki.info\",\n\t\tpackageJson = JSON.parse(fs.readFileSync(packagePath));\n\tdelete packageJson.includeWikis;\n\tfs.writeFileSync(packagePath,JSON.stringify(packageJson,null,$tw.config.preferences.jsonSpaces));\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/init.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/load.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/load.js\ntype: application/javascript\nmodule-type: command\n\nCommand to load tiddlers from a file\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"load\",\n\tsynchronous: false\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\");\n\tif(this.params.length < 1) {\n\t\treturn \"Missing filename\";\n\t}\n\tvar ext = path.extname(self.params[0]);\n\tfs.readFile(this.params[0],$tw.utils.getTypeEncoding(ext),function(err,data) {\n\t\tif (err) {\n\t\t\tself.callback(err);\n\t\t} else {\n\t\t\tvar fields = {title: self.params[0]},\n\t\t\t\ttype = path.extname(self.params[0]);\n\t\t\tvar tiddlers = self.commander.wiki.deserializeTiddlers(type,data,fields);\n\t\t\tif(!tiddlers) {\n\t\t\t\tself.callback(\"No tiddlers found in file \\\"\" + self.params[0] + \"\\\"\");\n\t\t\t} else {\n\t\t\t\tfor(var t=0; t<tiddlers.length; t++) {\n\t\t\t\t\tself.commander.wiki.importTiddler(new $tw.Tiddler(tiddlers[t]));\n\t\t\t\t}\n\t\t\t\tself.callback(null);\t\n\t\t\t}\n\t\t}\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/load.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/makelibrary.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/makelibrary.js\ntype: application/javascript\nmodule-type: command\n\nCommand to pack all of the plugins in the library into a plugin tiddler of type \"library\"\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"makelibrary\",\n\tsynchronous: true\n};\n\nvar UPGRADE_LIBRARY_TITLE = \"$:/UpgradeLibrary\";\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tvar wiki = this.commander.wiki,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\tupgradeLibraryTitle = this.params[0] || UPGRADE_LIBRARY_TITLE,\n\t\ttiddlers = {};\n\t// Collect up the library plugins\n\tvar collectPlugins = function(folder) {\n\t\t\tvar pluginFolders = fs.readdirSync(folder);\n\t\t\tfor(var p=0; p<pluginFolders.length; p++) {\n\t\t\t\tif(!$tw.boot.excludeRegExp.test(pluginFolders[p])) {\n\t\t\t\t\tpluginFields = $tw.loadPluginFolder(path.resolve(folder,\"./\" + pluginFolders[p]));\n\t\t\t\t\tif(pluginFields && pluginFields.title) {\n\t\t\t\t\t\ttiddlers[pluginFields.title] = pluginFields;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcollectPublisherPlugins = function(folder) {\n\t\t\tvar publisherFolders = fs.readdirSync(folder);\n\t\t\tfor(var t=0; t<publisherFolders.length; t++) {\n\t\t\t\tif(!$tw.boot.excludeRegExp.test(publisherFolders[t])) {\n\t\t\t\t\tcollectPlugins(path.resolve(folder,\"./\" + publisherFolders[t]));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\tcollectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.pluginsPath));\n\tcollectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.themesPath));\n\tcollectPlugins(path.resolve($tw.boot.corePath,$tw.config.languagesPath));\n\t// Save the upgrade library tiddler\n\tvar pluginFields = {\n\t\ttitle: upgradeLibraryTitle,\n\t\ttype: \"application/json\",\n\t\t\"plugin-type\": \"library\",\n\t\t\"text\": JSON.stringify({tiddlers: tiddlers},null,$tw.config.preferences.jsonSpaces)\n\t};\n\twiki.addTiddler(new $tw.Tiddler(pluginFields));\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/makelibrary.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/output.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/output.js\ntype: application/javascript\nmodule-type: command\n\nCommand to set the default output location (defaults to current working directory)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"output\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tvar fs = require(\"fs\"),\n\t\tpath = require(\"path\");\n\tif(this.params.length < 1) {\n\t\treturn \"Missing output path\";\n\t}\n\tthis.commander.outputPath = path.resolve(process.cwd(),this.params[0]);\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/output.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/password.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/password.js\ntype: application/javascript\nmodule-type: command\n\nSave password for crypto operations\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"password\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 1) {\n\t\treturn \"Missing password\";\n\t}\n\t$tw.crypto.setPassword(this.params[0]);\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/password.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/rendertiddler.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/rendertiddler.js\ntype: application/javascript\nmodule-type: command\n\nCommand to render a tiddler and save it to a file\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"rendertiddler\",\n\tsynchronous: false\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 2) {\n\t\treturn \"Missing filename\";\n\t}\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\ttitle = this.params[0],\n\t\tfilename = path.resolve(this.commander.outputPath,this.params[1]),\n\t\ttype = this.params[2] || \"text/html\",\n\t\ttemplate = this.params[3],\n\t\tvariables = {};\n\t$tw.utils.createFileDirectories(filename);\n\tif(template) {\n\t\tvariables.currentTiddler = title;\n\t\ttitle = template;\n\t}\n\tfs.writeFile(filename,this.commander.wiki.renderTiddler(type,title,{variables: variables}),\"utf8\",function(err) {\n\t\tself.callback(err);\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/rendertiddler.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/rendertiddlers.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/rendertiddlers.js\ntype: application/javascript\nmodule-type: command\n\nCommand to render several tiddlers to a folder of files\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nexports.info = {\n\tname: \"rendertiddlers\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 2) {\n\t\treturn \"Missing filename\";\n\t}\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\twiki = this.commander.wiki,\n\t\tfilter = this.params[0],\n\t\ttemplate = this.params[1],\n\t\toutputPath = this.commander.outputPath,\n\t\tpathname = path.resolve(outputPath,this.params[2]),\t\t\n\t\ttype = this.params[3] || \"text/html\",\n\t\textension = this.params[4] || \".html\",\n\t\tdeleteDirectory = (this.params[5] || \"\").toLowerCase() !== \"noclean\",\n\t\ttiddlers = wiki.filterTiddlers(filter);\n\tif(deleteDirectory) {\n\t\t$tw.utils.deleteDirectory(pathname);\n\t}\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar parser = wiki.parseTiddler(template),\n\t\t\twidgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}}),\n\t\t\tcontainer = $tw.fakeDocument.createElement(\"div\");\n\t\twidgetNode.render(container,null);\n\t\tvar text = type === \"text/html\" ? container.innerHTML : container.textContent,\n\t\t\texportPath = null;\n\t\tif($tw.utils.hop($tw.macros,\"tv-get-export-path\")) {\n\t\t\tvar macroPath = $tw.macros[\"tv-get-export-path\"].run.apply(self,[title]);\n\t\t\tif(macroPath) {\n\t\t\t\texportPath = path.resolve(outputPath,macroPath + extension);\n\t\t\t}\n\t\t}\n\t\tvar finalPath = exportPath || path.resolve(pathname,encodeURIComponent(title) + extension);\n\t\t$tw.utils.createFileDirectories(finalPath);\n\t\tfs.writeFileSync(finalPath,text,\"utf8\");\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/rendertiddlers.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/savelibrarytiddlers.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/savelibrarytiddlers.js\ntype: application/javascript\nmodule-type: command\n\nCommand to save the subtiddlers of a bundle tiddler as a series of JSON files\n\n--savelibrarytiddlers <tiddler> <pathname> <skinnylisting>\n\nThe tiddler identifies the bundle tiddler that contains the subtiddlers.\n\nThe pathname specifies the pathname to the folder in which the JSON files should be saved. The filename is the URL encoded title of the subtiddler.\n\nThe skinnylisting specifies the title of the tiddler to which a JSON catalogue of the subtiddlers will be saved. The JSON file contains the same data as the bundle tiddler but with the `text` field removed.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"savelibrarytiddlers\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 2) {\n\t\treturn \"Missing filename\";\n\t}\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\tcontainerTitle = this.params[0],\n\t\tfilter = this.params[1],\n\t\tbasepath = this.params[2],\n\t\tskinnyListTitle = this.params[3];\n\t// Get the container tiddler as data\n\tvar containerData = self.commander.wiki.getTiddlerDataCached(containerTitle,undefined);\n\tif(!containerData) {\n\t\treturn \"'\" + containerTitle + \"' is not a tiddler bundle\";\n\t}\n\t// Filter the list of plugins\n\tvar pluginList = [];\n\t$tw.utils.each(containerData.tiddlers,function(tiddler,title) {\n\t\tpluginList.push(title);\n\t});\n\tvar filteredPluginList;\n\tif(filter) {\n\t\tfilteredPluginList = self.commander.wiki.filterTiddlers(filter,null,self.commander.wiki.makeTiddlerIterator(pluginList));\n\t} else {\n\t\tfilteredPluginList = pluginList;\n\t}\n\t// Iterate through the plugins\n\tvar skinnyList = [];\n\t$tw.utils.each(filteredPluginList,function(title) {\n\t\tvar tiddler = containerData.tiddlers[title];\n\t\t// Save each JSON file and collect the skinny data\n\t\tvar pathname = path.resolve(self.commander.outputPath,basepath + encodeURIComponent(title) + \".json\");\n\t\t$tw.utils.createFileDirectories(pathname);\n\t\tfs.writeFileSync(pathname,JSON.stringify(tiddler,null,$tw.config.preferences.jsonSpaces),\"utf8\");\n\t\t// Collect the skinny list data\n\t\tvar pluginTiddlers = JSON.parse(tiddler.text),\n\t\t\treadmeContent = (pluginTiddlers.tiddlers[title + \"/readme\"] || {}).text,\n\t\t\ticonTiddler = pluginTiddlers.tiddlers[title + \"/icon\"] || {},\n\t\t\ticonType = iconTiddler.type,\n\t\t\ticonText = iconTiddler.text,\n\t\t\ticonContent;\n\t\tif(iconType && iconText) {\n\t\t\ticonContent = $tw.utils.makeDataUri(iconText,iconType);\n\t\t}\n\t\tskinnyList.push($tw.utils.extend({},tiddler,{text: undefined, readme: readmeContent, icon: iconContent}));\n\t});\n\t// Save the catalogue tiddler\n\tif(skinnyListTitle) {\n\t\tself.commander.wiki.setTiddlerData(skinnyListTitle,skinnyList);\n\t}\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/savelibrarytiddlers.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/savetiddler.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/savetiddler.js\ntype: application/javascript\nmodule-type: command\n\nCommand to save the content of a tiddler to a file\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"savetiddler\",\n\tsynchronous: false\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 2) {\n\t\treturn \"Missing filename\";\n\t}\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\ttitle = this.params[0],\n\t\tfilename = path.resolve(this.commander.outputPath,this.params[1]),\n\t\ttiddler = this.commander.wiki.getTiddler(title),\n\t\ttype = tiddler.fields.type || \"text/vnd.tiddlywiki\",\n\t\tcontentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: \"utf8\"};\n\t$tw.utils.createFileDirectories(filename);\n\tfs.writeFile(filename,tiddler.fields.text,contentTypeInfo.encoding,function(err) {\n\t\tself.callback(err);\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/savetiddler.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/savetiddlers.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/savetiddlers.js\ntype: application/javascript\nmodule-type: command\n\nCommand to save several tiddlers to a folder of files\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nexports.info = {\n\tname: \"savetiddlers\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 1) {\n\t\treturn \"Missing filename\";\n\t}\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\twiki = this.commander.wiki,\n\t\tfilter = this.params[0],\n\t\tpathname = path.resolve(this.commander.outputPath,this.params[1]),\n\t\tdeleteDirectory = (this.params[2] || \"\").toLowerCase() !== \"noclean\",\n\t\ttiddlers = wiki.filterTiddlers(filter);\n\tif(deleteDirectory) {\n\t\t$tw.utils.deleteDirectory(pathname);\n\t}\n\t$tw.utils.createDirectory(pathname);\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = self.commander.wiki.getTiddler(title),\n\t\t\ttype = tiddler.fields.type || \"text/vnd.tiddlywiki\",\n\t\t\tcontentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: \"utf8\"},\n\t\t\tfilename = path.resolve(pathname,encodeURIComponent(title));\n\t\tfs.writeFileSync(filename,tiddler.fields.text,contentTypeInfo.encoding);\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/savetiddlers.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/server.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/server.js\ntype: application/javascript\nmodule-type: command\n\nServe tiddlers over http\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nif($tw.node) {\n\tvar util = require(\"util\"),\n\t\tfs = require(\"fs\"),\n\t\turl = require(\"url\"),\n\t\tpath = require(\"path\"),\n\t\thttp = require(\"http\");\n}\n\nexports.info = {\n\tname: \"server\",\n\tsynchronous: true\n};\n\n/*\nA simple HTTP server with regexp-based routes\n*/\nfunction SimpleServer(options) {\n\tthis.routes = options.routes || [];\n\tthis.wiki = options.wiki;\n\tthis.variables = options.variables || {};\n}\n\nSimpleServer.prototype.set = function(obj) {\n\tvar self = this;\n\t$tw.utils.each(obj,function(value,name) {\n\t\tself.variables[name] = value;\n\t});\n};\n\nSimpleServer.prototype.get = function(name) {\n\treturn this.variables[name];\n};\n\nSimpleServer.prototype.addRoute = function(route) {\n\tthis.routes.push(route);\n};\n\nSimpleServer.prototype.findMatchingRoute = function(request,state) {\n\tvar pathprefix = this.get(\"pathprefix\") || \"\";\n\tfor(var t=0; t<this.routes.length; t++) {\n\t\tvar potentialRoute = this.routes[t],\n\t\t\tpathRegExp = potentialRoute.path,\n\t\t\tpathname = state.urlInfo.pathname,\n\t\t\tmatch;\n\t\tif(pathprefix) {\n\t\t\tif(pathname.substr(0,pathprefix.length) === pathprefix) {\n\t\t\t\tpathname = pathname.substr(pathprefix.length);\n\t\t\t\tmatch = potentialRoute.path.exec(pathname);\n\t\t\t} else {\n\t\t\t\tmatch = false;\n\t\t\t}\n\t\t} else {\n\t\t\tmatch = potentialRoute.path.exec(pathname);\n\t\t}\n\t\tif(match && request.method === potentialRoute.method) {\n\t\t\tstate.params = [];\n\t\t\tfor(var p=1; p<match.length; p++) {\n\t\t\t\tstate.params.push(match[p]);\n\t\t\t}\n\t\t\treturn potentialRoute;\n\t\t}\n\t}\n\treturn null;\n};\n\nSimpleServer.prototype.checkCredentials = function(request,incomingUsername,incomingPassword) {\n\tvar header = request.headers.authorization || \"\",\n\t\ttoken = header.split(/\\s+/).pop() || \"\",\n\t\tauth = $tw.utils.base64Decode(token),\n\t\tparts = auth.split(/:/),\n\t\tusername = parts[0],\n\t\tpassword = parts[1];\n\tif(incomingUsername === username && incomingPassword === password) {\n\t\treturn \"ALLOWED\";\n\t} else {\n\t\treturn \"DENIED\";\n\t}\n};\n\nSimpleServer.prototype.listen = function(port,host) {\n\tvar self = this;\n\thttp.createServer(function(request,response) {\n\t\t// Compose the state object\n\t\tvar state = {};\n\t\tstate.wiki = self.wiki;\n\t\tstate.server = self;\n\t\tstate.urlInfo = url.parse(request.url);\n\t\t// Find the route that matches this path\n\t\tvar route = self.findMatchingRoute(request,state);\n\t\t// Check for the username and password if we've got one\n\t\tvar username = self.get(\"username\"),\n\t\t\tpassword = self.get(\"password\");\n\t\tif(username && password) {\n\t\t\t// Check they match\n\t\t\tif(self.checkCredentials(request,username,password) !== \"ALLOWED\") {\n\t\t\t\tvar servername = state.wiki.getTiddlerText(\"$:/SiteTitle\") || \"TiddlyWiki5\";\n\t\t\t\tresponse.writeHead(401,\"Authentication required\",{\n\t\t\t\t\t\"WWW-Authenticate\": 'Basic realm=\"Please provide your username and password to login to ' + servername + '\"'\n\t\t\t\t});\n\t\t\t\tresponse.end();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// Return a 404 if we didn't find a route\n\t\tif(!route) {\n\t\t\tresponse.writeHead(404);\n\t\t\tresponse.end();\n\t\t\treturn;\n\t\t}\n\t\t// Set the encoding for the incoming request\n\t\t// TODO: Presumably this would need tweaking if we supported PUTting binary tiddlers\n\t\trequest.setEncoding(\"utf8\");\n\t\t// Dispatch the appropriate method\n\t\tswitch(request.method) {\n\t\t\tcase \"GET\": // Intentional fall-through\n\t\t\tcase \"DELETE\":\n\t\t\t\troute.handler(request,response,state);\n\t\t\t\tbreak;\n\t\t\tcase \"PUT\":\n\t\t\t\tvar data = \"\";\n\t\t\t\trequest.on(\"data\",function(chunk) {\n\t\t\t\t\tdata += chunk.toString();\n\t\t\t\t});\n\t\t\t\trequest.on(\"end\",function() {\n\t\t\t\t\tstate.data = data;\n\t\t\t\t\troute.handler(request,response,state);\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t}\n\t}).listen(port,host);\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n\t// Set up server\n\tthis.server = new SimpleServer({\n\t\twiki: this.commander.wiki\n\t});\n\t// Add route handlers\n\tthis.server.addRoute({\n\t\tmethod: \"PUT\",\n\t\tpath: /^\\/recipes\\/default\\/tiddlers\\/(.+)$/,\n\t\thandler: function(request,response,state) {\n\t\t\tvar title = decodeURIComponent(state.params[0]),\n\t\t\t\tfields = JSON.parse(state.data);\n\t\t\t// Pull up any subfields in the `fields` object\n\t\t\tif(fields.fields) {\n\t\t\t\t$tw.utils.each(fields.fields,function(field,name) {\n\t\t\t\t\tfields[name] = field;\n\t\t\t\t});\n\t\t\t\tdelete fields.fields;\n\t\t\t}\n\t\t\t// Remove any revision field\n\t\t\tif(fields.revision) {\n\t\t\t\tdelete fields.revision;\n\t\t\t}\n\t\t\tstate.wiki.addTiddler(new $tw.Tiddler(state.wiki.getCreationFields(),fields,{title: title},state.wiki.getModificationFields()));\n\t\t\tvar changeCount = state.wiki.getChangeCount(title).toString();\n\t\t\tresponse.writeHead(204, \"OK\",{\n\t\t\t\tEtag: \"\\\"default/\" + encodeURIComponent(title) + \"/\" + changeCount + \":\\\"\",\n\t\t\t\t\"Content-Type\": \"text/plain\"\n\t\t\t});\n\t\t\tresponse.end();\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \"DELETE\",\n\t\tpath: /^\\/bags\\/default\\/tiddlers\\/(.+)$/,\n\t\thandler: function(request,response,state) {\n\t\t\tvar title = decodeURIComponent(state.params[0]);\n\t\t\tstate.wiki.deleteTiddler(title);\n\t\t\tresponse.writeHead(204, \"OK\", {\n\t\t\t\t\"Content-Type\": \"text/plain\"\n\t\t\t});\n\t\t\tresponse.end();\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \"GET\",\n\t\tpath: /^\\/$/,\n\t\thandler: function(request,response,state) {\n\t\t\tresponse.writeHead(200, {\"Content-Type\": state.server.get(\"serveType\")});\n\t\t\tvar text = state.wiki.renderTiddler(state.server.get(\"renderType\"),state.server.get(\"rootTiddler\"));\n\t\t\tresponse.end(text,\"utf8\");\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \"GET\",\n\t\tpath: /^\\/status$/,\n\t\thandler: function(request,response,state) {\n\t\t\tresponse.writeHead(200, {\"Content-Type\": \"application/json\"});\n\t\t\tvar text = JSON.stringify({\n\t\t\t\tusername: state.server.get(\"username\"),\n\t\t\t\tspace: {\n\t\t\t\t\trecipe: \"default\"\n\t\t\t\t},\n\t\t\t\ttiddlywiki_version: $tw.version\n\t\t\t});\n\t\t\tresponse.end(text,\"utf8\");\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \"GET\",\n\t\tpath: /^\\/favicon.ico$/,\n\t\thandler: function(request,response,state) {\n\t\t\tresponse.writeHead(200, {\"Content-Type\": \"image/x-icon\"});\n\t\t\tvar buffer = state.wiki.getTiddlerText(\"$:/favicon.ico\",\"\");\n\t\t\tresponse.end(buffer,\"base64\");\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \"GET\",\n\t\tpath: /^\\/recipes\\/default\\/tiddlers.json$/,\n\t\thandler: function(request,response,state) {\n\t\t\tresponse.writeHead(200, {\"Content-Type\": \"application/json\"});\n\t\t\tvar tiddlers = [];\n\t\t\tstate.wiki.forEachTiddler({sortField: \"title\"},function(title,tiddler) {\n\t\t\t\tvar tiddlerFields = {};\n\t\t\t\t$tw.utils.each(tiddler.fields,function(field,name) {\n\t\t\t\t\tif(name !== \"text\") {\n\t\t\t\t\t\ttiddlerFields[name] = tiddler.getFieldString(name);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ttiddlerFields.revision = state.wiki.getChangeCount(title);\n\t\t\t\ttiddlerFields.type = tiddlerFields.type || \"text/vnd.tiddlywiki\";\n\t\t\t\ttiddlers.push(tiddlerFields);\n\t\t\t});\n\t\t\tvar text = JSON.stringify(tiddlers);\n\t\t\tresponse.end(text,\"utf8\");\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \"GET\",\n\t\tpath: /^\\/recipes\\/default\\/tiddlers\\/(.+)$/,\n\t\thandler: function(request,response,state) {\n\t\t\tvar title = decodeURIComponent(state.params[0]),\n\t\t\t\ttiddler = state.wiki.getTiddler(title),\n\t\t\t\ttiddlerFields = {},\n\t\t\t\tknownFields = [\n\t\t\t\t\t\"bag\", \"created\", \"creator\", \"modified\", \"modifier\", \"permissions\", \"recipe\", \"revision\", \"tags\", \"text\", \"title\", \"type\", \"uri\"\n\t\t\t\t];\n\t\t\tif(tiddler) {\n\t\t\t\t$tw.utils.each(tiddler.fields,function(field,name) {\n\t\t\t\t\tvar value = tiddler.getFieldString(name);\n\t\t\t\t\tif(knownFields.indexOf(name) !== -1) {\n\t\t\t\t\t\ttiddlerFields[name] = value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttiddlerFields.fields = tiddlerFields.fields || {};\n\t\t\t\t\t\ttiddlerFields.fields[name] = value;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ttiddlerFields.revision = state.wiki.getChangeCount(title);\n\t\t\t\ttiddlerFields.type = tiddlerFields.type || \"text/vnd.tiddlywiki\";\n\t\t\t\tresponse.writeHead(200, {\"Content-Type\": \"application/json\"});\n\t\t\t\tresponse.end(JSON.stringify(tiddlerFields),\"utf8\");\n\t\t\t} else {\n\t\t\t\tresponse.writeHead(404);\n\t\t\t\tresponse.end();\n\t\t\t}\n\t\t}\n\t});\n};\n\nCommand.prototype.execute = function() {\n\tif(!$tw.boot.wikiTiddlersPath) {\n\t\t$tw.utils.warning(\"Warning: Wiki folder '\" + $tw.boot.wikiPath + \"' does not exist or is missing a tiddlywiki.info file\");\n\t}\n\tvar port = this.params[0] || \"8080\",\n\t\trootTiddler = this.params[1] || \"$:/core/save/all\",\n\t\trenderType = this.params[2] || \"text/plain\",\n\t\tserveType = this.params[3] || \"text/html\",\n\t\tusername = this.params[4],\n\t\tpassword = this.params[5],\n\t\thost = this.params[6] || \"127.0.0.1\",\n\t\tpathprefix = this.params[7];\n\tthis.server.set({\n\t\trootTiddler: rootTiddler,\n\t\trenderType: renderType,\n\t\tserveType: serveType,\n\t\tusername: username,\n\t\tpassword: password,\n\t\tpathprefix: pathprefix\n\t});\n\tthis.server.listen(port,host);\n\tconsole.log(\"Serving on \" + host + \":\" + port);\n\tconsole.log(\"(press ctrl-C to exit)\");\n\t// Warn if required plugins are missing\n\tif(!$tw.wiki.getTiddler(\"$:/plugins/tiddlywiki/tiddlyweb\") || !$tw.wiki.getTiddler(\"$:/plugins/tiddlywiki/filesystem\")) {\n\t\t$tw.utils.warning(\"Warning: Plugins required for client-server operation (\\\"tiddlywiki/filesystem\\\" and \\\"tiddlywiki/tiddlyweb\\\") are missing from tiddlywiki.info file\");\n\t}\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/server.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/setfield.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/setfield.js\ntype: application/javascript\nmodule-type: command\n\nCommand to modify selected tiddlers to set a field to the text of a template tiddler that has been wikified with the selected tiddler as the current tiddler.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nexports.info = {\n\tname: \"setfield\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 4) {\n\t\treturn \"Missing parameters\";\n\t}\n\tvar self = this,\n\t\twiki = this.commander.wiki,\n\t\tfilter = this.params[0],\n\t\tfieldname = this.params[1] || \"text\",\n\t\ttemplatetitle = this.params[2],\n\t\trendertype = this.params[3] || \"text/plain\",\n\t\ttiddlers = wiki.filterTiddlers(filter);\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar parser = wiki.parseTiddler(templatetitle),\n\t\t\tnewFields = {},\n\t\t\ttiddler = wiki.getTiddler(title);\n\t\tif(parser) {\n\t\t\tvar widgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}});\n\t\t\tvar container = $tw.fakeDocument.createElement(\"div\");\n\t\t\twidgetNode.render(container,null);\n\t\t\tnewFields[fieldname] = rendertype === \"text/html\" ? container.innerHTML : container.textContent;\n\t\t} else {\n\t\t\tnewFields[fieldname] = undefined;\n\t\t}\n\t\twiki.addTiddler(new $tw.Tiddler(tiddler,newFields));\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/setfield.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/unpackplugin.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/unpackplugin.js\ntype: application/javascript\nmodule-type: command\n\nCommand to extract the shadow tiddlers from within a plugin\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"unpackplugin\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 1) {\n\t\treturn \"Missing plugin name\";\n\t}\n\tvar self = this,\n\t\ttitle = this.params[0],\n\t\tpluginData = this.commander.wiki.getTiddlerDataCached(title);\n\tif(!pluginData) {\n\t\treturn \"Plugin '\" + title + \"' not found\";\n\t}\n\t$tw.utils.each(pluginData.tiddlers,function(tiddler) {\n\t\tself.commander.wiki.addTiddler(new $tw.Tiddler(tiddler));\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/unpackplugin.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/verbose.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/verbose.js\ntype: application/javascript\nmodule-type: command\n\nVerbose command\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"verbose\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tthis.commander.verbose = true;\n\t// Output the boot message log\n\tthis.commander.streams.output.write(\"Boot log:\\n \" + $tw.boot.logMessages.join(\"\\n \") + \"\\n\");\n\treturn null; // No error\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/verbose.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/version.js": {
"text": "/*\\\ntitle: $:/core/modules/commands/version.js\ntype: application/javascript\nmodule-type: command\n\nVersion command\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"version\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tthis.commander.streams.output.write($tw.version + \"\\n\");\n\treturn null; // No error\n};\n\nexports.Command = Command;\n\n})();\n",
"title": "$:/core/modules/commands/version.js",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/config.js": {
"text": "/*\\\ntitle: $:/core/modules/config.js\ntype: application/javascript\nmodule-type: config\n\nCore configuration constants\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.preferences = {};\n\nexports.preferences.notificationDuration = 3 * 1000;\nexports.preferences.jsonSpaces = 4;\n\nexports.textPrimitives = {\n\tupperLetter: \"[A-Z\\u00c0-\\u00d6\\u00d8-\\u00de\\u0150\\u0170]\",\n\tlowerLetter: \"[a-z\\u00df-\\u00f6\\u00f8-\\u00ff\\u0151\\u0171]\",\n\tanyLetter: \"[A-Za-z0-9\\u00c0-\\u00d6\\u00d8-\\u00de\\u00df-\\u00f6\\u00f8-\\u00ff\\u0150\\u0170\\u0151\\u0171]\",\n\tblockPrefixLetters:\t\"[A-Za-z0-9-_\\u00c0-\\u00d6\\u00d8-\\u00de\\u00df-\\u00f6\\u00f8-\\u00ff\\u0150\\u0170\\u0151\\u0171]\"\n};\n\nexports.textPrimitives.unWikiLink = \"~\";\nexports.textPrimitives.wikiLink = exports.textPrimitives.upperLetter + \"+\" +\n\texports.textPrimitives.lowerLetter + \"+\" +\n\texports.textPrimitives.upperLetter +\n\texports.textPrimitives.anyLetter + \"*\";\n\nexports.htmlEntities = {quot:34, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };\n\nexports.htmlVoidElements = \"area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr\".split(\",\");\n\nexports.htmlBlockElements = \"address,article,aside,audio,blockquote,canvas,dd,div,dl,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,noscript,ol,output,p,pre,section,table,tfoot,ul,video\".split(\",\");\n\nexports.htmlUnsafeElements = \"script\".split(\",\");\n\n})();\n",
"title": "$:/core/modules/config.js",
"type": "application/javascript",
"module-type": "config"
},
"$:/core/modules/deserializers.js": {
"text": "/*\\\ntitle: $:/core/modules/deserializers.js\ntype: application/javascript\nmodule-type: tiddlerdeserializer\n\nFunctions to deserialise tiddlers from a block of text\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nUtility function to parse an old-style tiddler DIV in a *.tid file. It looks like this:\n\n<div title=\"Title\" creator=\"JoeBloggs\" modifier=\"JoeBloggs\" created=\"201102111106\" modified=\"201102111310\" tags=\"myTag [[my long tag]]\">\n<pre>The text of the tiddler (without the expected HTML encoding).\n</pre>\n</div>\n\nNote that the field attributes are HTML encoded, but that the body of the <PRE> tag is not encoded.\n\nWhen these tiddler DIVs are encountered within a TiddlyWiki HTML file then the body is encoded in the usual way.\n*/\nvar parseTiddlerDiv = function(text /* [,fields] */) {\n\t// Slot together the default results\n\tvar result = {};\n\tif(arguments.length > 1) {\n\t\tfor(var f=1; f<arguments.length; f++) {\n\t\t\tvar fields = arguments[f];\n\t\t\tfor(var t in fields) {\n\t\t\t\tresult[t] = fields[t];\t\t\n\t\t\t}\n\t\t}\n\t}\n\t// Parse the DIV body\n\tvar startRegExp = /^\\s*<div\\s+([^>]*)>(\\s*<pre>)?/gi,\n\t\tendRegExp,\n\t\tmatch = startRegExp.exec(text);\n\tif(match) {\n\t\t// Old-style DIVs don't have the <pre> tag\n\t\tif(match[2]) {\n\t\t\tendRegExp = /<\\/pre>\\s*<\\/div>\\s*$/gi;\n\t\t} else {\n\t\t\tendRegExp = /<\\/div>\\s*$/gi;\n\t\t}\n\t\tvar endMatch = endRegExp.exec(text);\n\t\tif(endMatch) {\n\t\t\t// Extract the text\n\t\t\tresult.text = text.substring(match.index + match[0].length,endMatch.index);\n\t\t\t// Process the attributes\n\t\t\tvar attrRegExp = /\\s*([^=\\s]+)\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)')/gi,\n\t\t\t\tattrMatch;\n\t\t\tdo {\n\t\t\t\tattrMatch = attrRegExp.exec(match[1]);\n\t\t\t\tif(attrMatch) {\n\t\t\t\t\tvar name = attrMatch[1];\n\t\t\t\t\tvar value = attrMatch[2] !== undefined ? attrMatch[2] : attrMatch[3];\n\t\t\t\t\tresult[name] = value;\n\t\t\t\t}\n\t\t\t} while(attrMatch);\n\t\t\treturn result;\n\t\t}\n\t}\n\treturn undefined;\n};\n\nexports[\"application/x-tiddler-html-div\"] = function(text,fields) {\n\treturn [parseTiddlerDiv(text,fields)];\n};\n\nexports[\"application/json\"] = function(text,fields) {\n\tvar incoming = JSON.parse(text),\n\t\tresults = [];\n\tif($tw.utils.isArray(incoming)) {\n\t\tfor(var t=0; t<incoming.length; t++) {\n\t\t\tvar incomingFields = incoming[t],\n\t\t\t\tfields = {};\n\t\t\tfor(var f in incomingFields) {\n\t\t\t\tif(typeof incomingFields[f] === \"string\") {\n\t\t\t\t\tfields[f] = incomingFields[f];\n\t\t\t\t}\n\t\t\t}\n\t\t\tresults.push(fields);\n\t\t}\n\t}\n\treturn results;\n};\n\n/*\nParse an HTML file into tiddlers. There are three possibilities:\n# A TiddlyWiki classic HTML file containing `text/x-tiddlywiki` tiddlers\n# A TiddlyWiki5 HTML file containing `text/vnd.tiddlywiki` tiddlers\n# An ordinary HTML file\n*/\nexports[\"text/html\"] = function(text,fields) {\n\t// Check if we've got a store area\n\tvar storeAreaMarkerRegExp = /<div id=[\"']?storeArea['\"]?( style=[\"']?display:none;[\"']?)?>/gi,\n\t\tmatch = storeAreaMarkerRegExp.exec(text);\n\tif(match) {\n\t\t// If so, it's either a classic TiddlyWiki file or an unencrypted TW5 file\n\t\t// First read the normal tiddlers\n\t\tvar results = deserializeTiddlyWikiFile(text,storeAreaMarkerRegExp.lastIndex,!!match[1],fields);\n\t\t// Then any system tiddlers\n\t\tvar systemAreaMarkerRegExp = /<div id=[\"']?systemArea['\"]?( style=[\"']?display:none;[\"']?)?>/gi,\n\t\t\tsysMatch = systemAreaMarkerRegExp.exec(text);\n\t\tif(sysMatch) {\n\t\t\tresults.push.apply(results,deserializeTiddlyWikiFile(text,systemAreaMarkerRegExp.lastIndex,!!sysMatch[1],fields));\n\t\t}\n\t\treturn results;\n\t} else {\n\t\t// Check whether we've got an encrypted file\n\t\tvar encryptedStoreArea = $tw.utils.extractEncryptedStoreArea(text);\n\t\tif(encryptedStoreArea) {\n\t\t\t// If so, attempt to decrypt it using the current password\n\t\t\treturn $tw.utils.decryptStoreArea(encryptedStoreArea);\n\t\t} else {\n\t\t\t// It's not a TiddlyWiki so we'll return the entire HTML file as a tiddler\n\t\t\treturn deserializeHtmlFile(text,fields);\n\t\t}\n\t}\n};\n\nfunction deserializeHtmlFile(text,fields) {\n\tvar result = {};\n\t$tw.utils.each(fields,function(value,name) {\n\t\tresult[name] = value;\n\t});\n\tresult.text = text;\n\tresult.type = \"text/html\";\n\treturn [result];\n}\n\nfunction deserializeTiddlyWikiFile(text,storeAreaEnd,isTiddlyWiki5,fields) {\n\tvar results = [],\n\t\tendOfDivRegExp = /(<\\/div>\\s*)/gi,\n\t\tstartPos = storeAreaEnd,\n\t\tdefaultType = isTiddlyWiki5 ? undefined : \"text/x-tiddlywiki\";\n\tendOfDivRegExp.lastIndex = startPos;\n\tvar match = endOfDivRegExp.exec(text);\n\twhile(match) {\n\t\tvar endPos = endOfDivRegExp.lastIndex,\n\t\t\ttiddlerFields = parseTiddlerDiv(text.substring(startPos,endPos),fields,{type: defaultType});\n\t\tif(!tiddlerFields) {\n\t\t\tbreak;\n\t\t}\n\t\t$tw.utils.each(tiddlerFields,function(value,name) {\n\t\t\tif(typeof value === \"string\") {\n\t\t\t\ttiddlerFields[name] = $tw.utils.htmlDecode(value);\n\t\t\t}\n\t\t});\n\t\tif(tiddlerFields.text !== null) {\n\t\t\tresults.push(tiddlerFields);\n\t\t}\n\t\tstartPos = endPos;\n\t\tmatch = endOfDivRegExp.exec(text);\n\t}\n\treturn results;\n}\n\n})();\n",
"title": "$:/core/modules/deserializers.js",
"type": "application/javascript",
"module-type": "tiddlerdeserializer"
},
"$:/core/modules/filters/addprefix.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/addprefix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for adding a prefix to each title in the list. This is\nespecially useful in contexts where only a filter expression is allowed\nand macro substitution isn't available.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.addprefix = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(operator.operand + title);\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/addprefix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/addsuffix.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/addsuffix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for adding a suffix to each title in the list. This is\nespecially useful in contexts where only a filter expression is allowed\nand macro substitution isn't available.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.addsuffix = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title + operator.operand);\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/addsuffix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/after.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/after.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddler from the current list that is after the tiddler named in the operand.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.after = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\tvar index = results.indexOf(operator.operand);\n\tif(index === -1 || index > (results.length - 2)) {\n\t\treturn [];\n\t} else {\n\t\treturn [results[index + 1]];\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/filters/after.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/all/current.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/all/current.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[current]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.current = function(source,prefix,options) {\n\tvar currTiddlerTitle = options.widget && options.widget.getVariable(\"currentTiddler\");\n\tif(currTiddlerTitle) {\n\t\treturn [currTiddlerTitle];\n\t} else {\n\t\treturn [];\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/filters/all/current.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/missing.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/all/missing.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[missing]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.missing = function(source,prefix,options) {\n\treturn options.wiki.getMissingTitles();\n};\n\n})();\n",
"title": "$:/core/modules/filters/all/missing.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/orphans.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/all/orphans.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[orphans]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.orphans = function(source,prefix,options) {\n\treturn options.wiki.getOrphanTitles();\n};\n\n})();\n",
"title": "$:/core/modules/filters/all/orphans.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/shadows.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/all/shadows.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[shadows]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.shadows = function(source,prefix,options) {\n\treturn options.wiki.allShadowTitles();\n};\n\n})();\n",
"title": "$:/core/modules/filters/all/shadows.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/tiddlers.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/all/tiddlers.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[tiddlers]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tiddlers = function(source,prefix,options) {\n\treturn options.wiki.allTitles();\n};\n\n})();\n",
"title": "$:/core/modules/filters/all/tiddlers.js",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/all.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for selecting tiddlers\n\n[all[shadows+tiddlers]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar allFilterOperators;\n\nfunction getAllFilterOperators() {\n\tif(!allFilterOperators) {\n\t\tallFilterOperators = {};\n\t\t$tw.modules.applyMethods(\"allfilteroperator\",allFilterOperators);\n\t}\n\treturn allFilterOperators;\n}\n\n/*\nExport our filter function\n*/\nexports.all = function(source,operator,options) {\n\t// Get our suboperators\n\tvar allFilterOperators = getAllFilterOperators();\n\t// Cycle through the suboperators accumulating their results\n\tvar results = [],\n\t\tsubops = operator.operand.split(\"+\");\n\t// Check for common optimisations\n\tif(subops.length === 1 && subops[0] === \"\") {\n\t\treturn source;\n\t} else if(subops.length === 1 && subops[0] === \"tiddlers\") {\n\t\treturn options.wiki.each;\n\t} else if(subops.length === 1 && subops[0] === \"shadows\") {\n\t\treturn options.wiki.eachShadow;\n\t} else if(subops.length === 2 && subops[0] === \"tiddlers\" && subops[1] === \"shadows\") {\n\t\treturn options.wiki.eachTiddlerPlusShadows;\n\t} else if(subops.length === 2 && subops[0] === \"shadows\" && subops[1] === \"tiddlers\") {\n\t\treturn options.wiki.eachShadowPlusTiddlers;\n\t}\n\t// Do it the hard way\n\tfor(var t=0; t<subops.length; t++) {\n\t\tvar subop = allFilterOperators[subops[t]];\n\t\tif(subop) {\n\t\t\t$tw.utils.pushTop(results,subop(source,operator.prefix,options));\n\t\t}\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/all.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/backlinks.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/backlinks.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning all the backlinks from a tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.backlinks = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.pushTop(results,options.wiki.getTiddlerBacklinks(title));\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/backlinks.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/before.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/before.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddler from the current list that is before the tiddler named in the operand.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.before = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\tvar index = results.indexOf(operator.operand);\n\tif(index <= 0) {\n\t\treturn [];\n\t} else {\n\t\treturn [results[index - 1]];\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/filters/before.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/commands.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/commands.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the commands available in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.commands = function(source,operator,options) {\n\tvar results = [];\n\t$tw.utils.each($tw.commands,function(commandInfo,name) {\n\t\tresults.push(name);\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/commands.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/days.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/days.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that selects tiddlers with a specified date field within a specified date interval.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.days = function(source,operator,options) {\n\tvar results = [],\n\t\tfieldName = operator.suffix || \"modified\",\n\t\tdayInterval = (parseInt(operator.operand,10)||0),\n\t\tdayIntervalSign = $tw.utils.sign(dayInterval),\n\t\ttargetTimeStamp = (new Date()).setHours(0,0,0,0) + 1000*60*60*24*dayInterval,\n\t\tisWithinDays = function(dateField) {\n\t\t\tvar sign = $tw.utils.sign(targetTimeStamp - (new Date(dateField)).setHours(0,0,0,0));\n\t\t\treturn sign === 0 || sign === dayIntervalSign;\n\t\t};\n\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler && tiddler.fields[fieldName]) {\n\t\t\t\tif(!isWithinDays($tw.utils.parseDate(tiddler.fields[fieldName]))) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler && tiddler.fields[fieldName]) {\n\t\t\t\tif(isWithinDays($tw.utils.parseDate(tiddler.fields[fieldName]))) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/days.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/each.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/each.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that selects one tiddler for each unique value of the specified field.\nWith suffix \"list\", selects all tiddlers that are values in a specified list field.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.each = function(source,operator,options) {\n\tvar results =[] ,\n\t\tvalue,values = {},\n\t\tfield = operator.operand || \"title\";\n\tif(operator.suffix !== \"list-item\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler) {\n\t\t\t\tvalue = (field === \"title\") ? title : tiddler.getFieldString(field);\n\t\t\t\tif(!$tw.utils.hop(values,value)) {\n\t\t\t\t\tvalues[value] = true;\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler) {\n\t\t\t\t$tw.utils.each(\n\t\t\t\t\toptions.wiki.getTiddlerList(title,field),\n\t\t\t\t\tfunction(value) {\n\t\t\t\t\t\tif(!$tw.utils.hop(values,value)) {\n\t\t\t\t\t\t\tvalues[value] = true;\n\t\t\t\t\t\t\tresults.push(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/each.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/eachday.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/eachday.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that selects one tiddler for each unique day covered by the specified date field\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.eachday = function(source,operator,options) {\n\tvar results = [],\n\t\tvalues = [],\n\t\tfieldName = operator.operand || \"modified\";\n\t// Function to convert a date/time to a date integer\n\tvar toDate = function(value) {\n\t\tvalue = (new Date(value)).setHours(0,0,0,0);\n\t\treturn value+0;\n\t};\n\tsource(function(tiddler,title) {\n\t\tif(tiddler && tiddler.fields[fieldName]) {\n\t\t\tvar value = toDate($tw.utils.parseDate(tiddler.fields[fieldName]));\n\t\t\tif(values.indexOf(value) === -1) {\n\t\t\t\tvalues.push(value);\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/eachday.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/editiondescription.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/editiondescription.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the descriptions of the specified edition names\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.editiondescription = function(source,operator,options) {\n\tvar results = [],\n\t\teditionInfo = $tw.utils.getEditionInfo();\n\tif(editionInfo) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif($tw.utils.hop(editionInfo,title)) {\n\t\t\t\tresults.push(editionInfo[title].description || \"\");\t\t\t\t\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/editiondescription.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/editions.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/editions.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the available editions in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.editions = function(source,operator,options) {\n\tvar results = [],\n\t\teditionInfo = $tw.utils.getEditionInfo();\n\tif(editionInfo) {\n\t\t$tw.utils.each(editionInfo,function(info,name) {\n\t\t\tresults.push(name);\n\t\t});\n\t}\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/editions.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/field.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/field.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for comparing fields for equality\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.field = function(source,operator,options) {\n\tvar results = [],\n\t\tfieldname = (operator.suffix || operator.operator || \"title\").toLowerCase();\n\tif(operator.prefix === \"!\") {\n\t\tif(operator.regexp) {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler) {\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\n\t\t\t\t\tif(text !== null && !operator.regexp.exec(text)) {\n\t\t\t\t\t\tresults.push(title);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler) {\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\n\t\t\t\t\tif(text !== null && text !== operator.operand) {\n\t\t\t\t\t\tresults.push(title);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t} else {\n\t\tif(operator.regexp) {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler) {\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\n\t\t\t\t\tif(text !== null && !!operator.regexp.exec(text)) {\n\t\t\t\t\t\tresults.push(title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler) {\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\n\t\t\t\t\tif(text !== null && text === operator.operand) {\n\t\t\t\t\t\tresults.push(title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/field.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/fields.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/fields.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the fields on the selected tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.fields = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tif(tiddler) {\n\t\t\tfor(var fieldName in tiddler.fields) {\n\t\t\t\t$tw.utils.pushTop(results,fieldName);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/fields.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/get.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/get.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for replacing tiddler titles by the value of the field specified in the operand.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.get = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tif(tiddler) {\n\t\t\tvar value = tiddler.getFieldString(operator.operand);\n\t\t\tif(value) {\n\t\t\t\tresults.push(value);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/get.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/getindex.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/getindex.js\ntype: application/javascript\nmodule-type: filteroperator\n\nreturns the value at a given index of datatiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.getindex = function(source,operator,options) {\n\tvar data,title,results = [];\n\tif(operator.operand){\n\t\tsource(function(tiddler,title) {\n\t\t\ttitle = tiddler ? tiddler.fields.title : title;\n\t\t\tdata = options.wiki.extractTiddlerDataItem(tiddler,operator.operand);\n\t\t\tif(data) {\n\t\t\t\tresults.push(data);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/getindex.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/has.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/has.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking if a tiddler has the specified field\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.has = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!tiddler || (tiddler && (!$tw.utils.hop(tiddler.fields,operator.operand) || tiddler.fields[operator.operand] === \"\"))) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler && $tw.utils.hop(tiddler.fields,operator.operand) && tiddler.fields[operator.operand] !== \"\") {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/has.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/haschanged.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/haschanged.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returns tiddlers from the list that have a non-zero changecount.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.haschanged = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.getChangeCount(title) === 0) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.getChangeCount(title) > 0) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/haschanged.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/indexes.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/indexes.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the indexes of a data tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.indexes = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tvar data = options.wiki.getTiddlerDataCached(title);\n\t\tif(data) {\n\t\t\t$tw.utils.pushTop(results,Object.keys(data));\n\t\t}\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/indexes.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/is/current.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/is/current.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[current]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.current = function(source,prefix,options) {\n\tvar results = [],\n\t\tcurrTiddlerTitle = options.widget && options.widget.getVariable(\"currentTiddler\");\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title !== currTiddlerTitle) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title === currTiddlerTitle) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/is/current.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/image.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/is/image.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[image]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.image = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.isImageTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.isImageTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/is/image.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/missing.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/is/missing.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[missing]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.missing = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.tiddlerExists(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.tiddlerExists(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/is/missing.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/orphan.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/is/orphan.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[orphan]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.orphan = function(source,prefix,options) {\n\tvar results = [],\n\t\torphanTitles = options.wiki.getOrphanTitles();\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(orphanTitles.indexOf(title) === -1) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(orphanTitles.indexOf(title) !== -1) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/is/orphan.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/shadow.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/is/shadow.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[shadow]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.shadow = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.isShadowTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.isShadowTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/is/shadow.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/system.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/is/system.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[system]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.system = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.isSystemTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.isSystemTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/is/system.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/tag.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/is/tag.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[tag]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tag = function(source,prefix,options) {\n\tvar results = [],\n\t\ttagMap = options.wiki.getTagMap();\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!$tw.utils.hop(tagMap,title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif($tw.utils.hop(tagMap,title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/is/tag.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/tiddler.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/is/tiddler.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[tiddler]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tiddler = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.tiddlerExists(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.tiddlerExists(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/is/tiddler.js",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/is.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking tiddler properties\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar isFilterOperators;\n\nfunction getIsFilterOperators() {\n\tif(!isFilterOperators) {\n\t\tisFilterOperators = {};\n\t\t$tw.modules.applyMethods(\"isfilteroperator\",isFilterOperators);\n\t}\n\treturn isFilterOperators;\n}\n\n/*\nExport our filter function\n*/\nexports.is = function(source,operator,options) {\n\t// Dispatch to the correct isfilteroperator\n\tvar isFilterOperators = getIsFilterOperators();\n\tvar isFilterOperator = isFilterOperators[operator.operand];\n\tif(isFilterOperator) {\n\t\treturn isFilterOperator(source,operator.prefix,options);\n\t} else {\n\t\treturn [\"Filter Error: Unknown operand for the 'is' filter operator\"];\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/filters/is.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/limit.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/limit.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for chopping the results to a specified maximum number of entries\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.limit = function(source,operator,options) {\n\tvar results = [];\n\t// Convert to an array\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\t// Slice the array if necessary\n\tvar limit = Math.min(results.length,parseInt(operator.operand,10));\n\tif(operator.prefix === \"!\") {\n\t\tresults = results.slice(-limit);\n\t} else {\n\t\tresults = results.slice(0,limit);\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/limit.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/links.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/links.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning all the links from a tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.links = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.pushTop(results,options.wiki.getTiddlerLinks(title));\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/links.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/list.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/list.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddlers whose title is listed in the operand tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.list = function(source,operator,options) {\n\tvar results = [],\n\t\ttr = $tw.utils.parseTextReference(operator.operand),\n\t\tcurrTiddlerTitle = options.widget && options.widget.getVariable(\"currentTiddler\"),\n\t\tlist = options.wiki.getTiddlerList(tr.title || currTiddlerTitle,tr.field,tr.index);\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(list.indexOf(title) === -1) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tresults = list;\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/list.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/listed.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/listed.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning all tiddlers that have the selected tiddlers in a list\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.listed = function(source,operator,options) {\n\tvar field = operator.operand || \"list\",\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.pushTop(results,options.wiki.findListingsOfTiddler(title,field));\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/listed.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/listops.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/listops.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operators for manipulating the current selection list\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nReverse list\n*/\nexports.reverse = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.unshift(title);\n\t});\n\treturn results;\n};\n\n/*\nFirst entry/entries in list\n*/\nexports.first = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(0,count);\n};\n\n/*\nLast entry/entries in list\n*/\nexports.last = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(-count);\n};\n\n/*\nAll but the first entry/entries of the list\n*/\nexports.rest = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(count);\n};\nexports.butfirst = exports.rest;\nexports.bf = exports.rest;\n\n/*\nAll but the last entry/entries of the list\n*/\nexports.butlast = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(0,-count);\n};\nexports.bl = exports.butlast;\n\n/*\nThe nth member of the list\n*/\nexports.nth = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(count - 1,count);\n};\n\n})();\n",
"title": "$:/core/modules/filters/listops.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/modules.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/modules.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the titles of the modules of a given type in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.modules = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.each($tw.modules.types[title],function(moduleInfo,moduleName) {\n\t\t\tresults.push(moduleName);\n\t\t});\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/modules.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/moduletypes.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/moduletypes.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the module types in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.moduletypes = function(source,operator,options) {\n\tvar results = [];\n\t$tw.utils.each($tw.modules.types,function(moduleInfo,type) {\n\t\tresults.push(type);\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/moduletypes.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/next.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/next.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddler whose title occurs next in the list supplied in the operand tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.next = function(source,operator,options) {\n\tvar results = [],\n\t\tlist = options.wiki.getTiddlerList(operator.operand);\n\tsource(function(tiddler,title) {\n\t\tvar match = list.indexOf(title);\n\t\t// increment match and then test if result is in range\n\t\tmatch++;\n\t\tif(match > 0 && match < list.length) {\n\t\t\tresults.push(list[match]);\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/next.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/plugintiddlers.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/plugintiddlers.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the titles of the shadow tiddlers within a plugin\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.plugintiddlers = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tvar pluginInfo = options.wiki.getPluginInfo(title) || options.wiki.getTiddlerDataCached(title,{tiddlers:[]});\n\t\tif(pluginInfo && pluginInfo.tiddlers) {\n\t\t\t$tw.utils.each(pluginInfo.tiddlers,function(fields,title) {\n\t\t\t\tresults.push(title);\n\t\t\t});\n\t\t}\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/plugintiddlers.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/prefix.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/prefix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking if a title starts with a prefix\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.prefix = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title.substr(0,operator.operand.length) !== operator.operand) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title.substr(0,operator.operand.length) === operator.operand) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/prefix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/previous.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/previous.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddler whose title occurs immediately prior in the list supplied in the operand tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.previous = function(source,operator,options) {\n\tvar results = [],\n\t\tlist = options.wiki.getTiddlerList(operator.operand);\n\tsource(function(tiddler,title) {\n\t\tvar match = list.indexOf(title);\n\t\t// increment match and then test if result is in range\n\t\tmatch--;\n\t\tif(match >= 0) {\n\t\t\tresults.push(list[match]);\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/previous.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/regexp.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/regexp.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for regexp matching\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.regexp = function(source,operator,options) {\n\tvar results = [],\n\t\tfieldname = (operator.suffix || \"title\").toLowerCase(),\n\t\tregexpString, regexp, flags = \"\", match,\n\t\tgetFieldString = function(tiddler,title) {\n\t\t\tif(tiddler) {\n\t\t\t\treturn tiddler.getFieldString(fieldname);\n\t\t\t} else if(fieldname === \"title\") {\n\t\t\t\treturn title;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t// Process flags and construct regexp\n\tregexpString = operator.operand;\n\tmatch = /^\\(\\?([gim]+)\\)/.exec(regexpString);\n\tif(match) {\n\t\tflags = match[1];\n\t\tregexpString = regexpString.substr(match[0].length);\n\t} else {\n\t\tmatch = /\\(\\?([gim]+)\\)$/.exec(regexpString);\n\t\tif(match) {\n\t\t\tflags = match[1];\n\t\t\tregexpString = regexpString.substr(0,regexpString.length - match[0].length);\n\t\t}\n\t}\n\ttry {\n\t\tregexp = new RegExp(regexpString,flags);\n\t} catch(e) {\n\t\treturn [\"\" + e];\n\t}\n\t// Process the incoming tiddlers\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tvar text = getFieldString(tiddler,title);\n\t\t\tif(text !== null) {\n\t\t\t\tif(!regexp.exec(text)) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tvar text = getFieldString(tiddler,title);\n\t\t\tif(text !== null) {\n\t\t\t\tif(!!regexp.exec(text)) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/regexp.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/removeprefix.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/removeprefix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for removing a prefix from each title in the list. Titles that do not start with the prefix are removed.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.removeprefix = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tif(title.substr(0,operator.operand.length) === operator.operand) {\n\t\t\tresults.push(title.substr(operator.operand.length));\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/removeprefix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/removesuffix.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/removesuffix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for removing a suffix from each title in the list. Titles that do not end with the suffix are removed.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.removesuffix = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tif(title.substr(-operator.operand.length) === operator.operand) {\n\t\t\tresults.push(title.substr(0,title.length - operator.operand.length));\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/removesuffix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/sameday.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/sameday.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that selects tiddlers with a modified date field on the same day as the provided value.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.sameday = function(source,operator,options) {\n\tvar results = [],\n\t\tfieldName = operator.suffix || \"modified\",\n\t\ttargetDate = (new Date($tw.utils.parseDate(operator.operand))).setHours(0,0,0,0);\n\t// Function to convert a date/time to a date integer\n\tvar isSameDay = function(dateField) {\n\t\t\treturn (new Date(dateField)).setHours(0,0,0,0) === targetDate;\n\t\t};\n\tsource(function(tiddler,title) {\n\t\tif(tiddler && tiddler.fields[fieldName]) {\n\t\t\tif(isSameDay($tw.utils.parseDate(tiddler.fields[fieldName]))) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/sameday.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/search.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/search.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for searching for the text in the operand tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.search = function(source,operator,options) {\n\tvar invert = operator.prefix === \"!\";\n\tif(operator.suffix) {\n\t\treturn options.wiki.search(operator.operand,{\n\t\t\tsource: source,\n\t\t\tinvert: invert,\n\t\t\tfield: operator.suffix\n\t\t});\n\t} else {\n\t\treturn options.wiki.search(operator.operand,{\n\t\t\tsource: source,\n\t\t\tinvert: invert\n\t\t});\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/filters/search.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/shadowsource.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/shadowsource.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the source plugins for shadow tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.shadowsource = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tvar source = options.wiki.getShadowSource(title);\n\t\tif(source) {\n\t\t\t$tw.utils.pushTop(results,source);\n\t\t}\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/shadowsource.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/sort.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/sort.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for sorting\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.sort = function(source,operator,options) {\n\tvar results = prepare_results(source);\n\toptions.wiki.sortTiddlers(results,operator.operand || \"title\",operator.prefix === \"!\",false,false);\n\treturn results;\n};\n\nexports.nsort = function(source,operator,options) {\n\tvar results = prepare_results(source);\n\toptions.wiki.sortTiddlers(results,operator.operand || \"title\",operator.prefix === \"!\",false,true);\n\treturn results;\n};\n\nexports.sortcs = function(source,operator,options) {\n\tvar results = prepare_results(source);\n\toptions.wiki.sortTiddlers(results,operator.operand || \"title\",operator.prefix === \"!\",true,false);\n\treturn results;\n};\n\nexports.nsortcs = function(source,operator,options) {\n\tvar results = prepare_results(source);\n\toptions.wiki.sortTiddlers(results,operator.operand || \"title\",operator.prefix === \"!\",true,true);\n\treturn results;\n};\n\nvar prepare_results = function (source) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/sort.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/splitbefore.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/splitbefore.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that splits each result on the first occurance of the specified separator and returns the unique values.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.splitbefore = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tvar parts = title.split(operator.operand);\n\t\tif(parts.length === 1) {\n\t\t\t$tw.utils.pushTop(results,parts[0]);\n\t\t} else {\n\t\t\t$tw.utils.pushTop(results,parts[0] + operator.operand);\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/splitbefore.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/storyviews.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/storyviews.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the story views in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.storyviews = function(source,operator,options) {\n\tvar results = [],\n\t\tstoryviews = {};\n\t$tw.modules.applyMethods(\"storyview\",storyviews);\n\t$tw.utils.each(storyviews,function(info,name) {\n\t\tresults.push(name);\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/storyviews.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/suffix.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/suffix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking if a title ends with a suffix\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.suffix = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title.substr(-operator.operand.length) !== operator.operand) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title.substr(-operator.operand.length) === operator.operand) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/suffix.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/tag.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/tag.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking for the presence of a tag\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tag = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler && !tiddler.hasTag(operator.operand)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler && tiddler.hasTag(operator.operand)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t\tresults = options.wiki.sortByList(results,operator.operand);\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/tag.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/tagging.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/tagging.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning all tiddlers that are tagged with the selected tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tagging = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.pushTop(results,options.wiki.getTiddlersWithTag(title));\n\t});\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/tagging.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/tags.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/tags.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning all the tags of the selected tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tags = function(source,operator,options) {\n\tvar tags = {};\n\tsource(function(tiddler,title) {\n\t\tvar t, length;\n\t\tif(tiddler && tiddler.fields.tags) {\n\t\t\tfor(t=0, length=tiddler.fields.tags.length; t<length; t++) {\n\t\t\t\ttags[tiddler.fields.tags[t]] = true;\n\t\t\t}\n\t\t}\n\t});\n\treturn Object.keys(tags);\n};\n\n})();\n",
"title": "$:/core/modules/filters/tags.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/title.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/title.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for comparing title fields for equality\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.title = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler && tiddler.fields.title !== operator.operand) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tresults.push(operator.operand);\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/title.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/untagged.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/untagged.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning all the selected tiddlers that are untagged\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.untagged = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler && $tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length > 0) {\n\t\t\t\t$tw.utils.pushTop(results,title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!tiddler || !tiddler.hasField(\"tags\") || ($tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length === 0)) {\n\t\t\t\t$tw.utils.pushTop(results,title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/untagged.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/wikiparserrules.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/wikiparserrules.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the wiki parser rules in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.wikiparserrules = function(source,operator,options) {\n\tvar results = [];\n\t$tw.utils.each($tw.modules.types.wikirule,function(mod) {\n\t\tvar exp = mod.exports;\n\t\tif(exp.types[operator.operand]) {\n\t\t\tresults.push(exp.name);\n\t\t}\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"title": "$:/core/modules/filters/wikiparserrules.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/x-listops.js": {
"text": "/*\\\ntitle: $:/core/modules/filters/x-listops.js\ntype: application/javascript\nmodule-type: filteroperator\n\nExtended filter operators to manipulate the current list.\n\n\\*/\n(function () {\n\n /*jslint node: true, browser: true */\n /*global $tw: false */\n \"use strict\";\n\n /*\n Fetch titles from the current list\n */\n var prepare_results = function (source) {\n var results = [];\n source(function (tiddler, title) {\n results.push(title);\n });\n return results;\n };\n\n /*\n Moves a number of items from the tail of the current list before the item named in the operand\n */\n exports.putbefore = function (source, operator) {\n var results = prepare_results(source),\n index = results.indexOf(operator.operand),\n count = parseInt(operator.suffix) || 1;\n return (index === -1) ?\n results.slice(0, -1) :\n results.slice(0, index).concat(results.slice(-count)).concat(results.slice(index, -count));\n };\n\n /*\n Moves a number of items from the tail of the current list after the item named in the operand\n */\n exports.putafter = function (source, operator) {\n var results = prepare_results(source),\n index = results.indexOf(operator.operand),\n count = parseInt(operator.suffix) || 1;\n return (index === -1) ?\n results.slice(0, -1) :\n results.slice(0, index + 1).concat(results.slice(-count)).concat(results.slice(index + 1, -count));\n };\n\n /*\n Replaces the item named in the operand with a number of items from the tail of the current list\n */\n exports.replace = function (source, operator) {\n var results = prepare_results(source),\n index = results.indexOf(operator.operand),\n count = parseInt(operator.suffix) || 1;\n return (index === -1) ?\n results.slice(0, -count) :\n results.slice(0, index).concat(results.slice(-count)).concat(results.slice(index + 1, -count));\n };\n\n /*\n Moves a number of items from the tail of the current list to the head of the list\n */\n exports.putfirst = function (source, operator) {\n var results = prepare_results(source),\n count = parseInt(operator.suffix) || 1;\n return results.slice(-count).concat(results.slice(0, -count));\n };\n\n /*\n Moves a number of items from the head of the current list to the tail of the list\n */\n exports.putlast = function (source, operator) {\n var results = prepare_results(source),\n count = parseInt(operator.suffix) || 1;\n return results.slice(count).concat(results.slice(0, count));\n };\n\n /*\n Moves the item named in the operand a number of places forward or backward in the list\n */\n exports.move = function (source, operator) {\n var results = prepare_results(source),\n index = results.indexOf(operator.operand),\n count = parseInt(operator.suffix) || 1,\n marker = results.splice(index, 1);\n return results.slice(0, index + count).concat(marker).concat(results.slice(index + count));\n };\n\n /*\n Returns the items from the current list that are after the item named in the operand\n */\n exports.allafter = function (source, operator) {\n var results = prepare_results(source),\n index = results.indexOf(operator.operand);\n return (index === -1 || index > (results.length - 2)) ? [] :\n (operator.suffix) ? results.slice(index) :\n results.slice(index + 1);\n };\n\n /*\n Returns the items from the current list that are before the item named in the operand\n */\n exports.allbefore = function (source, operator) {\n var results = prepare_results(source),\n index = results.indexOf(operator.operand);\n return (index <= 0) ? [] :\n (operator.suffix) ? results.slice(0, index + 1) :\n results.slice(0, index);\n };\n\n /*\n Appends the items listed in the operand array to the tail of the current list\n */\n exports.append = function (source, operator) {\n var append = $tw.utils.parseStringArray(operator.operand, \"true\"),\n results = prepare_results(source),\n count = parseInt(operator.suffix) || append.length;\n return (append.length === 0) ? results :\n (operator.prefix) ? results.concat(append.slice(-count)) :\n results.concat(append.slice(0, count));\n };\n\n /*\n Prepends the items listed in the operand array to the head of the current list\n */\n exports.prepend = function (source, operator) {\n var prepend = $tw.utils.parseStringArray(operator.operand, \"true\"),\n results = prepare_results(source),\n count = parseInt(operator.suffix) || prepend.length;\n return (prepend.length === 0) ? results :\n (operator.prefix) ? prepend.slice(-count).concat(results) :\n prepend.slice(0, count).concat(results);\n };\n\n /*\n Returns all items from the current list except the items listed in the operand array\n */\n exports.remove = function (source, operator) {\n var array = $tw.utils.parseStringArray(operator.operand, \"true\"),\n results = prepare_results(source),\n count = parseInt(operator.suffix) || array.length,\n p,\n len,\n index;\n len = array.length - 1;\n for (p = 0; p < count; ++p) {\n if (operator.prefix) {\n index = results.indexOf(array[len - p]);\n } else {\n index = results.indexOf(array[p]);\n }\n if (index !== -1) {\n results.splice(index, 1);\n }\n }\n return results;\n };\n\n /*\n Returns all items from the current list sorted in the order of the items in the operand array\n */\n exports.sortby = function (source, operator) {\n var results = prepare_results(source);\n if (!results || results.length < 2) {\n return results;\n }\n var lookup = $tw.utils.parseStringArray(operator.operand, \"true\");\n results.sort(function (a, b) {\n return lookup.indexOf(a) - lookup.indexOf(b);\n });\n return results;\n };\n\n /*\n Removes all duplicate items from the current list\n */\n exports.unique = function (source, operator) {\n var results = prepare_results(source);\n var set = results.reduce(function (a, b) {\n if (a.indexOf(b) < 0) {\n a.push(b);\n }\n return a;\n }, []);\n return set;\n };\n})();\n",
"title": "$:/core/modules/filters/x-listops.js",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters.js": {
"text": "/*\\\ntitle: $:/core/modules/filters.js\ntype: application/javascript\nmodule-type: wikimethod\n\nAdds tiddler filtering methods to the $tw.Wiki object.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nParses an operation (i.e. a run) within a filter string\n\toperators: Array of array of operator nodes into which results should be inserted\n\tfilterString: filter string\n\tp: start position within the string\nReturns the new start position, after the parsed operation\n*/\nfunction parseFilterOperation(operators,filterString,p) {\n\tvar operator, operand, bracketPos, curlyBracketPos;\n\t// Skip the starting square bracket\n\tif(filterString.charAt(p++) !== \"[\") {\n\t\tthrow \"Missing [ in filter expression\";\n\t}\n\t// Process each operator in turn\n\tdo {\n\t\toperator = {};\n\t\t// Check for an operator prefix\n\t\tif(filterString.charAt(p) === \"!\") {\n\t\t\toperator.prefix = filterString.charAt(p++);\n\t\t}\n\t\t// Get the operator name\n\t\tvar nextBracketPos = filterString.substring(p).search(/[\\[\\{<\\/]/);\n\t\tif(nextBracketPos === -1) {\n\t\t\tthrow \"Missing [ in filter expression\";\n\t\t}\n\t\tnextBracketPos += p;\n\t\tvar bracket = filterString.charAt(nextBracketPos);\n\t\toperator.operator = filterString.substring(p,nextBracketPos);\n\t\t\n\t\t// Any suffix?\n\t\tvar colon = operator.operator.indexOf(':');\n\t\tif(colon > -1) {\n\t\t\toperator.suffix = operator.operator.substring(colon + 1);\n\t\t\toperator.operator = operator.operator.substring(0,colon) || \"field\";\n\t\t}\n\t\t// Empty operator means: title\n\t\telse if(operator.operator === \"\") {\n\t\t\toperator.operator = \"title\";\n\t\t}\n\n\t\tp = nextBracketPos + 1;\n\t\tswitch (bracket) {\n\t\t\tcase \"{\": // Curly brackets\n\t\t\t\toperator.indirect = true;\n\t\t\t\tnextBracketPos = filterString.indexOf(\"}\",p);\n\t\t\t\tbreak;\n\t\t\tcase \"[\": // Square brackets\n\t\t\t\tnextBracketPos = filterString.indexOf(\"]\",p);\n\t\t\t\tbreak;\n\t\t\tcase \"<\": // Angle brackets\n\t\t\t\toperator.variable = true;\n\t\t\t\tnextBracketPos = filterString.indexOf(\">\",p);\n\t\t\t\tbreak;\n\t\t\tcase \"/\": // regexp brackets\n\t\t\t\tvar rex = /^((?:[^\\\\\\/]*|\\\\.)*)\\/(?:\\(([mygi]+)\\))?/g,\n\t\t\t\t\trexMatch = rex.exec(filterString.substring(p));\n\t\t\t\tif(rexMatch) {\n\t\t\t\t\toperator.regexp = new RegExp(rexMatch[1], rexMatch[2]);\n// DEPRECATION WARNING\nconsole.log(\"WARNING: Filter\",operator.operator,\"has a deprecated regexp operand\",operator.regexp);\n\t\t\t\t\tnextBracketPos = p + rex.lastIndex - 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow \"Unterminated regular expression in filter expression\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif(nextBracketPos === -1) {\n\t\t\tthrow \"Missing closing bracket in filter expression\";\n\t\t}\n\t\tif(!operator.regexp) {\n\t\t\toperator.operand = filterString.substring(p,nextBracketPos);\n\t\t}\n\t\tp = nextBracketPos + 1;\n\t\t\t\n\t\t// Push this operator\n\t\toperators.push(operator);\n\t} while(filterString.charAt(p) !== \"]\");\n\t// Skip the ending square bracket\n\tif(filterString.charAt(p++) !== \"]\") {\n\t\tthrow \"Missing ] in filter expression\";\n\t}\n\t// Return the parsing position\n\treturn p;\n}\n\n/*\nParse a filter string\n*/\nexports.parseFilter = function(filterString) {\n\tfilterString = filterString || \"\";\n\tvar results = [], // Array of arrays of operator nodes {operator:,operand:}\n\t\tp = 0, // Current position in the filter string\n\t\tmatch;\n\tvar whitespaceRegExp = /(\\s+)/mg,\n\t\toperandRegExp = /((?:\\+|\\-)?)(?:(\\[)|(?:\"([^\"]*)\")|(?:'([^']*)')|([^\\s\\[\\]]+))/mg;\n\twhile(p < filterString.length) {\n\t\t// Skip any whitespace\n\t\twhitespaceRegExp.lastIndex = p;\n\t\tmatch = whitespaceRegExp.exec(filterString);\n\t\tif(match && match.index === p) {\n\t\t\tp = p + match[0].length;\n\t\t}\n\t\t// Match the start of the operation\n\t\tif(p < filterString.length) {\n\t\t\toperandRegExp.lastIndex = p;\n\t\t\tmatch = operandRegExp.exec(filterString);\n\t\t\tif(!match || match.index !== p) {\n\t\t\t\tthrow \"Syntax error in filter expression\";\n\t\t\t}\n\t\t\tvar operation = {\n\t\t\t\tprefix: \"\",\n\t\t\t\toperators: []\n\t\t\t};\n\t\t\tif(match[1]) {\n\t\t\t\toperation.prefix = match[1];\n\t\t\t\tp++;\n\t\t\t}\n\t\t\tif(match[2]) { // Opening square bracket\n\t\t\t\tp = parseFilterOperation(operation.operators,filterString,p);\n\t\t\t} else {\n\t\t\t\tp = match.index + match[0].length;\n\t\t\t}\n\t\t\tif(match[3] || match[4] || match[5]) { // Double quoted string, single quoted string or unquoted title\n\t\t\t\toperation.operators.push(\n\t\t\t\t\t{operator: \"title\", operand: match[3] || match[4] || match[5]}\n\t\t\t\t);\n\t\t\t}\n\t\t\tresults.push(operation);\n\t\t}\n\t}\n\treturn results;\n};\n\nexports.getFilterOperators = function() {\n\tif(!this.filterOperators) {\n\t\t$tw.Wiki.prototype.filterOperators = {};\n\t\t$tw.modules.applyMethods(\"filteroperator\",this.filterOperators);\n\t}\n\treturn this.filterOperators;\n};\n\nexports.filterTiddlers = function(filterString,widget,source) {\n\tvar fn = this.compileFilter(filterString);\n\treturn fn.call(this,source,widget);\n};\n\n/*\nCompile a filter into a function with the signature fn(source,widget) where:\nsource: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title)\nwidget: an optional widget node for retrieving the current tiddler etc.\n*/\nexports.compileFilter = function(filterString) {\n\tvar filterParseTree;\n\ttry {\n\t\tfilterParseTree = this.parseFilter(filterString);\n\t} catch(e) {\n\t\treturn function(source,widget) {\n\t\t\treturn [\"Filter error: \" + e];\n\t\t};\n\t}\n\t// Get the hashmap of filter operator functions\n\tvar filterOperators = this.getFilterOperators();\n\t// Assemble array of functions, one for each operation\n\tvar operationFunctions = [];\n\t// Step through the operations\n\tvar self = this;\n\t$tw.utils.each(filterParseTree,function(operation) {\n\t\t// Create a function for the chain of operators in the operation\n\t\tvar operationSubFunction = function(source,widget) {\n\t\t\tvar accumulator = source,\n\t\t\t\tresults = [],\n\t\t\t\tcurrTiddlerTitle = widget && widget.getVariable(\"currentTiddler\");\n\t\t\t$tw.utils.each(operation.operators,function(operator) {\n\t\t\t\tvar operand = operator.operand,\n\t\t\t\t\toperatorFunction;\n\t\t\t\tif(!operator.operator) {\n\t\t\t\t\toperatorFunction = filterOperators.title;\n\t\t\t\t} else if(!filterOperators[operator.operator]) {\n\t\t\t\t\toperatorFunction = filterOperators.field;\n\t\t\t\t} else {\n\t\t\t\t\toperatorFunction = filterOperators[operator.operator];\n\t\t\t\t}\n\t\t\t\tif(operator.indirect) {\n\t\t\t\t\toperand = self.getTextReference(operator.operand,\"\",currTiddlerTitle);\n\t\t\t\t}\n\t\t\t\tif(operator.variable) {\n\t\t\t\t\toperand = widget.getVariable(operator.operand,{defaultValue: \"\"});\n\t\t\t\t}\n\t\t\t\t// Invoke the appropriate filteroperator module\n\t\t\t\tresults = operatorFunction(accumulator,{\n\t\t\t\t\t\t\toperator: operator.operator,\n\t\t\t\t\t\t\toperand: operand,\n\t\t\t\t\t\t\tprefix: operator.prefix,\n\t\t\t\t\t\t\tsuffix: operator.suffix,\n\t\t\t\t\t\t\tregexp: operator.regexp\n\t\t\t\t\t\t},{\n\t\t\t\t\t\t\twiki: self,\n\t\t\t\t\t\t\twidget: widget\n\t\t\t\t\t\t});\n\t\t\t\tif($tw.utils.isArray(results)) {\n\t\t\t\t\taccumulator = self.makeTiddlerIterator(results);\n\t\t\t\t} else {\n\t\t\t\t\taccumulator = results;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif($tw.utils.isArray(results)) {\n\t\t\t\treturn results;\n\t\t\t} else {\n\t\t\t\tvar resultArray = [];\n\t\t\t\tresults(function(tiddler,title) {\n\t\t\t\t\tresultArray.push(title);\n\t\t\t\t});\n\t\t\t\treturn resultArray;\n\t\t\t}\n\t\t};\n\t\t// Wrap the operator functions in a wrapper function that depends on the prefix\n\t\toperationFunctions.push((function() {\n\t\t\tswitch(operation.prefix || \"\") {\n\t\t\t\tcase \"\": // No prefix means that the operation is unioned into the result\n\t\t\t\t\treturn function(results,source,widget) {\n\t\t\t\t\t\t$tw.utils.pushTop(results,operationSubFunction(source,widget));\n\t\t\t\t\t};\n\t\t\t\tcase \"-\": // The results of this operation are removed from the main result\n\t\t\t\t\treturn function(results,source,widget) {\n\t\t\t\t\t\t$tw.utils.removeArrayEntries(results,operationSubFunction(source,widget));\n\t\t\t\t\t};\n\t\t\t\tcase \"+\": // This operation is applied to the main results so far\n\t\t\t\t\treturn function(results,source,widget) {\n\t\t\t\t\t\t// This replaces all the elements of the array, but keeps the actual array so that references to it are preserved\n\t\t\t\t\t\tsource = self.makeTiddlerIterator(results);\n\t\t\t\t\t\tresults.splice(0,results.length);\n\t\t\t\t\t\t$tw.utils.pushTop(results,operationSubFunction(source,widget));\n\t\t\t\t\t};\n\t\t\t}\n\t\t})());\n\t});\n\t// Return a function that applies the operations to a source iterator of tiddler titles\n\treturn $tw.perf.measure(\"filter\",function filterFunction(source,widget) {\n\t\tif(!source) {\n\t\t\tsource = self.each;\n\t\t} else if(typeof source === \"object\") { // Array or hashmap\n\t\t\tsource = self.makeTiddlerIterator(source);\n\t\t}\n\t\tvar results = [];\n\t\t$tw.utils.each(operationFunctions,function(operationFunction) {\n\t\t\toperationFunction(results,source,widget);\n\t\t});\n\t\treturn results;\n\t});\n};\n\n})();\n",
"title": "$:/core/modules/filters.js",
"type": "application/javascript",
"module-type": "wikimethod"
},
"$:/core/modules/info/platform.js": {
"text": "/*\\\ntitle: $:/core/modules/info/platform.js\ntype: application/javascript\nmodule-type: info\n\nInitialise basic platform $:/info/ tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.getInfoTiddlerFields = function() {\n\tvar mapBoolean = function(value) {return value ? \"yes\" : \"no\";},\n\t\tinfoTiddlerFields = [];\n\t// Basics\n\tinfoTiddlerFields.push({title: \"$:/info/browser\", text: mapBoolean(!!$tw.browser)});\n\tinfoTiddlerFields.push({title: \"$:/info/node\", text: mapBoolean(!!$tw.node)});\n\treturn infoTiddlerFields;\n};\n\n})();\n",
"title": "$:/core/modules/info/platform.js",
"type": "application/javascript",
"module-type": "info"
},
"$:/core/modules/language.js": {
"text": "/*\\\ntitle: $:/core/modules/language.js\ntype: application/javascript\nmodule-type: global\n\nThe $tw.Language() manages translateable strings\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nCreate an instance of the language manager. Options include:\nwiki: wiki from which to retrieve translation tiddlers\n*/\nfunction Language(options) {\n\toptions = options || \"\";\n\tthis.wiki = options.wiki || $tw.wiki;\n}\n\n/*\nReturn a wikified translateable string. The title is automatically prefixed with \"$:/language/\"\nOptions include:\nvariables: optional hashmap of variables to supply to the language wikification\n*/\nLanguage.prototype.getString = function(title,options) {\n\toptions = options || {};\n\ttitle = \"$:/language/\" + title;\n\treturn this.wiki.renderTiddler(\"text/plain\",title,{variables: options.variables});\n};\n\n/*\nReturn a raw, unwikified translateable string. The title is automatically prefixed with \"$:/language/\"\n*/\nLanguage.prototype.getRawString = function(title) {\n\ttitle = \"$:/language/\" + title;\n\treturn this.wiki.getTiddlerText(title);\n};\n\nexports.Language = Language;\n\n})();\n",
"title": "$:/core/modules/language.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/macros/changecount.js": {
"text": "/*\\\ntitle: $:/core/modules/macros/changecount.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to return the changecount for the current tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"changecount\";\n\nexports.params = [];\n\n/*\nRun the macro\n*/\nexports.run = function() {\n\treturn this.wiki.getChangeCount(this.getVariable(\"currentTiddler\")) + \"\";\n};\n\n})();\n",
"title": "$:/core/modules/macros/changecount.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/contrastcolour.js": {
"text": "/*\\\ntitle: $:/core/modules/macros/contrastcolour.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to choose which of two colours has the highest contrast with a base colour\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"contrastcolour\";\n\nexports.params = [\n\t{name: \"target\"},\n\t{name: \"fallbackTarget\"},\n\t{name: \"colourA\"},\n\t{name: \"colourB\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(target,fallbackTarget,colourA,colourB) {\n\tvar rgbTarget = $tw.utils.parseCSSColor(target) || $tw.utils.parseCSSColor(fallbackTarget);\n\tif(!rgbTarget) {\n\t\treturn colourA;\n\t}\n\tvar rgbColourA = $tw.utils.parseCSSColor(colourA),\n\t\trgbColourB = $tw.utils.parseCSSColor(colourB);\n\tif(rgbColourA && !rgbColourB) {\n\t\treturn rgbColourA;\n\t}\n\tif(rgbColourB && !rgbColourA) {\n\t\treturn rgbColourB;\n\t}\n\tif(!rgbColourA && !rgbColourB) {\n\t\t// If neither colour is readable, return a crude inverse of the target\n\t\treturn [255 - rgbTarget[0],255 - rgbTarget[1],255 - rgbTarget[2],rgbTarget[3]];\n\t}\n\t// Colour brightness formula derived from http://www.w3.org/WAI/ER/WD-AERT/#color-contrast\n\tvar brightnessTarget = rgbTarget[0] * 0.299 + rgbTarget[1] * 0.587 + rgbTarget[2] * 0.114,\n\t\tbrightnessA = rgbColourA[0] * 0.299 + rgbColourA[1] * 0.587 + rgbColourA[2] * 0.114,\n\t\tbrightnessB = rgbColourB[0] * 0.299 + rgbColourB[1] * 0.587 + rgbColourB[2] * 0.114;\n\treturn Math.abs(brightnessTarget - brightnessA) > Math.abs(brightnessTarget - brightnessB) ? colourA : colourB;\n};\n\n})();\n",
"title": "$:/core/modules/macros/contrastcolour.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/csvtiddlers.js": {
"text": "/*\\\ntitle: $:/core/modules/macros/csvtiddlers.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to output tiddlers matching a filter to CSV\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"csvtiddlers\";\n\nexports.params = [\n\t{name: \"filter\"},\n\t{name: \"format\"},\n];\n\n/*\nRun the macro\n*/\nexports.run = function(filter,format) {\n\tvar self = this,\n\t\ttiddlers = this.wiki.filterTiddlers(filter),\n\t\ttiddler,\n\t\tfields = [],\n\t\tt,f;\n\t// Collect all the fields\n\tfor(t=0;t<tiddlers.length; t++) {\n\t\ttiddler = this.wiki.getTiddler(tiddlers[t]);\n\t\tfor(f in tiddler.fields) {\n\t\t\tif(fields.indexOf(f) === -1) {\n\t\t\t\tfields.push(f);\n\t\t\t}\n\t\t}\n\t}\n\t// Sort the fields and bring the standard ones to the front\n\tfields.sort();\n\t\"title text modified modifier created creator\".split(\" \").reverse().forEach(function(value,index) {\n\t\tvar p = fields.indexOf(value);\n\t\tif(p !== -1) {\n\t\t\tfields.splice(p,1);\n\t\t\tfields.unshift(value)\n\t\t}\n\t});\n\t// Output the column headings\n\tvar output = [], row = [];\n\tfields.forEach(function(value) {\n\t\trow.push(quoteAndEscape(value))\n\t});\n\toutput.push(row.join(\",\"));\n\t// Output each tiddler\n\tfor(var t=0;t<tiddlers.length; t++) {\n\t\trow = [];\n\t\ttiddler = this.wiki.getTiddler(tiddlers[t]);\n\t\t\tfor(f=0; f<fields.length; f++) {\n\t\t\t\trow.push(quoteAndEscape(tiddler ? tiddler.getFieldString(fields[f]) || \"\" : \"\"));\n\t\t\t}\n\t\toutput.push(row.join(\",\"));\n\t}\n\treturn output.join(\"\\n\");\n};\n\nfunction quoteAndEscape(value) {\n\treturn \"\\\"\" + value.replace(/\"/mg,\"\\\"\\\"\") + \"\\\"\";\n}\n\n})();\n",
"title": "$:/core/modules/macros/csvtiddlers.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/dumpvariables.js": {
"text": "/*\\\ntitle: $:/core/modules/macros/dumpvariables.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to dump all active variable values\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"dumpvariables\";\n\nexports.params = [\n];\n\n/*\nRun the macro\n*/\nexports.run = function() {\n\tvar output = [\"|!Variable |!Value |\"],\n\t\tvariables = [], variable;\n\tfor(variable in this.variables) {\n\t\tvariables.push(variable);\n\t}\n\tvariables.sort();\n\tfor(var index=0; index<variables.length; index++) {\n\t\tvar variable = variables[index];\n\t\toutput.push(\"|\" + variable + \" |<input size=50 value=<<\" + variable + \">>/> |\")\n\t}\n\treturn output.join(\"\\n\");\n};\n\n})();\n",
"title": "$:/core/modules/macros/dumpvariables.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/jsontiddlers.js": {
"text": "/*\\\ntitle: $:/core/modules/macros/jsontiddlers.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to output tiddlers matching a filter to JSON\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"jsontiddlers\";\n\nexports.params = [\n\t{name: \"filter\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(filter) {\n\tvar tiddlers = this.wiki.filterTiddlers(filter),\n\t\tdata = [];\n\tfor(var t=0;t<tiddlers.length; t++) {\n\t\tvar tiddler = this.wiki.getTiddler(tiddlers[t]);\n\t\tif(tiddler) {\n\t\t\tvar fields = new Object();\n\t\t\tfor(var field in tiddler.fields) {\n\t\t\t\tfields[field] = tiddler.getFieldString(field);\n\t\t\t}\n\t\t\tdata.push(fields);\n\t\t}\n\t}\n\treturn JSON.stringify(data,null,$tw.config.preferences.jsonSpaces);\n};\n\n})();\n",
"title": "$:/core/modules/macros/jsontiddlers.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/makedatauri.js": {
"text": "/*\\\ntitle: $:/core/modules/macros/makedatauri.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to convert the content of a tiddler to a data URI\n\n<<makedatauri text:\"Text to be converted\" type:\"text/vnd.tiddlywiki\">>\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"makedatauri\";\n\nexports.params = [\n\t{name: \"text\"},\n\t{name: \"type\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(text,type) {\n\treturn $tw.utils.makeDataUri(text,type);\n};\n\n})();\n",
"title": "$:/core/modules/macros/makedatauri.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/now.js": {
"text": "/*\\\ntitle: $:/core/modules/macros/now.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to return a formatted version of the current time\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"now\";\n\nexports.params = [\n\t{name: \"format\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(format) {\n\treturn $tw.utils.formatDateString(new Date(),format || \"0hh:0mm, DDth MMM YYYY\");\n};\n\n})();\n",
"title": "$:/core/modules/macros/now.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/qualify.js": {
"text": "/*\\\ntitle: $:/core/modules/macros/qualify.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to qualify a state tiddler title according\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"qualify\";\n\nexports.params = [\n\t{name: \"title\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(title) {\n\treturn title + \"-\" + this.getStateQualifier();\n};\n\n})();\n",
"title": "$:/core/modules/macros/qualify.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/resolvepath.js": {
"text": "/*\\\ntitle: $:/core/modules/macros/resolvepath.js\ntype: application/javascript\nmodule-type: macro\n\nResolves a relative path for an absolute rootpath.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"resolvepath\";\n\nexports.params = [\n\t{name: \"source\"},\n\t{name: \"root\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(source, root) {\n\treturn $tw.utils.resolvePath(source, root);\n};\n\n})();\n",
"title": "$:/core/modules/macros/resolvepath.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/version.js": {
"text": "/*\\\ntitle: $:/core/modules/macros/version.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to return the TiddlyWiki core version number\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"version\";\n\nexports.params = [];\n\n/*\nRun the macro\n*/\nexports.run = function() {\n\treturn $tw.version;\n};\n\n})();\n",
"title": "$:/core/modules/macros/version.js",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/parsers/audioparser.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/audioparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe audio parser parses an audio tiddler into an embeddable HTML element\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar AudioParser = function(type,text,options) {\n\tvar element = {\n\t\t\ttype: \"element\",\n\t\t\ttag: \"audio\",\n\t\t\tattributes: {\n\t\t\t\tcontrols: {type: \"string\", value: \"controls\"}\n\t\t\t}\n\t\t},\n\t\tsrc;\n\tif(options._canonical_uri) {\n\t\telement.attributes.src = {type: \"string\", value: options._canonical_uri};\n\t} else if(text) {\n\t\telement.attributes.src = {type: \"string\", value: \"data:\" + type + \";base64,\" + text};\n\t}\n\tthis.tree = [element];\n};\n\nexports[\"audio/ogg\"] = AudioParser;\nexports[\"audio/mpeg\"] = AudioParser;\nexports[\"audio/mp3\"] = AudioParser;\nexports[\"audio/mp4\"] = AudioParser;\n\n})();\n\n",
"title": "$:/core/modules/parsers/audioparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/csvparser.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/csvparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe CSV text parser processes CSV files into a table wrapped in a scrollable widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar CsvParser = function(type,text,options) {\n\t// Table framework\n\tthis.tree = [{\n\t\t\"type\": \"scrollable\", \"children\": [{\n\t\t\t\"type\": \"element\", \"tag\": \"table\", \"children\": [{\n\t\t\t\t\"type\": \"element\", \"tag\": \"tbody\", \"children\": []\n\t\t\t}], \"attributes\": {\n\t\t\t\t\"class\": {\"type\": \"string\", \"value\": \"tc-csv-table\"}\n\t\t\t}\n\t\t}]\n\t}];\n\t// Split the text into lines\n\tvar lines = text.split(/\\r?\\n/mg),\n\t\ttag = \"th\";\n\tfor(var line=0; line<lines.length; line++) {\n\t\tvar lineText = lines[line];\n\t\tif(lineText) {\n\t\t\tvar row = {\n\t\t\t\t\t\"type\": \"element\", \"tag\": \"tr\", \"children\": []\n\t\t\t\t};\n\t\t\tvar columns = lineText.split(\",\");\n\t\t\tfor(var column=0; column<columns.length; column++) {\n\t\t\t\trow.children.push({\n\t\t\t\t\t\t\"type\": \"element\", \"tag\": tag, \"children\": [{\n\t\t\t\t\t\t\t\"type\": \"text\",\n\t\t\t\t\t\t\t\"text\": columns[column]\n\t\t\t\t\t\t}]\n\t\t\t\t\t});\n\t\t\t}\n\t\t\ttag = \"td\";\n\t\t\tthis.tree[0].children[0].children[0].children.push(row);\n\t\t}\n\t}\n};\n\nexports[\"text/csv\"] = CsvParser;\n\n})();\n\n",
"title": "$:/core/modules/parsers/csvparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/htmlparser.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/htmlparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe HTML parser displays text as raw HTML\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar HtmlParser = function(type,text,options) {\n\tvar src;\n\tif(options._canonical_uri) {\n\t\tsrc = options._canonical_uri;\n\t} else if(text) {\n\t\tsrc = \"data:text/html;charset=utf-8,\" + encodeURIComponent(text);\n\t}\n\tthis.tree = [{\n\t\ttype: \"element\",\n\t\ttag: \"iframe\",\n\t\tattributes: {\n\t\t\tsrc: {type: \"string\", value: src},\n\t\t\tsandbox: {type: \"string\", value: \"sandbox\"}\n\t\t}\n\t}];\n};\n\nexports[\"text/html\"] = HtmlParser;\n\n})();\n\n",
"title": "$:/core/modules/parsers/htmlparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/imageparser.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/imageparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe image parser parses an image into an embeddable HTML element\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar ImageParser = function(type,text,options) {\n\tvar element = {\n\t\t\ttype: \"element\",\n\t\t\ttag: \"img\",\n\t\t\tattributes: {}\n\t\t},\n\t\tsrc;\n\tif(options._canonical_uri) {\n\t\telement.attributes.src = {type: \"string\", value: options._canonical_uri};\n\t\tif(type === \"application/pdf\" || type === \".pdf\") {\n\t\t\telement.tag = \"embed\";\n\t\t}\n\t} else if(text) {\n\t\tif(type === \"application/pdf\" || type === \".pdf\") {\n\t\t\telement.attributes.src = {type: \"string\", value: \"data:application/pdf;base64,\" + text};\n\t\t\telement.tag = \"embed\";\n\t\t} else if(type === \"image/svg+xml\" || type === \".svg\") {\n\t\t\telement.attributes.src = {type: \"string\", value: \"data:image/svg+xml,\" + encodeURIComponent(text)};\n\t\t} else {\n\t\t\telement.attributes.src = {type: \"string\", value: \"data:\" + type + \";base64,\" + text};\n\t\t}\n\t}\n\tthis.tree = [element];\n};\n\nexports[\"image/svg+xml\"] = ImageParser;\nexports[\"image/jpg\"] = ImageParser;\nexports[\"image/jpeg\"] = ImageParser;\nexports[\"image/png\"] = ImageParser;\nexports[\"image/gif\"] = ImageParser;\nexports[\"application/pdf\"] = ImageParser;\nexports[\"image/x-icon\"] = ImageParser;\n\n})();\n\n",
"title": "$:/core/modules/parsers/imageparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/utils/parseutils.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/parseutils.js\ntype: application/javascript\nmodule-type: utils\n\nUtility functions concerned with parsing text into tokens.\n\nMost functions have the following pattern:\n\n* The parameters are:\n** `source`: the source string being parsed\n** `pos`: the current parse position within the string\n** Any further parameters are used to identify the token that is being parsed\n* The return value is:\n** null if the token was not found at the specified position\n** an object representing the token with the following standard fields:\n*** `type`: string indicating the type of the token\n*** `start`: start position of the token in the source string\n*** `end`: end position of the token in the source string\n*** Any further fields required to describe the token\n\nThe exception is `skipWhiteSpace`, which just returns the position after the whitespace.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nLook for a whitespace token. Returns null if not found, otherwise returns {type: \"whitespace\", start:, end:,}\n*/\nexports.parseWhiteSpace = function(source,pos) {\n\tvar p = pos,c;\n\twhile(true) {\n\t\tc = source.charAt(p);\n\t\tif((c === \" \") || (c === \"\\f\") || (c === \"\\n\") || (c === \"\\r\") || (c === \"\\t\") || (c === \"\\v\") || (c === \"\\u00a0\")) { // Ignores some obscure unicode spaces\n\t\t\tp++;\n\t\t} else {\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(p === pos) {\n\t\treturn null;\n\t} else {\n\t\treturn {\n\t\t\ttype: \"whitespace\",\n\t\t\tstart: pos,\n\t\t\tend: p\n\t\t}\n\t}\n};\n\n/*\nConvenience wrapper for parseWhiteSpace. Returns the position after the whitespace\n*/\nexports.skipWhiteSpace = function(source,pos) {\n\tvar c;\n\twhile(true) {\n\t\tc = source.charAt(pos);\n\t\tif((c === \" \") || (c === \"\\f\") || (c === \"\\n\") || (c === \"\\r\") || (c === \"\\t\") || (c === \"\\v\") || (c === \"\\u00a0\")) { // Ignores some obscure unicode spaces\n\t\t\tpos++;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n};\n\n/*\nLook for a given string token. Returns null if not found, otherwise returns {type: \"token\", value:, start:, end:,}\n*/\nexports.parseTokenString = function(source,pos,token) {\n\tvar match = source.indexOf(token,pos) === pos;\n\tif(match) {\n\t\treturn {\n\t\t\ttype: \"token\",\n\t\t\tvalue: token,\n\t\t\tstart: pos,\n\t\t\tend: pos + token.length\n\t\t};\n\t}\n\treturn null;\n};\n\n/*\nLook for a token matching a regex. Returns null if not found, otherwise returns {type: \"regexp\", match:, start:, end:,}\n*/\nexports.parseTokenRegExp = function(source,pos,reToken) {\n\tvar node = {\n\t\ttype: \"regexp\",\n\t\tstart: pos\n\t};\n\treToken.lastIndex = pos;\n\tnode.match = reToken.exec(source);\n\tif(node.match && node.match.index === pos) {\n\t\tnode.end = pos + node.match[0].length;\n\t\treturn node;\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/*\nLook for a string literal. Returns null if not found, otherwise returns {type: \"string\", value:, start:, end:,}\n*/\nexports.parseStringLiteral = function(source,pos) {\n\tvar node = {\n\t\ttype: \"string\",\n\t\tstart: pos\n\t};\n\tvar reString = /(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\")|(?:'([^']*)')/g;\n\treString.lastIndex = pos;\n\tvar match = reString.exec(source);\n\tif(match && match.index === pos) {\n\t\tnode.value = match[1] !== undefined ? match[1] :(\n\t\t\tmatch[2] !== undefined ? match[2] : match[3] \n\t\t\t\t\t);\n\t\tnode.end = pos + match[0].length;\n\t\treturn node;\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/*\nLook for a macro invocation parameter. Returns null if not found, or {type: \"macro-parameter\", name:, value:, start:, end:}\n*/\nexports.parseMacroParameter = function(source,pos) {\n\tvar node = {\n\t\ttype: \"macro-parameter\",\n\t\tstart: pos\n\t};\n\t// Define our regexp\n\tvar reMacroParameter = /(?:([A-Za-z0-9\\-_]+)\\s*:)?(?:\\s*(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\"|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\\s>\"'=]+)))/g;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for the parameter\n\tvar token = $tw.utils.parseTokenRegExp(source,pos,reMacroParameter);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Get the parameter details\n\tnode.value = token.match[2] !== undefined ? token.match[2] : (\n\t\t\t\t\ttoken.match[3] !== undefined ? token.match[3] : (\n\t\t\t\t\t\ttoken.match[4] !== undefined ? token.match[4] : (\n\t\t\t\t\t\t\ttoken.match[5] !== undefined ? token.match[5] : (\n\t\t\t\t\t\t\t\ttoken.match[6] !== undefined ? token.match[6] : (\n\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\tif(token.match[1]) {\n\t\tnode.name = token.match[1];\n\t}\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\n/*\nLook for a macro invocation. Returns null if not found, or {type: \"macrocall\", name:, parameters:, start:, end:}\n*/\nexports.parseMacroInvocation = function(source,pos) {\n\tvar node = {\n\t\ttype: \"macrocall\",\n\t\tstart: pos,\n\t\tparams: []\n\t};\n\t// Define our regexps\n\tvar reMacroName = /([^\\s>\"'=]+)/g;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for a double less than sign\n\tvar token = $tw.utils.parseTokenString(source,pos,\"<<\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Get the macro name\n\tvar name = $tw.utils.parseTokenRegExp(source,pos,reMacroName);\n\tif(!name) {\n\t\treturn null;\n\t}\n\tnode.name = name.match[1];\n\tpos = name.end;\n\t// Process parameters\n\tvar parameter = $tw.utils.parseMacroParameter(source,pos);\n\twhile(parameter) {\n\t\tnode.params.push(parameter);\n\t\tpos = parameter.end;\n\t\t// Get the next parameter\n\t\tparameter = $tw.utils.parseMacroParameter(source,pos);\n\t}\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for a double greater than sign\n\ttoken = $tw.utils.parseTokenString(source,pos,\">>\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\n/*\nLook for an HTML attribute definition. Returns null if not found, otherwise returns {type: \"attribute\", name:, valueType: \"string|indirect|macro\", value:, start:, end:,}\n*/\nexports.parseAttribute = function(source,pos) {\n\tvar node = {\n\t\tstart: pos\n\t};\n\t// Define our regexps\n\tvar reAttributeName = /([^\\/\\s>\"'=]+)/g,\n\t\treUnquotedAttribute = /([^\\/\\s<>\"'=]+)/g,\n\t\treIndirectValue = /\\{\\{([^\\}]+)\\}\\}/g;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Get the attribute name\n\tvar name = $tw.utils.parseTokenRegExp(source,pos,reAttributeName);\n\tif(!name) {\n\t\treturn null;\n\t}\n\tnode.name = name.match[1];\n\tpos = name.end;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for an equals sign\n\tvar token = $tw.utils.parseTokenString(source,pos,\"=\");\n\tif(token) {\n\t\tpos = token.end;\n\t\t// Skip whitespace\n\t\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t\t// Look for a string literal\n\t\tvar stringLiteral = $tw.utils.parseStringLiteral(source,pos);\n\t\tif(stringLiteral) {\n\t\t\tpos = stringLiteral.end;\n\t\t\tnode.type = \"string\";\n\t\t\tnode.value = stringLiteral.value;\n\t\t} else {\n\t\t\t// Look for an indirect value\n\t\t\tvar indirectValue = $tw.utils.parseTokenRegExp(source,pos,reIndirectValue);\n\t\t\tif(indirectValue) {\n\t\t\t\tpos = indirectValue.end;\n\t\t\t\tnode.type = \"indirect\";\n\t\t\t\tnode.textReference = indirectValue.match[1];\n\t\t\t} else {\n\t\t\t\t// Look for a unquoted value\n\t\t\t\tvar unquotedValue = $tw.utils.parseTokenRegExp(source,pos,reUnquotedAttribute);\n\t\t\t\tif(unquotedValue) {\n\t\t\t\t\tpos = unquotedValue.end;\n\t\t\t\t\tnode.type = \"string\";\n\t\t\t\t\tnode.value = unquotedValue.match[1];\n\t\t\t\t} else {\n\t\t\t\t\t// Look for a macro invocation value\n\t\t\t\t\tvar macroInvocation = $tw.utils.parseMacroInvocation(source,pos);\n\t\t\t\t\tif(macroInvocation) {\n\t\t\t\t\t\tpos = macroInvocation.end;\n\t\t\t\t\t\tnode.type = \"macro\";\n\t\t\t\t\t\tnode.value = macroInvocation;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode.type = \"string\";\n\t\t\t\t\t\tnode.value = \"true\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tnode.type = \"string\";\n\t\tnode.value = \"true\";\n\t}\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\n})();\n",
"title": "$:/core/modules/utils/parseutils.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/parsers/textparser.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/textparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe plain text parser processes blocks of source text into a degenerate parse tree consisting of a single text node\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar TextParser = function(type,text,options) {\n\tthis.tree = [{\n\t\ttype: \"codeblock\",\n\t\tattributes: {\n\t\t\tcode: {type: \"string\", value: text},\n\t\t\tlanguage: {type: \"string\", value: type}\n\t\t}\n\t}];\n};\n\nexports[\"text/plain\"] = TextParser;\nexports[\"text/x-tiddlywiki\"] = TextParser;\nexports[\"application/javascript\"] = TextParser;\nexports[\"application/json\"] = TextParser;\nexports[\"text/css\"] = TextParser;\nexports[\"application/x-tiddler-dictionary\"] = TextParser;\n\n})();\n\n",
"title": "$:/core/modules/parsers/textparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/videoparser.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/videoparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe video parser parses a video tiddler into an embeddable HTML element\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar AudioParser = function(type,text,options) {\n\tvar element = {\n\t\t\ttype: \"element\",\n\t\t\ttag: \"video\",\n\t\t\tattributes: {\n\t\t\t\tcontrols: {type: \"string\", value: \"controls\"}\n\t\t\t}\n\t\t},\n\t\tsrc;\n\tif(options._canonical_uri) {\n\t\telement.attributes.src = {type: \"string\", value: options._canonical_uri};\n\t} else if(text) {\n\t\telement.attributes.src = {type: \"string\", value: \"data:\" + type + \";base64,\" + text};\n\t}\n\tthis.tree = [element];\n};\n\nexports[\"video/mp4\"] = AudioParser;\n\n})();\n\n",
"title": "$:/core/modules/parsers/videoparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/wikiparser/rules/codeblock.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/codeblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for code blocks. For example:\n\n```\n\t```\n\tThis text will not be //wikified//\n\t```\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"codeblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match and get language if defined\n\tthis.matchRegExp = /```([\\w-]*)\\r?\\n/mg;\n};\n\nexports.parse = function() {\n\tvar reEnd = /(\\r?\\n```$)/mg;\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Look for the end of the block\n\treEnd.lastIndex = this.parser.pos;\n\tvar match = reEnd.exec(this.parser.source),\n\t\ttext;\n\t// Process the block\n\tif(match) {\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\n\t\tthis.parser.pos = match.index + match[0].length;\n\t} else {\n\t\ttext = this.parser.source.substr(this.parser.pos);\n\t\tthis.parser.pos = this.parser.sourceLength;\n\t}\n\t// Return the $codeblock widget\n\treturn [{\n\t\t\ttype: \"codeblock\",\n\t\t\tattributes: {\n\t\t\t\t\tcode: {type: \"string\", value: text},\n\t\t\t\t\tlanguage: {type: \"string\", value: this.match[1]}\n\t\t\t}\n\t}];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/codeblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/codeinline.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/codeinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for code runs. For example:\n\n```\n\tThis is a `code run`.\n\tThis is another ``code run``\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"codeinline\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /(``?)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tvar reEnd = new RegExp(this.match[1], \"mg\");\n\t// Look for the end marker\n\treEnd.lastIndex = this.parser.pos;\n\tvar match = reEnd.exec(this.parser.source),\n\t\ttext;\n\t// Process the text\n\tif(match) {\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\n\t\tthis.parser.pos = match.index + match[0].length;\n\t} else {\n\t\ttext = this.parser.source.substr(this.parser.pos);\n\t\tthis.parser.pos = this.parser.sourceLength;\n\t}\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"code\",\n\t\tchildren: [{\n\t\t\ttype: \"text\",\n\t\t\ttext: text\n\t\t}]\n\t}];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/codeinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/commentblock.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/commentblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for HTML comments. For example:\n\n```\n<!-- This is a comment -->\n```\n\nNote that the syntax for comments is simplified to an opening \"<!--\" sequence and a closing \"-->\" sequence -- HTML itself implements a more complex format (see http://ostermiller.org/findhtmlcomment.html)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"commentblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\tthis.matchRegExp = /<!--/mg;\n\tthis.endMatchRegExp = /-->/mg;\n};\n\nexports.findNextMatch = function(startPos) {\n\tthis.matchRegExp.lastIndex = startPos;\n\tthis.match = this.matchRegExp.exec(this.parser.source);\n\tif(this.match) {\n\t\tthis.endMatchRegExp.lastIndex = startPos + this.match[0].length;\n\t\tthis.endMatch = this.endMatchRegExp.exec(this.parser.source);\n\t\tif(this.endMatch) {\n\t\t\treturn this.match.index;\n\t\t}\n\t}\n\treturn undefined;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.endMatchRegExp.lastIndex;\n\t// Don't return any elements\n\treturn [];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/commentblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/commentinline.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/commentinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for HTML comments. For example:\n\n```\n<!-- This is a comment -->\n```\n\nNote that the syntax for comments is simplified to an opening \"<!--\" sequence and a closing \"-->\" sequence -- HTML itself implements a more complex format (see http://ostermiller.org/findhtmlcomment.html)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"commentinline\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\tthis.matchRegExp = /<!--/mg;\n\tthis.endMatchRegExp = /-->/mg;\n};\n\nexports.findNextMatch = function(startPos) {\n\tthis.matchRegExp.lastIndex = startPos;\n\tthis.match = this.matchRegExp.exec(this.parser.source);\n\tif(this.match) {\n\t\tthis.endMatchRegExp.lastIndex = startPos + this.match[0].length;\n\t\tthis.endMatch = this.endMatchRegExp.exec(this.parser.source);\n\t\tif(this.endMatch) {\n\t\t\treturn this.match.index;\n\t\t}\n\t}\n\treturn undefined;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.endMatchRegExp.lastIndex;\n\t// Don't return any elements\n\treturn [];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/commentinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/dash.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/dash.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for dashes. For example:\n\n```\nThis is an en-dash: --\n\nThis is an em-dash: ---\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"dash\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /-{2,3}(?!-)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tvar dash = this.match[0].length === 2 ? \"–\" : \"—\";\n\treturn [{\n\t\ttype: \"entity\",\n\t\tentity: dash\n\t}];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/dash.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/bold.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/bold.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis - bold. For example:\n\n```\n\tThis is ''bold'' text\n```\n\nThis wikiparser can be modified using the rules eg:\n\n```\n\\rules except bold \n\\rules only bold \n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"bold\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /''/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(/''/mg,{eatTerminator: true});\n\n\t// Return the classed span\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"strong\",\n\t\tchildren: tree\n\t}];\n};\n\n})();",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/bold.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/italic.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/italic.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis - italic. For example:\n\n```\n\tThis is //italic// text\n```\n\nThis wikiparser can be modified using the rules eg:\n\n```\n\\rules except italic\n\\rules only italic\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"italic\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\/\\//mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(/\\/\\//mg,{eatTerminator: true});\n\n\t// Return the classed span\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"em\",\n\t\tchildren: tree\n\t}];\n};\n\n})();",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/italic.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis - strikethrough. For example:\n\n```\n\tThis is ~~strikethrough~~ text\n```\n\nThis wikiparser can be modified using the rules eg:\n\n```\n\\rules except strikethrough \n\\rules only strikethrough \n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"strikethrough\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /~~/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(/~~/mg,{eatTerminator: true});\n\n\t// Return the classed span\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"strike\",\n\t\tchildren: tree\n\t}];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/subscript.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/subscript.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis - subscript. For example:\n\n```\n\tThis is ,,subscript,, text\n```\n\nThis wikiparser can be modified using the rules eg:\n\n```\n\\rules except subscript \n\\rules only subscript \n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"subscript\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /,,/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(/,,/mg,{eatTerminator: true});\n\n\t// Return the classed span\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"sub\",\n\t\tchildren: tree\n\t}];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/subscript.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/superscript.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/superscript.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis - superscript. For example:\n\n```\n\tThis is ^^superscript^^ text\n```\n\nThis wikiparser can be modified using the rules eg:\n\n```\n\\rules except superscript \n\\rules only superscript \n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"superscript\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\^\\^/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(/\\^\\^/mg,{eatTerminator: true});\n\n\t// Return the classed span\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"sup\",\n\t\tchildren: tree\n\t}];\n};\n\n})();",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/superscript.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/underscore.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/underscore.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis - underscore. For example:\n\n```\n\tThis is __underscore__ text\n```\n\nThis wikiparser can be modified using the rules eg:\n\n```\n\\rules except underscore \n\\rules only underscore\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"underscore\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /__/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(/__/mg,{eatTerminator: true});\n\n\t// Return the classed span\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"u\",\n\t\tchildren: tree\n\t}];\n};\n\n})();",
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/underscore.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/entity.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/entity.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for HTML entities. For example:\n\n```\n\tThis is a copyright symbol: ©\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"entity\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /(&#?[a-zA-Z0-9]{2,8};)/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get all the details of the match\n\tvar entityString = this.match[1];\n\t// Move past the macro call\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Return the entity\n\treturn [{type: \"entity\", entity: this.match[0]}];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/entity.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/extlink.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/extlink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for external links. For example:\n\n```\nAn external link: http://www.tiddlywiki.com/\n\nA suppressed external link: ~http://www.tiddlyspace.com/\n```\n\nExternal links can be suppressed by preceding them with `~`.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"extlink\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /~?(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\\s<>{}\\[\\]`|'\"\\\\^~]+(?:\\/|\\b)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Create the link unless it is suppressed\n\tif(this.match[0].substr(0,1) === \"~\") {\n\t\treturn [{type: \"text\", text: this.match[0].substr(1)}];\n\t} else {\n\t\treturn [{\n\t\t\ttype: \"element\",\n\t\t\ttag: \"a\",\n\t\t\tattributes: {\n\t\t\t\thref: {type: \"string\", value: this.match[0]},\n\t\t\t\t\"class\": {type: \"string\", value: \"tc-tiddlylink-external\"},\n\t\t\t\ttarget: {type: \"string\", value: \"_blank\"}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \"text\", text: this.match[0]\n\t\t\t}]\n\t\t}];\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/extlink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for block-level filtered transclusion. For example:\n\n```\n{{{ [tag[docs]] }}}\n{{{ [tag[docs]] |tooltip}}}\n{{{ [tag[docs]] ||TemplateTitle}}}\n{{{ [tag[docs]] |tooltip||TemplateTitle}}}\n{{{ [tag[docs]] }}width:40;height:50;}.class.class\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"filteredtranscludeblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\{\\{\\{([^\\|]+?)(?:\\|([^\\|\\{\\}]+))?(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}([^\\}]*)\\}(?:\\.(\\S+))?(?:\\r?\\n|$)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Get the match details\n\tvar filter = this.match[1],\n\t\ttooltip = this.match[2],\n\t\ttemplate = $tw.utils.trim(this.match[3]),\n\t\tstyle = this.match[4],\n\t\tclasses = this.match[5];\n\t// Return the list widget\n\tvar node = {\n\t\ttype: \"list\",\n\t\tattributes: {\n\t\t\tfilter: {type: \"string\", value: filter}\n\t\t},\n\t\tisBlock: true\n\t};\n\tif(tooltip) {\n\t\tnode.attributes.tooltip = {type: \"string\", value: tooltip};\n\t}\n\tif(template) {\n\t\tnode.attributes.template = {type: \"string\", value: template};\n\t}\n\tif(style) {\n\t\tnode.attributes.style = {type: \"string\", value: style};\n\t}\n\tif(classes) {\n\t\tnode.attributes.itemClass = {type: \"string\", value: classes.split(\".\").join(\" \")};\n\t}\n\treturn [node];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for inline filtered transclusion. For example:\n\n```\n{{{ [tag[docs]] }}}\n{{{ [tag[docs]] |tooltip}}}\n{{{ [tag[docs]] ||TemplateTitle}}}\n{{{ [tag[docs]] |tooltip||TemplateTitle}}}\n{{{ [tag[docs]] }}width:40;height:50;}.class.class\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"filteredtranscludeinline\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\{\\{\\{([^\\|]+?)(?:\\|([^\\|\\{\\}]+))?(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}([^\\}]*)\\}(?:\\.(\\S+))?/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Get the match details\n\tvar filter = this.match[1],\n\t\ttooltip = this.match[2],\n\t\ttemplate = $tw.utils.trim(this.match[3]),\n\t\tstyle = this.match[4],\n\t\tclasses = this.match[5];\n\t// Return the list widget\n\tvar node = {\n\t\ttype: \"list\",\n\t\tattributes: {\n\t\t\tfilter: {type: \"string\", value: filter}\n\t\t}\n\t};\n\tif(tooltip) {\n\t\tnode.attributes.tooltip = {type: \"string\", value: tooltip};\n\t}\n\tif(template) {\n\t\tnode.attributes.template = {type: \"string\", value: template};\n\t}\n\tif(style) {\n\t\tnode.attributes.style = {type: \"string\", value: style};\n\t}\n\tif(classes) {\n\t\tnode.attributes.itemClass = {type: \"string\", value: classes.split(\".\").join(\" \")};\n\t}\n\treturn [node];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for marking areas with hard line breaks. For example:\n\n```\n\"\"\"\nThis is some text\nThat is set like\nIt is a Poem\nWhen it is\nClearly\nNot\n\"\"\"\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"hardlinebreaks\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\"\"\"(?:\\r?\\n)?/mg;\n};\n\nexports.parse = function() {\n\tvar reEnd = /(\"\"\")|(\\r?\\n)/mg,\n\t\ttree = [],\n\t\tmatch;\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tdo {\n\t\t// Parse the run up to the terminator\n\t\ttree.push.apply(tree,this.parser.parseInlineRun(reEnd,{eatTerminator: false}));\n\t\t// Redo the terminator match\n\t\treEnd.lastIndex = this.parser.pos;\n\t\tmatch = reEnd.exec(this.parser.source);\n\t\tif(match) {\n\t\t\tthis.parser.pos = reEnd.lastIndex;\n\t\t\t// Add a line break if the terminator was a line break\n\t\t\tif(match[2]) {\n\t\t\t\ttree.push({type: \"element\", tag: \"br\"});\n\t\t\t}\n\t\t}\n\t} while(match && !match[1]);\n\t// Return the nodes\n\treturn tree;\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/heading.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/heading.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for headings\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"heading\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /(!{1,6})/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get all the details of the match\n\tvar headingLevel = this.match[1].length;\n\t// Move past the !s\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse any classes, whitespace and then the heading itself\n\tvar classes = this.parser.parseClasses();\n\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\n\tvar tree = this.parser.parseInlineRun(/(\\r?\\n)/mg);\n\t// Return the heading\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"h\" + headingLevel, \n\t\tattributes: {\n\t\t\t\"class\": {type: \"string\", value: classes.join(\" \")}\n\t\t},\n\t\tchildren: tree\n\t}];\n};\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/heading.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/horizrule.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/horizrule.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for rules. For example:\n\n```\n---\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"horizrule\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /-{3,}\\r?(?:\\n|$)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\treturn [{type: \"element\", tag: \"hr\"}];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/horizrule.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/html.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/html.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki rule for HTML elements and widgets. For example:\n\n{{{\n<aside>\nThis is an HTML5 aside element\n</aside>\n\n<$slider target=\"MyTiddler\">\nThis is a widget invocation\n</$slider>\n\n}}}\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"html\";\nexports.types = {inline: true, block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n};\n\nexports.findNextMatch = function(startPos) {\n\t// Find the next tag\n\tthis.nextTag = this.findNextTag(this.parser.source,startPos,{\n\t\trequireLineBreak: this.is.block\n\t});\n\treturn this.nextTag ? this.nextTag.start : undefined;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Retrieve the most recent match so that recursive calls don't overwrite it\n\tvar tag = this.nextTag;\n\tthis.nextTag = null;\n\t// Advance the parser position to past the tag\n\tthis.parser.pos = tag.end;\n\t// Check for an immediately following double linebreak\n\tvar hasLineBreak = !tag.isSelfClosing && !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\\S\\n\\r]*\\r?\\n(?:[^\\S\\n\\r]*\\r?\\n|$))/g);\n\t// Set whether we're in block mode\n\ttag.isBlock = this.is.block || hasLineBreak;\n\t// Parse the body if we need to\n\tif(!tag.isSelfClosing && $tw.config.htmlVoidElements.indexOf(tag.tag) === -1) {\n\t\t\tvar reEndString = \"</\" + $tw.utils.escapeRegExp(tag.tag) + \">\",\n\t\t\t\treEnd = new RegExp(\"(\" + reEndString + \")\",\"mg\");\n\t\tif(hasLineBreak) {\n\t\t\ttag.children = this.parser.parseBlocks(reEndString);\n\t\t} else {\n\t\t\ttag.children = this.parser.parseInlineRun(reEnd);\n\t\t}\n\t\treEnd.lastIndex = this.parser.pos;\n\t\tvar endMatch = reEnd.exec(this.parser.source);\n\t\tif(endMatch && endMatch.index === this.parser.pos) {\n\t\t\tthis.parser.pos = endMatch.index + endMatch[0].length;\n\t\t}\n\t}\n\t// Return the tag\n\treturn [tag];\n};\n\n/*\nLook for an HTML tag. Returns null if not found, otherwise returns {type: \"element\", name:, attributes: [], isSelfClosing:, start:, end:,}\n*/\nexports.parseTag = function(source,pos,options) {\n\toptions = options || {};\n\tvar token,\n\t\tnode = {\n\t\t\ttype: \"element\",\n\t\t\tstart: pos,\n\t\t\tattributes: {}\n\t\t};\n\t// Define our regexps\n\tvar reTagName = /([a-zA-Z0-9\\-\\$]+)/g;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for a less than sign\n\ttoken = $tw.utils.parseTokenString(source,pos,\"<\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Get the tag name\n\ttoken = $tw.utils.parseTokenRegExp(source,pos,reTagName);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tnode.tag = token.match[1];\n\tif(node.tag.charAt(0) === \"$\") {\n\t\tnode.type = node.tag.substr(1);\n\t}\n\tpos = token.end;\n\t// Process attributes\n\tvar attribute = $tw.utils.parseAttribute(source,pos);\n\twhile(attribute) {\n\t\tnode.attributes[attribute.name] = attribute;\n\t\tpos = attribute.end;\n\t\t// Get the next attribute\n\t\tattribute = $tw.utils.parseAttribute(source,pos);\n\t}\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for a closing slash\n\ttoken = $tw.utils.parseTokenString(source,pos,\"/\");\n\tif(token) {\n\t\tpos = token.end;\n\t\tnode.isSelfClosing = true;\n\t}\n\t// Look for a greater than sign\n\ttoken = $tw.utils.parseTokenString(source,pos,\">\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Check for a required line break\n\tif(options.requireLineBreak) {\n\t\ttoken = $tw.utils.parseTokenRegExp(source,pos,/([^\\S\\n\\r]*\\r?\\n(?:[^\\S\\n\\r]*\\r?\\n|$))/g);\n\t\tif(!token) {\n\t\t\treturn null;\n\t\t}\n\t}\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\nexports.findNextTag = function(source,pos,options) {\n\t// A regexp for finding candidate HTML tags\n\tvar reLookahead = /<([a-zA-Z\\-\\$]+)/g;\n\t// Find the next candidate\n\treLookahead.lastIndex = pos;\n\tvar match = reLookahead.exec(source);\n\twhile(match) {\n\t\t// Try to parse the candidate as a tag\n\t\tvar tag = this.parseTag(source,match.index,options);\n\t\t// Return success\n\t\tif(tag && this.isLegalTag(tag)) {\n\t\t\treturn tag;\n\t\t}\n\t\t// Look for the next match\n\t\treLookahead.lastIndex = match.index + 1;\n\t\tmatch = reLookahead.exec(source);\n\t}\n\t// Failed\n\treturn null;\n};\n\nexports.isLegalTag = function(tag) {\n\t// Widgets are always OK\n\tif(tag.type !== \"element\") {\n\t\treturn true;\n\t// If it's an HTML tag that starts with a dash then it's not legal\n\t} else if(tag.tag.charAt(0) === \"-\") {\n\t\treturn false;\n\t} else {\n\t\t// Otherwise it's OK\n\t\treturn true;\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/html.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/image.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/image.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for embedding images. For example:\n\n```\n[img[http://tiddlywiki.com/fractalveg.jpg]]\n[img width=23 height=24 [http://tiddlywiki.com/fractalveg.jpg]]\n[img width={{!!width}} height={{!!height}} [http://tiddlywiki.com/fractalveg.jpg]]\n[img[Description of image|http://tiddlywiki.com/fractalveg.jpg]]\n[img[TiddlerTitle]]\n[img[Description of image|TiddlerTitle]]\n```\n\nGenerates the `<$image>` widget.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"image\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n};\n\nexports.findNextMatch = function(startPos) {\n\t// Find the next tag\n\tthis.nextImage = this.findNextImage(this.parser.source,startPos);\n\treturn this.nextImage ? this.nextImage.start : undefined;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.nextImage.end;\n\tvar node = {\n\t\ttype: \"image\",\n\t\tattributes: this.nextImage.attributes\n\t};\n\treturn [node];\n};\n\n/*\nFind the next image from the current position\n*/\nexports.findNextImage = function(source,pos) {\n\t// A regexp for finding candidate HTML tags\n\tvar reLookahead = /(\\[img)/g;\n\t// Find the next candidate\n\treLookahead.lastIndex = pos;\n\tvar match = reLookahead.exec(source);\n\twhile(match) {\n\t\t// Try to parse the candidate as a tag\n\t\tvar tag = this.parseImage(source,match.index);\n\t\t// Return success\n\t\tif(tag) {\n\t\t\treturn tag;\n\t\t}\n\t\t// Look for the next match\n\t\treLookahead.lastIndex = match.index + 1;\n\t\tmatch = reLookahead.exec(source);\n\t}\n\t// Failed\n\treturn null;\n};\n\n/*\nLook for an image at the specified position. Returns null if not found, otherwise returns {type: \"image\", attributes: [], isSelfClosing:, start:, end:,}\n*/\nexports.parseImage = function(source,pos) {\n\tvar token,\n\t\tnode = {\n\t\t\ttype: \"image\",\n\t\t\tstart: pos,\n\t\t\tattributes: {}\n\t\t};\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for the `[img`\n\ttoken = $tw.utils.parseTokenString(source,pos,\"[img\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Process attributes\n\tif(source.charAt(pos) !== \"[\") {\n\t\tvar attribute = $tw.utils.parseAttribute(source,pos);\n\t\twhile(attribute) {\n\t\t\tnode.attributes[attribute.name] = attribute;\n\t\t\tpos = attribute.end;\n\t\t\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t\t\tif(source.charAt(pos) !== \"[\") {\n\t\t\t\t// Get the next attribute\n\t\t\t\tattribute = $tw.utils.parseAttribute(source,pos);\n\t\t\t} else {\n\t\t\t\tattribute = null;\n\t\t\t}\n\t\t}\n\t}\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for the `[` after the attributes\n\ttoken = $tw.utils.parseTokenString(source,pos,\"[\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Get the source up to the terminating `]]`\n\ttoken = $tw.utils.parseTokenRegExp(source,pos,/(?:([^|\\]]*?)\\|)?([^\\]]+?)\\]\\]/g);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\tif(token.match[1]) {\n\t\tnode.attributes.tooltip = {type: \"string\", value: token.match[1].trim()};\n\t}\n\tnode.attributes.source = {type: \"string\", value: (token.match[2] || \"\").trim()};\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/image.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/list.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/list.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for lists. For example:\n\n```\n* This is an unordered list\n* It has two items\n\n# This is a numbered list\n## With a subitem\n# And a third item\n\n; This is a term that is being defined\n: This is the definition of that term\n```\n\nNote that lists can be nested arbitrarily:\n\n```\n#** One\n#* Two\n#** Three\n#**** Four\n#**# Five\n#**## Six\n## Seven\n### Eight\n## Nine\n```\n\nA CSS class can be applied to a list item as follows:\n\n```\n* List item one\n*.active List item two has the class `active`\n* List item three\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"list\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /([\\*#;:>]+)/mg;\n};\n\nvar listTypes = {\n\t\"*\": {listTag: \"ul\", itemTag: \"li\"},\n\t\"#\": {listTag: \"ol\", itemTag: \"li\"},\n\t\";\": {listTag: \"dl\", itemTag: \"dt\"},\n\t\":\": {listTag: \"dl\", itemTag: \"dd\"},\n\t\">\": {listTag: \"blockquote\", itemTag: \"p\"}\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Array of parse tree nodes for the previous row of the list\n\tvar listStack = [];\n\t// Cycle through the items in the list\n\twhile(true) {\n\t\t// Match the list marker\n\t\tvar reMatch = /([\\*#;:>]+)/mg;\n\t\treMatch.lastIndex = this.parser.pos;\n\t\tvar match = reMatch.exec(this.parser.source);\n\t\tif(!match || match.index !== this.parser.pos) {\n\t\t\tbreak;\n\t\t}\n\t\t// Check whether the list type of the top level matches\n\t\tvar listInfo = listTypes[match[0].charAt(0)];\n\t\tif(listStack.length > 0 && listStack[0].tag !== listInfo.listTag) {\n\t\t\tbreak;\n\t\t}\n\t\t// Move past the list marker\n\t\tthis.parser.pos = match.index + match[0].length;\n\t\t// Walk through the list markers for the current row\n\t\tfor(var t=0; t<match[0].length; t++) {\n\t\t\tlistInfo = listTypes[match[0].charAt(t)];\n\t\t\t// Remove any stacked up element if we can't re-use it because the list type doesn't match\n\t\t\tif(listStack.length > t && listStack[t].tag !== listInfo.listTag) {\n\t\t\t\tlistStack.splice(t,listStack.length - t);\n\t\t\t}\n\t\t\t// Construct the list element or reuse the previous one at this level\n\t\t\tif(listStack.length <= t) {\n\t\t\t\tvar listElement = {type: \"element\", tag: listInfo.listTag, children: [\n\t\t\t\t\t{type: \"element\", tag: listInfo.itemTag, children: []}\n\t\t\t\t]};\n\t\t\t\t// Link this list element into the last child item of the parent list item\n\t\t\t\tif(t) {\n\t\t\t\t\tvar prevListItem = listStack[t-1].children[listStack[t-1].children.length-1];\n\t\t\t\t\tprevListItem.children.push(listElement);\n\t\t\t\t}\n\t\t\t\t// Save this element in the stack\n\t\t\t\tlistStack[t] = listElement;\n\t\t\t} else if(t === (match[0].length - 1)) {\n\t\t\t\tlistStack[t].children.push({type: \"element\", tag: listInfo.itemTag, children: []});\n\t\t\t}\n\t\t}\n\t\tif(listStack.length > match[0].length) {\n\t\t\tlistStack.splice(match[0].length,listStack.length - match[0].length);\n\t\t}\n\t\t// Process the body of the list item into the last list item\n\t\tvar lastListChildren = listStack[listStack.length-1].children,\n\t\t\tlastListItem = lastListChildren[lastListChildren.length-1],\n\t\t\tclasses = this.parser.parseClasses();\n\t\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\n\t\tvar tree = this.parser.parseInlineRun(/(\\r?\\n)/mg);\n\t\tlastListItem.children.push.apply(lastListItem.children,tree);\n\t\tif(classes.length > 0) {\n\t\t\t$tw.utils.addClassToParseTreeNode(lastListItem,classes.join(\" \"));\n\t\t}\n\t\t// Consume any whitespace following the list item\n\t\tthis.parser.skipWhitespace();\n\t}\n\t// Return the root element of the list\n\treturn [listStack[0]];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/list.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/macrocallblock.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/macrocallblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki rule for block macro calls\n\n```\n<<name value value2>>\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"macrocallblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /<<([^>\\s]+)(?:\\s*)((?:[^>]|(?:>(?!>)))*?)>>(?:\\r?\\n|$)/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get all the details of the match\n\tvar macroName = this.match[1],\n\t\tparamString = this.match[2];\n\t// Move past the macro call\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tvar params = [],\n\t\treParam = /\\s*(?:([A-Za-z0-9\\-_]+)\\s*:)?(?:\\s*(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\"|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\"'\\s]+)))/mg,\n\t\tparamMatch = reParam.exec(paramString);\n\twhile(paramMatch) {\n\t\t// Process this parameter\n\t\tvar paramInfo = {\n\t\t\tvalue: paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5] || paramMatch[6]\n\t\t};\n\t\tif(paramMatch[1]) {\n\t\t\tparamInfo.name = paramMatch[1];\n\t\t}\n\t\tparams.push(paramInfo);\n\t\t// Find the next match\n\t\tparamMatch = reParam.exec(paramString);\n\t}\n\treturn [{\n\t\ttype: \"macrocall\",\n\t\tname: macroName,\n\t\tparams: params,\n\t\tisBlock: true\n\t}];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/macrocallblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/macrocallinline.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/macrocallinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki rule for macro calls\n\n```\n<<name value value2>>\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"macrocallinline\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /<<([^\\s>]+)\\s*([\\s\\S]*?)>>/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get all the details of the match\n\tvar macroName = this.match[1],\n\t\tparamString = this.match[2];\n\t// Move past the macro call\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tvar params = [],\n\t\treParam = /\\s*(?:([A-Za-z0-9\\-_]+)\\s*:)?(?:\\s*(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\"|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\"'\\s]+)))/mg,\n\t\tparamMatch = reParam.exec(paramString);\n\twhile(paramMatch) {\n\t\t// Process this parameter\n\t\tvar paramInfo = {\n\t\t\tvalue: paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5]|| paramMatch[6]\n\t\t};\n\t\tif(paramMatch[1]) {\n\t\t\tparamInfo.name = paramMatch[1];\n\t\t}\n\t\tparams.push(paramInfo);\n\t\t// Find the next match\n\t\tparamMatch = reParam.exec(paramString);\n\t}\n\treturn [{\n\t\ttype: \"macrocall\",\n\t\tname: macroName,\n\t\tparams: params\n\t}];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/macrocallinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/macrodef.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/macrodef.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki pragma rule for macro definitions\n\n```\n\\define name(param:defaultvalue,param2:defaultvalue)\ndefinition text, including $param$ markers\n\\end\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"macrodef\";\nexports.types = {pragma: true};\n\n/*\nInstantiate parse rule\n*/\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /^\\\\define\\s+([^(\\s]+)\\(\\s*([^)]*)\\)(\\s*\\r?\\n)?/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Move past the macro name and parameters\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse the parameters\n\tvar paramString = this.match[2],\n\t\tparams = [];\n\tif(paramString !== \"\") {\n\t\tvar reParam = /\\s*([A-Za-z0-9\\-_]+)(?:\\s*:\\s*(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\"|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\"'\\s]+)))?/mg,\n\t\t\tparamMatch = reParam.exec(paramString);\n\t\twhile(paramMatch) {\n\t\t\t// Save the parameter details\n\t\t\tvar paramInfo = {name: paramMatch[1]},\n\t\t\t\tdefaultValue = paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5] || paramMatch[6];\n\t\t\tif(defaultValue) {\n\t\t\t\tparamInfo[\"default\"] = defaultValue;\n\t\t\t}\n\t\t\tparams.push(paramInfo);\n\t\t\t// Look for the next parameter\n\t\t\tparamMatch = reParam.exec(paramString);\n\t\t}\n\t}\n\t// Is this a multiline definition?\n\tvar reEnd;\n\tif(this.match[3]) {\n\t\t// If so, the end of the body is marked with \\end\n\t\treEnd = /(\\r?\\n\\\\end[^\\S\\n\\r]*(?:$|\\r?\\n))/mg;\n\t} else {\n\t\t// Otherwise, the end of the definition is marked by the end of the line\n\t\treEnd = /(\\r?\\n)/mg;\n\t\t// Move past any whitespace\n\t\tthis.parser.pos = $tw.utils.skipWhiteSpace(this.parser.source,this.parser.pos);\n\t}\n\t// Find the end of the definition\n\treEnd.lastIndex = this.parser.pos;\n\tvar text,\n\t\tendMatch = reEnd.exec(this.parser.source);\n\tif(endMatch) {\n\t\ttext = this.parser.source.substring(this.parser.pos,endMatch.index);\n\t\tthis.parser.pos = endMatch.index + endMatch[0].length;\n\t} else {\n\t\t// We didn't find the end of the definition, so we'll make it blank\n\t\ttext = \"\";\n\t}\n\t// Save the macro definition\n\treturn [{\n\t\ttype: \"set\",\n\t\tattributes: {\n\t\t\tname: {type: \"string\", value: this.match[1]},\n\t\t\tvalue: {type: \"string\", value: text}\n\t\t},\n\t\tchildren: [],\n\t\tparams: params\n\t}];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/macrodef.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/prettyextlink.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/prettyextlink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for external links. For example:\n\n```\n[ext[http://tiddlywiki.com/fractalveg.jpg]]\n[ext[Tooltip|http://tiddlywiki.com/fractalveg.jpg]]\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"prettyextlink\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n};\n\nexports.findNextMatch = function(startPos) {\n\t// Find the next tag\n\tthis.nextLink = this.findNextLink(this.parser.source,startPos);\n\treturn this.nextLink ? this.nextLink.start : undefined;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.nextLink.end;\n\treturn [this.nextLink];\n};\n\n/*\nFind the next link from the current position\n*/\nexports.findNextLink = function(source,pos) {\n\t// A regexp for finding candidate links\n\tvar reLookahead = /(\\[ext\\[)/g;\n\t// Find the next candidate\n\treLookahead.lastIndex = pos;\n\tvar match = reLookahead.exec(source);\n\twhile(match) {\n\t\t// Try to parse the candidate as a link\n\t\tvar link = this.parseLink(source,match.index);\n\t\t// Return success\n\t\tif(link) {\n\t\t\treturn link;\n\t\t}\n\t\t// Look for the next match\n\t\treLookahead.lastIndex = match.index + 1;\n\t\tmatch = reLookahead.exec(source);\n\t}\n\t// Failed\n\treturn null;\n};\n\n/*\nLook for an link at the specified position. Returns null if not found, otherwise returns {type: \"element\", tag: \"a\", attributes: [], isSelfClosing:, start:, end:,}\n*/\nexports.parseLink = function(source,pos) {\n\tvar token,\n\t\ttextNode = {\n\t\t\ttype: \"text\"\n\t\t},\n\t\tnode = {\n\t\t\ttype: \"element\",\n\t\t\ttag: \"a\",\n\t\t\tstart: pos,\n\t\t\tattributes: {\n\t\t\t\t\"class\": {type: \"string\", value: \"tc-tiddlylink-external\"},\n\t\t\t},\n\t\t\tchildren: [textNode]\n\t\t};\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for the `[ext[`\n\ttoken = $tw.utils.parseTokenString(source,pos,\"[ext[\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Look ahead for the terminating `]]`\n\tvar closePos = source.indexOf(\"]]\",pos);\n\tif(closePos === -1) {\n\t\treturn null;\n\t}\n\t// Look for a `|` separating the tooltip\n\tvar splitPos = source.indexOf(\"|\",pos);\n\tif(splitPos === -1 || splitPos > closePos) {\n\t\tsplitPos = null;\n\t}\n\t// Pull out the tooltip and URL\n\tvar tooltip, URL;\n\tif(splitPos) {\n\t\tURL = source.substring(splitPos + 1,closePos).trim();\n\t\ttextNode.text = source.substring(pos,splitPos).trim();\n\t} else {\n\t\tURL = source.substring(pos,closePos).trim();\n\t\ttextNode.text = URL;\n\t}\n\tnode.attributes.href = {type: \"string\", value: URL};\n\tnode.attributes.target = {type: \"string\", value: \"_blank\"};\n\t// Update the end position\n\tnode.end = closePos + 2;\n\treturn node;\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/prettyextlink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/prettylink.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/prettylink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for pretty links. For example:\n\n```\n[[Introduction]]\n\n[[Link description|TiddlerTitle]]\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"prettylink\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\[\\[(.*?)(?:\\|(.*?))?\\]\\]/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Process the link\n\tvar text = this.match[1],\n\t\tlink = this.match[2] || text;\n\tif($tw.utils.isLinkExternal(link)) {\n\t\treturn [{\n\t\t\ttype: \"element\",\n\t\t\ttag: \"a\",\n\t\t\tattributes: {\n\t\t\t\thref: {type: \"string\", value: link},\n\t\t\t\t\"class\": {type: \"string\", value: \"tc-tiddlylink-external\"},\n\t\t\t\ttarget: {type: \"string\", value: \"_blank\"}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \"text\", text: text\n\t\t\t}]\n\t\t}];\n\t} else {\n\t\treturn [{\n\t\t\ttype: \"link\",\n\t\t\tattributes: {\n\t\t\t\tto: {type: \"string\", value: link}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \"text\", text: text\n\t\t\t}]\n\t\t}];\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/prettylink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/quoteblock.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/quoteblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for quote blocks. For example:\n\n```\n\t<<<.optionalClass(es) optional cited from\n\ta quote\n\t<<<\n\t\n\t<<<.optionalClass(es)\n\ta quote\n\t<<< optional cited from\n```\n\nQuotes can be quoted by putting more <s\n\n```\n\t<<<\n\tQuote Level 1\n\t\n\t<<<<\n\tQuoteLevel 2\n\t<<<<\n\t\n\t<<<\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"quoteblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /(<<<+)/mg;\n};\n\nexports.parse = function() {\n\tvar classes = [\"tc-quote\"];\n\t// Get all the details of the match\n\tvar reEndString = \"^\" + this.match[1] + \"(?!<)\";\n\t// Move past the <s\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t\n\t// Parse any classes, whitespace and then the optional cite itself\n\tclasses.push.apply(classes, this.parser.parseClasses());\n\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\n\tvar cite = this.parser.parseInlineRun(/(\\r?\\n)/mg);\n\t// before handling the cite, parse the body of the quote\n\tvar tree= this.parser.parseBlocks(reEndString);\n\t// If we got a cite, put it before the text\n\tif(cite.length > 0) {\n\t\ttree.unshift({\n\t\t\ttype: \"element\",\n\t\t\ttag: \"cite\",\n\t\t\tchildren: cite\n\t\t});\n\t}\n\t// Parse any optional cite\n\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\n\tcite = this.parser.parseInlineRun(/(\\r?\\n)/mg);\n\t// If we got a cite, push it\n\tif(cite.length > 0) {\n\t\ttree.push({\n\t\t\ttype: \"element\",\n\t\t\ttag: \"cite\",\n\t\t\tchildren: cite\n\t\t});\n\t}\n\t// Return the blockquote element\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"blockquote\",\n\t\tattributes: {\n\t\t\tclass: { type: \"string\", value: classes.join(\" \") },\n\t\t},\n\t\tchildren: tree\n\t}];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/quoteblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/rules.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/rules.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki pragma rule for rules specifications\n\n```\n\\rules except ruleone ruletwo rulethree\n\\rules only ruleone ruletwo rulethree\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"rules\";\nexports.types = {pragma: true};\n\n/*\nInstantiate parse rule\n*/\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /^\\\\rules[^\\S\\n]/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Move past the pragma invocation\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse whitespace delimited tokens terminated by a line break\n\tvar reMatch = /[^\\S\\n]*(\\S+)|(\\r?\\n)/mg,\n\t\ttokens = [];\n\treMatch.lastIndex = this.parser.pos;\n\tvar match = reMatch.exec(this.parser.source);\n\twhile(match && match.index === this.parser.pos) {\n\t\tthis.parser.pos = reMatch.lastIndex;\n\t\t// Exit if we've got the line break\n\t\tif(match[2]) {\n\t\t\tbreak;\n\t\t}\n\t\t// Process the token\n\t\tif(match[1]) {\n\t\t\ttokens.push(match[1]);\n\t\t}\n\t\t// Match the next token\n\t\tmatch = reMatch.exec(this.parser.source);\n\t}\n\t// Process the tokens\n\tif(tokens.length > 0) {\n\t\tthis.parser.amendRules(tokens[0],tokens.slice(1));\n\t}\n\t// No parse tree nodes to return\n\treturn [];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/rules.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/styleblock.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/styleblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for assigning styles and classes to paragraphs and other blocks. For example:\n\n```\n@@.myClass\n@@background-color:red;\nThis paragraph will have the CSS class `myClass`.\n\n* The `<ul>` around this list will also have the class `myClass`\n* List item 2\n\n@@\n```\n\nNote that classes and styles can be mixed subject to the rule that styles must precede classes. For example\n\n```\n@@.myFirstClass.mySecondClass\n@@width:100px;.myThirdClass\nThis is a paragraph\n@@\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"styleblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /@@((?:[^\\.\\r\\n\\s:]+:[^\\r\\n;]+;)+)?(?:\\.([^\\r\\n\\s]+))?\\r?\\n/mg;\n};\n\nexports.parse = function() {\n\tvar reEndString = \"^@@(?:\\\\r?\\\\n)?\";\n\tvar classes = [], styles = [];\n\tdo {\n\t\t// Get the class and style\n\t\tif(this.match[1]) {\n\t\t\tstyles.push(this.match[1]);\n\t\t}\n\t\tif(this.match[2]) {\n\t\t\tclasses.push(this.match[2].split(\".\").join(\" \"));\n\t\t}\n\t\t// Move past the match\n\t\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t\t// Look for another line of classes and styles\n\t\tthis.match = this.matchRegExp.exec(this.parser.source);\n\t} while(this.match && this.match.index === this.parser.pos);\n\t// Parse the body\n\tvar tree = this.parser.parseBlocks(reEndString);\n\tfor(var t=0; t<tree.length; t++) {\n\t\tif(classes.length > 0) {\n\t\t\t$tw.utils.addClassToParseTreeNode(tree[t],classes.join(\" \"));\n\t\t}\n\t\tif(styles.length > 0) {\n\t\t\t$tw.utils.addAttributeToParseTreeNode(tree[t],\"style\",styles.join(\"\"));\n\t\t}\n\t}\n\treturn tree;\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/styleblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/styleinline.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/styleinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for assigning styles and classes to inline runs. For example:\n\n```\n@@.myClass This is some text with a class@@\n@@background-color:red;This is some text with a background colour@@\n@@width:100px;.myClass This is some text with a class and a width@@\n```\n\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"styleinline\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /@@((?:[^\\.\\r\\n\\s:]+:[^\\r\\n;]+;)+)?(\\.(?:[^\\r\\n\\s]+)\\s+)?/mg;\n};\n\nexports.parse = function() {\n\tvar reEnd = /@@/g;\n\t// Get the styles and class\n\tvar stylesString = this.match[1],\n\t\tclassString = this.match[2] ? this.match[2].split(\".\").join(\" \") : undefined;\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse the run up to the terminator\n\tvar tree = this.parser.parseInlineRun(reEnd,{eatTerminator: true});\n\t// Return the classed span\n\tvar node = {\n\t\ttype: \"element\",\n\t\ttag: \"span\",\n\t\tattributes: {\n\t\t\t\"class\": {type: \"string\", value: \"tc-inline-style\"}\n\t\t},\n\t\tchildren: tree\n\t};\n\tif(classString) {\n\t\t$tw.utils.addClassToParseTreeNode(node,classString);\n\t}\n\tif(stylesString) {\n\t\t$tw.utils.addAttributeToParseTreeNode(node,\"style\",stylesString);\n\t}\n\treturn [node];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/styleinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/syslink.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/syslink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for system tiddler links.\nCan be suppressed preceding them with `~`.\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"syslink\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /~?\\$:\\/[a-zA-Z0-9/.\\-_]+/mg;\n};\n\nexports.parse = function() {\n\tvar match = this.match[0];\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Create the link unless it is suppressed\n\tif(match.substr(0,1) === \"~\") {\n\t\treturn [{type: \"text\", text: match.substr(1)}];\n\t} else {\n\t\treturn [{\n\t\t\ttype: \"link\",\n\t\t\tattributes: {\n\t\t\t\tto: {type: \"string\", value: match}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: match\n\t\t\t}]\n\t\t}];\n\t}\n};\n\n})();",
"title": "$:/core/modules/parsers/wikiparser/rules/syslink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/table.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/table.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for tables.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"table\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /^\\|(?:[^\\n]*)\\|(?:[fhck]?)\\r?(?:\\n|$)/mg;\n};\n\nvar processRow = function(prevColumns) {\n\tvar cellRegExp = /(?:\\|([^\\n\\|]*)\\|)|(\\|[fhck]?\\r?(?:\\n|$))/mg,\n\t\tcellTermRegExp = /((?:\\x20*)\\|)/mg,\n\t\ttree = [],\n\t\tcol = 0,\n\t\tcolSpanCount = 1,\n\t\tprevCell,\n\t\tvAlign;\n\t// Match a single cell\n\tcellRegExp.lastIndex = this.parser.pos;\n\tvar cellMatch = cellRegExp.exec(this.parser.source);\n\twhile(cellMatch && cellMatch.index === this.parser.pos) {\n\t\tif(cellMatch[1] === \"~\") {\n\t\t\t// Rowspan\n\t\t\tvar last = prevColumns[col];\n\t\t\tif(last) {\n\t\t\t\tlast.rowSpanCount++;\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(last.element,\"rowspan\",last.rowSpanCount);\n\t\t\t\tvAlign = $tw.utils.getAttributeValueFromParseTreeNode(last.element,\"valign\",\"center\");\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(last.element,\"valign\",vAlign);\n\t\t\t\tif(colSpanCount > 1) {\n\t\t\t\t\t$tw.utils.addAttributeToParseTreeNode(last.element,\"colspan\",colSpanCount);\n\t\t\t\t\tcolSpanCount = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Move to just before the `|` terminating the cell\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\n\t\t} else if(cellMatch[1] === \">\") {\n\t\t\t// Colspan\n\t\t\tcolSpanCount++;\n\t\t\t// Move to just before the `|` terminating the cell\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\n\t\t} else if(cellMatch[1] === \"<\" && prevCell) {\n\t\t\tcolSpanCount = 1 + $tw.utils.getAttributeValueFromParseTreeNode(prevCell,\"colspan\",1);\n\t\t\t$tw.utils.addAttributeToParseTreeNode(prevCell,\"colspan\",colSpanCount);\n\t\t\tcolSpanCount = 1;\n\t\t\t// Move to just before the `|` terminating the cell\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\n\t\t} else if(cellMatch[2]) {\n\t\t\t// End of row\n\t\t\tif(prevCell && colSpanCount > 1) {\n\t\t\t\tif(prevCell.attributes && prevCell.attributes && prevCell.attributes.colspan) {\n\t\t\t\t\t\tcolSpanCount += prevCell.attributes.colspan.value;\n\t\t\t\t} else {\n\t\t\t\t\tcolSpanCount -= 1;\n\t\t\t\t}\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(prevCell,\"colspan\",colSpanCount);\n\t\t\t}\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\n\t\t\tbreak;\n\t\t} else {\n\t\t\t// For ordinary cells, step beyond the opening `|`\n\t\t\tthis.parser.pos++;\n\t\t\t// Look for a space at the start of the cell\n\t\t\tvar spaceLeft = false;\n\t\t\tvAlign = null;\n\t\t\tif(this.parser.source.substr(this.parser.pos).search(/^\\^([^\\^]|\\^\\^)/) === 0) {\n\t\t\t\tvAlign = \"top\";\n\t\t\t} else if(this.parser.source.substr(this.parser.pos).search(/^,([^,]|,,)/) === 0) {\n\t\t\t\tvAlign = \"bottom\";\n\t\t\t}\n\t\t\tif(vAlign) {\n\t\t\t\tthis.parser.pos++;\n\t\t\t}\n\t\t\tvar chr = this.parser.source.substr(this.parser.pos,1);\n\t\t\twhile(chr === \" \") {\n\t\t\t\tspaceLeft = true;\n\t\t\t\tthis.parser.pos++;\n\t\t\t\tchr = this.parser.source.substr(this.parser.pos,1);\n\t\t\t}\n\t\t\t// Check whether this is a heading cell\n\t\t\tvar cell;\n\t\t\tif(chr === \"!\") {\n\t\t\t\tthis.parser.pos++;\n\t\t\t\tcell = {type: \"element\", tag: \"th\", children: []};\n\t\t\t} else {\n\t\t\t\tcell = {type: \"element\", tag: \"td\", children: []};\n\t\t\t}\n\t\t\ttree.push(cell);\n\t\t\t// Record information about this cell\n\t\t\tprevCell = cell;\n\t\t\tprevColumns[col] = {rowSpanCount:1,element:cell};\n\t\t\t// Check for a colspan\n\t\t\tif(colSpanCount > 1) {\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\"colspan\",colSpanCount);\n\t\t\t\tcolSpanCount = 1;\n\t\t\t}\n\t\t\t// Parse the cell\n\t\t\tcell.children = this.parser.parseInlineRun(cellTermRegExp,{eatTerminator: true});\n\t\t\t// Set the alignment for the cell\n\t\t\tif(vAlign) {\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\"valign\",vAlign);\n\t\t\t}\n\t\t\tif(this.parser.source.substr(this.parser.pos - 2,1) === \" \") { // spaceRight\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\"align\",spaceLeft ? \"center\" : \"left\");\n\t\t\t} else if(spaceLeft) {\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\"align\",\"right\");\n\t\t\t}\n\t\t\t// Move back to the closing `|`\n\t\t\tthis.parser.pos--;\n\t\t}\n\t\tcol++;\n\t\tcellRegExp.lastIndex = this.parser.pos;\n\t\tcellMatch = cellRegExp.exec(this.parser.source);\n\t}\n\treturn tree;\n};\n\nexports.parse = function() {\n\tvar rowContainerTypes = {\"c\":\"caption\", \"h\":\"thead\", \"\":\"tbody\", \"f\":\"tfoot\"},\n\t\ttable = {type: \"element\", tag: \"table\", children: []},\n\t\trowRegExp = /^\\|([^\\n]*)\\|([fhck]?)\\r?(?:\\n|$)/mg,\n\t\trowTermRegExp = /(\\|(?:[fhck]?)\\r?(?:\\n|$))/mg,\n\t\tprevColumns = [],\n\t\tcurrRowType,\n\t\trowContainer,\n\t\trowCount = 0;\n\t// Match the row\n\trowRegExp.lastIndex = this.parser.pos;\n\tvar rowMatch = rowRegExp.exec(this.parser.source);\n\twhile(rowMatch && rowMatch.index === this.parser.pos) {\n\t\tvar rowType = rowMatch[2];\n\t\t// Check if it is a class assignment\n\t\tif(rowType === \"k\") {\n\t\t\t$tw.utils.addClassToParseTreeNode(table,rowMatch[1]);\n\t\t\tthis.parser.pos = rowMatch.index + rowMatch[0].length;\n\t\t} else {\n\t\t\t// Otherwise, create a new row if this one is of a different type\n\t\t\tif(rowType !== currRowType) {\n\t\t\t\trowContainer = {type: \"element\", tag: rowContainerTypes[rowType], children: []};\n\t\t\t\ttable.children.push(rowContainer);\n\t\t\t\tcurrRowType = rowType;\n\t\t\t}\n\t\t\t// Is this a caption row?\n\t\t\tif(currRowType === \"c\") {\n\t\t\t\t// If so, move past the opening `|` of the row\n\t\t\t\tthis.parser.pos++;\n\t\t\t\t// Move the caption to the first row if it isn't already\n\t\t\t\tif(table.children.length !== 1) {\n\t\t\t\t\ttable.children.pop(); // Take rowContainer out of the children array\n\t\t\t\t\ttable.children.splice(0,0,rowContainer); // Insert it at the bottom\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// Set the alignment - TODO: figure out why TW did this\n//\t\t\t\trowContainer.attributes.align = rowCount === 0 ? \"top\" : \"bottom\";\n\t\t\t\t// Parse the caption\n\t\t\t\trowContainer.children = this.parser.parseInlineRun(rowTermRegExp,{eatTerminator: true});\n\t\t\t} else {\n\t\t\t\t// Create the row\n\t\t\t\tvar theRow = {type: \"element\", tag: \"tr\", children: []};\n\t\t\t\t$tw.utils.addClassToParseTreeNode(theRow,rowCount%2 ? \"oddRow\" : \"evenRow\");\n\t\t\t\trowContainer.children.push(theRow);\n\t\t\t\t// Process the row\n\t\t\t\ttheRow.children = processRow.call(this,prevColumns);\n\t\t\t\tthis.parser.pos = rowMatch.index + rowMatch[0].length;\n\t\t\t\t// Increment the row count\n\t\t\t\trowCount++;\n\t\t\t}\n\t\t}\n\t\trowMatch = rowRegExp.exec(this.parser.source);\n\t}\n\treturn [table];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/table.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/transcludeblock.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/transcludeblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for block-level transclusion. For example:\n\n```\n{{MyTiddler}}\n{{MyTiddler||TemplateTitle}}\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"transcludeblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\{\\{([^\\{\\}\\|]*)(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}(?:\\r?\\n|$)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Get the match details\n\tvar template = $tw.utils.trim(this.match[2]),\n\t\ttextRef = $tw.utils.trim(this.match[1]);\n\t// Prepare the transclude widget\n\tvar transcludeNode = {\n\t\t\ttype: \"transclude\",\n\t\t\tattributes: {},\n\t\t\tisBlock: true\n\t\t};\n\t// Prepare the tiddler widget\n\tvar tr, targetTitle, targetField, targetIndex, tiddlerNode;\n\tif(textRef) {\n\t\ttr = $tw.utils.parseTextReference(textRef);\n\t\ttargetTitle = tr.title;\n\t\ttargetField = tr.field;\n\t\ttargetIndex = tr.index;\n\t\ttiddlerNode = {\n\t\t\ttype: \"tiddler\",\n\t\t\tattributes: {\n\t\t\t\ttiddler: {type: \"string\", value: targetTitle}\n\t\t\t},\n\t\t\tisBlock: true,\n\t\t\tchildren: [transcludeNode]\n\t\t};\n\t}\n\tif(template) {\n\t\ttranscludeNode.attributes.tiddler = {type: \"string\", value: template};\n\t\tif(textRef) {\n\t\t\treturn [tiddlerNode];\n\t\t} else {\n\t\t\treturn [transcludeNode];\n\t\t}\n\t} else {\n\t\tif(textRef) {\n\t\t\ttranscludeNode.attributes.tiddler = {type: \"string\", value: targetTitle};\n\t\t\tif(targetField) {\n\t\t\t\ttranscludeNode.attributes.field = {type: \"string\", value: targetField};\n\t\t\t}\n\t\t\tif(targetIndex) {\n\t\t\t\ttranscludeNode.attributes.index = {type: \"string\", value: targetIndex};\n\t\t\t}\n\t\t\treturn [tiddlerNode];\n\t\t} else {\n\t\t\treturn [transcludeNode];\n\t\t}\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/transcludeblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/transcludeinline.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/transcludeinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for inline-level transclusion. For example:\n\n```\n{{MyTiddler}}\n{{MyTiddler||TemplateTitle}}\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"transcludeinline\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\{\\{([^\\{\\}\\|]*)(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Get the match details\n\tvar template = $tw.utils.trim(this.match[2]),\n\t\ttextRef = $tw.utils.trim(this.match[1]);\n\t// Prepare the transclude widget\n\tvar transcludeNode = {\n\t\t\ttype: \"transclude\",\n\t\t\tattributes: {}\n\t\t};\n\t// Prepare the tiddler widget\n\tvar tr, targetTitle, targetField, targetIndex, tiddlerNode;\n\tif(textRef) {\n\t\ttr = $tw.utils.parseTextReference(textRef);\n\t\ttargetTitle = tr.title;\n\t\ttargetField = tr.field;\n\t\ttargetIndex = tr.index;\n\t\ttiddlerNode = {\n\t\t\ttype: \"tiddler\",\n\t\t\tattributes: {\n\t\t\t\ttiddler: {type: \"string\", value: targetTitle}\n\t\t\t},\n\t\t\tchildren: [transcludeNode]\n\t\t};\n\t}\n\tif(template) {\n\t\ttranscludeNode.attributes.tiddler = {type: \"string\", value: template};\n\t\tif(textRef) {\n\t\t\treturn [tiddlerNode];\n\t\t} else {\n\t\t\treturn [transcludeNode];\n\t\t}\n\t} else {\n\t\tif(textRef) {\n\t\t\ttranscludeNode.attributes.tiddler = {type: \"string\", value: targetTitle};\n\t\t\tif(targetField) {\n\t\t\t\ttranscludeNode.attributes.field = {type: \"string\", value: targetField};\n\t\t\t}\n\t\t\tif(targetIndex) {\n\t\t\t\ttranscludeNode.attributes.index = {type: \"string\", value: targetIndex};\n\t\t\t}\n\t\t\treturn [tiddlerNode];\n\t\t} else {\n\t\t\treturn [transcludeNode];\n\t\t}\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/transcludeinline.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/typedblock.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/typedblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for typed blocks. For example:\n\n```\n$$$.js\nThis will be rendered as JavaScript\n$$$\n\n$$$.svg\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"150\" height=\"100\">\n <circle cx=\"100\" cy=\"50\" r=\"40\" stroke=\"black\" stroke-width=\"2\" fill=\"red\" />\n</svg>\n$$$\n\n$$$text/vnd.tiddlywiki>text/html\nThis will be rendered as an //HTML representation// of WikiText\n$$$\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nexports.name = \"typedblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\$\\$\\$([^ >\\r\\n]*)(?: *> *([^ \\r\\n]+))?\\r?\\n/mg;\n};\n\nexports.parse = function() {\n\tvar reEnd = /\\r?\\n\\$\\$\\$\\r?(?:\\n|$)/mg;\n\t// Save the type\n\tvar parseType = this.match[1],\n\t\trenderType = this.match[2];\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Look for the end of the block\n\treEnd.lastIndex = this.parser.pos;\n\tvar match = reEnd.exec(this.parser.source),\n\t\ttext;\n\t// Process the block\n\tif(match) {\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\n\t\tthis.parser.pos = match.index + match[0].length;\n\t} else {\n\t\ttext = this.parser.source.substr(this.parser.pos);\n\t\tthis.parser.pos = this.parser.sourceLength;\n\t}\n\t// Parse the block according to the specified type\n\tvar parser = this.parser.wiki.parseText(parseType,text,{defaultType: \"text/plain\"});\n\t// If there's no render type, just return the parse tree\n\tif(!renderType) {\n\t\treturn parser.tree;\n\t} else {\n\t\t// Otherwise, render to the rendertype and return in a <PRE> tag\n\t\tvar widgetNode = this.parser.wiki.makeWidget(parser),\n\t\t\tcontainer = $tw.fakeDocument.createElement(\"div\");\n\t\twidgetNode.render(container,null);\n\t\ttext = renderType === \"text/html\" ? container.innerHTML : container.textContent;\n\t\treturn [{\n\t\t\ttype: \"element\",\n\t\t\ttag: \"pre\",\n\t\t\tchildren: [{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: text\n\t\t\t}]\n\t\t}];\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/typedblock.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/wikilink.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/wikilink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for wiki links. For example:\n\n```\nAWikiLink\nAnotherLink\n~SuppressedLink\n```\n\nPrecede a camel case word with `~` to prevent it from being recognised as a link.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"wikilink\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = new RegExp($tw.config.textPrimitives.unWikiLink + \"?\" + $tw.config.textPrimitives.wikiLink,\"mg\");\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get the details of the match\n\tvar linkText = this.match[0];\n\t// Move past the macro call\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// If the link starts with the unwikilink character then just output it as plain text\n\tif(linkText.substr(0,1) === $tw.config.textPrimitives.unWikiLink) {\n\t\treturn [{type: \"text\", text: linkText.substr(1)}];\n\t}\n\t// If the link has been preceded with a blocked letter then don't treat it as a link\n\tif(this.match.index > 0) {\n\t\tvar preRegExp = new RegExp($tw.config.textPrimitives.blockPrefixLetters,\"mg\");\n\t\tpreRegExp.lastIndex = this.match.index-1;\n\t\tvar preMatch = preRegExp.exec(this.parser.source);\n\t\tif(preMatch && preMatch.index === this.match.index-1) {\n\t\t\treturn [{type: \"text\", text: linkText}];\n\t\t}\n\t}\n\treturn [{\n\t\ttype: \"link\",\n\t\tattributes: {\n\t\t\tto: {type: \"string\", value: linkText}\n\t\t},\n\t\tchildren: [{\n\t\t\ttype: \"text\",\n\t\t\ttext: linkText\n\t\t}]\n\t}];\n};\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/wikilink.js",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/wikiparser.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/wikiparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe wiki text parser processes blocks of source text into a parse tree.\n\nThe parse tree is made up of nested arrays of these JavaScript objects:\n\n\t{type: \"element\", tag: <string>, attributes: {}, children: []} - an HTML element\n\t{type: \"text\", text: <string>} - a text node\n\t{type: \"entity\", value: <string>} - an entity\n\t{type: \"raw\", html: <string>} - raw HTML\n\nAttributes are stored as hashmaps of the following objects:\n\n\t{type: \"string\", value: <string>} - literal string\n\t{type: \"indirect\", textReference: <textReference>} - indirect through a text reference\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar WikiParser = function(type,text,options) {\n\tthis.wiki = options.wiki;\n\tvar self = this;\n\t// Check for an externally linked tiddler\n\tif($tw.browser && (text || \"\") === \"\" && options._canonical_uri) {\n\t\tthis.loadRemoteTiddler(options._canonical_uri);\n\t\ttext = $tw.language.getRawString(\"LazyLoadingWarning\");\n\t}\n\t// Initialise the classes if we don't have them already\n\tif(!this.pragmaRuleClasses) {\n\t\tWikiParser.prototype.pragmaRuleClasses = $tw.modules.createClassesFromModules(\"wikirule\",\"pragma\",$tw.WikiRuleBase);\n\t\tthis.setupRules(WikiParser.prototype.pragmaRuleClasses,\"$:/config/WikiParserRules/Pragmas/\");\n\t}\n\tif(!this.blockRuleClasses) {\n\t\tWikiParser.prototype.blockRuleClasses = $tw.modules.createClassesFromModules(\"wikirule\",\"block\",$tw.WikiRuleBase);\n\t\tthis.setupRules(WikiParser.prototype.blockRuleClasses,\"$:/config/WikiParserRules/Block/\");\n\t}\n\tif(!this.inlineRuleClasses) {\n\t\tWikiParser.prototype.inlineRuleClasses = $tw.modules.createClassesFromModules(\"wikirule\",\"inline\",$tw.WikiRuleBase);\n\t\tthis.setupRules(WikiParser.prototype.inlineRuleClasses,\"$:/config/WikiParserRules/Inline/\");\n\t}\n\t// Save the parse text\n\tthis.type = type || \"text/vnd.tiddlywiki\";\n\tthis.source = text || \"\";\n\tthis.sourceLength = this.source.length;\n\t// Set current parse position\n\tthis.pos = 0;\n\t// Instantiate the pragma parse rules\n\tthis.pragmaRules = this.instantiateRules(this.pragmaRuleClasses,\"pragma\",0);\n\t// Instantiate the parser block and inline rules\n\tthis.blockRules = this.instantiateRules(this.blockRuleClasses,\"block\",0);\n\tthis.inlineRules = this.instantiateRules(this.inlineRuleClasses,\"inline\",0);\n\t// Parse any pragmas\n\tthis.tree = [];\n\tvar topBranch = this.parsePragmas();\n\t// Parse the text into inline runs or blocks\n\tif(options.parseAsInline) {\n\t\ttopBranch.push.apply(topBranch,this.parseInlineRun());\n\t} else {\n\t\ttopBranch.push.apply(topBranch,this.parseBlocks());\n\t}\n\t// Return the parse tree\n};\n\n/*\n*/\nWikiParser.prototype.loadRemoteTiddler = function(url) {\n\tvar self = this;\n\t$tw.utils.httpRequest({\n\t\turl: url,\n\t\ttype: \"GET\",\n\t\tcallback: function(err,data) {\n\t\t\tif(!err) {\n\t\t\t\tvar tiddlers = self.wiki.deserializeTiddlers(\".tid\",data,self.wiki.getCreationFields());\n\t\t\t\t$tw.utils.each(tiddlers,function(tiddler) {\n\t\t\t\t\ttiddler[\"_canonical_uri\"] = url;\n\t\t\t\t});\n\t\t\t\tif(tiddlers) {\n\t\t\t\t\tself.wiki.addTiddlers(tiddlers);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n};\n\n/*\n*/\nWikiParser.prototype.setupRules = function(proto,configPrefix) {\n\tvar self = this;\n\tif(!$tw.safemode) {\n\t\t$tw.utils.each(proto,function(object,name) {\n\t\t\tif(self.wiki.getTiddlerText(configPrefix + name,\"enable\") !== \"enable\") {\n\t\t\t\tdelete proto[name];\n\t\t\t}\n\t\t});\n\t}\n};\n\n/*\nInstantiate an array of parse rules\n*/\nWikiParser.prototype.instantiateRules = function(classes,type,startPos) {\n\tvar rulesInfo = [],\n\t\tself = this;\n\t$tw.utils.each(classes,function(RuleClass) {\n\t\t// Instantiate the rule\n\t\tvar rule = new RuleClass(self);\n\t\trule.is = {};\n\t\trule.is[type] = true;\n\t\trule.init(self);\n\t\tvar matchIndex = rule.findNextMatch(startPos);\n\t\tif(matchIndex !== undefined) {\n\t\t\trulesInfo.push({\n\t\t\t\trule: rule,\n\t\t\t\tmatchIndex: matchIndex\n\t\t\t});\n\t\t}\n\t});\n\treturn rulesInfo;\n};\n\n/*\nSkip any whitespace at the current position. Options are:\n\ttreatNewlinesAsNonWhitespace: true if newlines are NOT to be treated as whitespace\n*/\nWikiParser.prototype.skipWhitespace = function(options) {\n\toptions = options || {};\n\tvar whitespaceRegExp = options.treatNewlinesAsNonWhitespace ? /([^\\S\\n]+)/mg : /(\\s+)/mg;\n\twhitespaceRegExp.lastIndex = this.pos;\n\tvar whitespaceMatch = whitespaceRegExp.exec(this.source);\n\tif(whitespaceMatch && whitespaceMatch.index === this.pos) {\n\t\tthis.pos = whitespaceRegExp.lastIndex;\n\t}\n};\n\n/*\nGet the next match out of an array of parse rule instances\n*/\nWikiParser.prototype.findNextMatch = function(rules,startPos) {\n\t// Find the best matching rule by finding the closest match position\n\tvar matchingRule,\n\t\tmatchingRulePos = this.sourceLength;\n\t// Step through each rule\n\tfor(var t=0; t<rules.length; t++) {\n\t\tvar ruleInfo = rules[t];\n\t\t// Ask the rule to get the next match if we've moved past the current one\n\t\tif(ruleInfo.matchIndex !== undefined && ruleInfo.matchIndex < startPos) {\n\t\t\truleInfo.matchIndex = ruleInfo.rule.findNextMatch(startPos);\n\t\t}\n\t\t// Adopt this match if it's closer than the current best match\n\t\tif(ruleInfo.matchIndex !== undefined && ruleInfo.matchIndex <= matchingRulePos) {\n\t\t\tmatchingRule = ruleInfo;\n\t\t\tmatchingRulePos = ruleInfo.matchIndex;\n\t\t}\n\t}\n\treturn matchingRule;\n};\n\n/*\nParse any pragmas at the beginning of a block of parse text\n*/\nWikiParser.prototype.parsePragmas = function() {\n\tvar currentTreeBranch = this.tree;\n\twhile(true) {\n\t\t// Skip whitespace\n\t\tthis.skipWhitespace();\n\t\t// Check for the end of the text\n\t\tif(this.pos >= this.sourceLength) {\n\t\t\tbreak;\n\t\t}\n\t\t// Check if we've arrived at a pragma rule match\n\t\tvar nextMatch = this.findNextMatch(this.pragmaRules,this.pos);\n\t\t// If not, just exit\n\t\tif(!nextMatch || nextMatch.matchIndex !== this.pos) {\n\t\t\tbreak;\n\t\t}\n\t\t// Process the pragma rule\n\t\tvar subTree = nextMatch.rule.parse();\n\t\tif(subTree.length > 0) {\n\t\t\t// Quick hack; we only cope with a single parse tree node being returned, which is true at the moment\n\t\t\tcurrentTreeBranch.push.apply(currentTreeBranch,subTree);\n\t\t\tsubTree[0].children = [];\n\t\t\tcurrentTreeBranch = subTree[0].children;\n\t\t}\n\t}\n\treturn currentTreeBranch;\n};\n\n/*\nParse a block from the current position\n\tterminatorRegExpString: optional regular expression string that identifies the end of plain paragraphs. Must not include capturing parenthesis\n*/\nWikiParser.prototype.parseBlock = function(terminatorRegExpString) {\n\tvar terminatorRegExp = terminatorRegExpString ? new RegExp(\"(\" + terminatorRegExpString + \"|\\\\r?\\\\n\\\\r?\\\\n)\",\"mg\") : /(\\r?\\n\\r?\\n)/mg;\n\tthis.skipWhitespace();\n\tif(this.pos >= this.sourceLength) {\n\t\treturn [];\n\t}\n\t// Look for a block rule that applies at the current position\n\tvar nextMatch = this.findNextMatch(this.blockRules,this.pos);\n\tif(nextMatch && nextMatch.matchIndex === this.pos) {\n\t\treturn nextMatch.rule.parse();\n\t}\n\t// Treat it as a paragraph if we didn't find a block rule\n\treturn [{type: \"element\", tag: \"p\", children: this.parseInlineRun(terminatorRegExp)}];\n};\n\n/*\nParse a series of blocks of text until a terminating regexp is encountered or the end of the text\n\tterminatorRegExpString: terminating regular expression\n*/\nWikiParser.prototype.parseBlocks = function(terminatorRegExpString) {\n\tif(terminatorRegExpString) {\n\t\treturn this.parseBlocksTerminated(terminatorRegExpString);\n\t} else {\n\t\treturn this.parseBlocksUnterminated();\n\t}\n};\n\n/*\nParse a block from the current position to the end of the text\n*/\nWikiParser.prototype.parseBlocksUnterminated = function() {\n\tvar tree = [];\n\twhile(this.pos < this.sourceLength) {\n\t\ttree.push.apply(tree,this.parseBlock());\n\t}\n\treturn tree;\n};\n\n/*\nParse blocks of text until a terminating regexp is encountered\n*/\nWikiParser.prototype.parseBlocksTerminated = function(terminatorRegExpString) {\n\tvar terminatorRegExp = new RegExp(\"(\" + terminatorRegExpString + \")\",\"mg\"),\n\t\ttree = [];\n\t// Skip any whitespace\n\tthis.skipWhitespace();\n\t// Check if we've got the end marker\n\tterminatorRegExp.lastIndex = this.pos;\n\tvar match = terminatorRegExp.exec(this.source);\n\t// Parse the text into blocks\n\twhile(this.pos < this.sourceLength && !(match && match.index === this.pos)) {\n\t\tvar blocks = this.parseBlock(terminatorRegExpString);\n\t\ttree.push.apply(tree,blocks);\n\t\t// Skip any whitespace\n\t\tthis.skipWhitespace();\n\t\t// Check if we've got the end marker\n\t\tterminatorRegExp.lastIndex = this.pos;\n\t\tmatch = terminatorRegExp.exec(this.source);\n\t}\n\tif(match && match.index === this.pos) {\n\t\tthis.pos = match.index + match[0].length;\n\t}\n\treturn tree;\n};\n\n/*\nParse a run of text at the current position\n\tterminatorRegExp: a regexp at which to stop the run\n\toptions: see below\nOptions available:\n\teatTerminator: move the parse position past any encountered terminator (default false)\n*/\nWikiParser.prototype.parseInlineRun = function(terminatorRegExp,options) {\n\tif(terminatorRegExp) {\n\t\treturn this.parseInlineRunTerminated(terminatorRegExp,options);\n\t} else {\n\t\treturn this.parseInlineRunUnterminated(options);\n\t}\n};\n\nWikiParser.prototype.parseInlineRunUnterminated = function(options) {\n\tvar tree = [];\n\t// Find the next occurrence of an inline rule\n\tvar nextMatch = this.findNextMatch(this.inlineRules,this.pos);\n\t// Loop around the matches until we've reached the end of the text\n\twhile(this.pos < this.sourceLength && nextMatch) {\n\t\t// Process the text preceding the run rule\n\t\tif(nextMatch.matchIndex > this.pos) {\n\t\t\ttree.push({type: \"text\", text: this.source.substring(this.pos,nextMatch.matchIndex)});\n\t\t\tthis.pos = nextMatch.matchIndex;\n\t\t}\n\t\t// Process the run rule\n\t\ttree.push.apply(tree,nextMatch.rule.parse());\n\t\t// Look for the next run rule\n\t\tnextMatch = this.findNextMatch(this.inlineRules,this.pos);\n\t}\n\t// Process the remaining text\n\tif(this.pos < this.sourceLength) {\n\t\ttree.push({type: \"text\", text: this.source.substr(this.pos)});\n\t}\n\tthis.pos = this.sourceLength;\n\treturn tree;\n};\n\nWikiParser.prototype.parseInlineRunTerminated = function(terminatorRegExp,options) {\n\toptions = options || {};\n\tvar tree = [];\n\t// Find the next occurrence of the terminator\n\tterminatorRegExp.lastIndex = this.pos;\n\tvar terminatorMatch = terminatorRegExp.exec(this.source);\n\t// Find the next occurrence of a inlinerule\n\tvar inlineRuleMatch = this.findNextMatch(this.inlineRules,this.pos);\n\t// Loop around until we've reached the end of the text\n\twhile(this.pos < this.sourceLength && (terminatorMatch || inlineRuleMatch)) {\n\t\t// Return if we've found the terminator, and it precedes any inline rule match\n\t\tif(terminatorMatch) {\n\t\t\tif(!inlineRuleMatch || inlineRuleMatch.matchIndex >= terminatorMatch.index) {\n\t\t\t\tif(terminatorMatch.index > this.pos) {\n\t\t\t\t\ttree.push({type: \"text\", text: this.source.substring(this.pos,terminatorMatch.index)});\n\t\t\t\t}\n\t\t\t\tthis.pos = terminatorMatch.index;\n\t\t\t\tif(options.eatTerminator) {\n\t\t\t\t\tthis.pos += terminatorMatch[0].length;\n\t\t\t\t}\n\t\t\t\treturn tree;\n\t\t\t}\n\t\t}\n\t\t// Process any inline rule, along with the text preceding it\n\t\tif(inlineRuleMatch) {\n\t\t\t// Preceding text\n\t\t\tif(inlineRuleMatch.matchIndex > this.pos) {\n\t\t\t\ttree.push({type: \"text\", text: this.source.substring(this.pos,inlineRuleMatch.matchIndex)});\n\t\t\t\tthis.pos = inlineRuleMatch.matchIndex;\n\t\t\t}\n\t\t\t// Process the inline rule\n\t\t\ttree.push.apply(tree,inlineRuleMatch.rule.parse());\n\t\t\t// Look for the next inline rule\n\t\t\tinlineRuleMatch = this.findNextMatch(this.inlineRules,this.pos);\n\t\t\t// Look for the next terminator match\n\t\t\tterminatorRegExp.lastIndex = this.pos;\n\t\t\tterminatorMatch = terminatorRegExp.exec(this.source);\n\t\t}\n\t}\n\t// Process the remaining text\n\tif(this.pos < this.sourceLength) {\n\t\ttree.push({type: \"text\", text: this.source.substr(this.pos)});\n\t}\n\tthis.pos = this.sourceLength;\n\treturn tree;\n};\n\n/*\nParse zero or more class specifiers `.classname`\n*/\nWikiParser.prototype.parseClasses = function() {\n\tvar classRegExp = /\\.([^\\s\\.]+)/mg,\n\t\tclassNames = [];\n\tclassRegExp.lastIndex = this.pos;\n\tvar match = classRegExp.exec(this.source);\n\twhile(match && match.index === this.pos) {\n\t\tthis.pos = match.index + match[0].length;\n\t\tclassNames.push(match[1]);\n\t\tmatch = classRegExp.exec(this.source);\n\t}\n\treturn classNames;\n};\n\n/*\nAmend the rules used by this instance of the parser\n\ttype: `only` keeps just the named rules, `except` keeps all but the named rules\n\tnames: array of rule names\n*/\nWikiParser.prototype.amendRules = function(type,names) {\n\tnames = names || [];\n\t// Define the filter function\n\tvar keepFilter;\n\tif(type === \"only\") {\n\t\tkeepFilter = function(name) {\n\t\t\treturn names.indexOf(name) !== -1;\n\t\t};\n\t} else if(type === \"except\") {\n\t\tkeepFilter = function(name) {\n\t\t\treturn names.indexOf(name) === -1;\n\t\t};\n\t} else {\n\t\treturn;\n\t}\n\t// Define a function to process each of our rule arrays\n\tvar processRuleArray = function(ruleArray) {\n\t\tfor(var t=ruleArray.length-1; t>=0; t--) {\n\t\t\tif(!keepFilter(ruleArray[t].rule.name)) {\n\t\t\t\truleArray.splice(t,1);\n\t\t\t}\n\t\t}\n\t};\n\t// Process each rule array\n\tprocessRuleArray(this.pragmaRules);\n\tprocessRuleArray(this.blockRules);\n\tprocessRuleArray(this.inlineRules);\n};\n\nexports[\"text/vnd.tiddlywiki\"] = WikiParser;\n\n})();\n\n",
"title": "$:/core/modules/parsers/wikiparser/wikiparser.js",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/wikiparser/rules/wikirulebase.js": {
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/wikirulebase.js\ntype: application/javascript\nmodule-type: global\n\nBase class for wiki parser rules\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nThis constructor is always overridden with a blank constructor, and so shouldn't be used\n*/\nvar WikiRuleBase = function() {\n};\n\n/*\nTo be overridden by individual rules\n*/\nWikiRuleBase.prototype.init = function(parser) {\n\tthis.parser = parser;\n};\n\n/*\nDefault implementation of findNextMatch uses RegExp matching\n*/\nWikiRuleBase.prototype.findNextMatch = function(startPos) {\n\tthis.matchRegExp.lastIndex = startPos;\n\tthis.match = this.matchRegExp.exec(this.parser.source);\n\treturn this.match ? this.match.index : undefined;\n};\n\nexports.WikiRuleBase = WikiRuleBase;\n\n})();\n",
"title": "$:/core/modules/parsers/wikiparser/rules/wikirulebase.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/pluginswitcher.js": {
"text": "/*\\\ntitle: $:/core/modules/pluginswitcher.js\ntype: application/javascript\nmodule-type: global\n\nManages switching plugins for themes and languages.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\noptions:\nwiki: wiki store to be used\npluginType: type of plugin to be switched\ncontrollerTitle: title of tiddler used to control switching of this resource\ndefaultPlugins: array of default plugins to be used if nominated plugin isn't found\n*/\nfunction PluginSwitcher(options) {\n\tthis.wiki = options.wiki;\n\tthis.pluginType = options.pluginType;\n\tthis.controllerTitle = options.controllerTitle;\n\tthis.defaultPlugins = options.defaultPlugins || [];\n\t// Switch to the current plugin\n\tthis.switchPlugins();\n\t// Listen for changes to the selected plugin\n\tvar self = this;\n\tthis.wiki.addEventListener(\"change\",function(changes) {\n\t\tif($tw.utils.hop(changes,self.controllerTitle)) {\n\t\t\tself.switchPlugins();\n\t\t}\n\t});\n}\n\nPluginSwitcher.prototype.switchPlugins = function() {\n\t// Get the name of the current theme\n\tvar selectedPluginTitle = this.wiki.getTiddlerText(this.controllerTitle);\n\t// If it doesn't exist, then fallback to one of the default themes\n\tvar index = 0;\n\twhile(!this.wiki.getTiddler(selectedPluginTitle) && index < this.defaultPlugins.length) {\n\t\tselectedPluginTitle = this.defaultPlugins[index++];\n\t}\n\t// Accumulate the titles of the plugins that we need to load\n\tvar plugins = [],\n\t\tself = this,\n\t\taccumulatePlugin = function(title) {\n\t\t\tvar tiddler = self.wiki.getTiddler(title);\n\t\t\tif(tiddler && tiddler.isPlugin() && plugins.indexOf(title) === -1) {\n\t\t\t\tplugins.push(title);\n\t\t\t\tvar pluginInfo = JSON.parse(self.wiki.getTiddlerText(title)),\n\t\t\t\t\tdependents = $tw.utils.parseStringArray(tiddler.fields.dependents || \"\");\n\t\t\t\t$tw.utils.each(dependents,function(title) {\n\t\t\t\t\taccumulatePlugin(title);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\taccumulatePlugin(selectedPluginTitle);\n\t// Unregister any existing theme tiddlers\n\tvar unregisteredTiddlers = $tw.wiki.unregisterPluginTiddlers(this.pluginType);\n\t// Register any new theme tiddlers\n\tvar registeredTiddlers = $tw.wiki.registerPluginTiddlers(this.pluginType,plugins);\n\t// Unpack the current theme tiddlers\n\t$tw.wiki.unpackPluginTiddlers();\n};\n\nexports.PluginSwitcher = PluginSwitcher;\n\n})();\n",
"title": "$:/core/modules/pluginswitcher.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/saver-handler.js": {
"text": "/*\\\ntitle: $:/core/modules/saver-handler.js\ntype: application/javascript\nmodule-type: global\n\nThe saver handler tracks changes to the store and handles saving the entire wiki via saver modules.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInstantiate the saver handler with the following options:\nwiki: wiki to be synced\ndirtyTracking: true if dirty tracking should be performed\n*/\nfunction SaverHandler(options) {\n\tvar self = this;\n\tthis.wiki = options.wiki;\n\tthis.dirtyTracking = options.dirtyTracking;\n\tthis.pendingAutoSave = false;\n\t// Make a logger\n\tthis.logger = new $tw.utils.Logger(\"saver-handler\");\n\t// Initialise our savers\n\tif($tw.browser) {\n\t\tthis.initSavers();\n\t}\n\t// Only do dirty tracking if required\n\tif($tw.browser && this.dirtyTracking) {\n\t\t// Compile the dirty tiddler filter\n\t\tthis.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter));\n\t\t// Count of changes that have not yet been saved\n\t\tthis.numChanges = 0;\n\t\t// Listen out for changes to tiddlers\n\t\tthis.wiki.addEventListener(\"change\",function(changes) {\n\t\t\t// Filter the changes so that we only count changes to tiddlers that we care about\n\t\t\tvar filteredChanges = self.filterFn.call(self.wiki,function(callback) {\n\t\t\t\t$tw.utils.each(changes,function(change,title) {\n\t\t\t\t\tvar tiddler = self.wiki.getTiddler(title);\n\t\t\t\t\tcallback(tiddler,title);\n\t\t\t\t});\n\t\t\t});\n\t\t\t// Adjust the number of changes\n\t\t\tself.numChanges += filteredChanges.length;\n\t\t\tself.updateDirtyStatus();\n\t\t\t// Do any autosave if one is pending and there's no more change events\n\t\t\tif(self.pendingAutoSave && self.wiki.getSizeOfTiddlerEventQueue() === 0) {\n\t\t\t\t// Check if we're dirty\n\t\t\t\tif(self.numChanges > 0) {\n\t\t\t\t\tself.saveWiki({\n\t\t\t\t\t\tmethod: \"autosave\",\n\t\t\t\t\t\tdownloadType: \"text/plain\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tself.pendingAutoSave = false;\n\t\t\t}\n\t\t});\n\t\t// Listen for the autosave event\n\t\t$tw.rootWidget.addEventListener(\"tm-auto-save-wiki\",function(event) {\n\t\t\t// Do the autosave unless there are outstanding tiddler change events\n\t\t\tif(self.wiki.getSizeOfTiddlerEventQueue() === 0) {\n\t\t\t\t// Check if we're dirty\n\t\t\t\tif(self.numChanges > 0) {\n\t\t\t\t\tself.saveWiki({\n\t\t\t\t\t\tmethod: \"autosave\",\n\t\t\t\t\t\tdownloadType: \"text/plain\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Otherwise put ourselves in the \"pending autosave\" state and wait for the change event before we do the autosave\n\t\t\t\tself.pendingAutoSave = true;\n\t\t\t}\n\t\t});\n\t\t// Set up our beforeunload handler\n\t\t$tw.addUnloadTask(function(event) {\n\t\t\tvar confirmationMessage;\n\t\t\tif(self.isDirty()) {\n\t\t\t\tconfirmationMessage = $tw.language.getString(\"UnsavedChangesWarning\");\n\t\t\t\tevent.returnValue = confirmationMessage; // Gecko\n\t\t\t}\n\t\t\treturn confirmationMessage;\n\t\t});\n\t}\n\t// Install the save action handlers\n\tif($tw.browser) {\n\t\t$tw.rootWidget.addEventListener(\"tm-save-wiki\",function(event) {\n\t\t\tself.saveWiki({\n\t\t\t\ttemplate: event.param,\n\t\t\t\tdownloadType: \"text/plain\",\n\t\t\t\tvariables: event.paramObject\n\t\t\t});\n\t\t});\n\t\t$tw.rootWidget.addEventListener(\"tm-download-file\",function(event) {\n\t\t\tself.saveWiki({\n\t\t\t\tmethod: \"download\",\n\t\t\t\ttemplate: event.param,\n\t\t\t\tdownloadType: \"text/plain\",\n\t\t\t\tvariables: event.paramObject\n\t\t\t});\n\t\t});\n\t}\n}\n\nSaverHandler.prototype.titleSyncFilter = \"$:/config/SaverFilter\";\nSaverHandler.prototype.titleAutoSave = \"$:/config/AutoSave\";\nSaverHandler.prototype.titleSavedNotification = \"$:/language/Notifications/Save/Done\";\n\n/*\nSelect the appropriate saver modules and set them up\n*/\nSaverHandler.prototype.initSavers = function(moduleType) {\n\tmoduleType = moduleType || \"saver\";\n\t// Instantiate the available savers\n\tthis.savers = [];\n\tvar self = this;\n\t$tw.modules.forEachModuleOfType(moduleType,function(title,module) {\n\t\tif(module.canSave(self)) {\n\t\t\tself.savers.push(module.create(self.wiki));\n\t\t}\n\t});\n\t// Sort the savers into priority order\n\tthis.savers.sort(function(a,b) {\n\t\tif(a.info.priority < b.info.priority) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\tif(a.info.priority > b.info.priority) {\n\t\t\t\treturn +1;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t});\n};\n\n/*\nSave the wiki contents. Options are:\n\tmethod: \"save\", \"autosave\" or \"download\"\n\ttemplate: the tiddler containing the template to save\n\tdownloadType: the content type for the saved file\n*/\nSaverHandler.prototype.saveWiki = function(options) {\n\toptions = options || {};\n\tvar self = this,\n\t\tmethod = options.method || \"save\",\n\t\tvariables = options.variables || {},\n\t\ttemplate = options.template || \"$:/core/save/all\",\n\t\tdownloadType = options.downloadType || \"text/plain\",\n\t\ttext = this.wiki.renderTiddler(downloadType,template,options),\n\t\tcallback = function(err) {\n\t\t\tif(err) {\n\t\t\t\talert(\"Error while saving:\\n\\n\" + err);\n\t\t\t} else {\n\t\t\t\t// Clear the task queue if we're saving (rather than downloading)\n\t\t\t\tif(method !== \"download\") {\n\t\t\t\t\tself.numChanges = 0;\n\t\t\t\t\tself.updateDirtyStatus();\n\t\t\t\t}\n\t\t\t\t$tw.notifier.display(self.titleSavedNotification);\n\t\t\t\tif(options.callback) {\n\t\t\t\t\toptions.callback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t// Ignore autosave if disabled\n\tif(method === \"autosave\" && this.wiki.getTiddlerText(this.titleAutoSave,\"yes\") !== \"yes\") {\n\t\treturn false;\n\t}\n\t// Call the highest priority saver that supports this method\n\tfor(var t=this.savers.length-1; t>=0; t--) {\n\t\tvar saver = this.savers[t];\n\t\tif(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback,{variables: {filename: variables.filename}})) {\n\t\t\tthis.logger.log(\"Saving wiki with method\",method,\"through saver\",saver.info.name);\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n\n/*\nChecks whether the wiki is dirty (ie the window shouldn't be closed)\n*/\nSaverHandler.prototype.isDirty = function() {\n\treturn this.numChanges > 0;\n};\n\n/*\nUpdate the document body with the class \"tc-dirty\" if the wiki has unsaved/unsynced changes\n*/\nSaverHandler.prototype.updateDirtyStatus = function() {\n\tif($tw.browser) {\n\t\t$tw.utils.toggleClass(document.body,\"tc-dirty\",this.isDirty());\n\t}\n};\n\nexports.SaverHandler = SaverHandler;\n\n})();\n",
"title": "$:/core/modules/saver-handler.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/savers/andtidwiki.js": {
"text": "/*\\\ntitle: $:/core/modules/savers/andtidwiki.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via the AndTidWiki Android app\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false, netscape: false, Components: false */\n\"use strict\";\n\nvar AndTidWiki = function(wiki) {\n};\n\nAndTidWiki.prototype.save = function(text,method,callback) {\n\t// Get the pathname of this document\n\tvar pathname = decodeURIComponent(document.location.toString().split(\"#\")[0]);\n\t// Strip the file://\n\tif(pathname.indexOf(\"file://\") === 0) {\n\t\tpathname = pathname.substr(7);\n\t}\n\t// Strip any query or location part\n\tvar p = pathname.indexOf(\"?\");\n\tif(p !== -1) {\n\t\tpathname = pathname.substr(0,p);\n\t}\n\tp = pathname.indexOf(\"#\");\n\tif(p !== -1) {\n\t\tpathname = pathname.substr(0,p);\n\t}\n\t// Save the file\n\twindow.twi.saveFile(pathname,text);\n\t// Call the callback\n\tcallback(null);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nAndTidWiki.prototype.info = {\n\tname: \"andtidwiki\",\n\tpriority: 1600,\n\tcapabilities: [\"save\", \"autosave\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn !!window.twi && !!window.twi.saveFile;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new AndTidWiki(wiki);\n};\n\n})();\n",
"title": "$:/core/modules/savers/andtidwiki.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/download.js": {
"text": "/*\\\ntitle: $:/core/modules/savers/download.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via HTML5's download APIs\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar DownloadSaver = function(wiki) {\n};\n\nDownloadSaver.prototype.save = function(text,method,callback,options) {\n\toptions = options || {};\n\t// Get the current filename\n\tvar filename = options.variables.filename;\n\tif(!filename) {\n\t\tvar p = document.location.pathname.lastIndexOf(\"/\");\n\t\tif(p !== -1) {\n\t\t\tfilename = document.location.pathname.substr(p+1);\n\t\t}\n\t}\n\tif(!filename) {\n\t\tfilename = \"tiddlywiki.html\";\n\t}\n\t// Set up the link\n\tvar link = document.createElement(\"a\");\n\tlink.setAttribute(\"target\",\"_blank\");\n\tif(Blob !== undefined) {\n\t\tvar blob = new Blob([text], {type: \"text/html\"});\n\t\tlink.setAttribute(\"href\", URL.createObjectURL(blob));\n\t} else {\n\t\tlink.setAttribute(\"href\",\"data:text/html,\" + encodeURIComponent(text));\n\t}\n\tlink.setAttribute(\"download\",filename);\n\tdocument.body.appendChild(link);\n\tlink.click();\n\tdocument.body.removeChild(link);\n\t// Callback that we succeeded\n\tcallback(null);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nDownloadSaver.prototype.info = {\n\tname: \"download\",\n\tpriority: 100,\n\tcapabilities: [\"save\", \"download\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn document.createElement(\"a\").download !== undefined;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new DownloadSaver(wiki);\n};\n\n})();\n",
"title": "$:/core/modules/savers/download.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/fsosaver.js": {
"text": "/*\\\ntitle: $:/core/modules/savers/fsosaver.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via MS FileSystemObject ActiveXObject\n\nNote: Since TiddlyWiki's markup contains the MOTW, the FileSystemObject normally won't be available. \nHowever, if the wiki is loaded as an .HTA file (Windows HTML Applications) then the FSO can be used.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar FSOSaver = function(wiki) {\n};\n\nFSOSaver.prototype.save = function(text,method,callback) {\n\t// Get the pathname of this document\n\tvar pathname = unescape(document.location.pathname);\n\t// Test for a Windows path of the form /x:\\blah...\n\tif(/^\\/[A-Z]\\:\\\\[^\\\\]+/i.test(pathname)) {\t// ie: ^/[a-z]:/[^/]+\n\t\t// Remove the leading slash\n\t\tpathname = pathname.substr(1);\n\t} else if(document.location.hostname !== \"\" && /^\\/\\\\[^\\\\]+\\\\[^\\\\]+/i.test(pathname)) {\t// test for \\\\server\\share\\blah... - ^/[^/]+/[^/]+\n\t\t// Remove the leading slash\n\t\tpathname = pathname.substr(1);\n\t\t// reconstruct UNC path\n\t\tpathname = \"\\\\\\\\\" + document.location.hostname + pathname;\n\t} else {\n\t\treturn false;\n\t}\n\t// Save the file (as UTF-16)\n\tvar fso = new ActiveXObject(\"Scripting.FileSystemObject\");\n\tvar file = fso.OpenTextFile(pathname,2,-1,-1);\n\tfile.Write(text);\n\tfile.Close();\n\t// Callback that we succeeded\n\tcallback(null);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nFSOSaver.prototype.info = {\n\tname: \"FSOSaver\",\n\tpriority: 120,\n\tcapabilities: [\"save\", \"autosave\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\ttry {\n\t\treturn (window.location.protocol === \"file:\") && !!(new ActiveXObject(\"Scripting.FileSystemObject\"));\n\t} catch(e) { return false; }\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new FSOSaver(wiki);\n};\n\n})();\n",
"title": "$:/core/modules/savers/fsosaver.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/manualdownload.js": {
"text": "/*\\\ntitle: $:/core/modules/savers/manualdownload.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via HTML5's download APIs\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Title of the tiddler containing the download message\nvar downloadInstructionsTitle = \"$:/language/Modals/Download\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar ManualDownloadSaver = function(wiki) {\n};\n\nManualDownloadSaver.prototype.save = function(text,method,callback) {\n\t$tw.modal.display(downloadInstructionsTitle,{\n\t\tdownloadLink: \"data:text/html,\" + encodeURIComponent(text)\n\t});\n\t// Callback that we succeeded\n\tcallback(null);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nManualDownloadSaver.prototype.info = {\n\tname: \"manualdownload\",\n\tpriority: 0,\n\tcapabilities: [\"save\", \"download\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn true;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new ManualDownloadSaver(wiki);\n};\n\n})();\n",
"title": "$:/core/modules/savers/manualdownload.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/msdownload.js": {
"text": "/*\\\ntitle: $:/core/modules/savers/msdownload.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via window.navigator.msSaveBlob()\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar MsDownloadSaver = function(wiki) {\n};\n\nMsDownloadSaver.prototype.save = function(text,method,callback) {\n\t// Get the current filename\n\tvar filename = \"tiddlywiki.html\",\n\t\tp = document.location.pathname.lastIndexOf(\"/\");\n\tif(p !== -1) {\n\t\tfilename = document.location.pathname.substr(p+1);\n\t}\n\t// Set up the link\n\tvar blob = new Blob([text], {type: \"text/html\"});\n\twindow.navigator.msSaveBlob(blob,filename);\n\t// Callback that we succeeded\n\tcallback(null);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nMsDownloadSaver.prototype.info = {\n\tname: \"msdownload\",\n\tpriority: 110,\n\tcapabilities: [\"save\", \"download\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn !!window.navigator.msSaveBlob;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new MsDownloadSaver(wiki);\n};\n\n})();\n",
"title": "$:/core/modules/savers/msdownload.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/tiddlyfox.js": {
"text": "/*\\\ntitle: $:/core/modules/savers/tiddlyfox.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via the TiddlyFox file extension\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false, netscape: false, Components: false */\n\"use strict\";\n\nvar TiddlyFoxSaver = function(wiki) {\n};\n\nTiddlyFoxSaver.prototype.save = function(text,method,callback) {\n\tvar messageBox = document.getElementById(\"tiddlyfox-message-box\");\n\tif(messageBox) {\n\t\t// Get the pathname of this document\n\t\tvar pathname = document.location.toString().split(\"#\")[0];\n\t\t// Replace file://localhost/ with file:///\n\t\tif(pathname.indexOf(\"file://localhost/\") === 0) {\n\t\t\tpathname = \"file://\" + pathname.substr(16);\n\t\t}\n\t\t// Windows path file:///x:/blah/blah --> x:\\blah\\blah\n\t\tif(/^file\\:\\/\\/\\/[A-Z]\\:\\//i.test(pathname)) {\n\t\t\t// Remove the leading slash and convert slashes to backslashes\n\t\t\tpathname = pathname.substr(8).replace(/\\//g,\"\\\\\");\n\t\t// Firefox Windows network path file://///server/share/blah/blah --> //server/share/blah/blah\n\t\t} else if(pathname.indexOf(\"file://///\") === 0) {\n\t\t\tpathname = \"\\\\\\\\\" + unescape(pathname.substr(10)).replace(/\\//g,\"\\\\\");\n\t\t// Mac/Unix local path file:///path/path --> /path/path\n\t\t} else if(pathname.indexOf(\"file:///\") === 0) {\n\t\t\tpathname = unescape(pathname.substr(7));\n\t\t// Mac/Unix local path file:/path/path --> /path/path\n\t\t} else if(pathname.indexOf(\"file:/\") === 0) {\n\t\t\tpathname = unescape(pathname.substr(5));\n\t\t// Otherwise Windows networth path file://server/share/path/path --> \\\\server\\share\\path\\path\n\t\t} else {\n\t\t\tpathname = \"\\\\\\\\\" + unescape(pathname.substr(7)).replace(new RegExp(\"/\",\"g\"),\"\\\\\");\n\t\t}\n\t\t// Create the message element and put it in the message box\n\t\tvar message = document.createElement(\"div\");\n\t\tmessage.setAttribute(\"data-tiddlyfox-path\",decodeURIComponent(pathname));\n\t\tmessage.setAttribute(\"data-tiddlyfox-content\",text);\n\t\tmessageBox.appendChild(message);\n\t\t// Add an event handler for when the file has been saved\n\t\tmessage.addEventListener(\"tiddlyfox-have-saved-file\",function(event) {\n\t\t\tcallback(null);\n\t\t}, false);\n\t\t// Create and dispatch the custom event to the extension\n\t\tvar event = document.createEvent(\"Events\");\n\t\tevent.initEvent(\"tiddlyfox-save-file\",true,false);\n\t\tmessage.dispatchEvent(event);\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n};\n\n/*\nInformation about this saver\n*/\nTiddlyFoxSaver.prototype.info = {\n\tname: \"tiddlyfox\",\n\tpriority: 1500,\n\tcapabilities: [\"save\", \"autosave\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn (window.location.protocol === \"file:\");\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new TiddlyFoxSaver(wiki);\n};\n\n})();\n",
"title": "$:/core/modules/savers/tiddlyfox.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/tiddlyie.js": {
"text": "/*\\\ntitle: $:/core/modules/savers/tiddlyie.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via Internet Explorer BHO extenion (TiddlyIE)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar TiddlyIESaver = function(wiki) {\n};\n\nTiddlyIESaver.prototype.save = function(text,method,callback) {\n\t// Check existence of TiddlyIE BHO extension (note: only works after document is complete)\n\tif(typeof(window.TiddlyIE) != \"undefined\") {\n\t\t// Get the pathname of this document\n\t\tvar pathname = unescape(document.location.pathname);\n\t\t// Test for a Windows path of the form /x:/blah...\n\t\tif(/^\\/[A-Z]\\:\\/[^\\/]+/i.test(pathname)) {\t// ie: ^/[a-z]:/[^/]+ (is this better?: ^/[a-z]:/[^/]+(/[^/]+)*\\.[^/]+ )\n\t\t\t// Remove the leading slash\n\t\t\tpathname = pathname.substr(1);\n\t\t\t// Convert slashes to backslashes\n\t\t\tpathname = pathname.replace(/\\//g,\"\\\\\");\n\t\t} else if(document.hostname !== \"\" && /^\\/[^\\/]+\\/[^\\/]+/i.test(pathname)) {\t// test for \\\\server\\share\\blah... - ^/[^/]+/[^/]+\n\t\t\t// Convert slashes to backslashes\n\t\t\tpathname = pathname.replace(/\\//g,\"\\\\\");\n\t\t\t// reconstruct UNC path\n\t\t\tpathname = \"\\\\\\\\\" + document.location.hostname + pathname;\n\t\t} else return false;\n\t\t// Prompt the user to save the file\n\t\twindow.TiddlyIE.save(pathname, text);\n\t\t// Callback that we succeeded\n\t\tcallback(null);\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n};\n\n/*\nInformation about this saver\n*/\nTiddlyIESaver.prototype.info = {\n\tname: \"tiddlyiesaver\",\n\tpriority: 1500,\n\tcapabilities: [\"save\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn (window.location.protocol === \"file:\");\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new TiddlyIESaver(wiki);\n};\n\n})();\n",
"title": "$:/core/modules/savers/tiddlyie.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/twedit.js": {
"text": "/*\\\ntitle: $:/core/modules/savers/twedit.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via the TWEdit iOS app\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false, netscape: false, Components: false */\n\"use strict\";\n\nvar TWEditSaver = function(wiki) {\n};\n\nTWEditSaver.prototype.save = function(text,method,callback) {\n\t// Bail if we're not running under TWEdit\n\tif(typeof DeviceInfo !== \"object\") {\n\t\treturn false;\n\t}\n\t// Get the pathname of this document\n\tvar pathname = decodeURIComponent(document.location.pathname);\n\t// Strip any query or location part\n\tvar p = pathname.indexOf(\"?\");\n\tif(p !== -1) {\n\t\tpathname = pathname.substr(0,p);\n\t}\n\tp = pathname.indexOf(\"#\");\n\tif(p !== -1) {\n\t\tpathname = pathname.substr(0,p);\n\t}\n\t// Remove the leading \"/Documents\" from path\n\tvar prefix = \"/Documents\";\n\tif(pathname.indexOf(prefix) === 0) {\n\t\tpathname = pathname.substr(prefix.length);\n\t}\n\t// Error handler\n\tvar errorHandler = function(event) {\n\t\t// Error\n\t\tcallback(\"Error saving to TWEdit: \" + event.target.error.code);\n\t};\n\t// Get the file system\n\twindow.requestFileSystem(LocalFileSystem.PERSISTENT,0,function(fileSystem) {\n\t\t// Now we've got the filesystem, get the fileEntry\n\t\tfileSystem.root.getFile(pathname, {create: true}, function(fileEntry) {\n\t\t\t// Now we've got the fileEntry, create the writer\n\t\t\tfileEntry.createWriter(function(writer) {\n\t\t\t\twriter.onerror = errorHandler;\n\t\t\t\twriter.onwrite = function() {\n\t\t\t\t\tcallback(null);\n\t\t\t\t};\n\t\t\t\twriter.position = 0;\n\t\t\t\twriter.write(text);\n\t\t\t},errorHandler);\n\t\t}, errorHandler);\n\t}, errorHandler);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nTWEditSaver.prototype.info = {\n\tname: \"twedit\",\n\tpriority: 1600,\n\tcapabilities: [\"save\", \"autosave\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn true;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new TWEditSaver(wiki);\n};\n\n/////////////////////////// Hack\n// HACK: This ensures that TWEdit recognises us as a TiddlyWiki document\nif($tw.browser) {\n\twindow.version = {title: \"TiddlyWiki\"};\n}\n\n})();\n",
"title": "$:/core/modules/savers/twedit.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/upload.js": {
"text": "/*\\\ntitle: $:/core/modules/savers/upload.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via upload to a server.\n\nDesigned to be compatible with BidiX's UploadPlugin at http://tiddlywiki.bidix.info/#UploadPlugin\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar UploadSaver = function(wiki) {\n\tthis.wiki = wiki;\n};\n\nUploadSaver.prototype.save = function(text,method,callback) {\n\t// Get the various parameters we need\n\tvar backupDir = this.wiki.getTextReference(\"$:/UploadBackupDir\") || \".\",\n\t\tusername = this.wiki.getTextReference(\"$:/UploadName\"),\n\t\tpassword = $tw.utils.getPassword(\"upload\"),\n\t\tuploadDir = this.wiki.getTextReference(\"$:/UploadDir\") || \".\",\n\t\tuploadFilename = this.wiki.getTextReference(\"$:/UploadFilename\") || \"index.html\",\n\t\turl = this.wiki.getTextReference(\"$:/UploadURL\");\n\t// Bail out if we don't have the bits we need\n\tif(!username || username.toString().trim() === \"\" || !password || password.toString().trim() === \"\") {\n\t\treturn false;\n\t}\n\t// Construct the url if not provided\n\tif(!url) {\n\t\turl = \"http://\" + username + \".tiddlyspot.com/store.cgi\";\n\t}\n\t// Assemble the header\n\tvar boundary = \"---------------------------\" + \"AaB03x\";\t\n\tvar uploadFormName = \"UploadPlugin\";\n\tvar head = [];\n\thead.push(\"--\" + boundary + \"\\r\\nContent-disposition: form-data; name=\\\"UploadPlugin\\\"\\r\\n\");\n\thead.push(\"backupDir=\" + backupDir + \";user=\" + username + \";password=\" + password + \";uploaddir=\" + uploadDir + \";;\"); \n\thead.push(\"\\r\\n\" + \"--\" + boundary);\n\thead.push(\"Content-disposition: form-data; name=\\\"userfile\\\"; filename=\\\"\" + uploadFilename + \"\\\"\");\n\thead.push(\"Content-Type: text/html;charset=UTF-8\");\n\thead.push(\"Content-Length: \" + text.length + \"\\r\\n\");\n\thead.push(\"\");\n\t// Assemble the tail and the data itself\n\tvar tail = \"\\r\\n--\" + boundary + \"--\\r\\n\",\n\t\tdata = head.join(\"\\r\\n\") + text + tail;\n\t// Do the HTTP post\n\tvar http = new XMLHttpRequest();\n\thttp.open(\"POST\",url,true,username,password);\n\thttp.setRequestHeader(\"Content-Type\",\"multipart/form-data; ;charset=UTF-8; boundary=\" + boundary);\n\thttp.onreadystatechange = function() {\n\t\tif(http.readyState == 4 && http.status == 200) {\n\t\t\tif(http.responseText.substr(0,4) === \"0 - \") {\n\t\t\t\tcallback(null);\n\t\t\t} else {\n\t\t\t\tcallback(http.responseText);\n\t\t\t}\n\t\t}\n\t};\n\ttry {\n\t\thttp.send(data);\n\t} catch(ex) {\n\t\treturn callback(\"Error:\" + ex);\n\t}\n\t$tw.notifier.display(\"$:/language/Notifications/Save/Starting\");\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nUploadSaver.prototype.info = {\n\tname: \"upload\",\n\tpriority: 2000,\n\tcapabilities: [\"save\", \"autosave\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn true;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new UploadSaver(wiki);\n};\n\n})();\n",
"title": "$:/core/modules/savers/upload.js",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/browser-messaging.js": {
"text": "/*\\\ntitle: $:/core/modules/browser-messaging.js\ntype: application/javascript\nmodule-type: startup\n\nBrowser message handling\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"browser-messaging\";\nexports.platforms = [\"browser\"];\nexports.after = [\"startup\"];\nexports.synchronous = true;\n\n/*\nLoad a specified url as an iframe and call the callback when it is loaded. If the url is already loaded then the existing iframe instance is used\n*/\nfunction loadIFrame(url,callback) {\n\t// Check if iframe already exists\n\tvar iframeInfo = $tw.browserMessaging.iframeInfoMap[url];\n\tif(iframeInfo) {\n\t\t// We've already got the iframe\n\t\tcallback(null,iframeInfo);\n\t} else {\n\t\t// Create the iframe and save it in the list\n\t\tvar iframe = document.createElement(\"iframe\"),\n\t\t\tiframeInfo = {\n\t\t\t\turl: url,\n\t\t\t\tstatus: \"loading\",\n\t\t\t\tdomNode: iframe\n\t\t\t};\n\t\t$tw.browserMessaging.iframeInfoMap[url] = iframeInfo;\n\t\tsaveIFrameInfoTiddler(iframeInfo);\n\t\t// Add the iframe to the DOM and hide it\n\t\tiframe.style.display = \"none\";\n\t\tdocument.body.appendChild(iframe);\n\t\t// Set up onload\n\t\tiframe.onload = function() {\n\t\t\tiframeInfo.status = \"loaded\";\n\t\t\tsaveIFrameInfoTiddler(iframeInfo);\n\t\t\tcallback(null,iframeInfo);\n\t\t};\n\t\tiframe.onerror = function() {\n\t\t\tcallback(\"Cannot load iframe\");\n\t\t};\n\t\ttry {\n\t\t\tiframe.src = url;\n\t\t} catch(ex) {\n\t\t\tcallback(ex);\n\t\t}\n\t}\n}\n\nfunction saveIFrameInfoTiddler(iframeInfo) {\n\t$tw.wiki.addTiddler(new $tw.Tiddler($tw.wiki.getCreationFields(),{\n\t\ttitle: \"$:/temp/ServerConnection/\" + iframeInfo.url,\n\t\ttext: iframeInfo.status,\n\t\ttags: [\"$:/tags/ServerConnection\"],\n\t\turl: iframeInfo.url\n\t},$tw.wiki.getModificationFields()));\n}\n\nexports.startup = function() {\n\t// Initialise the store of iframes we've created\n\t$tw.browserMessaging = {\n\t\tiframeInfoMap: {} // Hashmap by URL of {url:,status:\"loading/loaded\",domNode:}\n\t};\n\t// Listen for widget messages to control loading the plugin library\n\t$tw.rootWidget.addEventListener(\"tm-load-plugin-library\",function(event) {\n\t\tvar paramObject = event.paramObject || {},\n\t\t\turl = paramObject.url;\n\t\tif(url) {\n\t\t\tloadIFrame(url,function(err,iframeInfo) {\n\t\t\t\tif(err) {\n\t\t\t\t\talert(\"Error loading plugin library: \" + url);\n\t\t\t\t} else {\n\t\t\t\t\tiframeInfo.domNode.contentWindow.postMessage({\n\t\t\t\t\t\tverb: \"GET\",\n\t\t\t\t\t\turl: \"recipes/library/tiddlers.json\",\n\t\t\t\t\t\tcookies: {\n\t\t\t\t\t\t\ttype: \"save-info\",\n\t\t\t\t\t\t\tinfoTitlePrefix: paramObject.infoTitlePrefix || \"$:/temp/RemoteAssetInfo/\",\n\t\t\t\t\t\t\turl: url\n\t\t\t\t\t\t}\n\t\t\t\t\t},\"*\");\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\t$tw.rootWidget.addEventListener(\"tm-load-plugin-from-library\",function(event) {\n\t\tvar paramObject = event.paramObject || {},\n\t\t\turl = paramObject.url,\n\t\t\ttitle = paramObject.title;\n\t\tif(url && title) {\n\t\t\tloadIFrame(url,function(err,iframeInfo) {\n\t\t\t\tif(err) {\n\t\t\t\t\talert(\"Error loading plugin library: \" + url);\n\t\t\t\t} else {\n\t\t\t\t\tiframeInfo.domNode.contentWindow.postMessage({\n\t\t\t\t\t\tverb: \"GET\",\n\t\t\t\t\t\turl: \"recipes/library/tiddlers/\" + encodeURIComponent(title) + \".json\",\n\t\t\t\t\t\tcookies: {\n\t\t\t\t\t\t\ttype: \"save-tiddler\",\n\t\t\t\t\t\t\turl: url\n\t\t\t\t\t\t}\n\t\t\t\t\t},\"*\");\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\t// Listen for window messages from other windows\n\twindow.addEventListener(\"message\",function listener(event){\n\t\tconsole.log(\"browser-messaging: \",document.location.toString())\n\t\tconsole.log(\"browser-messaging: Received message from\",event.origin);\n\t\tconsole.log(\"browser-messaging: Message content\",event.data);\n\t\tswitch(event.data.verb) {\n\t\t\tcase \"GET-RESPONSE\":\n\t\t\t\tif(event.data.status.charAt(0) === \"2\") {\n\t\t\t\t\tif(event.data.cookies) {\n\t\t\t\t\t\tif(event.data.cookies.type === \"save-info\") {\n\t\t\t\t\t\t\tvar tiddlers = JSON.parse(event.data.body);\n\t\t\t\t\t\t\t$tw.utils.each(tiddlers,function(tiddler) {\n\t\t\t\t\t\t\t\t$tw.wiki.addTiddler(new $tw.Tiddler($tw.wiki.getCreationFields(),tiddler,{\n\t\t\t\t\t\t\t\t\ttitle: event.data.cookies.infoTitlePrefix + event.data.cookies.url + \"/\" + tiddler.title,\n\t\t\t\t\t\t\t\t\t\"original-title\": tiddler.title,\n\t\t\t\t\t\t\t\t\ttext: \"\",\n\t\t\t\t\t\t\t\t\ttype: \"text/vnd.tiddlywiki\",\n\t\t\t\t\t\t\t\t\t\"original-type\": tiddler.type,\n\t\t\t\t\t\t\t\t\t\"plugin-type\": undefined,\n\t\t\t\t\t\t\t\t\t\"original-plugin-type\": tiddler[\"plugin-type\"],\n\t\t\t\t\t\t\t\t\t\"module-type\": undefined,\n\t\t\t\t\t\t\t\t\t\"original-module-type\": tiddler[\"module-type\"],\n\t\t\t\t\t\t\t\t\ttags: [\"$:/tags/RemoteAssetInfo\"],\n\t\t\t\t\t\t\t\t\t\"original-tags\": $tw.utils.stringifyList(tiddler.tags || []),\n\t\t\t\t\t\t\t\t\t\"server-url\": event.data.cookies.url\n\t\t\t\t\t\t\t\t},$tw.wiki.getModificationFields()));\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else if(event.data.cookies.type === \"save-tiddler\") {\n\t\t\t\t\t\t\tvar tiddler = JSON.parse(event.data.body);\n\t\t\t\t\t\t\t$tw.wiki.addTiddler(new $tw.Tiddler(tiddler));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t},false);\n};\n\n})();\n",
"title": "$:/core/modules/browser-messaging.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/commands.js": {
"text": "/*\\\ntitle: $:/core/modules/startup/commands.js\ntype: application/javascript\nmodule-type: startup\n\nCommand processing\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"commands\";\nexports.platforms = [\"node\"];\nexports.after = [\"story\"];\nexports.synchronous = false;\n\nexports.startup = function(callback) {\n\t// On the server, start a commander with the command line arguments\n\tvar commander = new $tw.Commander(\n\t\t$tw.boot.argv,\n\t\tfunction(err) {\n\t\t\tif(err) {\n\t\t\t\treturn $tw.utils.error(\"Error: \" + err);\n\t\t\t}\n\t\t\tcallback();\n\t\t},\n\t\t$tw.wiki,\n\t\t{output: process.stdout, error: process.stderr}\n\t);\n\tcommander.execute();\n};\n\n})();\n",
"title": "$:/core/modules/startup/commands.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/favicon.js": {
"text": "/*\\\ntitle: $:/core/modules/startup/favicon.js\ntype: application/javascript\nmodule-type: startup\n\nFavicon handling\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"favicon\";\nexports.platforms = [\"browser\"];\nexports.after = [\"startup\"];\nexports.synchronous = true;\n\t\t\n// Favicon tiddler\nvar FAVICON_TITLE = \"$:/favicon.ico\";\n\nexports.startup = function() {\n\t// Set up the favicon\n\tsetFavicon();\n\t// Reset the favicon when the tiddler changes\n\t$tw.wiki.addEventListener(\"change\",function(changes) {\n\t\tif($tw.utils.hop(changes,FAVICON_TITLE)) {\n\t\t\tsetFavicon();\n\t\t}\n\t});\n};\n\nfunction setFavicon() {\n\tvar tiddler = $tw.wiki.getTiddler(FAVICON_TITLE);\n\tif(tiddler) {\n\t\tvar faviconLink = document.getElementById(\"faviconLink\");\n\t\tfaviconLink.setAttribute(\"href\",\"data:\" + tiddler.fields.type + \";base64,\" + tiddler.fields.text);\n\t}\n}\n\n})();\n",
"title": "$:/core/modules/startup/favicon.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/info.js": {
"text": "/*\\\ntitle: $:/core/modules/startup/info.js\ntype: application/javascript\nmodule-type: startup\n\nInitialise $:/info tiddlers via $:/temp/info-plugin pseudo-plugin\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"info\";\nexports.before = [\"startup\"];\nexports.after = [\"load-modules\"];\nexports.synchronous = true;\n\nexports.startup = function() {\n\t// Collect up the info tiddlers\n\tvar infoTiddlerFields = {};\n\t// Give each info module a chance to fill in as many info tiddlers as they want\n\t$tw.modules.forEachModuleOfType(\"info\",function(title,moduleExports) {\n\t\tif(moduleExports && moduleExports.getInfoTiddlerFields) {\n\t\t\tvar tiddlerFieldsArray = moduleExports.getInfoTiddlerFields(infoTiddlerFields);\n\t\t\t$tw.utils.each(tiddlerFieldsArray,function(fields) {\n\t\t\t\tif(fields) {\n\t\t\t\t\tinfoTiddlerFields[fields.title] = fields;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\t// Bake the info tiddlers into a plugin\n\tvar fields = {\n\t\ttitle: \"$:/temp/info-plugin\",\n\t\ttype: \"application/json\",\n\t\t\"plugin-type\": \"info\",\n\t\ttext: JSON.stringify({tiddlers: infoTiddlerFields},null,$tw.config.preferences.jsonSpaces)\n\t};\n\t$tw.wiki.addTiddler(new $tw.Tiddler(fields));\n\t$tw.wiki.readPluginInfo();\n\t$tw.wiki.registerPluginTiddlers(\"info\");\n\t$tw.wiki.unpackPluginTiddlers();\n};\n\n})();\n",
"title": "$:/core/modules/startup/info.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/load-modules.js": {
"text": "/*\\\ntitle: $:/core/modules/startup/load-modules.js\ntype: application/javascript\nmodule-type: startup\n\nLoad core modules\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"load-modules\";\nexports.synchronous = true;\n\nexports.startup = function() {\n\t// Load modules\n\t$tw.modules.applyMethods(\"utils\",$tw.utils);\n\tif($tw.node) {\n\t\t$tw.modules.applyMethods(\"utils-node\",$tw.utils);\n\t}\n\t$tw.modules.applyMethods(\"global\",$tw);\n\t$tw.modules.applyMethods(\"config\",$tw.config);\n\t$tw.Tiddler.fieldModules = $tw.modules.getModulesByTypeAsHashmap(\"tiddlerfield\");\n\t$tw.modules.applyMethods(\"tiddlermethod\",$tw.Tiddler.prototype);\n\t$tw.modules.applyMethods(\"wikimethod\",$tw.Wiki.prototype);\n\t$tw.modules.applyMethods(\"tiddlerdeserializer\",$tw.Wiki.tiddlerDeserializerModules);\n\t$tw.macros = $tw.modules.getModulesByTypeAsHashmap(\"macro\");\n\t$tw.wiki.initParsers();\n\t$tw.Commander.initCommands();\n};\n\n})();\n",
"title": "$:/core/modules/startup/load-modules.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/password.js": {
"text": "/*\\\ntitle: $:/core/modules/startup/password.js\ntype: application/javascript\nmodule-type: startup\n\nPassword handling\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"password\";\nexports.platforms = [\"browser\"];\nexports.after = [\"startup\"];\nexports.synchronous = true;\n\nexports.startup = function() {\n\t$tw.rootWidget.addEventListener(\"tm-set-password\",function(event) {\n\t\t$tw.passwordPrompt.createPrompt({\n\t\t\tserviceName: $tw.language.getString(\"Encryption/PromptSetPassword\"),\n\t\t\tnoUserName: true,\n\t\t\tsubmitText: $tw.language.getString(\"Encryption/SetPassword\"),\n\t\t\tcanCancel: true,\n\t\t\trepeatPassword: true,\n\t\t\tcallback: function(data) {\n\t\t\t\tif(data) {\n\t\t\t\t\t$tw.crypto.setPassword(data.password);\n\t\t\t\t}\n\t\t\t\treturn true; // Get rid of the password prompt\n\t\t\t}\n\t\t});\n\t});\n\t$tw.rootWidget.addEventListener(\"tm-clear-password\",function(event) {\n\t\tif($tw.browser) {\n\t\t\tif(!confirm($tw.language.getString(\"Encryption/ConfirmClearPassword\"))) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t$tw.crypto.setPassword(null);\n\t});\n\t// Ensure that $:/isEncrypted is maintained properly\n\t$tw.wiki.addEventListener(\"change\",function(changes) {\n\t\tif($tw.utils.hop(changes,\"$:/isEncrypted\")) {\n\t\t\t$tw.crypto.updateCryptoStateTiddler();\n\t\t}\n\t});\n};\n\n})();\n",
"title": "$:/core/modules/startup/password.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/render.js": {
"text": "/*\\\ntitle: $:/core/modules/startup/render.js\ntype: application/javascript\nmodule-type: startup\n\nTitle, stylesheet and page rendering\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"render\";\nexports.platforms = [\"browser\"];\nexports.after = [\"story\"];\nexports.synchronous = true;\n\n// Default story and history lists\nvar PAGE_TITLE_TITLE = \"$:/core/wiki/title\";\nvar PAGE_STYLESHEET_TITLE = \"$:/core/ui/PageStylesheet\";\nvar PAGE_TEMPLATE_TITLE = \"$:/core/ui/PageTemplate\";\n\n// Time (in ms) that we defer refreshing changes to draft tiddlers\nvar DRAFT_TIDDLER_TIMEOUT_TITLE = \"$:/config/Drafts/TypingTimeout\";\nvar DRAFT_TIDDLER_TIMEOUT = 400;\n\nexports.startup = function() {\n\t// Set up the title\n\t$tw.titleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TITLE_TITLE,{document: $tw.fakeDocument, parseAsInline: true});\n\t$tw.titleContainer = $tw.fakeDocument.createElement(\"div\");\n\t$tw.titleWidgetNode.render($tw.titleContainer,null);\n\tdocument.title = $tw.titleContainer.textContent;\n\t$tw.wiki.addEventListener(\"change\",function(changes) {\n\t\tif($tw.titleWidgetNode.refresh(changes,$tw.titleContainer,null)) {\n\t\t\tdocument.title = $tw.titleContainer.textContent;\n\t\t}\n\t});\n\t// Set up the styles\n\t$tw.styleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_STYLESHEET_TITLE,{document: $tw.fakeDocument});\n\t$tw.styleContainer = $tw.fakeDocument.createElement(\"style\");\n\t$tw.styleWidgetNode.render($tw.styleContainer,null);\n\t$tw.styleElement = document.createElement(\"style\");\n\t$tw.styleElement.innerHTML = $tw.styleContainer.textContent;\n\tdocument.head.insertBefore($tw.styleElement,document.head.firstChild);\n\t$tw.wiki.addEventListener(\"change\",$tw.perf.report(\"styleRefresh\",function(changes) {\n\t\tif($tw.styleWidgetNode.refresh(changes,$tw.styleContainer,null)) {\n\t\t\t$tw.styleElement.innerHTML = $tw.styleContainer.textContent;\n\t\t}\n\t}));\n\t// Display the $:/core/ui/PageTemplate tiddler to kick off the display\n\t$tw.perf.report(\"mainRender\",function() {\n\t\t$tw.pageWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TEMPLATE_TITLE,{document: document, parentWidget: $tw.rootWidget});\n\t\t$tw.pageContainer = document.createElement(\"div\");\n\t\t$tw.utils.addClass($tw.pageContainer,\"tc-page-container-wrapper\");\n\t\tdocument.body.insertBefore($tw.pageContainer,document.body.firstChild);\n\t\t$tw.pageWidgetNode.render($tw.pageContainer,null);\n\t})();\n\t// Prepare refresh mechanism\n\tvar deferredChanges = Object.create(null),\n\t\ttimerId;\n\tfunction refresh() {\n\t\t// Process the refresh\n\t\t$tw.pageWidgetNode.refresh(deferredChanges);\n\t\tdeferredChanges = Object.create(null);\n\t}\n\t// Add the change event handler\n\t$tw.wiki.addEventListener(\"change\",$tw.perf.report(\"mainRefresh\",function(changes) {\n\t\t// Check if only drafts have changed\n\t\tvar onlyDraftsHaveChanged = true;\n\t\tfor(var title in changes) {\n\t\t\tvar tiddler = $tw.wiki.getTiddler(title);\n\t\t\tif(!tiddler || !tiddler.hasField(\"draft.of\")) {\n\t\t\t\tonlyDraftsHaveChanged = false;\n\t\t\t}\n\t\t}\n\t\t// Defer the change if only drafts have changed\n\t\tif(timerId) {\n\t\t\tclearTimeout(timerId);\n\t\t}\n\t\ttimerId = null;\n\t\tif(onlyDraftsHaveChanged) {\n\t\t\tvar timeout = parseInt($tw.wiki.getTiddlerText(DRAFT_TIDDLER_TIMEOUT_TITLE,\"\"),10);\n\t\t\tif(isNaN(timeout)) {\n\t\t\t\ttimeout = DRAFT_TIDDLER_TIMEOUT;\n\t\t\t}\n\t\t\ttimerId = setTimeout(refresh,timeout);\n\t\t\t$tw.utils.extend(deferredChanges,changes);\n\t\t} else {\n\t\t\t$tw.utils.extend(deferredChanges,changes);\n\t\t\trefresh();\n\t\t}\n\t}));\n\t// Fix up the link between the root widget and the page container\n\t$tw.rootWidget.domNodes = [$tw.pageContainer];\n\t$tw.rootWidget.children = [$tw.pageWidgetNode];\n};\n\n})();\n",
"title": "$:/core/modules/startup/render.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/rootwidget.js": {
"text": "/*\\\ntitle: $:/core/modules/startup/rootwidget.js\ntype: application/javascript\nmodule-type: startup\n\nSetup the root widget and the core root widget handlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"rootwidget\";\nexports.platforms = [\"browser\"];\nexports.after = [\"startup\"];\nexports.before = [\"story\"];\nexports.synchronous = true;\n\nexports.startup = function() {\n\t// Install the modal message mechanism\n\t$tw.modal = new $tw.utils.Modal($tw.wiki);\n\t$tw.rootWidget.addEventListener(\"tm-modal\",function(event) {\n\t\t$tw.modal.display(event.param,{variables: event.paramObject});\n\t});\n\t// Install the notification mechanism\n\t$tw.notifier = new $tw.utils.Notifier($tw.wiki);\n\t$tw.rootWidget.addEventListener(\"tm-notify\",function(event) {\n\t\t$tw.notifier.display(event.param);\n\t});\n\t// Install the scroller\n\t$tw.pageScroller = new $tw.utils.PageScroller();\n\t$tw.rootWidget.addEventListener(\"tm-scroll\",function(event) {\n\t\t$tw.pageScroller.handleEvent(event);\n\t});\n\tvar fullscreen = $tw.utils.getFullScreenApis();\n\tif(fullscreen) {\n\t\t$tw.rootWidget.addEventListener(\"tm-full-screen\",function(event) {\n\t\t\tif(document[fullscreen._fullscreenElement]) {\n\t\t\t\tdocument[fullscreen._exitFullscreen]();\n\t\t\t} else {\n\t\t\t\tdocument.documentElement[fullscreen._requestFullscreen](Element.ALLOW_KEYBOARD_INPUT);\n\t\t\t}\n\t\t});\n\t}\n\t// If we're being viewed on a data: URI then give instructions for how to save\n\tif(document.location.protocol === \"data:\") {\n\t\t$tw.rootWidget.dispatchEvent({\n\t\t\ttype: \"tm-modal\",\n\t\t\tparam: \"$:/language/Modals/SaveInstructions\"\n\t\t});\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/startup/rootwidget.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup.js": {
"text": "/*\\\ntitle: $:/core/modules/startup.js\ntype: application/javascript\nmodule-type: startup\n\nMiscellaneous startup logic for both the client and server.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"startup\";\nexports.after = [\"load-modules\"];\nexports.synchronous = true;\n\n// Set to `true` to enable performance instrumentation\nvar PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE = \"$:/config/Performance/Instrumentation\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nexports.startup = function() {\n\tvar modules,n,m,f;\n\tif($tw.browser) {\n\t\t$tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent));\n\t}\n\t$tw.version = $tw.utils.extractVersionInfo();\n\t// Set up the performance framework\n\t$tw.perf = new $tw.Performance($tw.wiki.getTiddlerText(PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE,\"no\") === \"yes\");\n\t// Kick off the language manager and switcher\n\t$tw.language = new $tw.Language();\n\t$tw.languageSwitcher = new $tw.PluginSwitcher({\n\t\twiki: $tw.wiki,\n\t\tpluginType: \"language\",\n\t\tcontrollerTitle: \"$:/language\",\n\t\tdefaultPlugins: [\n\t\t\t\"$:/languages/en-US\"\n\t\t]\n\t});\n\t// Kick off the theme manager\n\t$tw.themeManager = new $tw.PluginSwitcher({\n\t\twiki: $tw.wiki,\n\t\tpluginType: \"theme\",\n\t\tcontrollerTitle: \"$:/theme\",\n\t\tdefaultPlugins: [\n\t\t\t\"$:/themes/tiddlywiki/snowwhite\",\n\t\t\t\"$:/themes/tiddlywiki/vanilla\"\n\t\t]\n\t});\n\t// Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup\n\t$tw.wiki.clearTiddlerEventQueue();\n\t// Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers\n\tif($tw.browser) {\n\t\t$tw.rootWidget = new widget.widget({\n\t\t\ttype: \"widget\",\n\t\t\tchildren: []\n\t\t},{\n\t\t\twiki: $tw.wiki,\n\t\t\tdocument: document\n\t\t});\n\t}\n\t// Find a working syncadaptor\n\t$tw.syncadaptor = undefined;\n\t$tw.modules.forEachModuleOfType(\"syncadaptor\",function(title,module) {\n\t\tif(!$tw.syncadaptor && module.adaptorClass) {\n\t\t\t$tw.syncadaptor = new module.adaptorClass({wiki: $tw.wiki});\n\t\t}\n\t});\n\t// Set up the syncer object if we've got a syncadaptor\n\tif($tw.syncadaptor) {\n\t\t$tw.syncer = new $tw.Syncer({wiki: $tw.wiki, syncadaptor: $tw.syncadaptor});\n\t} \n\t// Setup the saver handler\n\t$tw.saverHandler = new $tw.SaverHandler({wiki: $tw.wiki, dirtyTracking: !$tw.syncadaptor});\n\t// Host-specific startup\n\tif($tw.browser) {\n\t\t// Install the popup manager\n\t\t$tw.popup = new $tw.utils.Popup();\n\t\t// Install the animator\n\t\t$tw.anim = new $tw.utils.Animator();\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/startup.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/story.js": {
"text": "/*\\\ntitle: $:/core/modules/startup/story.js\ntype: application/javascript\nmodule-type: startup\n\nLoad core modules\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"story\";\nexports.after = [\"startup\"];\nexports.synchronous = true;\n\n// Default story and history lists\nvar DEFAULT_STORY_TITLE = \"$:/StoryList\";\nvar DEFAULT_HISTORY_TITLE = \"$:/HistoryList\";\n\n// Default tiddlers\nvar DEFAULT_TIDDLERS_TITLE = \"$:/DefaultTiddlers\";\n\n// Config\nvar CONFIG_UPDATE_ADDRESS_BAR = \"$:/config/Navigation/UpdateAddressBar\"; // Can be \"no\", \"permalink\", \"permaview\"\nvar CONFIG_UPDATE_HISTORY = \"$:/config/Navigation/UpdateHistory\"; // Can be \"yes\" or \"no\"\n\nexports.startup = function() {\n\t// Open startup tiddlers\n\topenStartupTiddlers();\n\tif($tw.browser) {\n\t\t// Set up location hash update\n\t\t$tw.wiki.addEventListener(\"change\",function(changes) {\n\t\t\tif($tw.utils.hop(changes,DEFAULT_STORY_TITLE) || $tw.utils.hop(changes,DEFAULT_HISTORY_TITLE)) {\n\t\t\t\tupdateLocationHash({\n\t\t\t\t\tupdateAddressBar: $tw.wiki.getTiddlerText(CONFIG_UPDATE_ADDRESS_BAR,\"permaview\").trim(),\n\t\t\t\t\tupdateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,\"no\").trim()\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t// Listen for changes to the browser location hash\n\t\twindow.addEventListener(\"hashchange\",function() {\n\t\t\tvar hash = $tw.utils.getLocationHash();\n\t\t\tif(hash !== $tw.locationHash) {\n\t\t\t\t$tw.locationHash = hash;\n\t\t\t\topenStartupTiddlers({defaultToCurrentStory: true});\n\t\t\t}\n\t\t},false);\n\t\t// Listen for the tm-browser-refresh message\n\t\t$tw.rootWidget.addEventListener(\"tm-browser-refresh\",function(event) {\n\t\t\twindow.location.reload(true);\n\t\t});\n\t\t// Listen for the tm-home message\n\t\t$tw.rootWidget.addEventListener(\"tm-home\",function(event) {\n\t\t\twindow.location.hash = \"\";\n\t\t\tvar storyFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE),\n\t\t\t\tstoryList = $tw.wiki.filterTiddlers(storyFilter);\n\t\t\t//invoke any hooks that might change the default story list\n\t\t\tstoryList = $tw.hooks.invokeHook(\"th-opening-default-tiddlers-list\",storyList);\n\t\t\t$tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: \"\", list: storyList},$tw.wiki.getModificationFields());\n\t\t\tif(storyList[0]) {\n\t\t\t\t$tw.wiki.addToHistory(storyList[0]);\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t// Listen for the tm-permalink message\n\t\t$tw.rootWidget.addEventListener(\"tm-permalink\",function(event) {\n\t\t\tupdateLocationHash({\n\t\t\t\tupdateAddressBar: \"permalink\",\n\t\t\t\tupdateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,\"no\").trim(),\n\t\t\t\ttargetTiddler: event.param || event.tiddlerTitle\n\t\t\t});\n\t\t});\n\t\t// Listen for the tm-permaview message\n\t\t$tw.rootWidget.addEventListener(\"tm-permaview\",function(event) {\n\t\t\tupdateLocationHash({\n\t\t\t\tupdateAddressBar: \"permaview\",\n\t\t\t\tupdateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,\"no\").trim(),\n\t\t\t\ttargetTiddler: event.param || event.tiddlerTitle\n\t\t\t});\n\t\t});\n\t}\n};\n\n/*\nProcess the location hash to open the specified tiddlers. Options:\ndefaultToCurrentStory: If true, the current story is retained as the default, instead of opening the default tiddlers\n*/\nfunction openStartupTiddlers(options) {\n\toptions = options || {};\n\t// Work out the target tiddler and the story filter. \"null\" means \"unspecified\"\n\tvar target = null,\n\t\tstoryFilter = null;\n\tif($tw.locationHash.length > 1) {\n\t\tvar hash = $tw.locationHash.substr(1),\n\t\t\tsplit = hash.indexOf(\":\");\n\t\tif(split === -1) {\n\t\t\ttarget = decodeURIComponent(hash.trim());\n\t\t} else {\n\t\t\ttarget = decodeURIComponent(hash.substr(0,split).trim());\n\t\t\tstoryFilter = decodeURIComponent(hash.substr(split + 1).trim());\n\t\t}\n\t}\n\t// If the story wasn't specified use the current tiddlers or a blank story\n\tif(storyFilter === null) {\n\t\tif(options.defaultToCurrentStory) {\n\t\t\tvar currStoryList = $tw.wiki.getTiddlerList(DEFAULT_STORY_TITLE);\n\t\t\tstoryFilter = $tw.utils.stringifyList(currStoryList);\n\t\t} else {\n\t\t\tif(target && target !== \"\") {\n\t\t\t\tstoryFilter = \"\";\n\t\t\t} else {\n\t\t\t\tstoryFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE);\n\t\t\t}\n\t\t}\n\t}\n\t// Process the story filter to get the story list\n\tvar storyList = $tw.wiki.filterTiddlers(storyFilter);\n\t// Invoke any hooks that want to change the default story list\n\tstoryList = $tw.hooks.invokeHook(\"th-opening-default-tiddlers-list\",storyList);\n\t// If the target tiddler isn't included then splice it in at the top\n\tif(target && storyList.indexOf(target) === -1) {\n\t\tstoryList.unshift(target);\n\t}\n\t// Save the story list\n\t$tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: \"\", list: storyList},$tw.wiki.getModificationFields());\n\t// If a target tiddler was specified add it to the history stack\n\tif(target && target !== \"\") {\n\t\t// The target tiddler doesn't need double square brackets, but we'll silently remove them if they're present\n\t\tif(target.indexOf(\"[[\") === 0 && target.substr(-2) === \"]]\") {\n\t\t\ttarget = target.substr(2,target.length - 4);\n\t\t}\n\t\t$tw.wiki.addToHistory(target);\n\t} else if(storyList.length > 0) {\n\t\t$tw.wiki.addToHistory(storyList[0]);\n\t}\n}\n\n/*\noptions: See below\noptions.updateAddressBar: \"permalink\", \"permaview\" or \"no\" (defaults to \"permaview\")\noptions.updateHistory: \"yes\" or \"no\" (defaults to \"no\")\noptions.targetTiddler: optional title of target tiddler for permalink\n*/\nfunction updateLocationHash(options) {\n\tif(options.updateAddressBar !== \"no\") {\n\t\t// Get the story and the history stack\n\t\tvar storyList = $tw.wiki.getTiddlerList(DEFAULT_STORY_TITLE),\n\t\t\thistoryList = $tw.wiki.getTiddlerData(DEFAULT_HISTORY_TITLE,[]),\n\t\t\ttargetTiddler = \"\";\n\t\tif(options.targetTiddler) {\n\t\t\ttargetTiddler = options.targetTiddler;\n\t\t} else {\n\t\t\t// The target tiddler is the one at the top of the stack\n\t\t\tif(historyList.length > 0) {\n\t\t\t\ttargetTiddler = historyList[historyList.length-1].title;\n\t\t\t}\n\t\t\t// Blank the target tiddler if it isn't present in the story\n\t\t\tif(storyList.indexOf(targetTiddler) === -1) {\n\t\t\t\ttargetTiddler = \"\";\n\t\t\t}\n\t\t}\n\t\t// Assemble the location hash\n\t\tif(options.updateAddressBar === \"permalink\") {\n\t\t\t$tw.locationHash = \"#\" + encodeURIComponent(targetTiddler);\n\t\t} else {\n\t\t\t$tw.locationHash = \"#\" + encodeURIComponent(targetTiddler) + \":\" + encodeURIComponent($tw.utils.stringifyList(storyList));\n\t\t}\n\t\t// Only change the location hash if we must, thus avoiding unnecessary onhashchange events\n\t\tif($tw.utils.getLocationHash() !== $tw.locationHash) {\n\t\t\tif(options.updateHistory === \"yes\") {\n\t\t\t\t// Assign the location hash so that history is updated\n\t\t\t\twindow.location.hash = $tw.locationHash;\n\t\t\t} else {\n\t\t\t\t// We use replace so that browser history isn't affected\n\t\t\t\twindow.location.replace(window.location.toString().split(\"#\")[0] + $tw.locationHash);\n\t\t\t}\n\t\t}\n\t}\n}\n\n})();\n",
"title": "$:/core/modules/startup/story.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/windows.js": {
"text": "/*\\\ntitle: $:/core/modules/startup/windows.js\ntype: application/javascript\nmodule-type: startup\n\nSetup root widget handlers for the messages concerned with opening external browser windows\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"windows\";\nexports.platforms = [\"browser\"];\nexports.after = [\"startup\"];\nexports.synchronous = true;\n\n// Global to keep track of open windows (hashmap by title)\nvar windows = {};\n\nexports.startup = function() {\n\t// Handle open window message\n\t$tw.rootWidget.addEventListener(\"tm-open-window\",function(event) {\n\t\t// Get the parameters\n\t\tvar refreshHandler,\n\t\t\ttitle = event.param || event.tiddlerTitle,\n\t\t\tparamObject = event.paramObject || {},\n\t\t\ttemplate = paramObject.template || \"$:/core/templates/single.tiddler.window\",\n\t\t\twidth = paramObject.width || \"700\",\n\t\t\theight = paramObject.height || \"600\",\n\t\t\tvariables = $tw.utils.extend({},paramObject,{currentTiddler: title});\n\t\t// Open the window\n\t\tvar srcWindow = window.open(\"\",\"external-\" + title,\"scrollbars,width=\" + width + \",height=\" + height),\n\t\t\tsrcDocument = srcWindow.document;\n\t\twindows[title] = srcWindow;\n\t\t// Check for reopening the same window\n\t\tif(srcWindow.haveInitialisedWindow) {\n\t\t\treturn;\n\t\t}\n\t\t// Initialise the document\n\t\tsrcDocument.write(\"<html><head></head><body class='tc-body tc-single-tiddler-window'></body></html>\");\n\t\tsrcDocument.close();\n\t\tsrcDocument.title = title;\n\t\tsrcWindow.addEventListener(\"beforeunload\",function(event) {\n\t\t\tdelete windows[title];\n\t\t\t$tw.wiki.removeEventListener(\"change\",refreshHandler);\n\t\t},false);\n\t\t// Set up the styles\n\t\tvar styleWidgetNode = $tw.wiki.makeTranscludeWidget(\"$:/core/ui/PageStylesheet\",{document: $tw.fakeDocument, variables: variables}),\n\t\t\tstyleContainer = $tw.fakeDocument.createElement(\"style\");\n\t\tstyleWidgetNode.render(styleContainer,null);\n\t\tvar styleElement = srcDocument.createElement(\"style\");\n\t\tstyleElement.innerHTML = styleContainer.textContent;\n\t\tsrcDocument.head.insertBefore(styleElement,srcDocument.head.firstChild);\n\t\t// Render the text of the tiddler\n\t\tvar parser = $tw.wiki.parseTiddler(template),\n\t\t\twidgetNode = $tw.wiki.makeWidget(parser,{document: srcDocument, parentWidget: $tw.rootWidget, variables: variables});\n\t\twidgetNode.render(srcDocument.body,srcDocument.body.firstChild);\n\t\t// Function to handle refreshes\n\t\trefreshHandler = function(changes) {\n\t\t\tif(styleWidgetNode.refresh(changes,styleContainer,null)) {\n\t\t\t\tstyleElement.innerHTML = styleContainer.textContent;\n\t\t\t}\n\t\t\twidgetNode.refresh(changes);\n\t\t};\n\t\t$tw.wiki.addEventListener(\"change\",refreshHandler);\n\t\tsrcWindow.haveInitialisedWindow = true;\n\t});\n\t// Close open windows when unloading main window\n\t$tw.addUnloadTask(function() {\n\t\t$tw.utils.each(windows,function(win) {\n\t\t\twin.close();\n\t\t});\n\t});\n\n};\n\n})();\n",
"title": "$:/core/modules/startup/windows.js",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/story.js": {
"text": "/*\\\ntitle: $:/core/modules/story.js\ntype: application/javascript\nmodule-type: global\n\nLightweight object for managing interactions with the story and history lists.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nConstruct Story object with options:\nwiki: reference to wiki object to use to resolve tiddler titles\nstoryTitle: title of story list tiddler\nhistoryTitle: title of history list tiddler\n*/\nfunction Story(options) {\n\toptions = options || {};\n\tthis.wiki = options.wiki || $tw.wiki;\n\tthis.storyTitle = options.storyTitle || \"$:/StoryList\";\n\tthis.historyTitle = options.historyTitle || \"$:/HistoryList\";\n};\n\nStory.prototype.navigateTiddler = function(navigateTo,navigateFromTitle,navigateFromClientRect) {\n\tthis.addToStory(navigateTo,navigateFromTitle);\n\tthis.addToHistory(navigateTo,navigateFromClientRect);\n};\n\nStory.prototype.getStoryList = function() {\n\treturn this.wiki.getTiddlerList(this.storyTitle) || [];\n};\n\nStory.prototype.addToStory = function(navigateTo,navigateFromTitle,options) {\n\toptions = options || {};\n\tvar storyList = this.getStoryList();\n\t// See if the tiddler is already there\n\tvar slot = storyList.indexOf(navigateTo);\n\t// Quit if it already exists in the story river\n\tif(slot >= 0) {\n\t\treturn;\n\t}\n\t// First we try to find the position of the story element we navigated from\n\tvar fromIndex = storyList.indexOf(navigateFromTitle);\n\tif(fromIndex >= 0) {\n\t\t// The tiddler is added from inside the river\n\t\t// Determine where to insert the tiddler; Fallback is \"below\"\n\t\tswitch(options.openLinkFromInsideRiver) {\n\t\t\tcase \"top\":\n\t\t\t\tslot = 0;\n\t\t\t\tbreak;\n\t\t\tcase \"bottom\":\n\t\t\t\tslot = storyList.length;\n\t\t\t\tbreak;\n\t\t\tcase \"above\":\n\t\t\t\tslot = fromIndex;\n\t\t\t\tbreak;\n\t\t\tcase \"below\": // Intentional fall-through\n\t\t\tdefault:\n\t\t\t\tslot = fromIndex + 1;\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\t\t// The tiddler is opened from outside the river. Determine where to insert the tiddler; default is \"top\"\n\t\tif(options.openLinkFromOutsideRiver === \"bottom\") {\n\t\t\t// Insert at bottom\n\t\t\tslot = storyList.length;\n\t\t} else {\n\t\t\t// Insert at top\n\t\t\tslot = 0;\n\t\t}\n\t}\n\t// Add the tiddler\n\tstoryList.splice(slot,0,navigateTo);\n\t// Save the story\n\tthis.saveStoryList(storyList);\n};\n\nStory.prototype.saveStoryList = function(storyList) {\n\tvar storyTiddler = this.wiki.getTiddler(this.storyTitle);\n\tthis.wiki.addTiddler(new $tw.Tiddler(\n\t\tthis.wiki.getCreationFields(),\n\t\t{title: this.storyTitle},\n\t\tstoryTiddler,\n\t\t{list: storyList},\n\t\tthis.wiki.getModificationFields()\n\t));\n};\n\nStory.prototype.addToHistory = function(navigateTo,navigateFromClientRect) {\n\tvar titles = $tw.utils.isArray(navigateTo) ? navigateTo : [navigateTo];\n\t// Add a new record to the top of the history stack\n\tvar historyList = this.wiki.getTiddlerData(this.historyTitle,[]);\n\t$tw.utils.each(titles,function(title) {\n\t\thistoryList.push({title: title, fromPageRect: navigateFromClientRect});\n\t});\n\tthis.wiki.setTiddlerData(this.historyTitle,historyList,{\"current-tiddler\": titles[titles.length-1]});\n};\n\nStory.prototype.storyCloseTiddler = function(targetTitle) {\n// TBD\n};\n\nStory.prototype.storyCloseAllTiddlers = function() {\n// TBD\n};\n\nStory.prototype.storyCloseOtherTiddlers = function(targetTitle) {\n// TBD\n};\n\nStory.prototype.storyEditTiddler = function(targetTitle) {\n// TBD\n};\n\nStory.prototype.storyDeleteTiddler = function(targetTitle) {\n// TBD\n};\n\nStory.prototype.storySaveTiddler = function(targetTitle) {\n// TBD\n};\n\nStory.prototype.storyCancelTiddler = function(targetTitle) {\n// TBD\n};\n\nStory.prototype.storyNewTiddler = function(targetTitle) {\n// TBD\n};\n\nexports.Story = Story;\n\n\n})();\n",
"title": "$:/core/modules/story.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/storyviews/classic.js": {
"text": "/*\\\ntitle: $:/core/modules/storyviews/classic.js\ntype: application/javascript\nmodule-type: storyview\n\nViews the story as a linear sequence\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar easing = \"cubic-bezier(0.645, 0.045, 0.355, 1)\"; // From http://easings.net/#easeInOutCubic\n\nvar ClassicStoryView = function(listWidget) {\n\tthis.listWidget = listWidget;\n};\n\nClassicStoryView.prototype.navigateTo = function(historyInfo) {\n\tvar listElementIndex = this.listWidget.findListItem(0,historyInfo.title);\n\tif(listElementIndex === undefined) {\n\t\treturn;\n\t}\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\n\t\ttargetElement = listItemWidget.findFirstDomNode();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Scroll the node into view\n\tthis.listWidget.dispatchEvent({type: \"tm-scroll\", target: targetElement});\n};\n\nClassicStoryView.prototype.insert = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Get the current height of the tiddler\n\tvar computedStyle = window.getComputedStyle(targetElement),\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\n\t\tcurrHeight = targetElement.offsetHeight + currMarginTop;\n\t// Reset the margin once the transition is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(targetElement,[\n\t\t\t{transition: \"none\"},\n\t\t\t{marginBottom: \"\"}\n\t\t]);\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \"none\"},\n\t\t{marginBottom: (-currHeight) + \"px\"},\n\t\t{opacity: \"0.0\"}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t// Transition to the final position\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \"opacity \" + duration + \"ms \" + easing + \", \" +\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms \" + easing},\n\t\t{marginBottom: currMarginBottom + \"px\"},\n\t\t{opacity: \"1.0\"}\n\t]);\n};\n\nClassicStoryView.prototype.remove = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration(),\n\t\tremoveElement = function() {\n\t\t\twidget.removeChildDomNodes();\n\t\t};\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\tremoveElement();\n\t\treturn;\n\t}\n\t// Get the current height of the tiddler\n\tvar currWidth = targetElement.offsetWidth,\n\t\tcomputedStyle = window.getComputedStyle(targetElement),\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\n\t\tcurrHeight = targetElement.offsetHeight + currMarginTop;\n\t// Remove the dom nodes of the widget at the end of the transition\n\tsetTimeout(removeElement,duration);\n\t// Animate the closure\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \"none\"},\n\t\t{transform: \"translateX(0px)\"},\n\t\t{marginBottom: currMarginBottom + \"px\"},\n\t\t{opacity: \"1.0\"}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", \" +\n\t\t\t\t\t\"opacity \" + duration + \"ms \" + easing + \", \" +\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms \" + easing},\n\t\t{transform: \"translateX(-\" + currWidth + \"px)\"},\n\t\t{marginBottom: (-currHeight) + \"px\"},\n\t\t{opacity: \"0.0\"}\n\t]);\n};\n\nexports.classic = ClassicStoryView;\n\n})();",
"title": "$:/core/modules/storyviews/classic.js",
"type": "application/javascript",
"module-type": "storyview"
},
"$:/core/modules/storyviews/pop.js": {
"text": "/*\\\ntitle: $:/core/modules/storyviews/pop.js\ntype: application/javascript\nmodule-type: storyview\n\nAnimates list insertions and removals\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar PopStoryView = function(listWidget) {\n\tthis.listWidget = listWidget;\n};\n\nPopStoryView.prototype.navigateTo = function(historyInfo) {\n\tvar listElementIndex = this.listWidget.findListItem(0,historyInfo.title);\n\tif(listElementIndex === undefined) {\n\t\treturn;\n\t}\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\n\t\ttargetElement = listItemWidget.findFirstDomNode();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Scroll the node into view\n\tthis.listWidget.dispatchEvent({type: \"tm-scroll\", target: targetElement});\n};\n\nPopStoryView.prototype.insert = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Reset once the transition is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(targetElement,[\n\t\t\t{transition: \"none\"},\n\t\t\t{transform: \"none\"}\n\t\t]);\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \"none\"},\n\t\t{transform: \"scale(2)\"},\n\t\t{opacity: \"0.0\"}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t// Transition to the final position\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"opacity \" + duration + \"ms ease-in-out\"},\n\t\t{transform: \"scale(1)\"},\n\t\t{opacity: \"1.0\"}\n\t]);\n};\n\nPopStoryView.prototype.remove = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration(),\n\t\tremoveElement = function() {\n\t\t\tif(targetElement.parentNode) {\n\t\t\t\twidget.removeChildDomNodes();\n\t\t\t}\n\t\t};\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\tremoveElement();\n\t\treturn;\n\t}\n\t// Remove the element at the end of the transition\n\tsetTimeout(removeElement,duration);\n\t// Animate the closure\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \"none\"},\n\t\t{transform: \"scale(1)\"},\n\t\t{opacity: \"1.0\"}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"opacity \" + duration + \"ms ease-in-out\"},\n\t\t{transform: \"scale(0.1)\"},\n\t\t{opacity: \"0.0\"}\n\t]);\n};\n\nexports.pop = PopStoryView;\n\n})();\n",
"title": "$:/core/modules/storyviews/pop.js",
"type": "application/javascript",
"module-type": "storyview"
},
"$:/core/modules/storyviews/zoomin.js": {
"text": "/*\\\ntitle: $:/core/modules/storyviews/zoomin.js\ntype: application/javascript\nmodule-type: storyview\n\nZooms between individual tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar easing = \"cubic-bezier(0.645, 0.045, 0.355, 1)\"; // From http://easings.net/#easeInOutCubic\n\nvar ZoominListView = function(listWidget) {\n\tvar self = this;\n\tthis.listWidget = listWidget;\n\t// Get the index of the tiddler that is at the top of the history\n\tvar history = this.listWidget.wiki.getTiddlerDataCached(this.listWidget.historyTitle,[]),\n\t\ttargetTiddler;\n\tif(history.length > 0) {\n\t\ttargetTiddler = history[history.length-1].title;\n\t}\n\t// Make all the tiddlers position absolute, and hide all but the top (or first) one\n\t$tw.utils.each(this.listWidget.children,function(itemWidget,index) {\n\t\tvar domNode = itemWidget.findFirstDomNode();\n\t\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\t\tif(!(domNode instanceof Element)) {\n\t\t\treturn;\n\t\t}\n\t\tif((targetTiddler && targetTiddler !== itemWidget.parseTreeNode.itemTitle) || (!targetTiddler && index)) {\n\t\t\tdomNode.style.display = \"none\";\n\t\t} else {\n\t\t\tself.currentTiddlerDomNode = domNode;\n\t\t}\n\t\t$tw.utils.addClass(domNode,\"tc-storyview-zoomin-tiddler\");\n\t});\n};\n\nZoominListView.prototype.navigateTo = function(historyInfo) {\n\tvar duration = $tw.utils.getAnimationDuration(),\n\t\tlistElementIndex = this.listWidget.findListItem(0,historyInfo.title);\n\tif(listElementIndex === undefined) {\n\t\treturn;\n\t}\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\n\t\ttargetElement = listItemWidget.findFirstDomNode();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Make the new tiddler be position absolute and visible so that we can measure it\n\t$tw.utils.addClass(targetElement,\"tc-storyview-zoomin-tiddler\");\n\t$tw.utils.setStyle(targetElement,[\n\t\t{display: \"block\"},\n\t\t{transformOrigin: \"0 0\"},\n\t\t{transform: \"translateX(0px) translateY(0px) scale(1)\"},\n\t\t{transition: \"none\"},\n\t\t{opacity: \"0.0\"}\n\t]);\n\t// Get the position of the source node, or use the centre of the window as the source position\n\tvar sourceBounds = historyInfo.fromPageRect || {\n\t\t\tleft: window.innerWidth/2 - 2,\n\t\t\ttop: window.innerHeight/2 - 2,\n\t\t\twidth: window.innerWidth/8,\n\t\t\theight: window.innerHeight/8\n\t\t};\n\t// Try to find the title node in the target tiddler\n\tvar titleDomNode = findTitleDomNode(listItemWidget) || listItemWidget.findFirstDomNode(),\n\t\tzoomBounds = titleDomNode.getBoundingClientRect();\n\t// Compute the transform for the target tiddler to make the title lie over the source rectange\n\tvar targetBounds = targetElement.getBoundingClientRect(),\n\t\tscale = sourceBounds.width / zoomBounds.width,\n\t\tx = sourceBounds.left - targetBounds.left - (zoomBounds.left - targetBounds.left) * scale,\n\t\ty = sourceBounds.top - targetBounds.top - (zoomBounds.top - targetBounds.top) * scale;\n\t// Transform the target tiddler to its starting position\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transform: \"translateX(\" + x + \"px) translateY(\" + y + \"px) scale(\" + scale + \")\"}\n\t]);\n\t// Force layout\n\t$tw.utils.forceLayout(targetElement);\n\t// Apply the ending transitions with a timeout to ensure that the previously applied transformations are applied first\n\tvar self = this,\n\t\tprevCurrentTiddler = this.currentTiddlerDomNode;\n\tthis.currentTiddlerDomNode = targetElement;\n\t// Transform the target tiddler to its natural size\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", opacity \" + duration + \"ms \" + easing},\n\t\t{opacity: \"1.0\"},\n\t\t{transform: \"translateX(0px) translateY(0px) scale(1)\"},\n\t\t{zIndex: \"500\"},\n\t]);\n\t// Transform the previous tiddler out of the way and then hide it\n\tif(prevCurrentTiddler && prevCurrentTiddler !== targetElement) {\n\t\tscale = zoomBounds.width / sourceBounds.width;\n\t\tx = zoomBounds.left - targetBounds.left - (sourceBounds.left - targetBounds.left) * scale;\n\t\ty = zoomBounds.top - targetBounds.top - (sourceBounds.top - targetBounds.top) * scale;\n\t\t$tw.utils.setStyle(prevCurrentTiddler,[\n\t\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", opacity \" + duration + \"ms \" + easing},\n\t\t\t{opacity: \"0.0\"},\n\t\t\t{transformOrigin: \"0 0\"},\n\t\t\t{transform: \"translateX(\" + x + \"px) translateY(\" + y + \"px) scale(\" + scale + \")\"},\n\t\t\t{zIndex: \"0\"}\n\t\t]);\n\t\t// Hide the tiddler when the transition has finished\n\t\tsetTimeout(function() {\n\t\t\tif(self.currentTiddlerDomNode !== prevCurrentTiddler) {\n\t\t\t\tprevCurrentTiddler.style.display = \"none\";\n\t\t\t}\n\t\t},duration);\n\t}\n\t// Scroll the target into view\n//\t$tw.pageScroller.scrollIntoView(targetElement);\n};\n\n/*\nFind the first child DOM node of a widget that has the class \"tc-title\"\n*/\nfunction findTitleDomNode(widget,targetClass) {\n\ttargetClass = targetClass || \"tc-title\";\n\tvar domNode = widget.findFirstDomNode();\n\tif(domNode && domNode.querySelector) {\n\t\treturn domNode.querySelector(\".\" + targetClass);\n\t}\n\treturn null;\n}\n\nZoominListView.prototype.insert = function(widget) {\n\tvar targetElement = widget.findFirstDomNode();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Make the newly inserted node position absolute and hidden\n\t$tw.utils.addClass(targetElement,\"tc-storyview-zoomin-tiddler\");\n\t$tw.utils.setStyle(targetElement,[\n\t\t{display: \"none\"}\n\t]);\n};\n\nZoominListView.prototype.remove = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration(),\n\t\tremoveElement = function() {\n\t\t\twidget.removeChildDomNodes();\n\t\t};\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\tremoveElement();\n\t\treturn;\n\t}\n\t// Abandon if hidden\n\tif(targetElement.style.display != \"block\" ) {\n\t\tremoveElement();\n\t\treturn;\n\t}\n\t// Set up the tiddler that is being closed\n\t$tw.utils.addClass(targetElement,\"tc-storyview-zoomin-tiddler\");\n\t$tw.utils.setStyle(targetElement,[\n\t\t{display: \"block\"},\n\t\t{transformOrigin: \"50% 50%\"},\n\t\t{transform: \"translateX(0px) translateY(0px) scale(1)\"},\n\t\t{transition: \"none\"},\n\t\t{zIndex: \"0\"}\n\t]);\n\t// We'll move back to the previous or next element in the story\n\tvar toWidget = widget.previousSibling();\n\tif(!toWidget) {\n\t\ttoWidget = widget.nextSibling();\n\t}\n\tvar toWidgetDomNode = toWidget && toWidget.findFirstDomNode();\n\t// Set up the tiddler we're moving back in\n\tif(toWidgetDomNode) {\n\t\t$tw.utils.addClass(toWidgetDomNode,\"tc-storyview-zoomin-tiddler\");\n\t\t$tw.utils.setStyle(toWidgetDomNode,[\n\t\t\t{display: \"block\"},\n\t\t\t{transformOrigin: \"50% 50%\"},\n\t\t\t{transform: \"translateX(0px) translateY(0px) scale(10)\"},\n\t\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", opacity \" + duration + \"ms \" + easing},\n\t\t\t{opacity: \"0\"},\n\t\t\t{zIndex: \"500\"}\n\t\t]);\n\t\tthis.currentTiddlerDomNode = toWidgetDomNode;\n\t}\n\t// Animate them both\n\t// Force layout\n\t$tw.utils.forceLayout(this.listWidget.parentDomNode);\n\t// First, the tiddler we're closing\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transformOrigin: \"50% 50%\"},\n\t\t{transform: \"translateX(0px) translateY(0px) scale(0.1)\"},\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", opacity \" + duration + \"ms \" + easing},\n\t\t{opacity: \"0\"},\n\t\t{zIndex: \"0\"}\n\t]);\n\tsetTimeout(removeElement,duration);\n\t// Now the tiddler we're going back to\n\tif(toWidgetDomNode) {\n\t\t$tw.utils.setStyle(toWidgetDomNode,[\n\t\t\t{transform: \"translateX(0px) translateY(0px) scale(1)\"},\n\t\t\t{opacity: \"1\"}\n\t\t]);\n\t}\n\treturn true; // Indicate that we'll delete the DOM node\n};\n\nexports.zoomin = ZoominListView;\n\n})();\n",
"title": "$:/core/modules/storyviews/zoomin.js",
"type": "application/javascript",
"module-type": "storyview"
},
"$:/core/modules/syncer.js": {
"text": "/*\\\ntitle: $:/core/modules/syncer.js\ntype: application/javascript\nmodule-type: global\n\nThe syncer tracks changes to the store. If a syncadaptor is used then individual tiddlers are synchronised through it. If there is no syncadaptor then the entire wiki is saved via saver modules.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInstantiate the syncer with the following options:\nsyncadaptor: reference to syncadaptor to be used\nwiki: wiki to be synced\n*/\nfunction Syncer(options) {\n\tvar self = this;\n\tthis.wiki = options.wiki;\n\tthis.syncadaptor = options.syncadaptor;\n\t// Make a logger\n\tthis.logger = new $tw.utils.Logger(\"syncer\" + ($tw.browser ? \"-browser\" : \"\") + ($tw.node ? \"-server\" : \"\"));\n\t// Compile the dirty tiddler filter\n\tthis.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter));\n\t// Record information for known tiddlers\n\tthis.readTiddlerInfo();\n\t// Tasks are {type: \"load\"/\"save\"/\"delete\", title:, queueTime:, lastModificationTime:}\n\tthis.taskQueue = {}; // Hashmap of tasks yet to be performed\n\tthis.taskInProgress = {}; // Hash of tasks in progress\n\tthis.taskTimerId = null; // Timer for task dispatch\n\tthis.pollTimerId = null; // Timer for polling server\n\t// Listen out for changes to tiddlers\n\tthis.wiki.addEventListener(\"change\",function(changes) {\n\t\tself.syncToServer(changes);\n\t});\n\t// Browser event handlers\n\tif($tw.browser) {\n\t\t// Set up our beforeunload handler\n\t\t$tw.addUnloadTask(function(event) {\n\t\t\tvar confirmationMessage;\n\t\t\tif(self.isDirty()) {\n\t\t\t\tconfirmationMessage = $tw.language.getString(\"UnsavedChangesWarning\");\n\t\t\t\tevent.returnValue = confirmationMessage; // Gecko\n\t\t\t}\n\t\t\treturn confirmationMessage;\n\t\t});\n\t\t// Listen out for login/logout/refresh events in the browser\n\t\t$tw.rootWidget.addEventListener(\"tm-login\",function() {\n\t\t\tself.handleLoginEvent();\n\t\t});\n\t\t$tw.rootWidget.addEventListener(\"tm-logout\",function() {\n\t\t\tself.handleLogoutEvent();\n\t\t});\n\t\t$tw.rootWidget.addEventListener(\"tm-server-refresh\",function() {\n\t\t\tself.handleRefreshEvent();\n\t\t});\n\t}\n\t// Listen out for lazyLoad events\n\tthis.wiki.addEventListener(\"lazyLoad\",function(title) {\n\t\tself.handleLazyLoadEvent(title);\n\t});\n\t// Get the login status\n\tthis.getStatus(function(err,isLoggedIn) {\n\t\t// Do a sync from the server\n\t\tself.syncFromServer();\n\t});\n}\n\n/*\nConstants\n*/\nSyncer.prototype.titleIsLoggedIn = \"$:/status/IsLoggedIn\";\nSyncer.prototype.titleUserName = \"$:/status/UserName\";\nSyncer.prototype.titleSyncFilter = \"$:/config/SyncFilter\";\nSyncer.prototype.titleSavedNotification = \"$:/language/Notifications/Save/Done\";\nSyncer.prototype.taskTimerInterval = 1 * 1000; // Interval for sync timer\nSyncer.prototype.throttleInterval = 1 * 1000; // Defer saving tiddlers if they've changed in the last 1s...\nSyncer.prototype.fallbackInterval = 10 * 1000; // Unless the task is older than 10s\nSyncer.prototype.pollTimerInterval = 60 * 1000; // Interval for polling for changes from the adaptor\n\n\n/*\nRead (or re-read) the latest tiddler info from the store\n*/\nSyncer.prototype.readTiddlerInfo = function() {\n\t// Hashmap by title of {revision:,changeCount:,adaptorInfo:}\n\tthis.tiddlerInfo = {};\n\t// Record information for known tiddlers\n\tvar self = this,\n\t\ttiddlers = this.filterFn.call(this.wiki);\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = self.wiki.getTiddler(title);\n\t\tself.tiddlerInfo[title] = {\n\t\t\trevision: tiddler.fields.revision,\n\t\t\tadaptorInfo: self.syncadaptor && self.syncadaptor.getTiddlerInfo(tiddler),\n\t\t\tchangeCount: self.wiki.getChangeCount(title)\n\t\t};\n\t});\n};\n\n/*\nChecks whether the wiki is dirty (ie the window shouldn't be closed)\n*/\nSyncer.prototype.isDirty = function() {\n\treturn (this.numTasksInQueue() > 0) || (this.numTasksInProgress() > 0);\n};\n\n/*\nUpdate the document body with the class \"tc-dirty\" if the wiki has unsaved/unsynced changes\n*/\nSyncer.prototype.updateDirtyStatus = function() {\n\tif($tw.browser) {\n\t\t$tw.utils.toggleClass(document.body,\"tc-dirty\",this.isDirty());\n\t}\n};\n\n/*\nSave an incoming tiddler in the store, and updates the associated tiddlerInfo\n*/\nSyncer.prototype.storeTiddler = function(tiddlerFields) {\n\t// Save the tiddler\n\tvar tiddler = new $tw.Tiddler(this.wiki.getTiddler(tiddlerFields.title),tiddlerFields);\n\tthis.wiki.addTiddler(tiddler);\n\t// Save the tiddler revision and changeCount details\n\tthis.tiddlerInfo[tiddlerFields.title] = {\n\t\trevision: tiddlerFields.revision,\n\t\tadaptorInfo: this.syncadaptor.getTiddlerInfo(tiddler),\n\t\tchangeCount: this.wiki.getChangeCount(tiddlerFields.title)\n\t};\n};\n\nSyncer.prototype.getStatus = function(callback) {\n\tvar self = this;\n\t// Check if the adaptor supports getStatus()\n\tif(this.syncadaptor && this.syncadaptor.getStatus) {\n\t\t// Mark us as not logged in\n\t\tthis.wiki.addTiddler({title: this.titleIsLoggedIn,text: \"no\"});\n\t\t// Get login status\n\t\tthis.syncadaptor.getStatus(function(err,isLoggedIn,username) {\n\t\t\tif(err) {\n\t\t\t\tself.logger.alert(err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Set the various status tiddlers\n\t\t\tself.wiki.addTiddler({title: self.titleIsLoggedIn,text: isLoggedIn ? \"yes\" : \"no\"});\n\t\t\tif(isLoggedIn) {\n\t\t\t\tself.wiki.addTiddler({title: self.titleUserName,text: username || \"\"});\n\t\t\t} else {\n\t\t\t\tself.wiki.deleteTiddler(self.titleUserName);\n\t\t\t}\n\t\t\t// Invoke the callback\n\t\t\tif(callback) {\n\t\t\t\tcallback(err,isLoggedIn,username);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tcallback(null,true,\"UNAUTHENTICATED\");\n\t}\n};\n\n/*\nSynchronise from the server by reading the skinny tiddler list and queuing up loads for any tiddlers that we don't already have up to date\n*/\nSyncer.prototype.syncFromServer = function() {\n\tif(this.syncadaptor && this.syncadaptor.getSkinnyTiddlers) {\n\t\tthis.logger.log(\"Retrieving skinny tiddler list\");\n\t\tvar self = this;\n\t\tif(this.pollTimerId) {\n\t\t\tclearTimeout(this.pollTimerId);\n\t\t\tthis.pollTimerId = null;\n\t\t}\n\t\tthis.syncadaptor.getSkinnyTiddlers(function(err,tiddlers) {\n\t\t\t// Trigger the next sync\n\t\t\tself.pollTimerId = setTimeout(function() {\n\t\t\t\tself.pollTimerId = null;\n\t\t\t\tself.syncFromServer.call(self);\n\t\t\t},self.pollTimerInterval);\n\t\t\t// Check for errors\n\t\t\tif(err) {\n\t\t\t\tself.logger.alert(\"Error retrieving skinny tiddler list:\",err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Process each incoming tiddler\n\t\t\tfor(var t=0; t<tiddlers.length; t++) {\n\t\t\t\t// Get the incoming tiddler fields, and the existing tiddler\n\t\t\t\tvar tiddlerFields = tiddlers[t],\n\t\t\t\t\tincomingRevision = tiddlerFields.revision + \"\",\n\t\t\t\t\ttiddler = self.wiki.getTiddler(tiddlerFields.title),\n\t\t\t\t\ttiddlerInfo = self.tiddlerInfo[tiddlerFields.title],\n\t\t\t\t\tcurrRevision = tiddlerInfo ? tiddlerInfo.revision : null;\n\t\t\t\t// Ignore the incoming tiddler if it's the same as the revision we've already got\n\t\t\t\tif(currRevision !== incomingRevision) {\n\t\t\t\t\t// Do a full load if we've already got a fat version of the tiddler\n\t\t\t\t\tif(tiddler && tiddler.fields.text !== undefined) {\n\t\t\t\t\t\t// Do a full load of this tiddler\n\t\t\t\t\t\tself.enqueueSyncTask({\n\t\t\t\t\t\t\ttype: \"load\",\n\t\t\t\t\t\t\ttitle: tiddlerFields.title\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Load the skinny version of the tiddler\n\t\t\t\t\t\tself.storeTiddler(tiddlerFields);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n};\n\n/*\nSynchronise a set of changes to the server\n*/\nSyncer.prototype.syncToServer = function(changes) {\n\tvar self = this,\n\t\tnow = Date.now(),\n\t\tfilteredChanges = this.filterFn.call(this.wiki,function(callback) {\n\t\t\t$tw.utils.each(changes,function(change,title) {\n\t\t\t\tvar tiddler = self.wiki.getTiddler(title);\n\t\t\t\tcallback(tiddler,title);\n\t\t\t});\n\t\t});\n\t$tw.utils.each(changes,function(change,title,object) {\n\t\t// Process the change if it is a deletion of a tiddler we're already syncing, or is on the filtered change list\n\t\tif((change.deleted && $tw.utils.hop(self.tiddlerInfo,title)) || filteredChanges.indexOf(title) !== -1) {\n\t\t\t// Queue a task to sync this tiddler\n\t\t\tself.enqueueSyncTask({\n\t\t\t\ttype: change.deleted ? \"delete\" : \"save\",\n\t\t\t\ttitle: title\n\t\t\t});\n\t\t}\n\t});\n};\n\n/*\nLazily load a skinny tiddler if we can\n*/\nSyncer.prototype.handleLazyLoadEvent = function(title) {\n\t// Queue up a sync task to load this tiddler\n\tthis.enqueueSyncTask({\n\t\ttype: \"load\",\n\t\ttitle: title\n\t});\n};\n\n/*\nDispay a password prompt and allow the user to login\n*/\nSyncer.prototype.handleLoginEvent = function() {\n\tvar self = this;\n\tthis.getStatus(function(err,isLoggedIn,username) {\n\t\tif(!isLoggedIn) {\n\t\t\t$tw.passwordPrompt.createPrompt({\n\t\t\t\tserviceName: \"Login to TiddlySpace\",\n\t\t\t\tcallback: function(data) {\n\t\t\t\t\tself.login(data.username,data.password,function(err,isLoggedIn) {\n\t\t\t\t\t\tself.syncFromServer();\n\t\t\t\t\t});\n\t\t\t\t\treturn true; // Get rid of the password prompt\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n};\n\n/*\nAttempt to login to TiddlyWeb.\n\tusername: username\n\tpassword: password\n\tcallback: invoked with arguments (err,isLoggedIn)\n*/\nSyncer.prototype.login = function(username,password,callback) {\n\tthis.logger.log(\"Attempting to login as\",username);\n\tvar self = this;\n\tif(this.syncadaptor.login) {\n\t\tthis.syncadaptor.login(username,password,function(err) {\n\t\t\tif(err) {\n\t\t\t\treturn callback(err);\n\t\t\t}\n\t\t\tself.getStatus(function(err,isLoggedIn,username) {\n\t\t\t\tif(callback) {\n\t\t\t\t\tcallback(null,isLoggedIn);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t} else {\n\t\tcallback(null,true);\n\t}\n};\n\n/*\nAttempt to log out of TiddlyWeb\n*/\nSyncer.prototype.handleLogoutEvent = function() {\n\tthis.logger.log(\"Attempting to logout\");\n\tvar self = this;\n\tif(this.syncadaptor.logout) {\n\t\tthis.syncadaptor.logout(function(err) {\n\t\t\tif(err) {\n\t\t\t\tself.logger.alert(err);\n\t\t\t} else {\n\t\t\t\tself.getStatus();\n\t\t\t}\n\t\t});\n\t}\n};\n\n/*\nImmediately refresh from the server\n*/\nSyncer.prototype.handleRefreshEvent = function() {\n\tthis.syncFromServer();\n};\n\n/*\nQueue up a sync task. If there is already a pending task for the tiddler, just update the last modification time\n*/\nSyncer.prototype.enqueueSyncTask = function(task) {\n\tvar self = this,\n\t\tnow = Date.now();\n\t// Set the timestamps on this task\n\ttask.queueTime = now;\n\ttask.lastModificationTime = now;\n\t// Fill in some tiddlerInfo if the tiddler is one we haven't seen before\n\tif(!$tw.utils.hop(this.tiddlerInfo,task.title)) {\n\t\tthis.tiddlerInfo[task.title] = {\n\t\t\trevision: null,\n\t\t\tadaptorInfo: {},\n\t\t\tchangeCount: -1\n\t\t};\n\t}\n\t// Bail if this is a save and the tiddler is already at the changeCount that the server has\n\tif(task.type === \"save\" && this.wiki.getChangeCount(task.title) <= this.tiddlerInfo[task.title].changeCount) {\n\t\treturn;\n\t}\n\t// Check if this tiddler is already in the queue\n\tif($tw.utils.hop(this.taskQueue,task.title)) {\n\t\t// this.logger.log(\"Re-queueing up sync task with type:\",task.type,\"title:\",task.title);\n\t\tvar existingTask = this.taskQueue[task.title];\n\t\t// If so, just update the last modification time\n\t\texistingTask.lastModificationTime = task.lastModificationTime;\n\t\t// If the new task is a save then we upgrade the existing task to a save. Thus a pending load is turned into a save if the tiddler changes locally in the meantime. But a pending save is not modified to become a load\n\t\tif(task.type === \"save\" || task.type === \"delete\") {\n\t\t\texistingTask.type = task.type;\n\t\t}\n\t} else {\n\t\t// this.logger.log(\"Queuing up sync task with type:\",task.type,\"title:\",task.title);\n\t\t// If it is not in the queue, insert it\n\t\tthis.taskQueue[task.title] = task;\n\t\tthis.updateDirtyStatus();\n\t}\n\t// Process the queue\n\t$tw.utils.nextTick(function() {self.processTaskQueue.call(self);});\n};\n\n/*\nReturn the number of tasks in progress\n*/\nSyncer.prototype.numTasksInProgress = function() {\n\treturn $tw.utils.count(this.taskInProgress);\n};\n\n/*\nReturn the number of tasks in the queue\n*/\nSyncer.prototype.numTasksInQueue = function() {\n\treturn $tw.utils.count(this.taskQueue);\n};\n\n/*\nTrigger a timeout if one isn't already outstanding\n*/\nSyncer.prototype.triggerTimeout = function() {\n\tvar self = this;\n\tif(!this.taskTimerId) {\n\t\tthis.taskTimerId = setTimeout(function() {\n\t\t\tself.taskTimerId = null;\n\t\t\tself.processTaskQueue.call(self);\n\t\t},self.taskTimerInterval);\n\t}\n};\n\n/*\nProcess the task queue, performing the next task if appropriate\n*/\nSyncer.prototype.processTaskQueue = function() {\n\tvar self = this;\n\t// Only process a task if we're not already performing a task. If we are already performing a task then we'll dispatch the next one when it completes\n\tif(this.numTasksInProgress() === 0) {\n\t\t// Choose the next task to perform\n\t\tvar task = this.chooseNextTask();\n\t\t// Perform the task if we had one\n\t\tif(task) {\n\t\t\t// Remove the task from the queue and add it to the in progress list\n\t\t\tdelete this.taskQueue[task.title];\n\t\t\tthis.taskInProgress[task.title] = task;\n\t\t\tthis.updateDirtyStatus();\n\t\t\t// Dispatch the task\n\t\t\tthis.dispatchTask(task,function(err) {\n\t\t\t\tif(err) {\n\t\t\t\t\tself.logger.alert(\"Sync error while processing '\" + task.title + \"':\\n\" + err);\n\t\t\t\t}\n\t\t\t\t// Mark that this task is no longer in progress\n\t\t\t\tdelete self.taskInProgress[task.title];\n\t\t\t\tself.updateDirtyStatus();\n\t\t\t\t// Process the next task\n\t\t\t\tself.processTaskQueue.call(self);\n\t\t\t});\n\t\t} else {\n\t\t\t// Make sure we've set a time if there wasn't a task to perform, but we've still got tasks in the queue\n\t\t\tif(this.numTasksInQueue() > 0) {\n\t\t\t\tthis.triggerTimeout();\n\t\t\t}\n\t\t}\n\t}\n};\n\n/*\nChoose the next applicable task\n*/\nSyncer.prototype.chooseNextTask = function() {\n\tvar self = this,\n\t\tcandidateTask = null,\n\t\tnow = Date.now();\n\t// Select the best candidate task\n\t$tw.utils.each(this.taskQueue,function(task,title) {\n\t\t// Exclude the task if there's one of the same name in progress\n\t\tif($tw.utils.hop(self.taskInProgress,title)) {\n\t\t\treturn;\n\t\t}\n\t\t// Exclude the task if it is a save and the tiddler has been modified recently, but not hit the fallback time\n\t\tif(task.type === \"save\" && (now - task.lastModificationTime) < self.throttleInterval &&\n\t\t\t(now - task.queueTime) < self.fallbackInterval) {\n\t\t\treturn;\n\t\t}\n\t\t// Exclude the task if it is newer than the current best candidate\n\t\tif(candidateTask && candidateTask.queueTime < task.queueTime) {\n\t\t\treturn;\n\t\t}\n\t\t// Now this is our best candidate\n\t\tcandidateTask = task;\n\t});\n\treturn candidateTask;\n};\n\n/*\nDispatch a task and invoke the callback\n*/\nSyncer.prototype.dispatchTask = function(task,callback) {\n\tvar self = this;\n\tif(task.type === \"save\") {\n\t\tvar changeCount = this.wiki.getChangeCount(task.title),\n\t\t\ttiddler = this.wiki.getTiddler(task.title);\n\t\tthis.logger.log(\"Dispatching 'save' task:\",task.title);\n\t\tif(tiddler) {\n\t\t\tthis.syncadaptor.saveTiddler(tiddler,function(err,adaptorInfo,revision) {\n\t\t\t\tif(err) {\n\t\t\t\t\treturn callback(err);\n\t\t\t\t}\n\t\t\t\t// Adjust the info stored about this tiddler\n\t\t\t\tself.tiddlerInfo[task.title] = {\n\t\t\t\t\tchangeCount: changeCount,\n\t\t\t\t\tadaptorInfo: adaptorInfo,\n\t\t\t\t\trevision: revision\n\t\t\t\t};\n\t\t\t\t// Invoke the callback\n\t\t\t\tcallback(null);\n\t\t\t},{\n\t\t\t\ttiddlerInfo: self.tiddlerInfo[task.title]\n\t\t\t});\n\t\t} else {\n\t\t\tthis.logger.log(\" Not Dispatching 'save' task:\",task.title,\"tiddler does not exist\");\n\t\t\treturn callback(null);\n\t\t}\n\t} else if(task.type === \"load\") {\n\t\t// Load the tiddler\n\t\tthis.logger.log(\"Dispatching 'load' task:\",task.title);\n\t\tthis.syncadaptor.loadTiddler(task.title,function(err,tiddlerFields) {\n\t\t\tif(err) {\n\t\t\t\treturn callback(err);\n\t\t\t}\n\t\t\t// Store the tiddler\n\t\t\tif(tiddlerFields) {\n\t\t\t\tself.storeTiddler(tiddlerFields);\n\t\t\t}\n\t\t\t// Invoke the callback\n\t\t\tcallback(null);\n\t\t});\n\t} else if(task.type === \"delete\") {\n\t\t// Delete the tiddler\n\t\tthis.logger.log(\"Dispatching 'delete' task:\",task.title);\n\t\tthis.syncadaptor.deleteTiddler(task.title,function(err) {\n\t\t\tif(err) {\n\t\t\t\treturn callback(err);\n\t\t\t}\n\t\t\tdelete self.tiddlerInfo[task.title];\n\t\t\t// Invoke the callback\n\t\t\tcallback(null);\n\t\t},{\n\t\t\ttiddlerInfo: self.tiddlerInfo[task.title]\n\t\t});\n\t}\n};\n\nexports.Syncer = Syncer;\n\n})();\n",
"title": "$:/core/modules/syncer.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/tiddler.js": {
"text": "/*\\\ntitle: $:/core/modules/tiddler.js\ntype: application/javascript\nmodule-type: tiddlermethod\n\nExtension methods for the $tw.Tiddler object (constructor and methods required at boot time are in boot/boot.js)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.hasTag = function(tag) {\n\treturn this.fields.tags && this.fields.tags.indexOf(tag) !== -1;\n};\n\nexports.isPlugin = function() {\n\treturn this.fields.type === \"application/json\" && this.hasField(\"plugin-type\");\n};\n\nexports.isDraft = function() {\n\treturn this.hasField(\"draft.of\");\n};\n\nexports.getFieldString = function(field) {\n\tvar value = this.fields[field];\n\t// Check for a missing field\n\tif(value === undefined || value === null) {\n\t\treturn \"\";\n\t}\n\t// Parse the field with the associated module (if any)\n\tvar fieldModule = $tw.Tiddler.fieldModules[field];\n\tif(fieldModule && fieldModule.stringify) {\n\t\treturn fieldModule.stringify.call(this,value);\n\t} else {\n\t\treturn value.toString();\n\t}\n};\n\n/*\nGet all the fields as a name:value block. Options:\n\texclude: an array of field names to exclude\n*/\nexports.getFieldStringBlock = function(options) {\n\toptions = options || {};\n\tvar exclude = options.exclude || [];\n\tvar fields = [];\n\tfor(var field in this.fields) {\n\t\tif($tw.utils.hop(this.fields,field)) {\n\t\t\tif(exclude.indexOf(field) === -1) {\n\t\t\t\tfields.push(field + \": \" + this.getFieldString(field));\n\t\t\t}\n\t\t}\n\t}\n\treturn fields.join(\"\\n\");\n};\n\n/*\nCompare two tiddlers for equality\ntiddler: the tiddler to compare\nexcludeFields: array of field names to exclude from the comparison\n*/\nexports.isEqual = function(tiddler,excludeFields) {\n\tif(!(tiddler instanceof $tw.Tiddler)) {\n\t\treturn false;\n\t}\n\texcludeFields = excludeFields || [];\n\tvar self = this,\n\t\tdifferences = []; // Fields that have differences\n\t// Add to the differences array\n\tfunction addDifference(fieldName) {\n\t\t// Check for this field being excluded\n\t\tif(excludeFields.indexOf(fieldName) === -1) {\n\t\t\t// Save the field as a difference\n\t\t\t$tw.utils.pushTop(differences,fieldName);\n\t\t}\n\t}\n\t// Returns true if the two values of this field are equal\n\tfunction isFieldValueEqual(fieldName) {\n\t\tvar valueA = self.fields[fieldName],\n\t\t\tvalueB = tiddler.fields[fieldName];\n\t\t// Check for identical string values\n\t\tif(typeof(valueA) === \"string\" && typeof(valueB) === \"string\" && valueA === valueB) {\n\t\t\treturn true;\n\t\t}\n\t\t// Check for identical array values\n\t\tif($tw.utils.isArray(valueA) && $tw.utils.isArray(valueB) && $tw.utils.isArrayEqual(valueA,valueB)) {\n\t\t\treturn true;\n\t\t}\n\t\t// Otherwise the fields must be different\n\t\treturn false;\n\t}\n\t// Compare our fields\n\tfor(var fieldName in this.fields) {\n\t\tif(!isFieldValueEqual(fieldName)) {\n\t\t\taddDifference(fieldName);\n\t\t}\n\t}\n\t// There's a difference for every field in the other tiddler that we don't have\n\tfor(fieldName in tiddler.fields) {\n\t\tif(!(fieldName in this.fields)) {\n\t\t\taddDifference(fieldName);\n\t\t}\n\t}\n\t// Return whether there were any differences\n\treturn differences.length === 0;\n};\n\n})();\n",
"title": "$:/core/modules/tiddler.js",
"type": "application/javascript",
"module-type": "tiddlermethod"
},
"$:/core/modules/upgraders/plugins.js": {
"text": "/*\\\ntitle: $:/core/modules/upgraders/plugins.js\ntype: application/javascript\nmodule-type: upgrader\n\nUpgrader module that checks that plugins are newer than any already installed version\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar UPGRADE_LIBRARY_TITLE = \"$:/UpgradeLibrary\";\n\nvar BLOCKED_PLUGINS = {\n\t\"$:/themes/tiddlywiki/stickytitles\": {\n\t\tversions: [\"*\"]\n\t},\n\t\"$:/plugins/tiddlywiki/fullscreen\": {\n\t\tversions: [\"*\"]\n\t}\n};\n\nexports.upgrade = function(wiki,titles,tiddlers) {\n\tvar self = this,\n\t\tmessages = {},\n\t\tupgradeLibrary,\n\t\tgetLibraryTiddler = function(title) {\n\t\t\tif(!upgradeLibrary) {\n\t\t\t\tupgradeLibrary = wiki.getTiddlerData(UPGRADE_LIBRARY_TITLE,{});\n\t\t\t\tupgradeLibrary.tiddlers = upgradeLibrary.tiddlers || {};\n\t\t\t}\n\t\t\treturn upgradeLibrary.tiddlers[title];\n\t\t};\n\n\t// Go through all the incoming tiddlers\n\t$tw.utils.each(titles,function(title) {\n\t\tvar incomingTiddler = tiddlers[title];\n\t\t// Check if we're dealing with a plugin\n\t\tif(incomingTiddler && incomingTiddler[\"plugin-type\"] && incomingTiddler.version) {\n\t\t\t// Upgrade the incoming plugin if it is in the upgrade library\n\t\t\tvar libraryTiddler = getLibraryTiddler(title);\n\t\t\tif(libraryTiddler && libraryTiddler[\"plugin-type\"] && libraryTiddler.version) {\n\t\t\t\ttiddlers[title] = libraryTiddler;\n\t\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/Plugins/Upgraded\",{variables: {incoming: incomingTiddler.version, upgraded: libraryTiddler.version}});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Suppress the incoming plugin if it is older than the currently installed one\n\t\t\tvar existingTiddler = wiki.getTiddler(title);\n\t\t\tif(existingTiddler && existingTiddler.hasField(\"plugin-type\") && existingTiddler.hasField(\"version\")) {\n\t\t\t\t// Reject the incoming plugin by blanking all its fields\n\t\t\t\tif($tw.utils.checkVersions(existingTiddler.fields.version,incomingTiddler.version)) {\n\t\t\t\t\ttiddlers[title] = Object.create(null);\n\t\t\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/Plugins/Suppressed/Version\",{variables: {incoming: incomingTiddler.version, existing: existingTiddler.fields.version}});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(incomingTiddler && incomingTiddler[\"plugin-type\"]) {\n\t\t\t// Check whether the plugin is on the blocked list\n\t\t\tvar blockInfo = BLOCKED_PLUGINS[title];\n\t\t\tif(blockInfo) {\n\t\t\t\tif(blockInfo.versions.indexOf(\"*\") !== -1 || (incomingTiddler.version && blockInfo.versions.indexOf(incomingTiddler.version) !== -1)) {\n\t\t\t\t\ttiddlers[title] = Object.create(null);\n\t\t\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/Plugins/Suppressed/Incompatible\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\treturn messages;\n};\n\n})();\n",
"title": "$:/core/modules/upgraders/plugins.js",
"type": "application/javascript",
"module-type": "upgrader"
},
"$:/core/modules/upgraders/system.js": {
"text": "/*\\\ntitle: $:/core/modules/upgraders/system.js\ntype: application/javascript\nmodule-type: upgrader\n\nUpgrader module that suppresses certain system tiddlers that shouldn't be imported\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar DONT_IMPORT_LIST = [\"$:/StoryList\",\"$:/HistoryList\"],\n\tDONT_IMPORT_PREFIX_LIST = [\"$:/temp/\",\"$:/state/\"];\n\nexports.upgrade = function(wiki,titles,tiddlers) {\n\tvar self = this,\n\t\tmessages = {};\n\t// Check for tiddlers on our list\n\t$tw.utils.each(titles,function(title) {\n\t\tif(DONT_IMPORT_LIST.indexOf(title) !== -1) {\n\t\t\ttiddlers[title] = Object.create(null);\n\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/System/Suppressed\");\n\t\t} else {\n\t\t\tfor(var t=0; t<DONT_IMPORT_PREFIX_LIST.length; t++) {\n\t\t\t\tvar prefix = DONT_IMPORT_PREFIX_LIST[t];\n\t\t\t\tif(title.substr(0,prefix.length) === prefix) {\n\t\t\t\t\ttiddlers[title] = Object.create(null);\n\t\t\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/State/Suppressed\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\treturn messages;\n};\n\n})();\n",
"title": "$:/core/modules/upgraders/system.js",
"type": "application/javascript",
"module-type": "upgrader"
},
"$:/core/modules/upgraders/themetweaks.js": {
"text": "/*\\\ntitle: $:/core/modules/upgraders/themetweaks.js\ntype: application/javascript\nmodule-type: upgrader\n\nUpgrader module that handles the change in theme tweak storage introduced in 5.0.14-beta.\n\nPreviously, theme tweaks were stored in two data tiddlers:\n\n* $:/themes/tiddlywiki/vanilla/metrics\n* $:/themes/tiddlywiki/vanilla/settings\n\nNow, each tweak is stored in its own separate tiddler.\n\nThis upgrader copies any values from the old format to the new. The old data tiddlers are not deleted in case they have been used to store additional indexes.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar MAPPINGS = {\n\t\"$:/themes/tiddlywiki/vanilla/metrics\": {\n\t\t\"fontsize\": \"$:/themes/tiddlywiki/vanilla/metrics/fontsize\",\n\t\t\"lineheight\": \"$:/themes/tiddlywiki/vanilla/metrics/lineheight\",\n\t\t\"storyleft\": \"$:/themes/tiddlywiki/vanilla/metrics/storyleft\",\n\t\t\"storytop\": \"$:/themes/tiddlywiki/vanilla/metrics/storytop\",\n\t\t\"storyright\": \"$:/themes/tiddlywiki/vanilla/metrics/storyright\",\n\t\t\"storywidth\": \"$:/themes/tiddlywiki/vanilla/metrics/storywidth\",\n\t\t\"tiddlerwidth\": \"$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth\"\n\t},\n\t\"$:/themes/tiddlywiki/vanilla/settings\": {\n\t\t\"fontfamily\": \"$:/themes/tiddlywiki/vanilla/settings/fontfamily\"\n\t}\n};\n\nexports.upgrade = function(wiki,titles,tiddlers) {\n\tvar self = this,\n\t\tmessages = {};\n\t// Check for tiddlers on our list\n\t$tw.utils.each(titles,function(title) {\n\t\tvar mapping = MAPPINGS[title];\n\t\tif(mapping) {\n\t\t\tvar tiddler = new $tw.Tiddler(tiddlers[title]),\n\t\t\t\ttiddlerData = wiki.getTiddlerDataCached(tiddler,{});\n\t\t\tfor(var index in mapping) {\n\t\t\t\tvar mappedTitle = mapping[index];\n\t\t\t\tif(!tiddlers[mappedTitle] || tiddlers[mappedTitle].title !== mappedTitle) {\n\t\t\t\t\ttiddlers[mappedTitle] = {\n\t\t\t\t\t\ttitle: mappedTitle,\n\t\t\t\t\t\ttext: tiddlerData[index]\n\t\t\t\t\t};\n\t\t\t\t\tmessages[mappedTitle] = $tw.language.getString(\"Import/Upgrader/ThemeTweaks/Created\",{variables: {\n\t\t\t\t\t\tfrom: title + \"##\" + index\n\t\t\t\t\t}});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\treturn messages;\n};\n\n})();\n",
"title": "$:/core/modules/upgraders/themetweaks.js",
"type": "application/javascript",
"module-type": "upgrader"
},
"$:/core/modules/utils/crypto.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/crypto.js\ntype: application/javascript\nmodule-type: utils\n\nUtility functions related to crypto.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nLook for an encrypted store area in the text of a TiddlyWiki file\n*/\nexports.extractEncryptedStoreArea = function(text) {\n\tvar encryptedStoreAreaStartMarker = \"<pre id=\\\"encryptedStoreArea\\\" type=\\\"text/plain\\\" style=\\\"display:none;\\\">\",\n\t\tencryptedStoreAreaStart = text.indexOf(encryptedStoreAreaStartMarker);\n\tif(encryptedStoreAreaStart !== -1) {\n\t\tvar encryptedStoreAreaEnd = text.indexOf(\"</pre>\",encryptedStoreAreaStart);\n\t\tif(encryptedStoreAreaEnd !== -1) {\n\t\t\treturn $tw.utils.htmlDecode(text.substring(encryptedStoreAreaStart + encryptedStoreAreaStartMarker.length,encryptedStoreAreaEnd-1));\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nAttempt to extract the tiddlers from an encrypted store area using the current password. If the password is not provided then the password in the password store will be used\n*/\nexports.decryptStoreArea = function(encryptedStoreArea,password) {\n\tvar decryptedText = $tw.crypto.decrypt(encryptedStoreArea,password);\n\tif(decryptedText) {\n\t\tvar json = JSON.parse(decryptedText),\n\t\t\ttiddlers = [];\n\t\tfor(var title in json) {\n\t\t\tif(title !== \"$:/isEncrypted\") {\n\t\t\t\ttiddlers.push(json[title]);\n\t\t\t}\n\t\t}\n\t\treturn tiddlers;\n\t} else {\n\t\treturn null;\n\t}\n};\n\n\n/*\nAttempt to extract the tiddlers from an encrypted store area using the current password. If that fails, the user is prompted for a password.\nencryptedStoreArea: text of the TiddlyWiki encrypted store area\ncallback: function(tiddlers) called with the array of decrypted tiddlers\n\nThe following configuration settings are supported:\n\n$tw.config.usePasswordVault: causes any password entered by the user to also be put into the system password vault\n*/\nexports.decryptStoreAreaInteractive = function(encryptedStoreArea,callback,options) {\n\t// Try to decrypt with the current password\n\tvar tiddlers = $tw.utils.decryptStoreArea(encryptedStoreArea);\n\tif(tiddlers) {\n\t\tcallback(tiddlers);\n\t} else {\n\t\t// Prompt for a new password and keep trying\n\t\t$tw.passwordPrompt.createPrompt({\n\t\t\tserviceName: \"Enter a password to decrypt the imported TiddlyWiki\",\n\t\t\tnoUserName: true,\n\t\t\tcanCancel: true,\n\t\t\tsubmitText: \"Decrypt\",\n\t\t\tcallback: function(data) {\n\t\t\t\t// Exit if the user cancelled\n\t\t\t\tif(!data) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// Attempt to decrypt the tiddlers\n\t\t\t\tvar tiddlers = $tw.utils.decryptStoreArea(encryptedStoreArea,data.password);\n\t\t\t\tif(tiddlers) {\n\t\t\t\t\tif($tw.config.usePasswordVault) {\n\t\t\t\t\t\t$tw.crypto.setPassword(data.password);\n\t\t\t\t\t}\n\t\t\t\t\tcallback(tiddlers);\n\t\t\t\t\t// Exit and remove the password prompt\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t// We didn't decrypt everything, so continue to prompt for password\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/utils/crypto.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/animations/slide.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/dom/animations/slide.js\ntype: application/javascript\nmodule-type: animation\n\nA simple slide animation that varies the height of the element\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nfunction slideOpen(domNode,options) {\n\toptions = options || {};\n\tvar duration = options.duration || $tw.utils.getAnimationDuration();\n\t// Get the current height of the domNode\n\tvar computedStyle = window.getComputedStyle(domNode),\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\n\t\tcurrPaddingBottom = parseInt(computedStyle.paddingBottom,10),\n\t\tcurrPaddingTop = parseInt(computedStyle.paddingTop,10),\n\t\tcurrHeight = domNode.offsetHeight;\n\t// Reset the margin once the transition is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(domNode,[\n\t\t\t{transition: \"none\"},\n\t\t\t{marginBottom: \"\"},\n\t\t\t{marginTop: \"\"},\n\t\t\t{paddingBottom: \"\"},\n\t\t\t{paddingTop: \"\"},\n\t\t\t{height: \"auto\"},\n\t\t\t{opacity: \"\"}\n\t\t]);\n\t\tif(options.callback) {\n\t\t\toptions.callback();\n\t\t}\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(domNode,[\n\t\t{transition: \"none\"},\n\t\t{marginTop: \"0px\"},\n\t\t{marginBottom: \"0px\"},\n\t\t{paddingTop: \"0px\"},\n\t\t{paddingBottom: \"0px\"},\n\t\t{height: \"0px\"},\n\t\t{opacity: \"0\"}\n\t]);\n\t$tw.utils.forceLayout(domNode);\n\t// Transition to the final position\n\t$tw.utils.setStyle(domNode,[\n\t\t{transition: \"margin-top \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"padding-top \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"padding-bottom \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"height \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"opacity \" + duration + \"ms ease-in-out\"},\n\t\t{marginBottom: currMarginBottom + \"px\"},\n\t\t{marginTop: currMarginTop + \"px\"},\n\t\t{paddingBottom: currPaddingBottom + \"px\"},\n\t\t{paddingTop: currPaddingTop + \"px\"},\n\t\t{height: currHeight + \"px\"},\n\t\t{opacity: \"1\"}\n\t]);\n}\n\nfunction slideClosed(domNode,options) {\n\toptions = options || {};\n\tvar duration = options.duration || $tw.utils.getAnimationDuration(),\n\t\tcurrHeight = domNode.offsetHeight;\n\t// Clear the properties we've set when the animation is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(domNode,[\n\t\t\t{transition: \"none\"},\n\t\t\t{marginBottom: \"\"},\n\t\t\t{marginTop: \"\"},\n\t\t\t{paddingBottom: \"\"},\n\t\t\t{paddingTop: \"\"},\n\t\t\t{height: \"auto\"},\n\t\t\t{opacity: \"\"}\n\t\t]);\n\t\tif(options.callback) {\n\t\t\toptions.callback();\n\t\t}\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(domNode,[\n\t\t{height: currHeight + \"px\"},\n\t\t{opacity: \"1\"}\n\t]);\n\t$tw.utils.forceLayout(domNode);\n\t// Transition to the final position\n\t$tw.utils.setStyle(domNode,[\n\t\t{transition: \"margin-top \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"padding-top \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"padding-bottom \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"height \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"opacity \" + duration + \"ms ease-in-out\"},\n\t\t{marginTop: \"0px\"},\n\t\t{marginBottom: \"0px\"},\n\t\t{paddingTop: \"0px\"},\n\t\t{paddingBottom: \"0px\"},\n\t\t{height: \"0px\"},\n\t\t{opacity: \"0\"}\n\t]);\n}\n\nexports.slide = {\n\topen: slideOpen,\n\tclose: slideClosed\n};\n\n})();\n",
"title": "$:/core/modules/utils/dom/animations/slide.js",
"type": "application/javascript",
"module-type": "animation"
},
"$:/core/modules/utils/dom/animator.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/dom/animator.js\ntype: application/javascript\nmodule-type: utils\n\nOrchestrates animations and transitions\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nfunction Animator() {\n\t// Get the registered animation modules\n\tthis.animations = {};\n\t$tw.modules.applyMethods(\"animation\",this.animations);\n}\n\nAnimator.prototype.perform = function(type,domNode,options) {\n\toptions = options || {};\n\t// Find an animation that can handle this type\n\tvar chosenAnimation;\n\t$tw.utils.each(this.animations,function(animation,name) {\n\t\tif($tw.utils.hop(animation,type)) {\n\t\t\tchosenAnimation = animation[type];\n\t\t}\n\t});\n\tif(!chosenAnimation) {\n\t\tchosenAnimation = function(domNode,options) {\n\t\t\tif(options.callback) {\n\t\t\t\toptions.callback();\n\t\t\t}\n\t\t};\n\t}\n\t// Call the animation\n\tchosenAnimation(domNode,options);\n};\n\nexports.Animator = Animator;\n\n})();\n",
"title": "$:/core/modules/utils/dom/animator.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/browser.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/dom/browser.js\ntype: application/javascript\nmodule-type: utils\n\nBrowser feature detection\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSet style properties of an element\n\telement: dom node\n\tstyles: ordered array of {name: value} pairs\n*/\nexports.setStyle = function(element,styles) {\n\tif(element.nodeType === 1) { // Element.ELEMENT_NODE\n\t\tfor(var t=0; t<styles.length; t++) {\n\t\t\tfor(var styleName in styles[t]) {\n\t\t\t\telement.style[$tw.utils.convertStyleNameToPropertyName(styleName)] = styles[t][styleName];\n\t\t\t}\n\t\t}\n\t}\n};\n\n/*\nConverts a standard CSS property name into the local browser-specific equivalent. For example:\n\t\"background-color\" --> \"backgroundColor\"\n\t\"transition\" --> \"webkitTransition\"\n*/\n\nvar styleNameCache = {}; // We'll cache the style name conversions\n\nexports.convertStyleNameToPropertyName = function(styleName) {\n\t// Return from the cache if we can\n\tif(styleNameCache[styleName]) {\n\t\treturn styleNameCache[styleName];\n\t}\n\t// Convert it by first removing any hyphens\n\tvar propertyName = $tw.utils.unHyphenateCss(styleName);\n\t// Then check if it needs a prefix\n\tif($tw.browser && document.body.style[propertyName] === undefined) {\n\t\tvar prefixes = [\"O\",\"MS\",\"Moz\",\"webkit\"];\n\t\tfor(var t=0; t<prefixes.length; t++) {\n\t\t\tvar prefixedName = prefixes[t] + propertyName.substr(0,1).toUpperCase() + propertyName.substr(1);\n\t\t\tif(document.body.style[prefixedName] !== undefined) {\n\t\t\t\tpropertyName = prefixedName;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t// Put it in the cache too\n\tstyleNameCache[styleName] = propertyName;\n\treturn propertyName;\n};\n\n/*\nConverts a JS format CSS property name back into the dashed form used in CSS declarations. For example:\n\t\"backgroundColor\" --> \"background-color\"\n\t\"webkitTransform\" --> \"-webkit-transform\"\n*/\nexports.convertPropertyNameToStyleName = function(propertyName) {\n\t// Rehyphenate the name\n\tvar styleName = $tw.utils.hyphenateCss(propertyName);\n\t// If there's a webkit prefix, add a dash (other browsers have uppercase prefixes, and so get the dash automatically)\n\tif(styleName.indexOf(\"webkit\") === 0) {\n\t\tstyleName = \"-\" + styleName;\n\t} else if(styleName.indexOf(\"-m-s\") === 0) {\n\t\tstyleName = \"-ms\" + styleName.substr(4);\n\t}\n\treturn styleName;\n};\n\n/*\nRound trip a stylename to a property name and back again. For example:\n\t\"transform\" --> \"webkitTransform\" --> \"-webkit-transform\"\n*/\nexports.roundTripPropertyName = function(propertyName) {\n\treturn $tw.utils.convertPropertyNameToStyleName($tw.utils.convertStyleNameToPropertyName(propertyName));\n};\n\n/*\nConverts a standard event name into the local browser specific equivalent. For example:\n\t\"animationEnd\" --> \"webkitAnimationEnd\"\n*/\n\nvar eventNameCache = {}; // We'll cache the conversions\n\nvar eventNameMappings = {\n\t\"transitionEnd\": {\n\t\tcorrespondingCssProperty: \"transition\",\n\t\tmappings: {\n\t\t\ttransition: \"transitionend\",\n\t\t\tOTransition: \"oTransitionEnd\",\n\t\t\tMSTransition: \"msTransitionEnd\",\n\t\t\tMozTransition: \"transitionend\",\n\t\t\twebkitTransition: \"webkitTransitionEnd\"\n\t\t}\n\t},\n\t\"animationEnd\": {\n\t\tcorrespondingCssProperty: \"animation\",\n\t\tmappings: {\n\t\t\tanimation: \"animationend\",\n\t\t\tOAnimation: \"oAnimationEnd\",\n\t\t\tMSAnimation: \"msAnimationEnd\",\n\t\t\tMozAnimation: \"animationend\",\n\t\t\twebkitAnimation: \"webkitAnimationEnd\"\n\t\t}\n\t}\n};\n\nexports.convertEventName = function(eventName) {\n\tif(eventNameCache[eventName]) {\n\t\treturn eventNameCache[eventName];\n\t}\n\tvar newEventName = eventName,\n\t\tmappings = eventNameMappings[eventName];\n\tif(mappings) {\n\t\tvar convertedProperty = $tw.utils.convertStyleNameToPropertyName(mappings.correspondingCssProperty);\n\t\tif(mappings.mappings[convertedProperty]) {\n\t\t\tnewEventName = mappings.mappings[convertedProperty];\n\t\t}\n\t}\n\t// Put it in the cache too\n\teventNameCache[eventName] = newEventName;\n\treturn newEventName;\n};\n\n/*\nReturn the names of the fullscreen APIs\n*/\nexports.getFullScreenApis = function() {\n\tvar d = document,\n\t\tdb = d.body,\n\t\tresult = {\n\t\t\"_requestFullscreen\": db.webkitRequestFullscreen !== undefined ? \"webkitRequestFullscreen\" :\n\t\t\t\t\t\t\tdb.mozRequestFullScreen !== undefined ? \"mozRequestFullScreen\" :\n\t\t\t\t\t\t\tdb.msRequestFullscreen !== undefined ? \"msRequestFullscreen\" :\n\t\t\t\t\t\t\tdb.requestFullscreen !== undefined ? \"requestFullscreen\" : \"\",\n\t\t\"_exitFullscreen\": d.webkitExitFullscreen !== undefined ? \"webkitExitFullscreen\" :\n\t\t\t\t\t\t\td.mozCancelFullScreen !== undefined ? \"mozCancelFullScreen\" :\n\t\t\t\t\t\t\td.msExitFullscreen !== undefined ? \"msExitFullscreen\" :\n\t\t\t\t\t\t\td.exitFullscreen !== undefined ? \"exitFullscreen\" : \"\",\n\t\t\"_fullscreenElement\": d.webkitFullscreenElement !== undefined ? \"webkitFullscreenElement\" :\n\t\t\t\t\t\t\td.mozFullScreenElement !== undefined ? \"mozFullScreenElement\" :\n\t\t\t\t\t\t\td.msFullscreenElement !== undefined ? \"msFullscreenElement\" :\n\t\t\t\t\t\t\td.fullscreenElement !== undefined ? \"fullscreenElement\" : \"\",\n\t\t\"_fullscreenChange\": d.webkitFullscreenElement !== undefined ? \"webkitfullscreenchange\" :\n\t\t\t\t\t\t\td.mozFullScreenElement !== undefined ? \"mozfullscreenchange\" :\n\t\t\t\t\t\t\td.msFullscreenElement !== undefined ? \"MSFullscreenChange\" :\n\t\t\t\t\t\t\td.fullscreenElement !== undefined ? \"fullscreenchange\" : \"\"\n\t};\n\tif(!result._requestFullscreen || !result._exitFullscreen || !result._fullscreenElement || !result._fullscreenChange) {\n\t\treturn null;\n\t} else {\n\t\treturn result;\n\t}\n};\n\n})();\n",
"title": "$:/core/modules/utils/dom/browser.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/csscolorparser.js": {
"text": "// (c) Dean McNamee <[email protected]>, 2012.\n//\n// https://github.com/deanm/css-color-parser-js\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n\n// http://www.w3.org/TR/css3-color/\nvar kCSSColorTable = {\n \"transparent\": [0,0,0,0], \"aliceblue\": [240,248,255,1],\n \"antiquewhite\": [250,235,215,1], \"aqua\": [0,255,255,1],\n \"aquamarine\": [127,255,212,1], \"azure\": [240,255,255,1],\n \"beige\": [245,245,220,1], \"bisque\": [255,228,196,1],\n \"black\": [0,0,0,1], \"blanchedalmond\": [255,235,205,1],\n \"blue\": [0,0,255,1], \"blueviolet\": [138,43,226,1],\n \"brown\": [165,42,42,1], \"burlywood\": [222,184,135,1],\n \"cadetblue\": [95,158,160,1], \"chartreuse\": [127,255,0,1],\n \"chocolate\": [210,105,30,1], \"coral\": [255,127,80,1],\n \"cornflowerblue\": [100,149,237,1], \"cornsilk\": [255,248,220,1],\n \"crimson\": [220,20,60,1], \"cyan\": [0,255,255,1],\n \"darkblue\": [0,0,139,1], \"darkcyan\": [0,139,139,1],\n \"darkgoldenrod\": [184,134,11,1], \"darkgray\": [169,169,169,1],\n \"darkgreen\": [0,100,0,1], \"darkgrey\": [169,169,169,1],\n \"darkkhaki\": [189,183,107,1], \"darkmagenta\": [139,0,139,1],\n \"darkolivegreen\": [85,107,47,1], \"darkorange\": [255,140,0,1],\n \"darkorchid\": [153,50,204,1], \"darkred\": [139,0,0,1],\n \"darksalmon\": [233,150,122,1], \"darkseagreen\": [143,188,143,1],\n \"darkslateblue\": [72,61,139,1], \"darkslategray\": [47,79,79,1],\n \"darkslategrey\": [47,79,79,1], \"darkturquoise\": [0,206,209,1],\n \"darkviolet\": [148,0,211,1], \"deeppink\": [255,20,147,1],\n \"deepskyblue\": [0,191,255,1], \"dimgray\": [105,105,105,1],\n \"dimgrey\": [105,105,105,1], \"dodgerblue\": [30,144,255,1],\n \"firebrick\": [178,34,34,1], \"floralwhite\": [255,250,240,1],\n \"forestgreen\": [34,139,34,1], \"fuchsia\": [255,0,255,1],\n \"gainsboro\": [220,220,220,1], \"ghostwhite\": [248,248,255,1],\n \"gold\": [255,215,0,1], \"goldenrod\": [218,165,32,1],\n \"gray\": [128,128,128,1], \"green\": [0,128,0,1],\n \"greenyellow\": [173,255,47,1], \"grey\": [128,128,128,1],\n \"honeydew\": [240,255,240,1], \"hotpink\": [255,105,180,1],\n \"indianred\": [205,92,92,1], \"indigo\": [75,0,130,1],\n \"ivory\": [255,255,240,1], \"khaki\": [240,230,140,1],\n \"lavender\": [230,230,250,1], \"lavenderblush\": [255,240,245,1],\n \"lawngreen\": [124,252,0,1], \"lemonchiffon\": [255,250,205,1],\n \"lightblue\": [173,216,230,1], \"lightcoral\": [240,128,128,1],\n \"lightcyan\": [224,255,255,1], \"lightgoldenrodyellow\": [250,250,210,1],\n \"lightgray\": [211,211,211,1], \"lightgreen\": [144,238,144,1],\n \"lightgrey\": [211,211,211,1], \"lightpink\": [255,182,193,1],\n \"lightsalmon\": [255,160,122,1], \"lightseagreen\": [32,178,170,1],\n \"lightskyblue\": [135,206,250,1], \"lightslategray\": [119,136,153,1],\n \"lightslategrey\": [119,136,153,1], \"lightsteelblue\": [176,196,222,1],\n \"lightyellow\": [255,255,224,1], \"lime\": [0,255,0,1],\n \"limegreen\": [50,205,50,1], \"linen\": [250,240,230,1],\n \"magenta\": [255,0,255,1], \"maroon\": [128,0,0,1],\n \"mediumaquamarine\": [102,205,170,1], \"mediumblue\": [0,0,205,1],\n \"mediumorchid\": [186,85,211,1], \"mediumpurple\": [147,112,219,1],\n \"mediumseagreen\": [60,179,113,1], \"mediumslateblue\": [123,104,238,1],\n \"mediumspringgreen\": [0,250,154,1], \"mediumturquoise\": [72,209,204,1],\n \"mediumvioletred\": [199,21,133,1], \"midnightblue\": [25,25,112,1],\n \"mintcream\": [245,255,250,1], \"mistyrose\": [255,228,225,1],\n \"moccasin\": [255,228,181,1], \"navajowhite\": [255,222,173,1],\n \"navy\": [0,0,128,1], \"oldlace\": [253,245,230,1],\n \"olive\": [128,128,0,1], \"olivedrab\": [107,142,35,1],\n \"orange\": [255,165,0,1], \"orangered\": [255,69,0,1],\n \"orchid\": [218,112,214,1], \"palegoldenrod\": [238,232,170,1],\n \"palegreen\": [152,251,152,1], \"paleturquoise\": [175,238,238,1],\n \"palevioletred\": [219,112,147,1], \"papayawhip\": [255,239,213,1],\n \"peachpuff\": [255,218,185,1], \"peru\": [205,133,63,1],\n \"pink\": [255,192,203,1], \"plum\": [221,160,221,1],\n \"powderblue\": [176,224,230,1], \"purple\": [128,0,128,1],\n \"red\": [255,0,0,1], \"rosybrown\": [188,143,143,1],\n \"royalblue\": [65,105,225,1], \"saddlebrown\": [139,69,19,1],\n \"salmon\": [250,128,114,1], \"sandybrown\": [244,164,96,1],\n \"seagreen\": [46,139,87,1], \"seashell\": [255,245,238,1],\n \"sienna\": [160,82,45,1], \"silver\": [192,192,192,1],\n \"skyblue\": [135,206,235,1], \"slateblue\": [106,90,205,1],\n \"slategray\": [112,128,144,1], \"slategrey\": [112,128,144,1],\n \"snow\": [255,250,250,1], \"springgreen\": [0,255,127,1],\n \"steelblue\": [70,130,180,1], \"tan\": [210,180,140,1],\n \"teal\": [0,128,128,1], \"thistle\": [216,191,216,1],\n \"tomato\": [255,99,71,1], \"turquoise\": [64,224,208,1],\n \"violet\": [238,130,238,1], \"wheat\": [245,222,179,1],\n \"white\": [255,255,255,1], \"whitesmoke\": [245,245,245,1],\n \"yellow\": [255,255,0,1], \"yellowgreen\": [154,205,50,1]}\n\nfunction clamp_css_byte(i) { // Clamp to integer 0 .. 255.\n i = Math.round(i); // Seems to be what Chrome does (vs truncation).\n return i < 0 ? 0 : i > 255 ? 255 : i;\n}\n\nfunction clamp_css_float(f) { // Clamp to float 0.0 .. 1.0.\n return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parse_css_int(str) { // int or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_byte(parseFloat(str) / 100 * 255);\n return clamp_css_byte(parseInt(str));\n}\n\nfunction parse_css_float(str) { // float or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_float(parseFloat(str) / 100);\n return clamp_css_float(parseFloat(str));\n}\n\nfunction css_hue_to_rgb(m1, m2, h) {\n if (h < 0) h += 1;\n else if (h > 1) h -= 1;\n\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\n if (h * 2 < 1) return m2;\n if (h * 3 < 2) return m1 + (m2 - m1) * (2/3 - h) * 6;\n return m1;\n}\n\nfunction parseCSSColor(css_str) {\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = css_str.replace(/ /g, '').toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in kCSSColorTable) return kCSSColorTable[str].slice(); // dup.\n\n // #abc and #abc123 syntax.\n if (str[0] === '#') {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) return null; // Covers NaN.\n return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 1];\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) return null; // Covers NaN.\n return [(iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n iv & 0xff,\n 1];\n }\n\n return null;\n }\n\n var op = str.indexOf('('), ep = str.indexOf(')');\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op+1, ep-(op+1)).split(',');\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n case 'rgba':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'rgb':\n if (params.length !== 3) return null;\n return [parse_css_int(params[0]),\n parse_css_int(params[1]),\n parse_css_int(params[2]),\n alpha];\n case 'hsla':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'hsl':\n if (params.length !== 3) return null;\n var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parse_css_float(params[1]);\n var l = parse_css_float(params[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n return [clamp_css_byte(css_hue_to_rgb(m1, m2, h+1/3) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\n alpha];\n default:\n return null;\n }\n }\n\n return null;\n}\n\ntry { exports.parseCSSColor = parseCSSColor } catch(e) { }\n",
"title": "$:/core/modules/utils/dom/csscolorparser.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/dom.js\ntype: application/javascript\nmodule-type: utils\n\nVarious static DOM-related utility functions.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nDetermines whether element 'a' contains element 'b'\nCode thanks to John Resig, http://ejohn.org/blog/comparing-document-position/\n*/\nexports.domContains = function(a,b) {\n\treturn a.contains ?\n\t\ta !== b && a.contains(b) :\n\t\t!!(a.compareDocumentPosition(b) & 16);\n};\n\nexports.removeChildren = function(node) {\n\twhile(node.hasChildNodes()) {\n\t\tnode.removeChild(node.firstChild);\n\t}\n};\n\nexports.hasClass = function(el,className) {\n\treturn el && el.className && el.className.toString().split(\" \").indexOf(className) !== -1;\n};\n\nexports.addClass = function(el,className) {\n\tvar c = el.className.split(\" \");\n\tif(c.indexOf(className) === -1) {\n\t\tc.push(className);\n\t}\n\tel.className = c.join(\" \");\n};\n\nexports.removeClass = function(el,className) {\n\tvar c = el.className.split(\" \"),\n\t\tp = c.indexOf(className);\n\tif(p !== -1) {\n\t\tc.splice(p,1);\n\t\tel.className = c.join(\" \");\n\t}\n};\n\nexports.toggleClass = function(el,className,status) {\n\tif(status === undefined) {\n\t\tstatus = !exports.hasClass(el,className);\n\t}\n\tif(status) {\n\t\texports.addClass(el,className);\n\t} else {\n\t\texports.removeClass(el,className);\n\t}\n};\n\n/*\nGet the scroll position of the viewport\nReturns:\n\t{\n\t\tx: horizontal scroll position in pixels,\n\t\ty: vertical scroll position in pixels\n\t}\n*/\nexports.getScrollPosition = function() {\n\tif(\"scrollX\" in window) {\n\t\treturn {x: window.scrollX, y: window.scrollY};\n\t} else {\n\t\treturn {x: document.documentElement.scrollLeft, y: document.documentElement.scrollTop};\n\t}\n};\n\n/*\nGets the bounding rectangle of an element in absolute page coordinates\n*/\nexports.getBoundingPageRect = function(element) {\n\tvar scrollPos = $tw.utils.getScrollPosition(),\n\t\tclientRect = element.getBoundingClientRect();\n\treturn {\n\t\tleft: clientRect.left + scrollPos.x,\n\t\twidth: clientRect.width,\n\t\tright: clientRect.right + scrollPos.x,\n\t\ttop: clientRect.top + scrollPos.y,\n\t\theight: clientRect.height,\n\t\tbottom: clientRect.bottom + scrollPos.y\n\t};\n};\n\n/*\nSaves a named password in the browser\n*/\nexports.savePassword = function(name,password) {\n\ttry {\n\t\tif(window.localStorage) {\n\t\t\tlocalStorage.setItem(\"tw5-password-\" + name,password);\n\t\t}\n\t} catch(e) {\n\t}\n};\n\n/*\nRetrieve a named password from the browser\n*/\nexports.getPassword = function(name) {\n\ttry {\n\t\treturn window.localStorage ? localStorage.getItem(\"tw5-password-\" + name) : \"\";\n\t} catch(e) {\n\t\treturn \"\";\n\t}\n};\n\n/*\nForce layout of a dom node and its descendents\n*/\nexports.forceLayout = function(element) {\n\tvar dummy = element.offsetWidth;\n};\n\n/*\nPulse an element for debugging purposes\n*/\nexports.pulseElement = function(element) {\n\t// Event handler to remove the class at the end\n\telement.addEventListener($tw.browser.animationEnd,function handler(event) {\n\t\telement.removeEventListener($tw.browser.animationEnd,handler,false);\n\t\t$tw.utils.removeClass(element,\"pulse\");\n\t},false);\n\t// Apply the pulse class\n\t$tw.utils.removeClass(element,\"pulse\");\n\t$tw.utils.forceLayout(element);\n\t$tw.utils.addClass(element,\"pulse\");\n};\n\n/*\nAttach specified event handlers to a DOM node\ndomNode: where to attach the event handlers\nevents: array of event handlers to be added (see below)\nEach entry in the events array is an object with these properties:\nhandlerFunction: optional event handler function\nhandlerObject: optional event handler object\nhandlerMethod: optionally specifies object handler method name (defaults to `handleEvent`)\n*/\nexports.addEventListeners = function(domNode,events) {\n\t$tw.utils.each(events,function(eventInfo) {\n\t\tvar handler;\n\t\tif(eventInfo.handlerFunction) {\n\t\t\thandler = eventInfo.handlerFunction;\n\t\t} else if(eventInfo.handlerObject) {\n\t\t\tif(eventInfo.handlerMethod) {\n\t\t\t\thandler = function(event) {\n\t\t\t\t\teventInfo.handlerObject[eventInfo.handlerMethod].call(eventInfo.handlerObject,event);\n\t\t\t\t};\t\n\t\t\t} else {\n\t\t\t\thandler = eventInfo.handlerObject;\n\t\t\t}\n\t\t}\n\t\tdomNode.addEventListener(eventInfo.name,handler,false);\n\t});\n};\n\n\n})();\n",
"title": "$:/core/modules/utils/dom.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/http.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/dom/http.js\ntype: application/javascript\nmodule-type: utils\n\nBrowser HTTP support\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nA quick and dirty HTTP function; to be refactored later. Options are:\n\turl: URL to retrieve\n\ttype: GET, PUT, POST etc\n\tcallback: function invoked with (err,data)\n*/\nexports.httpRequest = function(options) {\n\tvar type = options.type || \"GET\",\n\t\theaders = options.headers || {accept: \"application/json\"},\n\t\trequest = new XMLHttpRequest(),\n\t\tdata = \"\",\n\t\tf,results;\n\t// Massage the data hashmap into a string\n\tif(options.data) {\n\t\tif(typeof options.data === \"string\") { // Already a string\n\t\t\tdata = options.data;\n\t\t} else { // A hashmap of strings\n\t\t\tresults = [];\n\t\t\t$tw.utils.each(options.data,function(dataItem,dataItemTitle) {\n\t\t\t\tresults.push(dataItemTitle + \"=\" + encodeURIComponent(dataItem));\n\t\t\t});\n\t\t\tdata = results.join(\"&\");\n\t\t}\n\t}\n\t// Set up the state change handler\n\trequest.onreadystatechange = function() {\n\t\tif(this.readyState === 4) {\n\t\t\tif(this.status === 200 || this.status === 201 || this.status === 204) {\n\t\t\t\t// Success!\n\t\t\t\toptions.callback(null,this.responseText,this);\n\t\t\t\treturn;\n\t\t\t}\n\t\t// Something went wrong\n\t\toptions.callback(\"XMLHttpRequest error code: \" + this.status);\n\t\t}\n\t};\n\t// Make the request\n\trequest.open(type,options.url,true);\n\tif(headers) {\n\t\t$tw.utils.each(headers,function(header,headerTitle,object) {\n\t\t\trequest.setRequestHeader(headerTitle,header);\n\t\t});\n\t}\n\tif(data && !$tw.utils.hop(headers,\"Content-type\")) {\n\t\trequest.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded; charset=UTF-8\");\n\t}\n\ttry {\n\t\trequest.send(data);\n\t} catch(e) {\n\t\toptions.callback(e);\n\t}\n\treturn request;\n};\n\n})();\n",
"title": "$:/core/modules/utils/dom/http.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/keyboard.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/dom/keyboard.js\ntype: application/javascript\nmodule-type: utils\n\nKeyboard utilities\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar namedKeys = {\n\t\"backspace\": 8,\n\t\"tab\": 9,\n\t\"enter\": 13,\n\t\"escape\": 27\n};\n\n/*\nParses a key descriptor into the structure:\n{\n\tkeyCode: numeric keycode\n\tshiftKey: boolean\n\taltKey: boolean\n\tctrlKey: boolean\n}\nKey descriptors have the following format:\n\tctrl+enter\n\tctrl+shift+alt+A\n*/\nexports.parseKeyDescriptor = function(keyDescriptor) {\n\tvar components = keyDescriptor.split(\"+\"),\n\t\tinfo = {\n\t\t\tkeyCode: 0,\n\t\t\tshiftKey: false,\n\t\t\taltKey: false,\n\t\t\tctrlKey: false\n\t\t};\n\tfor(var t=0; t<components.length; t++) {\n\t\tvar s = components[t].toLowerCase();\n\t\t// Look for modifier keys\n\t\tif(s === \"ctrl\") {\n\t\t\tinfo.ctrlKey = true;\n\t\t} else if(s === \"shift\") {\n\t\t\tinfo.shiftKey = true;\n\t\t} else if(s === \"alt\") {\n\t\t\tinfo.altKey = true;\n\t\t} else if(s === \"meta\") {\n\t\t\tinfo.metaKey = true;\n\t\t}\n\t\t// Replace named keys with their code\n\t\tif(namedKeys[s]) {\n\t\t\tinfo.keyCode = namedKeys[s];\n\t\t}\n\t}\n\treturn info;\n};\n\nexports.checkKeyDescriptor = function(event,keyInfo) {\n\tvar metaKeyStatus = !!keyInfo.metaKey; // Using a temporary variable to keep JSHint happy\n\treturn event.keyCode === keyInfo.keyCode && \n\t\t\tevent.shiftKey === keyInfo.shiftKey && \n\t\t\tevent.altKey === keyInfo.altKey && \n\t\t\tevent.ctrlKey === keyInfo.ctrlKey && \n\t\t\tevent.metaKey === metaKeyStatus;\t\n};\n\n})();\n",
"title": "$:/core/modules/utils/dom/keyboard.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/modal.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/dom/modal.js\ntype: application/javascript\nmodule-type: utils\n\nModal message mechanism\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nvar Modal = function(wiki) {\n\tthis.wiki = wiki;\n\tthis.modalCount = 0;\n};\n\n/*\nDisplay a modal dialogue\n\ttitle: Title of tiddler to display\n\toptions: see below\nOptions include:\n\tdownloadLink: Text of a big download link to include\n*/\nModal.prototype.display = function(title,options) {\n\toptions = options || {};\n\tvar self = this,\n\t\trefreshHandler,\n\t\tduration = $tw.utils.getAnimationDuration(),\n\t\ttiddler = this.wiki.getTiddler(title);\n\t// Don't do anything if the tiddler doesn't exist\n\tif(!tiddler) {\n\t\treturn;\n\t}\n\t// Create the variables\n\tvar variables = $tw.utils.extend({currentTiddler: title},options.variables);\n\t// Create the wrapper divs\n\tvar wrapper = document.createElement(\"div\"),\n\t\tmodalBackdrop = document.createElement(\"div\"),\n\t\tmodalWrapper = document.createElement(\"div\"),\n\t\tmodalHeader = document.createElement(\"div\"),\n\t\theaderTitle = document.createElement(\"h3\"),\n\t\tmodalBody = document.createElement(\"div\"),\n\t\tmodalLink = document.createElement(\"a\"),\n\t\tmodalFooter = document.createElement(\"div\"),\n\t\tmodalFooterHelp = document.createElement(\"span\"),\n\t\tmodalFooterButtons = document.createElement(\"span\");\n\t// Up the modal count and adjust the body class\n\tthis.modalCount++;\n\tthis.adjustPageClass();\n\t// Add classes\n\t$tw.utils.addClass(wrapper,\"tc-modal-wrapper\");\n\t$tw.utils.addClass(modalBackdrop,\"tc-modal-backdrop\");\n\t$tw.utils.addClass(modalWrapper,\"tc-modal\");\n\t$tw.utils.addClass(modalHeader,\"tc-modal-header\");\n\t$tw.utils.addClass(modalBody,\"tc-modal-body\");\n\t$tw.utils.addClass(modalFooter,\"tc-modal-footer\");\n\t// Join them together\n\twrapper.appendChild(modalBackdrop);\n\twrapper.appendChild(modalWrapper);\n\tmodalHeader.appendChild(headerTitle);\n\tmodalWrapper.appendChild(modalHeader);\n\tmodalWrapper.appendChild(modalBody);\n\tmodalFooter.appendChild(modalFooterHelp);\n\tmodalFooter.appendChild(modalFooterButtons);\n\tmodalWrapper.appendChild(modalFooter);\n\t// Render the title of the message\n\tvar headerWidgetNode = this.wiki.makeTranscludeWidget(title,{\n\t\tfield: \"subtitle\",\n\t\tmode: \"inline\",\n\t\tchildren: [{\n\t\t\ttype: \"text\",\n\t\t\tattributes: {\n\t\t\t\ttext: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tvalue: title\n\t\t}}}],\n\t\tparentWidget: $tw.rootWidget,\n\t\tdocument: document,\n\t\tvariables: variables\n\t});\n\theaderWidgetNode.render(headerTitle,null);\n\t// Render the body of the message\n\tvar bodyWidgetNode = this.wiki.makeTranscludeWidget(title,{\n\t\tparentWidget: $tw.rootWidget,\n\t\tdocument: document,\n\t\tvariables: variables\n\t});\n\tbodyWidgetNode.render(modalBody,null);\n\t// Setup the link if present\n\tif(options.downloadLink) {\n\t\tmodalLink.href = options.downloadLink;\n\t\tmodalLink.appendChild(document.createTextNode(\"Right-click to save changes\"));\n\t\tmodalBody.appendChild(modalLink);\n\t}\n\t// Render the footer of the message\n\tif(tiddler && tiddler.fields && tiddler.fields.help) {\n\t\tvar link = document.createElement(\"a\");\n\t\tlink.setAttribute(\"href\",tiddler.fields.help);\n\t\tlink.setAttribute(\"target\",\"_blank\");\n\t\tlink.appendChild(document.createTextNode(\"Help\"));\n\t\tmodalFooterHelp.appendChild(link);\n\t\tmodalFooterHelp.style.float = \"left\";\n\t}\n\tvar footerWidgetNode = this.wiki.makeTranscludeWidget(title,{\n\t\tfield: \"footer\",\n\t\tmode: \"inline\",\n\t\tchildren: [{\n\t\t\ttype: \"button\",\n\t\t\tattributes: {\n\t\t\t\tmessage: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tvalue: \"tm-close-tiddler\"\n\t\t\t\t}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \"text\",\n\t\t\t\tattributes: {\n\t\t\t\t\ttext: {\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tvalue: \"Close\"\n\t\t\t}}}\n\t\t]}],\n\t\tparentWidget: $tw.rootWidget,\n\t\tdocument: document,\n\t\tvariables: variables\n\t});\n\tfooterWidgetNode.render(modalFooterButtons,null);\n\t// Set up the refresh handler\n\trefreshHandler = function(changes) {\n\t\theaderWidgetNode.refresh(changes,modalHeader,null);\n\t\tbodyWidgetNode.refresh(changes,modalBody,null);\n\t\tfooterWidgetNode.refresh(changes,modalFooterButtons,null);\n\t};\n\tthis.wiki.addEventListener(\"change\",refreshHandler);\n\t// Add the close event handler\n\tvar closeHandler = function(event) {\n\t\t// Remove our refresh handler\n\t\tself.wiki.removeEventListener(\"change\",refreshHandler);\n\t\t// Decrease the modal count and adjust the body class\n\t\tself.modalCount--;\n\t\tself.adjustPageClass();\n\t\t// Force layout and animate the modal message away\n\t\t$tw.utils.forceLayout(modalBackdrop);\n\t\t$tw.utils.forceLayout(modalWrapper);\n\t\t$tw.utils.setStyle(modalBackdrop,[\n\t\t\t{opacity: \"0\"}\n\t\t]);\n\t\t$tw.utils.setStyle(modalWrapper,[\n\t\t\t{transform: \"translateY(\" + window.innerHeight + \"px)\"}\n\t\t]);\n\t\t// Set up an event for the transition end\n\t\twindow.setTimeout(function() {\n\t\t\tif(wrapper.parentNode) {\n\t\t\t\t// Remove the modal message from the DOM\n\t\t\t\tdocument.body.removeChild(wrapper);\n\t\t\t}\n\t\t},duration);\n\t\t// Don't let anyone else handle the tm-close-tiddler message\n\t\treturn false;\n\t};\n\theaderWidgetNode.addEventListener(\"tm-close-tiddler\",closeHandler,false);\n\tbodyWidgetNode.addEventListener(\"tm-close-tiddler\",closeHandler,false);\n\tfooterWidgetNode.addEventListener(\"tm-close-tiddler\",closeHandler,false);\n\t// Set the initial styles for the message\n\t$tw.utils.setStyle(modalBackdrop,[\n\t\t{opacity: \"0\"}\n\t]);\n\t$tw.utils.setStyle(modalWrapper,[\n\t\t{transformOrigin: \"0% 0%\"},\n\t\t{transform: \"translateY(\" + (-window.innerHeight) + \"px)\"}\n\t]);\n\t// Put the message into the document\n\tdocument.body.appendChild(wrapper);\n\t// Set up animation for the styles\n\t$tw.utils.setStyle(modalBackdrop,[\n\t\t{transition: \"opacity \" + duration + \"ms ease-out\"}\n\t]);\n\t$tw.utils.setStyle(modalWrapper,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms ease-in-out\"}\n\t]);\n\t// Force layout\n\t$tw.utils.forceLayout(modalBackdrop);\n\t$tw.utils.forceLayout(modalWrapper);\n\t// Set final animated styles\n\t$tw.utils.setStyle(modalBackdrop,[\n\t\t{opacity: \"0.7\"}\n\t]);\n\t$tw.utils.setStyle(modalWrapper,[\n\t\t{transform: \"translateY(0px)\"}\n\t]);\n};\n\nModal.prototype.adjustPageClass = function() {\n\tif($tw.pageContainer) {\n\t\t$tw.utils.toggleClass($tw.pageContainer,\"tc-modal-displayed\",this.modalCount > 0);\n\t}\n};\n\nexports.Modal = Modal;\n\n})();\n",
"title": "$:/core/modules/utils/dom/modal.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/notifier.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/dom/notifier.js\ntype: application/javascript\nmodule-type: utils\n\nNotifier mechanism\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nvar Notifier = function(wiki) {\n\tthis.wiki = wiki;\n};\n\n/*\nDisplay a notification\n\ttitle: Title of tiddler containing the notification text\n\toptions: see below\nOptions include:\n*/\nNotifier.prototype.display = function(title,options) {\n\toptions = options || {};\n\t// Create the wrapper divs\n\tvar self = this,\n\t\tnotification = document.createElement(\"div\"),\n\t\ttiddler = this.wiki.getTiddler(title),\n\t\tduration = $tw.utils.getAnimationDuration(),\n\t\trefreshHandler;\n\t// Don't do anything if the tiddler doesn't exist\n\tif(!tiddler) {\n\t\treturn;\n\t}\n\t// Add classes\n\t$tw.utils.addClass(notification,\"tc-notification\");\n\t// Create the variables\n\tvar variables = $tw.utils.extend({currentTiddler: title},options.variables);\n\t// Render the body of the notification\n\tvar widgetNode = this.wiki.makeTranscludeWidget(title,{parentWidget: $tw.rootWidget, document: document, variables: variables});\n\twidgetNode.render(notification,null);\n\trefreshHandler = function(changes) {\n\t\twidgetNode.refresh(changes,notification,null);\n\t};\n\tthis.wiki.addEventListener(\"change\",refreshHandler);\n\t// Set the initial styles for the notification\n\t$tw.utils.setStyle(notification,[\n\t\t{opacity: \"0\"},\n\t\t{transformOrigin: \"0% 0%\"},\n\t\t{transform: \"translateY(\" + (-window.innerHeight) + \"px)\"},\n\t\t{transition: \"opacity \" + duration + \"ms ease-out, \" + $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms ease-in-out\"}\n\t]);\n\t// Add the notification to the DOM\n\tdocument.body.appendChild(notification);\n\t// Force layout\n\t$tw.utils.forceLayout(notification);\n\t// Set final animated styles\n\t$tw.utils.setStyle(notification,[\n\t\t{opacity: \"1.0\"},\n\t\t{transform: \"translateY(0px)\"}\n\t]);\n\t// Set a timer to remove the notification\n\twindow.setTimeout(function() {\n\t\t// Remove our change event handler\n\t\tself.wiki.removeEventListener(\"change\",refreshHandler);\n\t\t// Force layout and animate the notification away\n\t\t$tw.utils.forceLayout(notification);\n\t\t$tw.utils.setStyle(notification,[\n\t\t\t{opacity: \"0.0\"},\n\t\t\t{transform: \"translateX(\" + (notification.offsetWidth) + \"px)\"}\n\t\t]);\n\t\t// Remove the modal message from the DOM once the transition ends\n\t\tsetTimeout(function() {\n\t\t\tif(notification.parentNode) {\n\t\t\t\tdocument.body.removeChild(notification);\n\t\t\t}\n\t\t},duration);\n\t},$tw.config.preferences.notificationDuration);\n};\n\nexports.Notifier = Notifier;\n\n})();\n",
"title": "$:/core/modules/utils/dom/notifier.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/popup.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/dom/popup.js\ntype: application/javascript\nmodule-type: utils\n\nModule that creates a $tw.utils.Popup object prototype that manages popups in the browser\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nCreates a Popup object with these options:\n\trootElement: the DOM element to which the popup zapper should be attached\n*/\nvar Popup = function(options) {\n\toptions = options || {};\n\tthis.rootElement = options.rootElement || document.documentElement;\n\tthis.popups = []; // Array of {title:,wiki:,domNode:} objects\n};\n\n/*\nTrigger a popup open or closed. Parameters are in a hashmap:\n\ttitle: title of the tiddler where the popup details are stored\n\tdomNode: dom node to which the popup will be positioned\n\twiki: wiki\n\tforce: if specified, forces the popup state to true or false (instead of toggling it)\n*/\nPopup.prototype.triggerPopup = function(options) {\n\t// Check if this popup is already active\n\tvar index = this.findPopup(options.title);\n\t// Compute the new state\n\tvar state = index === -1;\n\tif(options.force !== undefined) {\n\t\tstate = options.force;\n\t}\n\t// Show or cancel the popup according to the new state\n\tif(state) {\n\t\tthis.show(options);\n\t} else {\n\t\tthis.cancel(index);\n\t}\n};\n\nPopup.prototype.findPopup = function(title) {\n\tvar index = -1;\n\tfor(var t=0; t<this.popups.length; t++) {\n\t\tif(this.popups[t].title === title) {\n\t\t\tindex = t;\n\t\t}\n\t}\n\treturn index;\n};\n\nPopup.prototype.handleEvent = function(event) {\n\tif(event.type === \"click\") {\n\t\t// Find out what was clicked on\n\t\tvar info = this.popupInfo(event.target),\n\t\t\tcancelLevel = info.popupLevel - 1;\n\t\t// Don't remove the level that was clicked on if we clicked on a handle\n\t\tif(info.isHandle) {\n\t\t\tcancelLevel++;\n\t\t}\n\t\t// Cancel\n\t\tthis.cancel(cancelLevel);\n\t}\n};\n\n/*\nFind the popup level containing a DOM node. Returns:\npopupLevel: count of the number of nested popups containing the specified element\nisHandle: true if the specified element is within a popup handle\n*/\nPopup.prototype.popupInfo = function(domNode) {\n\tvar isHandle = false,\n\t\tpopupCount = 0,\n\t\tnode = domNode;\n\t// First check ancestors to see if we're within a popup handle\n\twhile(node) {\n\t\tif($tw.utils.hasClass(node,\"tc-popup-handle\")) {\n\t\t\tisHandle = true;\n\t\t\tpopupCount++;\n\t\t}\n\t\tif($tw.utils.hasClass(node,\"tc-popup-keep\")) {\n\t\t\tisHandle = true;\n\t\t}\n\t\tnode = node.parentNode;\n\t}\n\t// Then count the number of ancestor popups\n\tnode = domNode;\n\twhile(node) {\n\t\tif($tw.utils.hasClass(node,\"tc-popup\")) {\n\t\t\tpopupCount++;\n\t\t}\n\t\tnode = node.parentNode;\n\t}\n\tvar info = {\n\t\tpopupLevel: popupCount,\n\t\tisHandle: isHandle\n\t};\n\treturn info;\n};\n\n/*\nDisplay a popup by adding it to the stack\n*/\nPopup.prototype.show = function(options) {\n\t// Find out what was clicked on\n\tvar info = this.popupInfo(options.domNode);\n\t// Cancel any higher level popups\n\tthis.cancel(info.popupLevel);\n\t// Store the popup details if not already there\n\tif(this.findPopup(options.title) === -1) {\n\t\tthis.popups.push({\n\t\t\ttitle: options.title,\n\t\t\twiki: options.wiki,\n\t\t\tdomNode: options.domNode\n\t\t});\n\t}\n\t// Set the state tiddler\n\toptions.wiki.setTextReference(options.title,\n\t\t\t\"(\" + options.domNode.offsetLeft + \",\" + options.domNode.offsetTop + \",\" + \n\t\t\t\toptions.domNode.offsetWidth + \",\" + options.domNode.offsetHeight + \")\");\n\t// Add the click handler if we have any popups\n\tif(this.popups.length > 0) {\n\t\tthis.rootElement.addEventListener(\"click\",this,true);\t\t\n\t}\n};\n\n/*\nCancel all popups at or above a specified level or DOM node\nlevel: popup level to cancel (0 cancels all popups)\n*/\nPopup.prototype.cancel = function(level) {\n\tvar numPopups = this.popups.length;\n\tlevel = Math.max(0,Math.min(level,numPopups));\n\tfor(var t=level; t<numPopups; t++) {\n\t\tvar popup = this.popups.pop();\n\t\tif(popup.title) {\n\t\t\tpopup.wiki.deleteTiddler(popup.title);\n\t\t}\n\t}\n\tif(this.popups.length === 0) {\n\t\tthis.rootElement.removeEventListener(\"click\",this,false);\n\t}\n};\n\n/*\nReturns true if the specified title and text identifies an active popup\n*/\nPopup.prototype.readPopupState = function(text) {\n\tvar popupLocationRegExp = /^\\((-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+)\\)$/;\n\treturn popupLocationRegExp.test(text);\n};\n\nexports.Popup = Popup;\n\n})();\n",
"title": "$:/core/modules/utils/dom/popup.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/scroller.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/dom/scroller.js\ntype: application/javascript\nmodule-type: utils\n\nModule that creates a $tw.utils.Scroller object prototype that manages scrolling in the browser\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nEvent handler for when the `tm-scroll` event hits the document body\n*/\nvar PageScroller = function() {\n\tthis.idRequestFrame = null;\n\tthis.requestAnimationFrame = window.requestAnimationFrame ||\n\t\twindow.webkitRequestAnimationFrame ||\n\t\twindow.mozRequestAnimationFrame ||\n\t\tfunction(callback) {\n\t\t\treturn window.setTimeout(callback, 1000/60);\n\t\t};\n\tthis.cancelAnimationFrame = window.cancelAnimationFrame ||\n\t\twindow.webkitCancelAnimationFrame ||\n\t\twindow.webkitCancelRequestAnimationFrame ||\n\t\twindow.mozCancelAnimationFrame ||\n\t\twindow.mozCancelRequestAnimationFrame ||\n\t\tfunction(id) {\n\t\t\twindow.clearTimeout(id);\n\t\t};\n};\n\nPageScroller.prototype.cancelScroll = function() {\n\tif(this.idRequestFrame) {\n\t\tthis.cancelAnimationFrame.call(window,this.idRequestFrame);\n\t\tthis.idRequestFrame = null;\n\t}\n};\n\n/*\nHandle an event\n*/\nPageScroller.prototype.handleEvent = function(event) {\n\tif(event.type === \"tm-scroll\") {\n\t\treturn this.scrollIntoView(event.target);\n\t}\n\treturn true;\n};\n\n/*\nHandle a scroll event hitting the page document\n*/\nPageScroller.prototype.scrollIntoView = function(element) {\n\tvar duration = $tw.utils.getAnimationDuration();\n\t// Now get ready to scroll the body\n\tthis.cancelScroll();\n\tthis.startTime = Date.now();\n\tvar scrollPosition = $tw.utils.getScrollPosition();\n\t// Get the client bounds of the element and adjust by the scroll position\n\tvar clientBounds = element.getBoundingClientRect(),\n\t\tbounds = {\n\t\t\tleft: clientBounds.left + scrollPosition.x,\n\t\t\ttop: clientBounds.top + scrollPosition.y,\n\t\t\twidth: clientBounds.width,\n\t\t\theight: clientBounds.height\n\t\t};\n\t// We'll consider the horizontal and vertical scroll directions separately via this function\n\t// targetPos/targetSize - position and size of the target element\n\t// currentPos/currentSize - position and size of the current scroll viewport\n\t// returns: new position of the scroll viewport\n\tvar getEndPos = function(targetPos,targetSize,currentPos,currentSize) {\n\t\t\tvar newPos = currentPos;\n\t\t\t// If the target is above/left of the current view, then scroll to it's top/left\n\t\t\tif(targetPos <= currentPos) {\n\t\t\t\tnewPos = targetPos;\n\t\t\t// If the target is smaller than the window and the scroll position is too far up, then scroll till the target is at the bottom of the window\n\t\t\t} else if(targetSize < currentSize && currentPos < (targetPos + targetSize - currentSize)) {\n\t\t\t\tnewPos = targetPos + targetSize - currentSize;\n\t\t\t// If the target is big, then just scroll to the top\n\t\t\t} else if(currentPos < targetPos) {\n\t\t\t\tnewPos = targetPos;\n\t\t\t// Otherwise, stay where we are\n\t\t\t} else {\n\t\t\t\tnewPos = currentPos;\n\t\t\t}\n\t\t\t// If we are scrolling within 50 pixels of the top/left then snap to zero\n\t\t\tif(newPos < 50) {\n\t\t\t\tnewPos = 0;\n\t\t\t}\n\t\t\treturn newPos;\n\t\t},\n\t\tendX = getEndPos(bounds.left,bounds.width,scrollPosition.x,window.innerWidth),\n\t\tendY = getEndPos(bounds.top,bounds.height,scrollPosition.y,window.innerHeight);\n\t// Only scroll if the position has changed\n\tif(endX !== scrollPosition.x || endY !== scrollPosition.y) {\n\t\tvar self = this,\n\t\t\tdrawFrame;\n\t\tdrawFrame = function () {\n\t\t\tvar t;\n\t\t\tif(duration <= 0) {\n\t\t\t\tt = 1;\n\t\t\t} else {\n\t\t\t\tt = ((Date.now()) - self.startTime) / duration;\t\n\t\t\t}\n\t\t\tif(t >= 1) {\n\t\t\t\tself.cancelScroll();\n\t\t\t\tt = 1;\n\t\t\t}\n\t\t\tt = $tw.utils.slowInSlowOut(t);\n\t\t\twindow.scrollTo(scrollPosition.x + (endX - scrollPosition.x) * t,scrollPosition.y + (endY - scrollPosition.y) * t);\n\t\t\tif(t < 1) {\n\t\t\t\tself.idRequestFrame = self.requestAnimationFrame.call(window,drawFrame);\n\t\t\t}\n\t\t};\n\t\tdrawFrame();\n\t}\n};\n\nexports.PageScroller = PageScroller;\n\n})();\n",
"title": "$:/core/modules/utils/dom/scroller.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/edition-info.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/edition-info.js\ntype: application/javascript\nmodule-type: utils-node\n\nInformation about the available editions\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar fs = require(\"fs\"),\n\tpath = require(\"path\");\n\nvar editionInfo;\n\nexports.getEditionInfo = function() {\n\tif(!editionInfo) {\n\t\t// Enumerate the edition paths\n\t\tvar editionPaths = $tw.getLibraryItemSearchPaths($tw.config.editionsPath,$tw.config.editionsEnvVar);\n\t\teditionInfo = {};\n\t\tfor(var editionIndex=0; editionIndex<editionPaths.length; editionIndex++) {\n\t\t\tvar editionPath = editionPaths[editionIndex];\n\t\t\t// Enumerate the folders\n\t\t\tvar entries = fs.readdirSync(editionPath);\n\t\t\tfor(var entryIndex=0; entryIndex<entries.length; entryIndex++) {\n\t\t\t\tvar entry = entries[entryIndex];\n\t\t\t\t// Check if directories have a valid tiddlywiki.info\n\t\t\t\tif(!editionInfo[entry] && $tw.utils.isDirectory(path.resolve(editionPath,entry))) {\n\t\t\t\t\tvar info;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinfo = JSON.parse(fs.readFileSync(path.resolve(editionPath,entry,\"tiddlywiki.info\"),\"utf8\"));\n\t\t\t\t\t} catch(ex) {\n\t\t\t\t\t}\n\t\t\t\t\tif(info) {\n\t\t\t\t\t\teditionInfo[entry] = info;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn editionInfo;\n};\n\n})();\n",
"title": "$:/core/modules/utils/edition-info.js",
"type": "application/javascript",
"module-type": "utils-node"
},
"$:/core/modules/utils/fakedom.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/fakedom.js\ntype: application/javascript\nmodule-type: global\n\nA barebones implementation of DOM interfaces needed by the rendering mechanism.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Sequence number used to enable us to track objects for testing\nvar sequenceNumber = null;\n\nvar bumpSequenceNumber = function(object) {\n\tif(sequenceNumber !== null) {\n\t\tobject.sequenceNumber = sequenceNumber++;\n\t}\n};\n\nvar TW_TextNode = function(text) {\n\tbumpSequenceNumber(this);\n\tthis.textContent = text;\n};\n\nObject.defineProperty(TW_TextNode.prototype, \"nodeType\", {\n\tget: function() {\n\t\treturn 3;\n\t}\n});\n\nObject.defineProperty(TW_TextNode.prototype, \"formattedTextContent\", {\n\tget: function() {\n\t\treturn this.textContent.replace(/(\\r?\\n)/g,\"\");\n\t}\n});\n\nvar TW_Element = function(tag,namespace) {\n\tbumpSequenceNumber(this);\n\tthis.isTiddlyWikiFakeDom = true;\n\tthis.tag = tag;\n\tthis.attributes = {};\n\tthis.isRaw = false;\n\tthis.children = [];\n\tthis.style = {};\n\tthis.namespaceURI = namespace || \"http://www.w3.org/1999/xhtml\";\n};\n\nObject.defineProperty(TW_Element.prototype, \"nodeType\", {\n\tget: function() {\n\t\treturn 1;\n\t}\n});\n\nTW_Element.prototype.getAttribute = function(name) {\n\tif(this.isRaw) {\n\t\tthrow \"Cannot getAttribute on a raw TW_Element\";\n\t}\n\treturn this.attributes[name];\n};\n\nTW_Element.prototype.setAttribute = function(name,value) {\n\tif(this.isRaw) {\n\t\tthrow \"Cannot setAttribute on a raw TW_Element\";\n\t}\n\tthis.attributes[name] = value;\n};\n\nTW_Element.prototype.setAttributeNS = function(namespace,name,value) {\n\tthis.setAttribute(name,value);\n};\n\nTW_Element.prototype.removeAttribute = function(name) {\n\tif(this.isRaw) {\n\t\tthrow \"Cannot removeAttribute on a raw TW_Element\";\n\t}\n\tif($tw.utils.hop(this.attributes,name)) {\n\t\tdelete this.attributes[name];\n\t}\n};\n\nTW_Element.prototype.appendChild = function(node) {\n\tthis.children.push(node);\n\tnode.parentNode = this;\n};\n\nTW_Element.prototype.insertBefore = function(node,nextSibling) {\n\tif(nextSibling) {\n\t\tvar p = this.children.indexOf(nextSibling);\n\t\tif(p !== -1) {\n\t\t\tthis.children.splice(p,0,node);\n\t\t\tnode.parentNode = this;\n\t\t} else {\n\t\t\tthis.appendChild(node);\n\t\t}\n\t} else {\n\t\tthis.appendChild(node);\n\t}\n};\n\nTW_Element.prototype.removeChild = function(node) {\n\tvar p = this.children.indexOf(node);\n\tif(p !== -1) {\n\t\tthis.children.splice(p,1);\n\t}\n};\n\nTW_Element.prototype.hasChildNodes = function() {\n\treturn !!this.children.length;\n};\n\nObject.defineProperty(TW_Element.prototype, \"childNodes\", {\n\tget: function() {\n\t\treturn this.children;\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"firstChild\", {\n\tget: function() {\n\t\treturn this.children[0];\n\t}\n});\n\nTW_Element.prototype.addEventListener = function(type,listener,useCapture) {\n\t// Do nothing\n};\n\nObject.defineProperty(TW_Element.prototype, \"tagName\", {\n\tget: function() {\n\t\treturn this.tag || \"\";\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"className\", {\n\tget: function() {\n\t\treturn this.attributes[\"class\"] || \"\";\n\t},\n\tset: function(value) {\n\t\tthis.attributes[\"class\"] = value;\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"value\", {\n\tget: function() {\n\t\treturn this.attributes.value || \"\";\n\t},\n\tset: function(value) {\n\t\tthis.attributes.value = value;\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"outerHTML\", {\n\tget: function() {\n\t\tvar output = [],attr,a,v;\n\t\toutput.push(\"<\",this.tag);\n\t\tif(this.attributes) {\n\t\t\tattr = [];\n\t\t\tfor(a in this.attributes) {\n\t\t\t\tattr.push(a);\n\t\t\t}\n\t\t\tattr.sort();\n\t\t\tfor(a=0; a<attr.length; a++) {\n\t\t\t\tv = this.attributes[attr[a]];\n\t\t\t\tif(v !== undefined) {\n\t\t\t\t\toutput.push(\" \",attr[a],\"=\\\"\",$tw.utils.htmlEncode(v),\"\\\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(this.style) {\n\t\t\tvar style = [];\n\t\t\tfor(var s in this.style) {\n\t\t\t\tstyle.push(s + \":\" + this.style[s] + \";\");\n\t\t\t}\n\t\t\tif(style.length > 0) {\n\t\t\t\toutput.push(\" style=\\\"\",style.join(\"\"),\"\\\"\")\n\t\t\t}\n\t\t}\n\t\toutput.push(\">\");\n\t\tif($tw.config.htmlVoidElements.indexOf(this.tag) === -1) {\n\t\t\toutput.push(this.innerHTML);\n\t\t\toutput.push(\"</\",this.tag,\">\");\n\t\t}\n\t\treturn output.join(\"\");\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"innerHTML\", {\n\tget: function() {\n\t\tif(this.isRaw) {\n\t\t\treturn this.rawHTML;\n\t\t} else {\n\t\t\tvar b = [];\n\t\t\t$tw.utils.each(this.children,function(node) {\n\t\t\t\tif(node instanceof TW_Element) {\n\t\t\t\t\tb.push(node.outerHTML);\n\t\t\t\t} else if(node instanceof TW_TextNode) {\n\t\t\t\t\tb.push($tw.utils.htmlEncode(node.textContent));\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn b.join(\"\");\n\t\t}\n\t},\n\tset: function(value) {\n\t\tthis.isRaw = true;\n\t\tthis.rawHTML = value;\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"textContent\", {\n\tget: function() {\n\t\tif(this.isRaw) {\n\t\t\tthrow \"Cannot get textContent on a raw TW_Element\";\n\t\t} else {\n\t\t\tvar b = [];\n\t\t\t$tw.utils.each(this.children,function(node) {\n\t\t\t\tb.push(node.textContent);\n\t\t\t});\n\t\t\treturn b.join(\"\");\n\t\t}\n\t},\n\tset: function(value) {\n\t\tthis.children = [new TW_TextNode(value)];\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"formattedTextContent\", {\n\tget: function() {\n\t\tif(this.isRaw) {\n\t\t\tthrow \"Cannot get formattedTextContent on a raw TW_Element\";\n\t\t} else {\n\t\t\tvar b = [],\n\t\t\t\tisBlock = $tw.config.htmlBlockElements.indexOf(this.tag) !== -1;\n\t\t\tif(isBlock) {\n\t\t\t\tb.push(\"\\n\");\n\t\t\t}\n\t\t\tif(this.tag === \"li\") {\n\t\t\t\tb.push(\"* \");\n\t\t\t}\n\t\t\t$tw.utils.each(this.children,function(node) {\n\t\t\t\tb.push(node.formattedTextContent);\n\t\t\t});\n\t\t\tif(isBlock) {\n\t\t\t\tb.push(\"\\n\");\n\t\t\t}\n\t\t\treturn b.join(\"\");\n\t\t}\n\t}\n});\n\nvar document = {\n\tsetSequenceNumber: function(value) {\n\t\tsequenceNumber = value;\n\t},\n\tcreateElementNS: function(namespace,tag) {\n\t\treturn new TW_Element(tag,namespace);\n\t},\n\tcreateElement: function(tag) {\n\t\treturn new TW_Element(tag);\n\t},\n\tcreateTextNode: function(text) {\n\t\treturn new TW_TextNode(text);\n\t},\n\tcompatMode: \"CSS1Compat\", // For KaTeX to know that we're not a browser in quirks mode\n\tisTiddlyWikiFakeDom: true\n};\n\nexports.fakeDocument = document;\n\n})();\n",
"title": "$:/core/modules/utils/fakedom.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/utils/filesystem.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/filesystem.js\ntype: application/javascript\nmodule-type: utils-node\n\nFile system utilities\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar fs = require(\"fs\"),\n\tpath = require(\"path\");\n\n/*\nRecursively (and synchronously) copy a directory and all its content\n*/\nexports.copyDirectory = function(srcPath,dstPath) {\n\t// Remove any trailing path separators\n\tsrcPath = $tw.utils.removeTrailingSeparator(srcPath);\n\tdstPath = $tw.utils.removeTrailingSeparator(dstPath);\n\t// Create the destination directory\n\tvar err = $tw.utils.createDirectory(dstPath);\n\tif(err) {\n\t\treturn err;\n\t}\n\t// Function to copy a folder full of files\n\tvar copy = function(srcPath,dstPath) {\n\t\tvar srcStats = fs.lstatSync(srcPath),\n\t\t\tdstExists = fs.existsSync(dstPath);\n\t\tif(srcStats.isFile()) {\n\t\t\t$tw.utils.copyFile(srcPath,dstPath);\n\t\t} else if(srcStats.isDirectory()) {\n\t\t\tvar items = fs.readdirSync(srcPath);\n\t\t\tfor(var t=0; t<items.length; t++) {\n\t\t\t\tvar item = items[t],\n\t\t\t\t\terr = copy(srcPath + path.sep + item,dstPath + path.sep + item);\n\t\t\t\tif(err) {\n\t\t\t\t\treturn err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\tcopy(srcPath,dstPath);\n\treturn null;\n};\n\n/*\nCopy a file\n*/\nvar FILE_BUFFER_LENGTH = 64 * 1024,\n\tfileBuffer;\n\nexports.copyFile = function(srcPath,dstPath) {\n\t// Create buffer if required\n\tif(!fileBuffer) {\n\t\tfileBuffer = new Buffer(FILE_BUFFER_LENGTH);\n\t}\n\t// Create any directories in the destination\n\t$tw.utils.createDirectory(path.dirname(dstPath));\n\t// Copy the file\n\tvar srcFile = fs.openSync(srcPath,\"r\"),\n\t\tdstFile = fs.openSync(dstPath,\"w\"),\n\t\tbytesRead = 1,\n\t\tpos = 0;\n\twhile (bytesRead > 0) {\n\t\tbytesRead = fs.readSync(srcFile,fileBuffer,0,FILE_BUFFER_LENGTH,pos);\n\t\tfs.writeSync(dstFile,fileBuffer,0,bytesRead);\n\t\tpos += bytesRead;\n\t}\n\tfs.closeSync(srcFile);\n\tfs.closeSync(dstFile);\n\treturn null;\n};\n\n/*\nRemove trailing path separator\n*/\nexports.removeTrailingSeparator = function(dirPath) {\n\tvar len = dirPath.length;\n\tif(dirPath.charAt(len-1) === path.sep) {\n\t\tdirPath = dirPath.substr(0,len-1);\n\t}\n\treturn dirPath;\n};\n\n/*\nRecursively create a directory\n*/\nexports.createDirectory = function(dirPath) {\n\tif(dirPath.substr(dirPath.length-1,1) !== path.sep) {\n\t\tdirPath = dirPath + path.sep;\n\t}\n\tvar pos = 1;\n\tpos = dirPath.indexOf(path.sep,pos);\n\twhile(pos !== -1) {\n\t\tvar subDirPath = dirPath.substr(0,pos);\n\t\tif(!$tw.utils.isDirectory(subDirPath)) {\n\t\t\ttry {\n\t\t\t\tfs.mkdirSync(subDirPath);\n\t\t\t} catch(e) {\n\t\t\t\treturn \"Error creating directory '\" + subDirPath + \"'\";\n\t\t\t}\n\t\t}\n\t\tpos = dirPath.indexOf(path.sep,pos + 1);\n\t}\n\treturn null;\n};\n\n/*\nRecursively create directories needed to contain a specified file\n*/\nexports.createFileDirectories = function(filePath) {\n\treturn $tw.utils.createDirectory(path.dirname(filePath));\n};\n\n/*\nRecursively delete a directory\n*/\nexports.deleteDirectory = function(dirPath) {\n\tif(fs.existsSync(dirPath)) {\n\t\tvar entries = fs.readdirSync(dirPath);\n\t\tfor(var entryIndex=0; entryIndex<entries.length; entryIndex++) {\n\t\t\tvar currPath = dirPath + path.sep + entries[entryIndex];\n\t\t\tif(fs.lstatSync(currPath).isDirectory()) {\n\t\t\t\t$tw.utils.deleteDirectory(currPath);\n\t\t\t} else {\n\t\t\t\tfs.unlinkSync(currPath);\n\t\t\t}\n\t\t}\n\tfs.rmdirSync(dirPath);\n\t}\n\treturn null;\n};\n\n/*\nCheck if a path identifies a directory\n*/\nexports.isDirectory = function(dirPath) {\n\treturn fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory();\n};\n\n/*\nCheck if a path identifies a directory that is empty\n*/\nexports.isDirectoryEmpty = function(dirPath) {\n\tif(!$tw.utils.isDirectory(dirPath)) {\n\t\treturn false;\n\t}\n\tvar files = fs.readdirSync(dirPath),\n\t\tempty = true;\n\t$tw.utils.each(files,function(file,index) {\n\t\tif(file.charAt(0) !== \".\") {\n\t\t\tempty = false;\n\t\t}\n\t});\n\treturn empty;\n};\n\n})();\n",
"title": "$:/core/modules/utils/filesystem.js",
"type": "application/javascript",
"module-type": "utils-node"
},
"$:/core/modules/utils/logger.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/logger.js\ntype: application/javascript\nmodule-type: utils\n\nA basic logging implementation\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar ALERT_TAG = \"$:/tags/Alert\";\n\n/*\nMake a new logger\n*/\nfunction Logger(componentName) {\n\tthis.componentName = componentName || \"\";\n}\n\n/*\nLog a message\n*/\nLogger.prototype.log = function(/* args */) {\n\tif(console !== undefined && console.log !== undefined) {\n\t\treturn Function.apply.call(console.log, console, [this.componentName + \":\"].concat(Array.prototype.slice.call(arguments,0)));\n\t}\n};\n\n/*\nAlert a message\n*/\nLogger.prototype.alert = function(/* args */) {\n\t// Prepare the text of the alert\n\tvar text = Array.prototype.join.call(arguments,\" \");\n\t// Create alert tiddlers in the browser\n\tif($tw.browser) {\n\t\t// Check if there is an existing alert with the same text and the same component\n\t\tvar existingAlerts = $tw.wiki.getTiddlersWithTag(ALERT_TAG),\n\t\t\talertFields,\n\t\t\texistingCount,\n\t\t\tself = this;\n\t\t$tw.utils.each(existingAlerts,function(title) {\n\t\t\tvar tiddler = $tw.wiki.getTiddler(title);\n\t\t\tif(tiddler.fields.text === text && tiddler.fields.component === self.componentName && tiddler.fields.modified && (!alertFields || tiddler.fields.modified < alertFields.modified)) {\n\t\t\t\t\talertFields = $tw.utils.extend({},tiddler.fields);\n\t\t\t}\n\t\t});\n\t\tif(alertFields) {\n\t\t\texistingCount = alertFields.count || 1;\n\t\t} else {\n\t\t\talertFields = {\n\t\t\t\ttitle: $tw.wiki.generateNewTitle(\"$:/temp/alerts/alert\",{prefix: \"\"}),\n\t\t\t\ttext: text,\n\t\t\t\ttags: [ALERT_TAG],\n\t\t\t\tcomponent: this.componentName\n\t\t\t};\n\t\t\texistingCount = 0;\n\t\t}\n\t\talertFields.modified = new Date();\n\t\tif(++existingCount > 1) {\n\t\t\talertFields.count = existingCount;\n\t\t} else {\n\t\t\talertFields.count = undefined;\n\t\t}\n\t\t$tw.wiki.addTiddler(new $tw.Tiddler(alertFields));\n\t\t// Log the alert as well\n\t\tthis.log.apply(this,Array.prototype.slice.call(arguments,0));\n\t} else {\n\t\t// Print an orange message to the console if not in the browser\n\t\tconsole.error(\"\\x1b[1;33m\" + text + \"\\x1b[0m\");\n\t}\n};\n\nexports.Logger = Logger;\n\n})();\n",
"title": "$:/core/modules/utils/logger.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/parsetree.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/parsetree.js\ntype: application/javascript\nmodule-type: utils\n\nParse tree utility functions.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.addAttributeToParseTreeNode = function(node,name,value) {\n\tnode.attributes = node.attributes || {};\n\tnode.attributes[name] = {type: \"string\", value: value};\n};\n\nexports.getAttributeValueFromParseTreeNode = function(node,name,defaultValue) {\n\tif(node.attributes && node.attributes[name] && node.attributes[name].value !== undefined) {\n\t\treturn node.attributes[name].value;\n\t}\n\treturn defaultValue;\n};\n\nexports.addClassToParseTreeNode = function(node,classString) {\n\tvar classes = [];\n\tnode.attributes = node.attributes || {};\n\tnode.attributes[\"class\"] = node.attributes[\"class\"] || {type: \"string\", value: \"\"};\n\tif(node.attributes[\"class\"].type === \"string\") {\n\t\tif(node.attributes[\"class\"].value !== \"\") {\n\t\t\tclasses = node.attributes[\"class\"].value.split(\" \");\n\t\t}\n\t\tif(classString !== \"\") {\n\t\t\t$tw.utils.pushTop(classes,classString.split(\" \"));\n\t\t}\n\t\tnode.attributes[\"class\"].value = classes.join(\" \");\n\t}\n};\n\nexports.addStyleToParseTreeNode = function(node,name,value) {\n\t\tnode.attributes = node.attributes || {};\n\t\tnode.attributes.style = node.attributes.style || {type: \"string\", value: \"\"};\n\t\tif(node.attributes.style.type === \"string\") {\n\t\t\tnode.attributes.style.value += name + \":\" + value + \";\";\n\t\t}\n};\n\nexports.findParseTreeNode = function(nodeArray,search) {\n\tfor(var t=0; t<nodeArray.length; t++) {\n\t\tif(nodeArray[t].type === search.type && nodeArray[t].tag === search.tag) {\n\t\t\treturn nodeArray[t];\n\t\t}\n\t}\n\treturn undefined;\n};\n\n/*\nHelper to get the text of a parse tree node or array of nodes\n*/\nexports.getParseTreeText = function getParseTreeText(tree) {\n\tvar output = [];\n\tif($tw.utils.isArray(tree)) {\n\t\t$tw.utils.each(tree,function(node) {\n\t\t\toutput.push(getParseTreeText(node));\n\t\t});\n\t} else {\n\t\tif(tree.type === \"text\") {\n\t\t\toutput.push(tree.text);\n\t\t}\n\t\tif(tree.children) {\n\t\t\treturn getParseTreeText(tree.children);\n\t\t}\n\t}\n\treturn output.join(\"\");\n};\n\n})();\n",
"title": "$:/core/modules/utils/parsetree.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/performance.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/performance.js\ntype: application/javascript\nmodule-type: global\n\nPerformance measurement.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nfunction Performance(enabled) {\n\tthis.enabled = !!enabled;\n\tthis.measures = {}; // Hashmap of current values of measurements\n\tthis.logger = new $tw.utils.Logger(\"performance\");\n}\n\n/*\nWrap performance reporting around a top level function\n*/\nPerformance.prototype.report = function(name,fn) {\n\tvar self = this;\n\tif(this.enabled) {\n\t\treturn function() {\n\t\t\tself.measures = {};\n\t\t\tvar startTime = $tw.utils.timer(),\n\t\t\t\tresult = fn.apply(this,arguments);\n\t\t\tself.logger.log(name + \": \" + $tw.utils.timer(startTime).toFixed(2) + \"ms\");\n\t\t\tfor(var m in self.measures) {\n\t\t\t\tself.logger.log(\"+\" + m + \": \" + self.measures[m].toFixed(2) + \"ms\");\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t} else {\n\t\treturn fn;\n\t}\n};\n\n/*\nWrap performance measurements around a subfunction\n*/\nPerformance.prototype.measure = function(name,fn) {\n\tvar self = this;\n\tif(this.enabled) {\n\t\treturn function() {\n\t\t\tvar startTime = $tw.utils.timer(),\n\t\t\t\tresult = fn.apply(this,arguments),\n\t\t\t\tvalue = self.measures[name] || 0;\n\t\t\tself.measures[name] = value + $tw.utils.timer(startTime);\n\t\t\treturn result;\n\t\t};\n\t} else {\n\t\treturn fn;\n\t}\n};\n\nexports.Performance = Performance;\n\n})();\n",
"title": "$:/core/modules/utils/performance.js",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/utils/pluginmaker.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/pluginmaker.js\ntype: application/javascript\nmodule-type: utils\n\nA quick and dirty way to pack up plugins within the browser.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nRepack a plugin, and then delete any non-shadow payload tiddlers\n*/\nexports.repackPlugin = function(title,additionalTiddlers,excludeTiddlers) {\n\tadditionalTiddlers = additionalTiddlers || [];\n\texcludeTiddlers = excludeTiddlers || [];\n\t// Get the plugin tiddler\n\tvar pluginTiddler = $tw.wiki.getTiddler(title);\n\tif(!pluginTiddler) {\n\t\tthrow \"No such tiddler as \" + title;\n\t}\n\t// Extract the JSON\n\tvar jsonPluginTiddler;\n\ttry {\n\t\tjsonPluginTiddler = JSON.parse(pluginTiddler.fields.text);\n\t} catch(e) {\n\t\tthrow \"Cannot parse plugin tiddler \" + title + \"\\nError: \" + e;\n\t}\n\t// Get the list of tiddlers\n\tvar tiddlers = Object.keys(jsonPluginTiddler.tiddlers);\n\t// Add the additional tiddlers\n\t$tw.utils.pushTop(tiddlers,additionalTiddlers);\n\t// Remove any excluded tiddlers\n\tfor(var t=tiddlers.length-1; t>=0; t--) {\n\t\tif(excludeTiddlers.indexOf(tiddlers[t]) !== -1) {\n\t\t\ttiddlers.splice(t,1);\n\t\t}\n\t}\n\t// Pack up the tiddlers into a block of JSON\n\tvar plugins = {};\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = $tw.wiki.getTiddler(title),\n\t\t\tfields = {};\n\t\t$tw.utils.each(tiddler.fields,function (value,name) {\n\t\t\tfields[name] = tiddler.getFieldString(name);\n\t\t});\n\t\tplugins[title] = fields;\n\t});\n\t// Retrieve and bump the version number\n\tvar pluginVersion = $tw.utils.parseVersion(pluginTiddler.getFieldString(\"version\") || \"0.0.0\") || {\n\t\t\tmajor: \"0\",\n\t\t\tminor: \"0\",\n\t\t\tpatch: \"0\"\n\t\t};\n\tpluginVersion.patch++;\n\tvar version = pluginVersion.major + \".\" + pluginVersion.minor + \".\" + pluginVersion.patch;\n\tif(pluginVersion.prerelease) {\n\t\tversion += \"-\" + pluginVersion.prerelease;\n\t}\n\tif(pluginVersion.build) {\n\t\tversion += \"+\" + pluginVersion.build;\n\t}\n\t// Save the tiddler\n\t$tw.wiki.addTiddler(new $tw.Tiddler(pluginTiddler,{text: JSON.stringify({tiddlers: plugins},null,4), version: version}));\n\t// Delete any non-shadow constituent tiddlers\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tif($tw.wiki.tiddlerExists(title)) {\n\t\t\t$tw.wiki.deleteTiddler(title);\n\t\t}\n\t});\n\t// Trigger an autosave\n\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\n\t// Return a heartwarming confirmation\n\treturn \"Plugin \" + title + \" successfully saved\";\n};\n\n})();\n",
"title": "$:/core/modules/utils/pluginmaker.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/utils.js": {
"text": "/*\\\ntitle: $:/core/modules/utils/utils.js\ntype: application/javascript\nmodule-type: utils\n\nVarious static utility functions.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nDisplay a warning, in colour if we're on a terminal\n*/\nexports.warning = function(text) {\n\tconsole.log($tw.node ? \"\\x1b[1;33m\" + text + \"\\x1b[0m\" : text);\n}\n\n/*\nTrim whitespace from the start and end of a string\nThanks to Steven Levithan, http://blog.stevenlevithan.com/archives/faster-trim-javascript\n*/\nexports.trim = function(str) {\n\tif(typeof str === \"string\") {\n\t\treturn str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n\t} else {\n\t\treturn str;\n\t}\n};\n\n/*\nReturn the number of keys in an object\n*/\nexports.count = function(object) {\n\treturn Object.keys(object || {}).length;\n};\n\n/*\nCheck if an array is equal by value and by reference.\n*/\nexports.isArrayEqual = function(array1,array2) {\n\tif(array1 === array2) {\n\t\treturn true;\n\t}\n\tarray1 = array1 || [];\n\tarray2 = array2 || [];\n\tif(array1.length !== array2.length) {\n\t\treturn false;\n\t}\n\treturn array1.every(function(value,index) {\n\t\treturn value === array2[index];\n\t});\n};\n\n/*\nPush entries onto an array, removing them first if they already exist in the array\n\tarray: array to modify (assumed to be free of duplicates)\n\tvalue: a single value to push or an array of values to push\n*/\nexports.pushTop = function(array,value) {\n\tvar t,p;\n\tif($tw.utils.isArray(value)) {\n\t\t// Remove any array entries that are duplicated in the new values\n\t\tif(value.length !== 0) {\n\t\t\tif(array.length !== 0) {\n\t\t\t\tif(value.length < array.length) {\n\t\t\t\t\tfor(t=0; t<value.length; t++) {\n\t\t\t\t\t\tp = array.indexOf(value[t]);\n\t\t\t\t\t\tif(p !== -1) {\n\t\t\t\t\t\t\tarray.splice(p,1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor(t=array.length-1; t>=0; t--) {\n\t\t\t\t\t\tp = value.indexOf(array[t]);\n\t\t\t\t\t\tif(p !== -1) {\n\t\t\t\t\t\t\tarray.splice(t,1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Push the values on top of the main array\n\t\t\tarray.push.apply(array,value);\n\t\t}\n\t} else {\n\t\tp = array.indexOf(value);\n\t\tif(p !== -1) {\n\t\t\tarray.splice(p,1);\n\t\t}\n\t\tarray.push(value);\n\t}\n\treturn array;\n};\n\n/*\nRemove entries from an array\n\tarray: array to modify\n\tvalue: a single value to remove, or an array of values to remove\n*/\nexports.removeArrayEntries = function(array,value) {\n\tvar t,p;\n\tif($tw.utils.isArray(value)) {\n\t\tfor(t=0; t<value.length; t++) {\n\t\t\tp = array.indexOf(value[t]);\n\t\t\tif(p !== -1) {\n\t\t\t\tarray.splice(p,1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tp = array.indexOf(value);\n\t\tif(p !== -1) {\n\t\t\tarray.splice(p,1);\n\t\t}\n\t}\n};\n\n/*\nCheck whether any members of a hashmap are present in another hashmap\n*/\nexports.checkDependencies = function(dependencies,changes) {\n\tvar hit = false;\n\t$tw.utils.each(changes,function(change,title) {\n\t\tif($tw.utils.hop(dependencies,title)) {\n\t\t\thit = true;\n\t\t}\n\t});\n\treturn hit;\n};\n\nexports.extend = function(object /* [, src] */) {\n\t$tw.utils.each(Array.prototype.slice.call(arguments, 1), function(source) {\n\t\tif(source) {\n\t\t\tfor(var property in source) {\n\t\t\t\tobject[property] = source[property];\n\t\t\t}\n\t\t}\n\t});\n\treturn object;\n};\n\nexports.deepCopy = function(object) {\n\tvar result,t;\n\tif($tw.utils.isArray(object)) {\n\t\t// Copy arrays\n\t\tresult = object.slice(0);\n\t} else if(typeof object === \"object\") {\n\t\tresult = {};\n\t\tfor(t in object) {\n\t\t\tif(object[t] !== undefined) {\n\t\t\t\tresult[t] = $tw.utils.deepCopy(object[t]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tresult = object;\n\t}\n\treturn result;\n};\n\nexports.extendDeepCopy = function(object,extendedProperties) {\n\tvar result = $tw.utils.deepCopy(object),t;\n\tfor(t in extendedProperties) {\n\t\tif(extendedProperties[t] !== undefined) {\n\t\t\tresult[t] = $tw.utils.deepCopy(extendedProperties[t]);\n\t\t}\n\t}\n\treturn result;\n};\n\nexports.deepFreeze = function deepFreeze(object) {\n\tvar property, key;\n\tObject.freeze(object);\n\tfor(key in object) {\n\t\tproperty = object[key];\n\t\tif($tw.utils.hop(object,key) && (typeof property === \"object\") && !Object.isFrozen(property)) {\n\t\t\tdeepFreeze(property);\n\t\t}\n\t}\n};\n\nexports.slowInSlowOut = function(t) {\n\treturn (1 - ((Math.cos(t * Math.PI) + 1) / 2));\n};\n\nexports.formatDateString = function(date,template) {\n\tvar result = \"\",\n\t\tt = template,\n\t\tmatches = [\n\t\t\t[/^0hh12/, function() {\n\t\t\t\treturn $tw.utils.pad($tw.utils.getHours12(date));\n\t\t\t}],\n\t\t\t[/^wYYYY/, function() {\n\t\t\t\treturn $tw.utils.getYearForWeekNo(date);\n\t\t\t}],\n\t\t\t[/^hh12/, function() {\n\t\t\t\treturn $tw.utils.getHours12(date);\n\t\t\t}],\n\t\t\t[/^DDth/, function() {\n\t\t\t\treturn date.getDate() + $tw.utils.getDaySuffix(date);\n\t\t\t}],\n\t\t\t[/^YYYY/, function() {\n\t\t\t\treturn date.getFullYear();\n\t\t\t}],\n\t\t\t[/^0hh/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getHours());\n\t\t\t}],\n\t\t\t[/^0mm/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getMinutes());\n\t\t\t}],\n\t\t\t[/^0ss/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getSeconds());\n\t\t\t}],\n\t\t\t[/^0DD/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getDate());\n\t\t\t}],\n\t\t\t[/^0MM/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getMonth()+1);\n\t\t\t}],\n\t\t\t[/^0WW/, function() {\n\t\t\t\treturn $tw.utils.pad($tw.utils.getWeek(date));\n\t\t\t}],\n\t\t\t[/^ddd/, function() {\n\t\t\t\treturn $tw.language.getString(\"Date/Short/Day/\" + date.getDay());\n\t\t\t}],\n\t\t\t[/^mmm/, function() {\n\t\t\t\treturn $tw.language.getString(\"Date/Short/Month/\" + (date.getMonth() + 1));\n\t\t\t}],\n\t\t\t[/^DDD/, function() {\n\t\t\t\treturn $tw.language.getString(\"Date/Long/Day/\" + date.getDay());\n\t\t\t}],\n\t\t\t[/^MMM/, function() {\n\t\t\t\treturn $tw.language.getString(\"Date/Long/Month/\" + (date.getMonth() + 1));\n\t\t\t}],\n\t\t\t[/^TZD/, function() {\n\t\t\t\tvar tz = date.getTimezoneOffset(),\n\t\t\t\tatz = Math.abs(tz);\n\t\t\t\treturn (tz < 0 ? '+' : '-') + $tw.utils.pad(Math.floor(atz / 60)) + ':' + $tw.utils.pad(atz % 60);\n\t\t\t}],\n\t\t\t[/^wYY/, function() {\n\t\t\t\treturn $tw.utils.pad($tw.utils.getYearForWeekNo(date) - 2000);\n\t\t\t}],\n\t\t\t[/^[ap]m/, function() {\n\t\t\t\treturn $tw.utils.getAmPm(date).toLowerCase();\n\t\t\t}],\n\t\t\t[/^hh/, function() {\n\t\t\t\treturn date.getHours();\n\t\t\t}],\n\t\t\t[/^mm/, function() {\n\t\t\t\treturn date.getMinutes();\n\t\t\t}],\n\t\t\t[/^ss/, function() {\n\t\t\t\treturn date.getSeconds();\n\t\t\t}],\n\t\t\t[/^[AP]M/, function() {\n\t\t\t\treturn $tw.utils.getAmPm(date).toUpperCase();\n\t\t\t}],\n\t\t\t[/^DD/, function() {\n\t\t\t\treturn date.getDate();\n\t\t\t}],\n\t\t\t[/^MM/, function() {\n\t\t\t\treturn date.getMonth() + 1;\n\t\t\t}],\n\t\t\t[/^WW/, function() {\n\t\t\t\treturn $tw.utils.getWeek(date);\n\t\t\t}],\n\t\t\t[/^YY/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getFullYear() - 2000);\n\t\t\t}]\n\t\t];\n\twhile(t.length){\n\t\tvar matchString = \"\";\n\t\t$tw.utils.each(matches, function(m) {\n\t\t\tvar match = m[0].exec(t);\n\t\t\tif(match) {\n\t\t\t\tmatchString = m[1].call();\n\t\t\t\tt = t.substr(match[0].length);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tif(matchString) {\n\t\t\tresult += matchString;\n\t\t} else {\n\t\t\tresult += t.charAt(0);\n\t\t\tt = t.substr(1);\n\t\t}\n\t}\n\tresult = result.replace(/\\\\(.)/g,\"$1\");\n\treturn result;\n};\n\nexports.getAmPm = function(date) {\n\treturn $tw.language.getString(\"Date/Period/\" + (date.getHours() >= 12 ? \"pm\" : \"am\"));\n};\n\nexports.getDaySuffix = function(date) {\n\treturn $tw.language.getString(\"Date/DaySuffix/\" + date.getDate());\n};\n\nexports.getWeek = function(date) {\n\tvar dt = new Date(date.getTime());\n\tvar d = dt.getDay();\n\tif(d === 0) {\n\t\td = 7; // JavaScript Sun=0, ISO Sun=7\n\t}\n\tdt.setTime(dt.getTime() + (4 - d) * 86400000);// shift day to Thurs of same week to calculate weekNo\n\tvar n = Math.floor((dt.getTime()-new Date(dt.getFullYear(),0,1) + 3600000) / 86400000);\n\treturn Math.floor(n / 7) + 1;\n};\n\nexports.getYearForWeekNo = function(date) {\n\tvar dt = new Date(date.getTime());\n\tvar d = dt.getDay();\n\tif(d === 0) {\n\t\td = 7; // JavaScript Sun=0, ISO Sun=7\n\t}\n\tdt.setTime(dt.getTime() + (4 - d) * 86400000);// shift day to Thurs of same week\n\treturn dt.getFullYear();\n};\n\nexports.getHours12 = function(date) {\n\tvar h = date.getHours();\n\treturn h > 12 ? h-12 : ( h > 0 ? h : 12 );\n};\n\n/*\nConvert a date delta in milliseconds into a string representation of \"23 seconds ago\", \"27 minutes ago\" etc.\n\tdelta: delta in milliseconds\nReturns an object with these members:\n\tdescription: string describing the delta period\n\tupdatePeriod: time in millisecond until the string will be inaccurate\n*/\nexports.getRelativeDate = function(delta) {\n\tvar futurep = false;\n\tif(delta < 0) {\n\t\tdelta = -1 * delta;\n\t\tfuturep = true;\n\t}\n\tvar units = [\n\t\t{name: \"Years\", duration: 365 * 24 * 60 * 60 * 1000},\n\t\t{name: \"Months\", duration: (365/12) * 24 * 60 * 60 * 1000},\n\t\t{name: \"Days\", duration: 24 * 60 * 60 * 1000},\n\t\t{name: \"Hours\", duration: 60 * 60 * 1000},\n\t\t{name: \"Minutes\", duration: 60 * 1000},\n\t\t{name: \"Seconds\", duration: 1000}\n\t];\n\tfor(var t=0; t<units.length; t++) {\n\t\tvar result = Math.floor(delta / units[t].duration);\n\t\tif(result >= 2) {\n\t\t\treturn {\n\t\t\t\tdelta: delta,\n\t\t\t\tdescription: $tw.language.getString(\n\t\t\t\t\t\"RelativeDate/\" + (futurep ? \"Future\" : \"Past\") + \"/\" + units[t].name,\n\t\t\t\t\t{variables:\n\t\t\t\t\t\t{period: result.toString()}\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t\tupdatePeriod: units[t].duration\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\tdelta: delta,\n\t\tdescription: $tw.language.getString(\n\t\t\t\"RelativeDate/\" + (futurep ? \"Future\" : \"Past\") + \"/Second\",\n\t\t\t{variables:\n\t\t\t\t{period: \"1\"}\n\t\t\t}\n\t\t),\n\t\tupdatePeriod: 1000\n\t};\n};\n\n// Convert & to \"&\", < to \"<\", > to \">\", \" to \""\"\nexports.htmlEncode = function(s) {\n\tif(s) {\n\t\treturn s.toString().replace(/&/mg,\"&\").replace(/</mg,\"<\").replace(/>/mg,\">\").replace(/\\\"/mg,\""\");\n\t} else {\n\t\treturn \"\";\n\t}\n};\n\n// Converts all HTML entities to their character equivalents\nexports.entityDecode = function(s) {\n\tvar e = s.substr(1,s.length-2); // Strip the & and the ;\n\tif(e.charAt(0) === \"#\") {\n\t\tif(e.charAt(1) === \"x\" || e.charAt(1) === \"X\") {\n\t\t\treturn String.fromCharCode(parseInt(e.substr(2),16));\t\n\t\t} else {\n\t\t\treturn String.fromCharCode(parseInt(e.substr(1),10));\n\t\t}\n\t} else {\n\t\tvar c = $tw.config.htmlEntities[e];\n\t\tif(c) {\n\t\t\treturn String.fromCharCode(c);\n\t\t} else {\n\t\t\treturn s; // Couldn't convert it as an entity, just return it raw\n\t\t}\n\t}\n};\n\nexports.unescapeLineBreaks = function(s) {\n\treturn s.replace(/\\\\n/mg,\"\\n\").replace(/\\\\b/mg,\" \").replace(/\\\\s/mg,\"\\\\\").replace(/\\r/mg,\"\");\n};\n\n/*\n * Returns an escape sequence for given character. Uses \\x for characters <=\n * 0xFF to save space, \\u for the rest.\n *\n * The code needs to be in sync with th code template in the compilation\n * function for \"action\" nodes.\n */\n// Copied from peg.js, thanks to David Majda\nexports.escape = function(ch) {\n\tvar charCode = ch.charCodeAt(0);\n\tif(charCode <= 0xFF) {\n\t\treturn '\\\\x' + $tw.utils.pad(charCode.toString(16).toUpperCase());\n\t} else {\n\t\treturn '\\\\u' + $tw.utils.pad(charCode.toString(16).toUpperCase(),4);\n\t}\n};\n\n// Turns a string into a legal JavaScript string\n// Copied from peg.js, thanks to David Majda\nexports.stringify = function(s) {\n\t/*\n\t* ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a string\n\t* literal except for the closing quote character, backslash, carriage return,\n\t* line separator, paragraph separator, and line feed. Any character may\n\t* appear in the form of an escape sequence.\n\t*\n\t* For portability, we also escape all non-ASCII characters.\n\t*/\n\treturn (s || \"\")\n\t\t.replace(/\\\\/g, '\\\\\\\\') // backslash\n\t\t.replace(/\"/g, '\\\\\"') // double quote character\n\t\t.replace(/'/g, \"\\\\'\") // single quote character\n\t\t.replace(/\\r/g, '\\\\r') // carriage return\n\t\t.replace(/\\n/g, '\\\\n') // line feed\n\t\t.replace(/[\\x80-\\uFFFF]/g, exports.escape); // non-ASCII characters\n};\n\n/*\nEscape the RegExp special characters with a preceding backslash\n*/\nexports.escapeRegExp = function(s) {\n return s.replace(/[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}]/g, '\\\\$&');\n};\n\n// Checks whether a link target is external, i.e. not a tiddler title\nexports.isLinkExternal = function(to) {\n\tvar externalRegExp = /(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\\s<>{}\\[\\]`|'\"\\\\^~]+(?:\\/|\\b)/i;\n\treturn externalRegExp.test(to);\n};\n\nexports.nextTick = function(fn) {\n/*global window: false */\n\tif(typeof process === \"undefined\") {\n\t\t// Apparently it would be faster to use postMessage - http://dbaron.org/log/20100309-faster-timeouts\n\t\twindow.setTimeout(fn,4);\n\t} else {\n\t\tprocess.nextTick(fn);\n\t}\n};\n\n/*\nConvert a hyphenated CSS property name into a camel case one\n*/\nexports.unHyphenateCss = function(propName) {\n\treturn propName.replace(/-([a-z])/gi, function(match0,match1) {\n\t\treturn match1.toUpperCase();\n\t});\n};\n\n/*\nConvert a camelcase CSS property name into a dashed one (\"backgroundColor\" --> \"background-color\")\n*/\nexports.hyphenateCss = function(propName) {\n\treturn propName.replace(/([A-Z])/g, function(match0,match1) {\n\t\treturn \"-\" + match1.toLowerCase();\n\t});\n};\n\n/*\nParse a text reference of one of these forms:\n* title\n* !!field\n* title!!field\n* title##index\n* etc\nReturns an object with the following fields, all optional:\n* title: tiddler title\n* field: tiddler field name\n* index: JSON property index\n*/\nexports.parseTextReference = function(textRef) {\n\t// Separate out the title, field name and/or JSON indices\n\tvar reTextRef = /(?:(.*?)!!(.+))|(?:(.*?)##(.+))|(.*)/mg,\n\t\tmatch = reTextRef.exec(textRef),\n\t\tresult = {};\n\tif(match && reTextRef.lastIndex === textRef.length) {\n\t\t// Return the parts\n\t\tif(match[1]) {\n\t\t\tresult.title = match[1];\n\t\t}\n\t\tif(match[2]) {\n\t\t\tresult.field = match[2];\n\t\t}\n\t\tif(match[3]) {\n\t\t\tresult.title = match[3];\n\t\t}\n\t\tif(match[4]) {\n\t\t\tresult.index = match[4];\n\t\t}\n\t\tif(match[5]) {\n\t\t\tresult.title = match[5];\n\t\t}\n\t} else {\n\t\t// If we couldn't parse it\n\t\tresult.title = textRef\n\t}\n\treturn result;\n};\n\n/*\nChecks whether a string is a valid fieldname\n*/\nexports.isValidFieldName = function(name) {\n\tif(!name || typeof name !== \"string\") {\n\t\treturn false;\n\t}\n\tname = name.toLowerCase().trim();\n\tvar fieldValidatorRegEx = /^[a-z0-9\\-\\._]+$/mg;\n\treturn fieldValidatorRegEx.test(name);\n};\n\n/*\nExtract the version number from the meta tag or from the boot file\n*/\n\n// Browser version\nexports.extractVersionInfo = function() {\n\tif($tw.packageInfo) {\n\t\treturn $tw.packageInfo.version;\n\t} else {\n\t\tvar metatags = document.getElementsByTagName(\"meta\");\n\t\tfor(var t=0; t<metatags.length; t++) {\n\t\t\tvar m = metatags[t];\n\t\t\tif(m.name === \"tiddlywiki-version\") {\n\t\t\t\treturn m.content;\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nGet the animation duration in ms\n*/\nexports.getAnimationDuration = function() {\n\treturn parseInt($tw.wiki.getTiddlerText(\"$:/config/AnimationDuration\",\"400\"),10);\n};\n\n/*\nHash a string to a number\nDerived from http://stackoverflow.com/a/15710692\n*/\nexports.hashString = function(str) {\n\treturn str.split(\"\").reduce(function(a,b) {\n\t\ta = ((a << 5) - a) + b.charCodeAt(0);\n\t\treturn a & a;\n\t},0);\n};\n\n/*\nDecode a base64 string\n*/\nexports.base64Decode = function(string64) {\n\tif($tw.browser) {\n\t\t// TODO\n\t\tthrow \"$tw.utils.base64Decode() doesn't work in the browser\";\n\t} else {\n\t\treturn (new Buffer(string64,\"base64\")).toString();\n\t}\n};\n\n/*\nConvert a hashmap into a tiddler dictionary format sequence of name:value pairs\n*/\nexports.makeTiddlerDictionary = function(data) {\n\tvar output = [];\n\tfor(var name in data) {\n\t\toutput.push(name + \": \" + data[name]);\n\t}\n\treturn output.join(\"\\n\");\n};\n\n/*\nHigh resolution microsecond timer for profiling\n*/\nexports.timer = function(base) {\n\tvar m;\n\tif($tw.node) {\n\t\tvar r = process.hrtime();\t\t\n\t\tm = r[0] * 1e3 + (r[1] / 1e6);\n\t} else if(window.performance) {\n\t\tm = performance.now();\n\t} else {\n\t\tm = Date.now();\n\t}\n\tif(typeof base !== \"undefined\") {\n\t\tm = m - base;\n\t}\n\treturn m;\n};\n\n/*\nConvert text and content type to a data URI\n*/\nexports.makeDataUri = function(text,type) {\n\ttype = type || \"text/vnd.tiddlywiki\";\n\tvar typeInfo = $tw.config.contentTypeInfo[type] || $tw.config.contentTypeInfo[\"text/plain\"],\n\t\tisBase64 = typeInfo.encoding === \"base64\",\n\t\tparts = [];\n\tparts.push(\"data:\");\n\tparts.push(type);\n\tparts.push(isBase64 ? \";base64\" : \"\");\n\tparts.push(\",\");\n\tparts.push(isBase64 ? text : encodeURIComponent(text));\n\treturn parts.join(\"\");\n};\n\n/*\nUseful for finding out the fully escaped CSS selector equivalent to a given tag. For example:\n\n$tw.utils.tagToCssSelector(\"$:/tags/Stylesheet\") --> tc-tagged-\\%24\\%3A\\%2Ftags\\%2FStylesheet\n*/\nexports.tagToCssSelector = function(tagName) {\n\treturn \"tc-tagged-\" + encodeURIComponent(tagName).replace(/[!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^`{\\|}~,]/mg,function(c) {\n\t\treturn \"\\\\\" + c;\n\t});\n};\n\n\n/*\nIE does not have sign function\n*/\nexports.sign = Math.sign || function(x) {\n\tx = +x; // convert to a number\n\tif (x === 0 || isNaN(x)) {\n\t\treturn x;\n\t}\n\treturn x > 0 ? 1 : -1;\n};\n\n})();\n",
"title": "$:/core/modules/utils/utils.js",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/widgets/action-deletefield.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/action-deletefield.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to delete fields of a tiddler.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar DeleteFieldWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nDeleteFieldWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nDeleteFieldWidget.prototype.render = function(parent,nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n\n/*\nCompute the internal state of the widget\n*/\nDeleteFieldWidget.prototype.execute = function() {\n\tthis.actionTiddler = this.getAttribute(\"$tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.actionField = this.getAttribute(\"$field\");\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nDeleteFieldWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes[\"$tiddler\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nInvoke the action associated with this widget\n*/\nDeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {\n\tvar self = this,\n\t\ttiddler = this.wiki.getTiddler(self.actionTiddler),\n\t\tremoveFields = {};\n\tif(this.actionField) {\n\t\tremoveFields[this.actionField] = undefined;\n\t}\n\tif(tiddler) {\n\t\t$tw.utils.each(this.attributes,function(attribute,name) {\n\t\t\tif(name.charAt(0) !== \"$\" && name !== \"title\") {\n\t\t\t\tremoveFields[name] = undefined;\n\t\t\t}\n\t\t});\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(this.wiki.getModificationFields(),tiddler,removeFields,this.wiki.getCreationFields()));\n\t}\n\treturn true; // Action was invoked\n};\n\nexports[\"action-deletefield\"] = DeleteFieldWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/action-deletefield.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-deletetiddler.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/action-deletetiddler.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to delete a tiddler.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar DeleteTiddlerWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nDeleteTiddlerWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nDeleteTiddlerWidget.prototype.render = function(parent,nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n\n/*\nCompute the internal state of the widget\n*/\nDeleteTiddlerWidget.prototype.execute = function() {\n\tthis.actionFilter = this.getAttribute(\"$filter\");\n\tthis.actionTiddler = this.getAttribute(\"$tiddler\");\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nDeleteTiddlerWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes[\"$filter\"] || changedAttributes[\"$tiddler\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nInvoke the action associated with this widget\n*/\nDeleteTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) {\n\tvar tiddlers = [];\n\tif(this.actionFilter) {\n\t\ttiddlers = this.wiki.filterTiddlers(this.actionFilter,this);\n\t}\n\tif(this.actionTiddler) {\n\t\ttiddlers.push(this.actionTiddler);\n\t}\n\tfor(var t=0; t<tiddlers.length; t++) {\n\t\tthis.wiki.deleteTiddler(tiddlers[t]);\n\t}\n\treturn true; // Action was invoked\n};\n\nexports[\"action-deletetiddler\"] = DeleteTiddlerWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/action-deletetiddler.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-listops.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/action-listops.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to apply list operations to any tiddler field (defaults to the 'list' field of the current tiddler)\n\n\\*/\n(function() {\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\nvar ActionListopsWidget = function(parseTreeNode, options) {\n\tthis.initialise(parseTreeNode, options);\n};\n/**\n * Inherit from the base widget class\n */\nActionListopsWidget.prototype = new Widget();\n/**\n * Render this widget into the DOM\n */\nActionListopsWidget.prototype.render = function(parent, nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n/**\n * Compute the internal state of the widget\n */\nActionListopsWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.target = this.getAttribute(\"$tiddler\", this.getVariable(\n\t\t\"currentTiddler\"));\n\tthis.filter = this.getAttribute(\"$filter\");\n\tthis.subfilter = this.getAttribute(\"$subfilter\");\n\tthis.listField = this.getAttribute(\"$field\", \"list\");\n\tthis.listIndex = this.getAttribute(\"$index\");\n\tthis.filtertags = this.getAttribute(\"$tags\");\n};\n/**\n * \tRefresh the widget by ensuring our attributes are up to date\n */\nActionListopsWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.$tiddler || changedAttributes.$filter ||\n\t\tchangedAttributes.$subfilter || changedAttributes.$field ||\n\t\tchangedAttributes.$index || changedAttributes.$tags) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n/**\n * \tInvoke the action associated with this widget\n */\nActionListopsWidget.prototype.invokeAction = function(triggeringWidget,\n\tevent) {\n\t//Apply the specified filters to the lists\n\tvar field = this.listField,\n\t\tindex,\n\t\ttype = \"!!\",\n\t\tlist = this.listField;\n\tif(this.listIndex) {\n\t\tfield = undefined;\n\t\tindex = this.listIndex;\n\t\ttype = \"##\";\n\t\tlist = this.listIndex;\n\t}\n\tif(this.filter) {\n\t\tthis.wiki.setText(this.target, field, index, $tw.utils.stringifyList(\n\t\t\tthis.wiki\n\t\t\t.filterTiddlers(this.filter, this)));\n\t}\n\tif(this.subfilter) {\n\t\tvar subfilter = \"[list[\" + this.target + type + list + \"]] \" + this.subfilter;\n\t\tthis.wiki.setText(this.target, field, index, $tw.utils.stringifyList(\n\t\t\tthis.wiki\n\t\t\t.filterTiddlers(subfilter, this)));\n\t}\n\tif(this.filtertags) {\n\t\tvar tagfilter = \"[list[\" + this.target + \"!!tags]] \" + this.filtertags;\n\t\tthis.wiki.setText(this.target, \"tags\", undefined, $tw.utils.stringifyList(\n\t\t\tthis.wiki.filterTiddlers(tagfilter, this)));\n\t}\n\treturn true; // Action was invoked\n};\n\nexports[\"action-listops\"] = ActionListopsWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/action-listops.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-navigate.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/action-navigate.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to navigate to a tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar NavigateWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nNavigateWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nNavigateWidget.prototype.render = function(parent,nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n\n/*\nCompute the internal state of the widget\n*/\nNavigateWidget.prototype.execute = function() {\n\tthis.actionTo = this.getAttribute(\"$to\");\n\tthis.actionScroll = this.getAttribute(\"$scroll\");\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nNavigateWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes[\"$to\"] || changedAttributes[\"$scroll\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nInvoke the action associated with this widget\n*/\nNavigateWidget.prototype.invokeAction = function(triggeringWidget,event) {\n\tvar bounds = triggeringWidget && triggeringWidget.getBoundingClientRect && triggeringWidget.getBoundingClientRect(),\n\t\tsuppressNavigation = event.metaKey || event.ctrlKey || (event.button === 1);\n\tif(this.actionScroll === \"yes\") {\n\t\tsuppressNavigation = false;\n\t} else if(this.actionScroll === \"no\") {\n\t\tsuppressNavigation = true;\n\t}\n\tthis.dispatchEvent({\n\t\ttype: \"tm-navigate\",\n\t\tnavigateTo: this.actionTo === undefined ? this.getVariable(\"currentTiddler\") : this.actionTo,\n\t\tnavigateFromTitle: this.getVariable(\"storyTiddler\"),\n\t\tnavigateFromNode: triggeringWidget,\n\t\tnavigateFromClientRect: bounds && { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height\n\t\t},\n\t\tnavigateSuppressNavigation: suppressNavigation\n\t});\n\treturn true; // Action was invoked\n};\n\nexports[\"action-navigate\"] = NavigateWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/action-navigate.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-sendmessage.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/action-sendmessage.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to send a message\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar SendMessageWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nSendMessageWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nSendMessageWidget.prototype.render = function(parent,nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n\n/*\nCompute the internal state of the widget\n*/\nSendMessageWidget.prototype.execute = function() {\n\tthis.actionMessage = this.getAttribute(\"$message\");\n\tthis.actionParam = this.getAttribute(\"$param\");\n\tthis.actionName = this.getAttribute(\"$name\");\n\tthis.actionValue = this.getAttribute(\"$value\",\"\");\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nSendMessageWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(Object.keys(changedAttributes).length) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nInvoke the action associated with this widget\n*/\nSendMessageWidget.prototype.invokeAction = function(triggeringWidget,event) {\n\t// Get the string parameter\n\tvar param = this.actionParam;\n\t// Assemble the attributes as a hashmap\n\tvar paramObject = Object.create(null);\n\tvar count = 0;\n\t$tw.utils.each(this.attributes,function(attribute,name) {\n\t\tif(name.charAt(0) !== \"$\") {\n\t\t\tparamObject[name] = attribute;\n\t\t\tcount++;\n\t\t}\n\t});\n\t// Add name/value pair if present\n\tif(this.actionName) {\n\t\tparamObject[this.actionName] = this.actionValue;\n\t}\n\t// Dispatch the message\n\tthis.dispatchEvent({\n\t\ttype: this.actionMessage,\n\t\tparam: param,\n\t\tparamObject: paramObject,\n\t\ttiddlerTitle: this.getVariable(\"currentTiddler\"),\n\t\tnavigateFromTitle: this.getVariable(\"storyTiddler\")\n\t});\n\treturn true; // Action was invoked\n};\n\nexports[\"action-sendmessage\"] = SendMessageWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/action-sendmessage.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-setfield.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/action-setfield.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to set a single field or index on a tiddler.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar SetFieldWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nSetFieldWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nSetFieldWidget.prototype.render = function(parent,nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n\n/*\nCompute the internal state of the widget\n*/\nSetFieldWidget.prototype.execute = function() {\n\tthis.actionTiddler = this.getAttribute(\"$tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.actionField = this.getAttribute(\"$field\");\n\tthis.actionIndex = this.getAttribute(\"$index\");\n\tthis.actionValue = this.getAttribute(\"$value\");\n\tthis.actionTimestamp = this.getAttribute(\"$timestamp\",\"yes\") === \"yes\";\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nSetFieldWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes[\"$tiddler\"] || changedAttributes[\"$field\"] || changedAttributes[\"$index\"] || changedAttributes[\"$value\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nInvoke the action associated with this widget\n*/\nSetFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {\n\tvar self = this,\n\t\toptions = {};\n\toptions.suppressTimestamp = !this.actionTimestamp;\n\tif((typeof this.actionField == \"string\") || (typeof this.actionIndex == \"string\") || (typeof this.actionValue == \"string\")) {\n\t\tthis.wiki.setText(this.actionTiddler,this.actionField,this.actionIndex,this.actionValue,options);\n\t}\n\t$tw.utils.each(this.attributes,function(attribute,name) {\n\t\tif(name.charAt(0) !== \"$\") {\n\t\t\tself.wiki.setText(self.actionTiddler,name,undefined,attribute,options);\n\t\t}\n\t});\n\treturn true; // Action was invoked\n};\n\nexports[\"action-setfield\"] = SetFieldWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/action-setfield.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/browse.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/browse.js\ntype: application/javascript\nmodule-type: widget\n\nBrowse widget for browsing for files to import\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar BrowseWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nBrowseWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nBrowseWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\tvar domNode = this.document.createElement(\"input\");\n\tdomNode.setAttribute(\"type\",\"file\");\n\tif(this.browseMultiple) {\n\t\tdomNode.setAttribute(\"multiple\",\"multiple\");\n\t}\n\tif(this.tooltip) {\n\t\tdomNode.setAttribute(\"title\",this.tooltip);\n\t}\n\t// Nw.js supports \"nwsaveas\" to force a \"save as\" dialogue that allows a new or existing file to be selected\n\tif(this.nwsaveas) {\n\t\tdomNode.setAttribute(\"nwsaveas\",this.nwsaveas);\n\t}\n\t// Nw.js supports \"webkitdirectory\" to allow a directory to be selected\n\tif(this.webkitdirectory) {\n\t\tdomNode.setAttribute(\"webkitdirectory\",this.webkitdirectory);\n\t}\n\t// Add a click event handler\n\tdomNode.addEventListener(\"change\",function (event) {\n\t\tif(self.message) {\n\t\t\tself.dispatchEvent({type: self.message, param: self.param, files: event.target.files});\n\t\t} else {\n\t\t\tself.wiki.readFiles(event.target.files,function(tiddlerFieldsArray) {\n\t\t\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify(tiddlerFieldsArray)});\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t},false);\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nBrowseWidget.prototype.execute = function() {\n\tthis.browseMultiple = this.getAttribute(\"multiple\");\n\tthis.message = this.getAttribute(\"message\");\n\tthis.param = this.getAttribute(\"param\");\n\tthis.tooltip = this.getAttribute(\"tooltip\");\n\tthis.nwsaveas = this.getAttribute(\"nwsaveas\");\n\tthis.webkitdirectory = this.getAttribute(\"webkitdirectory\");\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nBrowseWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nexports.browse = BrowseWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/browse.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/button.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/button.js\ntype: application/javascript\nmodule-type: widget\n\nButton widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ButtonWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nButtonWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nButtonWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\tvar tag = \"button\";\n\tif(this.buttonTag && $tw.config.htmlUnsafeElements.indexOf(this.buttonTag) === -1) {\n\t\ttag = this.buttonTag;\n\t}\n\tvar domNode = this.document.createElement(tag);\n\t// Assign classes\n\tvar classes = this[\"class\"].split(\" \") || [],\n\t\tisPoppedUp = this.popup && this.isPoppedUp();\n\tif(this.selectedClass) {\n\t\tif(this.set && this.setTo && this.isSelected()) {\n\t\t\t$tw.utils.pushTop(classes,this.selectedClass.split(\" \"));\n\t\t}\n\t\tif(isPoppedUp) {\n\t\t\t$tw.utils.pushTop(classes,this.selectedClass.split(\" \"));\n\t\t}\n\t}\n\tif(isPoppedUp) {\n\t\t$tw.utils.pushTop(classes,\"tc-popup-handle\");\n\t}\n\tdomNode.className = classes.join(\" \");\n\t// Assign other attributes\n\tif(this.style) {\n\t\tdomNode.setAttribute(\"style\",this.style);\n\t}\n\tif(this.tooltip) {\n\t\tdomNode.setAttribute(\"title\",this.tooltip);\n\t}\n\tif(this[\"aria-label\"]) {\n\t\tdomNode.setAttribute(\"aria-label\",this[\"aria-label\"]);\n\t}\n\t// Add a click event handler\n\tdomNode.addEventListener(\"click\",function (event) {\n\t\tvar handled = false;\n\t\tif(self.invokeActions(this,event)) {\n\t\t\thandled = true;\n\t\t}\n\t\tif(self.to) {\n\t\t\tself.navigateTo(event);\n\t\t\thandled = true;\n\t\t}\n\t\tif(self.message) {\n\t\t\tself.dispatchMessage(event);\n\t\t\thandled = true;\n\t\t}\n\t\tif(self.popup) {\n\t\t\tself.triggerPopup(event);\n\t\t\thandled = true;\n\t\t}\n\t\tif(self.set) {\n\t\t\tself.setTiddler();\n\t\t\thandled = true;\n\t\t}\n\t\tif(handled) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t}\n\t\treturn handled;\n\t},false);\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\n/*\nWe don't allow actions to propagate because we trigger actions ourselves\n*/\nButtonWidget.prototype.allowActionPropagation = function() {\n\treturn false;\n};\n\nButtonWidget.prototype.getBoundingClientRect = function() {\n\treturn this.domNodes[0].getBoundingClientRect();\n};\n\nButtonWidget.prototype.isSelected = function() {\n return this.wiki.getTextReference(this.set,this.defaultSetValue,this.getVariable(\"currentTiddler\")) === this.setTo;\n};\n\nButtonWidget.prototype.isPoppedUp = function() {\n\tvar tiddler = this.wiki.getTiddler(this.popup);\n\tvar result = tiddler && tiddler.fields.text ? $tw.popup.readPopupState(tiddler.fields.text) : false;\n\treturn result;\n};\n\nButtonWidget.prototype.navigateTo = function(event) {\n\tvar bounds = this.getBoundingClientRect();\n\tthis.dispatchEvent({\n\t\ttype: \"tm-navigate\",\n\t\tnavigateTo: this.to,\n\t\tnavigateFromTitle: this.getVariable(\"storyTiddler\"),\n\t\tnavigateFromNode: this,\n\t\tnavigateFromClientRect: { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height\n\t\t},\n\t\tnavigateSuppressNavigation: event.metaKey || event.ctrlKey || (event.button === 1)\n\t});\n};\n\nButtonWidget.prototype.dispatchMessage = function(event) {\n\tthis.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable(\"currentTiddler\")});\n};\n\nButtonWidget.prototype.triggerPopup = function(event) {\n\t$tw.popup.triggerPopup({\n\t\tdomNode: this.domNodes[0],\n\t\ttitle: this.popup,\n\t\twiki: this.wiki\n\t});\n};\n\nButtonWidget.prototype.setTiddler = function() {\n\tthis.wiki.setTextReference(this.set,this.setTo,this.getVariable(\"currentTiddler\"));\n};\n\n/*\nCompute the internal state of the widget\n*/\nButtonWidget.prototype.execute = function() {\n\t// Get attributes\n\tthis.to = this.getAttribute(\"to\");\n\tthis.message = this.getAttribute(\"message\");\n\tthis.param = this.getAttribute(\"param\");\n\tthis.set = this.getAttribute(\"set\");\n\tthis.setTo = this.getAttribute(\"setTo\");\n\tthis.popup = this.getAttribute(\"popup\");\n\tthis.hover = this.getAttribute(\"hover\");\n\tthis[\"class\"] = this.getAttribute(\"class\",\"\");\n\tthis[\"aria-label\"] = this.getAttribute(\"aria-label\");\n\tthis.tooltip = this.getAttribute(\"tooltip\");\n\tthis.style = this.getAttribute(\"style\");\n\tthis.selectedClass = this.getAttribute(\"selectedClass\");\n\tthis.defaultSetValue = this.getAttribute(\"default\",\"\");\n\tthis.buttonTag = this.getAttribute(\"tag\");\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nButtonWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes[\"class\"] || changedAttributes.selectedClass || changedAttributes.style || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup])) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.button = ButtonWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/button.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/checkbox.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/checkbox.js\ntype: application/javascript\nmodule-type: widget\n\nCheckbox widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar CheckboxWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nCheckboxWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nCheckboxWidget.prototype.render = function(parent,nextSibling) {\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Create our elements\n\tthis.labelDomNode = this.document.createElement(\"label\");\n\tthis.labelDomNode.setAttribute(\"class\",this.checkboxClass);\n\tthis.inputDomNode = this.document.createElement(\"input\");\n\tthis.inputDomNode.setAttribute(\"type\",\"checkbox\");\n\tif(this.getValue()) {\n\t\tthis.inputDomNode.setAttribute(\"checked\",\"true\");\n\t}\n\tthis.labelDomNode.appendChild(this.inputDomNode);\n\tthis.spanDomNode = this.document.createElement(\"span\");\n\tthis.labelDomNode.appendChild(this.spanDomNode);\n\t// Add a click event handler\n\t$tw.utils.addEventListeners(this.inputDomNode,[\n\t\t{name: \"change\", handlerObject: this, handlerMethod: \"handleChangeEvent\"}\n\t]);\n\t// Insert the label into the DOM and render any children\n\tparent.insertBefore(this.labelDomNode,nextSibling);\n\tthis.renderChildren(this.spanDomNode,null);\n\tthis.domNodes.push(this.labelDomNode);\n};\n\nCheckboxWidget.prototype.getValue = function() {\n\tvar tiddler = this.wiki.getTiddler(this.checkboxTitle);\n\tif(tiddler) {\n\t\tif(this.checkboxTag) {\n\t\t\tif(this.checkboxInvertTag) {\n\t\t\t\treturn !tiddler.hasTag(this.checkboxTag);\n\t\t\t} else {\n\t\t\t\treturn tiddler.hasTag(this.checkboxTag);\n\t\t\t}\n\t\t}\n\t\tif(this.checkboxField) {\n\t\t\tvar value = tiddler.fields[this.checkboxField] || this.checkboxDefault || \"\";\n\t\t\tif(value === this.checkboxChecked) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif(value === this.checkboxUnchecked) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif(this.checkboxTag) {\n\t\t\treturn false;\n\t\t}\n\t\tif(this.checkboxField) {\n\t\t\tif(this.checkboxDefault === this.checkboxChecked) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif(this.checkboxDefault === this.checkboxUnchecked) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n\nCheckboxWidget.prototype.handleChangeEvent = function(event) {\n\tvar checked = this.inputDomNode.checked,\n\t\ttiddler = this.wiki.getTiddler(this.checkboxTitle),\n\t\tfallbackFields = {text: \"\"},\n\t\tnewFields = {title: this.checkboxTitle},\n\t\thasChanged = false,\n\t\ttagCheck = false,\n\t\thasTag = tiddler && tiddler.hasTag(this.checkboxTag);\n\tif(this.checkboxTag && this.checkboxInvertTag === \"yes\") {\n\t\ttagCheck = hasTag === checked;\n\t} else {\n\t\ttagCheck = hasTag !== checked;\n\t}\n\t// Set the tag if specified\n\tif(this.checkboxTag && (!tiddler || tagCheck)) {\n\t\tnewFields.tags = tiddler ? (tiddler.fields.tags || []).slice(0) : [];\n\t\tvar pos = newFields.tags.indexOf(this.checkboxTag);\n\t\tif(pos !== -1) {\n\t\t\tnewFields.tags.splice(pos,1);\n\t\t}\n\t\tif(this.checkboxInvertTag === \"yes\" && !checked) {\n\t\t\tnewFields.tags.push(this.checkboxTag);\n\t\t} else if(this.checkboxInvertTag !== \"yes\" && checked) {\n\t\t\tnewFields.tags.push(this.checkboxTag);\n\t\t}\n\t\thasChanged = true;\n\t}\n\t// Set the field if specified\n\tif(this.checkboxField) {\n\t\tvar value = checked ? this.checkboxChecked : this.checkboxUnchecked;\n\t\tif(!tiddler || tiddler.fields[this.checkboxField] !== value) {\n\t\t\tnewFields[this.checkboxField] = value;\n\t\t\thasChanged = true;\n\t\t}\n\t}\n\tif(hasChanged) {\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),fallbackFields,tiddler,newFields,this.wiki.getModificationFields()));\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nCheckboxWidget.prototype.execute = function() {\n\t// Get the parameters from the attributes\n\tthis.checkboxTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.checkboxTag = this.getAttribute(\"tag\");\n\tthis.checkboxField = this.getAttribute(\"field\");\n\tthis.checkboxChecked = this.getAttribute(\"checked\");\n\tthis.checkboxUnchecked = this.getAttribute(\"unchecked\");\n\tthis.checkboxDefault = this.getAttribute(\"default\");\n\tthis.checkboxClass = this.getAttribute(\"class\",\"\");\n\tthis.checkboxInvertTag = this.getAttribute(\"invertTag\",\"\");\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nCheckboxWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.tag || changedAttributes.invertTag || changedAttributes.field || changedAttributes.checked || changedAttributes.unchecked || changedAttributes[\"default\"] || changedAttributes[\"class\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\tvar refreshed = false;\n\t\tif(changedTiddlers[this.checkboxTitle]) {\n\t\t\tthis.inputDomNode.checked = this.getValue();\n\t\t\trefreshed = true;\n\t\t}\n\t\treturn this.refreshChildren(changedTiddlers) || refreshed;\n\t}\n};\n\nexports.checkbox = CheckboxWidget;\n\n})();",
"title": "$:/core/modules/widgets/checkbox.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/codeblock.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/codeblock.js\ntype: application/javascript\nmodule-type: widget\n\nCode block node widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar CodeBlockWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nCodeBlockWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nCodeBlockWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar codeNode = this.document.createElement(\"code\"),\n\t\tdomNode = this.document.createElement(\"pre\");\n\tcodeNode.appendChild(this.document.createTextNode(this.getAttribute(\"code\")));\n\tdomNode.appendChild(codeNode);\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.domNodes.push(domNode);\n\tif(this.postRender) {\n\t\tthis.postRender();\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nCodeBlockWidget.prototype.execute = function() {\n\tthis.language = this.getAttribute(\"language\");\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nCodeBlockWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nexports.codeblock = CodeBlockWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/codeblock.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/count.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/count.js\ntype: application/javascript\nmodule-type: widget\n\nCount widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar CountWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nCountWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nCountWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar textNode = this.document.createTextNode(this.currentCount);\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nCountWidget.prototype.execute = function() {\n\t// Get parameters from our attributes\n\tthis.filter = this.getAttribute(\"filter\");\n\t// Execute the filter\n\tif(this.filter) {\n\t\tthis.currentCount = this.wiki.filterTiddlers(this.filter,this).length;\n\t} else {\n\t\tthis.currentCount = undefined;\n\t}\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nCountWidget.prototype.refresh = function(changedTiddlers) {\n\t// Re-execute the filter to get the count\n\tthis.computeAttributes();\n\tvar oldCount = this.currentCount;\n\tthis.execute();\n\tif(this.currentCount !== oldCount) {\n\t\t// Regenerate and rerender the widget and replace the existing DOM node\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n\n};\n\nexports.count = CountWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/count.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/dropzone.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/dropzone.js\ntype: application/javascript\nmodule-type: widget\n\nDropzone widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar DropZoneWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nDropZoneWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nDropZoneWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\tvar domNode = this.document.createElement(\"div\");\n\tdomNode.className = \"tc-dropzone\";\n\t// Add event handlers\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \"dragenter\", handlerObject: this, handlerMethod: \"handleDragEnterEvent\"},\n\t\t{name: \"dragover\", handlerObject: this, handlerMethod: \"handleDragOverEvent\"},\n\t\t{name: \"dragleave\", handlerObject: this, handlerMethod: \"handleDragLeaveEvent\"},\n\t\t{name: \"drop\", handlerObject: this, handlerMethod: \"handleDropEvent\"},\n\t\t{name: \"paste\", handlerObject: this, handlerMethod: \"handlePasteEvent\"}\n\t]);\n\tdomNode.addEventListener(\"click\",function (event) {\n\t},false);\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\nDropZoneWidget.prototype.enterDrag = function() {\n\t// Check for this window being the source of the drag\n\tif($tw.dragInProgress) {\n\t\treturn false;\n\t}\n\t// We count enter/leave events\n\tthis.dragEnterCount = (this.dragEnterCount || 0) + 1;\n\t// If we're entering for the first time we need to apply highlighting\n\tif(this.dragEnterCount === 1) {\n\t\t$tw.utils.addClass(this.domNodes[0],\"tc-dragover\");\n\t}\n};\n\nDropZoneWidget.prototype.leaveDrag = function() {\n\t// Reduce the enter count\n\tthis.dragEnterCount = (this.dragEnterCount || 0) - 1;\n\t// Remove highlighting if we're leaving externally\n\tif(this.dragEnterCount <= 0) {\n\t\t$tw.utils.removeClass(this.domNodes[0],\"tc-dragover\");\n\t}\n};\n\nDropZoneWidget.prototype.handleDragEnterEvent = function(event) {\n\tthis.enterDrag();\n\t// Tell the browser that we're ready to handle the drop\n\tevent.preventDefault();\n\t// Tell the browser not to ripple the drag up to any parent drop handlers\n\tevent.stopPropagation();\n};\n\nDropZoneWidget.prototype.handleDragOverEvent = function(event) {\n\t// Check for being over a TEXTAREA or INPUT\n\tif([\"TEXTAREA\",\"INPUT\"].indexOf(event.target.tagName) !== -1) {\n\t\treturn false;\n\t}\n\t// Check for this window being the source of the drag\n\tif($tw.dragInProgress) {\n\t\treturn false;\n\t}\n\t// Tell the browser that we're still interested in the drop\n\tevent.preventDefault();\n\tevent.dataTransfer.dropEffect = \"copy\"; // Explicitly show this is a copy\n};\n\nDropZoneWidget.prototype.handleDragLeaveEvent = function(event) {\n\tthis.leaveDrag();\n};\n\nDropZoneWidget.prototype.handleDropEvent = function(event) {\n\tthis.leaveDrag();\n\t// Check for being over a TEXTAREA or INPUT\n\tif([\"TEXTAREA\",\"INPUT\"].indexOf(event.target.tagName) !== -1) {\n\t\treturn false;\n\t}\n\t// Check for this window being the source of the drag\n\tif($tw.dragInProgress) {\n\t\treturn false;\n\t}\n\tvar self = this,\n\t\tdataTransfer = event.dataTransfer;\n\t// Reset the enter count\n\tthis.dragEnterCount = 0;\n\t// Remove highlighting\n\t$tw.utils.removeClass(this.domNodes[0],\"tc-dragover\");\n\t// Import any files in the drop\n\tvar numFiles = this.wiki.readFiles(dataTransfer.files,function(tiddlerFieldsArray) {\n\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify(tiddlerFieldsArray)});\n\t});\n\t// Try to import the various data types we understand\n\tif(numFiles === 0) {\n\t\tthis.importData(dataTransfer);\n\t}\n\t// Tell the browser that we handled the drop\n\tevent.preventDefault();\n\t// Stop the drop ripple up to any parent handlers\n\tevent.stopPropagation();\n};\n\nDropZoneWidget.prototype.importData = function(dataTransfer) {\n\t// Try each provided data type in turn\n\tfor(var t=0; t<this.importDataTypes.length; t++) {\n\t\tif(!$tw.browser.isIE || this.importDataTypes[t].IECompatible) {\n\t\t\t// Get the data\n\t\t\tvar dataType = this.importDataTypes[t];\n\t\t\t\tvar data = dataTransfer.getData(dataType.type);\n\t\t\t// Import the tiddlers in the data\n\t\t\tif(data !== \"\" && data !== null) {\n\t\t\t\tif($tw.log.IMPORT) {\n\t\t\t\t\tconsole.log(\"Importing data type '\" + dataType.type + \"', data: '\" + data + \"'\")\n\t\t\t\t}\n\t\t\t\tvar tiddlerFields = dataType.convertToFields(data);\n\t\t\t\tif(!tiddlerFields.title) {\n\t\t\t\t\ttiddlerFields.title = this.wiki.generateNewTitle(\"Untitled\");\n\t\t\t\t}\n\t\t\t\tthis.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify([tiddlerFields])});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nDropZoneWidget.prototype.importDataTypes = [\n\t{type: \"text/vnd.tiddler\", IECompatible: false, convertToFields: function(data) {\n\t\treturn JSON.parse(data);\n\t}},\n\t{type: \"URL\", IECompatible: true, convertToFields: function(data) {\n\t\t// Check for tiddler data URI\n\t\tvar match = decodeURIComponent(data).match(/^data\\:text\\/vnd\\.tiddler,(.*)/i);\n\t\tif(match) {\n\t\t\treturn JSON.parse(match[1]);\n\t\t} else {\n\t\t\treturn { // As URL string\n\t\t\t\ttext: data\n\t\t\t};\n\t\t}\n\t}},\n\t{type: \"text/x-moz-url\", IECompatible: false, convertToFields: function(data) {\n\t\t// Check for tiddler data URI\n\t\tvar match = decodeURIComponent(data).match(/^data\\:text\\/vnd\\.tiddler,(.*)/i);\n\t\tif(match) {\n\t\t\treturn JSON.parse(match[1]);\n\t\t} else {\n\t\t\treturn { // As URL string\n\t\t\t\ttext: data\n\t\t\t};\n\t\t}\n\t}},\n\t{type: \"text/html\", IECompatible: false, convertToFields: function(data) {\n\t\treturn {\n\t\t\ttext: data\n\t\t};\n\t}},\n\t{type: \"text/plain\", IECompatible: false, convertToFields: function(data) {\n\t\treturn {\n\t\t\ttext: data\n\t\t};\n\t}},\n\t{type: \"Text\", IECompatible: true, convertToFields: function(data) {\n\t\treturn {\n\t\t\ttext: data\n\t\t};\n\t}},\n\t{type: \"text/uri-list\", IECompatible: false, convertToFields: function(data) {\n\t\treturn {\n\t\t\ttext: data\n\t\t};\n\t}}\n];\n\nDropZoneWidget.prototype.handlePasteEvent = function(event) {\n\t// Let the browser handle it if we're in a textarea or input box\n\tif([\"TEXTAREA\",\"INPUT\"].indexOf(event.target.tagName) == -1) {\n\t\tvar self = this,\n\t\t\titems = event.clipboardData.items;\n\t\t// Enumerate the clipboard items\n\t\tfor(var t = 0; t<items.length; t++) {\n\t\t\tvar item = items[t];\n\t\t\tif(item.kind === \"file\") {\n\t\t\t\t// Import any files\n\t\t\t\tthis.wiki.readFile(item.getAsFile(),function(tiddlerFieldsArray) {\n\t\t\t\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify(tiddlerFieldsArray)});\n\t\t\t\t});\n\t\t\t} else if(item.kind === \"string\") {\n\t\t\t\t// Create tiddlers from string items\n\t\t\t\tvar type = item.type;\n\t\t\t\titem.getAsString(function(str) {\n\t\t\t\t\tvar tiddlerFields = {\n\t\t\t\t\t\ttitle: self.wiki.generateNewTitle(\"Untitled\"),\n\t\t\t\t\t\ttext: str,\n\t\t\t\t\t\ttype: type\n\t\t\t\t\t};\n\t\t\t\t\tif($tw.log.IMPORT) {\n\t\t\t\t\t\tconsole.log(\"Importing string '\" + str + \"', type: '\" + type + \"'\");\n\t\t\t\t\t}\n\t\t\t\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify([tiddlerFields])});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t// Tell the browser that we've handled the paste\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nDropZoneWidget.prototype.execute = function() {\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nDropZoneWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.dropzone = DropZoneWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/dropzone.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit-binary.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/edit-binary.js\ntype: application/javascript\nmodule-type: widget\n\nEdit-binary widget; placeholder for editing binary tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar BINARY_WARNING_MESSAGE = \"$:/core/ui/BinaryWarning\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EditBinaryWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditBinaryWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditBinaryWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nEditBinaryWidget.prototype.execute = function() {\n\t// Construct the child widgets\n\tthis.makeChildWidgets([{\n\t\ttype: \"transclude\",\n\t\tattributes: {\n\t\t\ttiddler: {type: \"string\", value: BINARY_WARNING_MESSAGE}\n\t\t}\n\t}]);\n};\n\n/*\nRefresh by refreshing our child widget\n*/\nEditBinaryWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports[\"edit-binary\"] = EditBinaryWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/edit-binary.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit-bitmap.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/edit-bitmap.js\ntype: application/javascript\nmodule-type: widget\n\nEdit-bitmap widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Default image sizes\nvar DEFAULT_IMAGE_WIDTH = 300,\n\tDEFAULT_IMAGE_HEIGHT = 185;\n\n// Configuration tiddlers\nvar LINE_WIDTH_TITLE = \"$:/config/BitmapEditor/LineWidth\",\n\tLINE_COLOUR_TITLE = \"$:/config/BitmapEditor/Colour\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EditBitmapWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditBitmapWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditBitmapWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Create our element\n\tthis.canvasDomNode = $tw.utils.domMaker(\"canvas\",{\n\t\tdocument: this.document,\n\t\t\"class\":\"tc-edit-bitmapeditor\",\n\t\teventListeners: [{\n\t\t\tname: \"touchstart\", handlerObject: this, handlerMethod: \"handleTouchStartEvent\"\n\t\t},{\n\t\t\tname: \"touchmove\", handlerObject: this, handlerMethod: \"handleTouchMoveEvent\"\n\t\t},{\n\t\t\tname: \"touchend\", handlerObject: this, handlerMethod: \"handleTouchEndEvent\"\n\t\t},{\n\t\t\tname: \"mousedown\", handlerObject: this, handlerMethod: \"handleMouseDownEvent\"\n\t\t},{\n\t\t\tname: \"mousemove\", handlerObject: this, handlerMethod: \"handleMouseMoveEvent\"\n\t\t},{\n\t\t\tname: \"mouseup\", handlerObject: this, handlerMethod: \"handleMouseUpEvent\"\n\t\t}]\n\t});\n\tthis.widthDomNode = $tw.utils.domMaker(\"input\",{\n\t\tdocument: this.document,\n\t\t\"class\":\"tc-edit-bitmapeditor-width\",\n\t\teventListeners: [{\n\t\t\tname: \"change\", handlerObject: this, handlerMethod: \"handleWidthChangeEvent\"\n\t\t}]\n\t});\n\tthis.heightDomNode = $tw.utils.domMaker(\"input\",{\n\t\tdocument: this.document,\n\t\t\"class\":\"tc-edit-bitmapeditor-height\",\n\t\teventListeners: [{\n\t\t\tname: \"change\", handlerObject: this, handlerMethod: \"handleHeightChangeEvent\"\n\t\t}]\n\t});\n\t// Insert the elements into the DOM\n\tparent.insertBefore(this.canvasDomNode,nextSibling);\n\tparent.insertBefore(this.widthDomNode,nextSibling);\n\tparent.insertBefore(this.heightDomNode,nextSibling);\n\tthis.domNodes.push(this.canvasDomNode,this.widthDomNode,this.heightDomNode);\n\t// Load the image into the canvas\n\tif($tw.browser) {\n\t\tthis.loadCanvas();\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nEditBitmapWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.editTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n};\n\n/*\nNote that the bitmap editor intentionally doesn't try to refresh itself because it would be confusing to have the image changing spontaneously while editting it\n*/\nEditBitmapWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nEditBitmapWidget.prototype.loadCanvas = function() {\n\tvar tiddler = this.wiki.getTiddler(this.editTitle),\n\t\tcurrImage = new Image();\n\t// Set up event handlers for loading the image\n\tvar self = this;\n\tcurrImage.onload = function() {\n\t\t// Copy the image to the on-screen canvas\n\t\tself.initCanvas(self.canvasDomNode,currImage.width,currImage.height,currImage);\n\t\t// And also copy the current bitmap to the off-screen canvas\n\t\tself.currCanvas = self.document.createElement(\"canvas\");\n\t\tself.initCanvas(self.currCanvas,currImage.width,currImage.height,currImage);\n\t\t// Set the width and height input boxes\n\t\tself.updateSize();\n\t};\n\tcurrImage.onerror = function() {\n\t\t// Set the on-screen canvas size and clear it\n\t\tself.initCanvas(self.canvasDomNode,DEFAULT_IMAGE_WIDTH,DEFAULT_IMAGE_HEIGHT);\n\t\t// Set the off-screen canvas size and clear it\n\t\tself.currCanvas = self.document.createElement(\"canvas\");\n\t\tself.initCanvas(self.currCanvas,DEFAULT_IMAGE_WIDTH,DEFAULT_IMAGE_HEIGHT);\n\t\t// Set the width and height input boxes\n\t\tself.updateSize();\n\t};\n\t// Get the current bitmap into an image object\n\tcurrImage.src = \"data:\" + tiddler.fields.type + \";base64,\" + tiddler.fields.text;\n};\n\nEditBitmapWidget.prototype.initCanvas = function(canvas,width,height,image) {\n\tcanvas.width = width;\n\tcanvas.height = height;\n\tvar ctx = canvas.getContext(\"2d\");\n\tif(image) {\n\t\tctx.drawImage(image,0,0);\n\t} else {\n\t\tctx.fillStyle = \"#fff\";\n\t\tctx.fillRect(0,0,canvas.width,canvas.height);\n\t}\n};\n\n/*\n** Update the input boxes with the actual size of the canvas\n*/\nEditBitmapWidget.prototype.updateSize = function() {\n\tthis.widthDomNode.value = this.currCanvas.width;\n\tthis.heightDomNode.value = this.currCanvas.height;\n};\n\n/*\n** Change the size of the canvas, preserving the current image\n*/\nEditBitmapWidget.prototype.changeCanvasSize = function(newWidth,newHeight) {\n\t// Create and size a new canvas\n\tvar newCanvas = this.document.createElement(\"canvas\");\n\tthis.initCanvas(newCanvas,newWidth,newHeight);\n\t// Copy the old image\n\tvar ctx = newCanvas.getContext(\"2d\");\n\tctx.drawImage(this.currCanvas,0,0);\n\t// Set the new canvas as the current one\n\tthis.currCanvas = newCanvas;\n\t// Set the size of the onscreen canvas\n\tthis.canvasDomNode.width = newWidth;\n\tthis.canvasDomNode.height = newHeight;\n\t// Paint the onscreen canvas with the offscreen canvas\n\tctx = this.canvasDomNode.getContext(\"2d\");\n\tctx.drawImage(this.currCanvas,0,0);\n};\n\nEditBitmapWidget.prototype.handleWidthChangeEvent = function(event) {\n\t// Get the new width\n\tvar newWidth = parseInt(this.widthDomNode.value,10);\n\t// Update if necessary\n\tif(newWidth > 0 && newWidth !== this.currCanvas.width) {\n\t\tthis.changeCanvasSize(newWidth,this.currCanvas.height);\n\t}\n\t// Update the input controls\n\tthis.updateSize();\n};\n\nEditBitmapWidget.prototype.handleHeightChangeEvent = function(event) {\n\t// Get the new width\n\tvar newHeight = parseInt(this.heightDomNode.value,10);\n\t// Update if necessary\n\tif(newHeight > 0 && newHeight !== this.currCanvas.height) {\n\t\tthis.changeCanvasSize(this.currCanvas.width,newHeight);\n\t}\n\t// Update the input controls\n\tthis.updateSize();\n};\n\nEditBitmapWidget.prototype.handleTouchStartEvent = function(event) {\n\tthis.brushDown = true;\n\tthis.strokeStart(event.touches[0].clientX,event.touches[0].clientY);\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nEditBitmapWidget.prototype.handleTouchMoveEvent = function(event) {\n\tif(this.brushDown) {\n\t\tthis.strokeMove(event.touches[0].clientX,event.touches[0].clientY);\n\t}\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nEditBitmapWidget.prototype.handleTouchEndEvent = function(event) {\n\tif(this.brushDown) {\n\t\tthis.brushDown = false;\n\t\tthis.strokeEnd();\n\t}\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nEditBitmapWidget.prototype.handleMouseDownEvent = function(event) {\n\tthis.strokeStart(event.clientX,event.clientY);\n\tthis.brushDown = true;\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nEditBitmapWidget.prototype.handleMouseMoveEvent = function(event) {\n\tif(this.brushDown) {\n\t\tthis.strokeMove(event.clientX,event.clientY);\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\treturn false;\n\t}\n\treturn true;\n};\n\nEditBitmapWidget.prototype.handleMouseUpEvent = function(event) {\n\tif(this.brushDown) {\n\t\tthis.brushDown = false;\n\t\tthis.strokeEnd();\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\treturn false;\n\t}\n\treturn true;\n};\n\nEditBitmapWidget.prototype.adjustCoordinates = function(x,y) {\n\tvar canvasRect = this.canvasDomNode.getBoundingClientRect(),\n\t\tscale = this.canvasDomNode.width/canvasRect.width;\n\treturn {x: (x - canvasRect.left) * scale, y: (y - canvasRect.top) * scale};\n};\n\nEditBitmapWidget.prototype.strokeStart = function(x,y) {\n\t// Start off a new stroke\n\tthis.stroke = [this.adjustCoordinates(x,y)];\n};\n\nEditBitmapWidget.prototype.strokeMove = function(x,y) {\n\tvar ctx = this.canvasDomNode.getContext(\"2d\"),\n\t\tt;\n\t// Add the new position to the end of the stroke\n\tthis.stroke.push(this.adjustCoordinates(x,y));\n\t// Redraw the previous image\n\tctx.drawImage(this.currCanvas,0,0);\n\t// Render the stroke\n\tctx.strokeStyle = this.wiki.getTiddlerText(LINE_COLOUR_TITLE,\"#ff0\");\n\tctx.lineWidth = parseInt(this.wiki.getTiddlerText(LINE_WIDTH_TITLE,\"3\"),10);\n\tctx.lineCap = \"round\";\n\tctx.lineJoin = \"round\";\n\tctx.beginPath();\n\tctx.moveTo(this.stroke[0].x,this.stroke[0].y);\n\tfor(t=1; t<this.stroke.length-1; t++) {\n\t\tvar s1 = this.stroke[t],\n\t\t\ts2 = this.stroke[t-1],\n\t\t\ttx = (s1.x + s2.x)/2,\n\t\t\tty = (s1.y + s2.y)/2;\n\t\tctx.quadraticCurveTo(s2.x,s2.y,tx,ty);\n\t}\n\tctx.stroke();\n};\n\nEditBitmapWidget.prototype.strokeEnd = function() {\n\t// Copy the bitmap to the off-screen canvas\n\tvar ctx = this.currCanvas.getContext(\"2d\");\n\tctx.drawImage(this.canvasDomNode,0,0);\n\t// Save the image into the tiddler\n\tthis.saveChanges();\n};\n\nEditBitmapWidget.prototype.saveChanges = function() {\n\tvar tiddler = this.wiki.getTiddler(this.editTitle);\n\tif(tiddler) {\n\t\t// data URIs look like \"data:<type>;base64,<text>\"\n\t\tvar dataURL = this.canvasDomNode.toDataURL(tiddler.fields.type,1.0),\n\t\t\tposColon = dataURL.indexOf(\":\"),\n\t\t\tposSemiColon = dataURL.indexOf(\";\"),\n\t\t\tposComma = dataURL.indexOf(\",\"),\n\t\t\ttype = dataURL.substring(posColon+1,posSemiColon),\n\t\t\ttext = dataURL.substring(posComma+1);\n\t\tvar update = {type: type, text: text};\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(this.wiki.getModificationFields(),tiddler,update,this.wiki.getCreationFields()));\n\t}\n};\n\nexports[\"edit-bitmap\"] = EditBitmapWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/edit-bitmap.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit-text.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/edit-text.js\ntype: application/javascript\nmodule-type: widget\n\nEdit-text widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar DEFAULT_MIN_TEXT_AREA_HEIGHT = \"100px\"; // Minimum height of textareas in pixels\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EditTextWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditTextWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditTextWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Create our element\n\tvar editInfo = this.getEditInfo(),\n\t\ttag = this.editTag;\n\tif($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {\n\t\ttag = \"input\";\n\t}\n\tvar domNode = this.document.createElement(tag);\n\tif(this.editType) {\n\t\tdomNode.setAttribute(\"type\",this.editType);\n\t}\n\tif(editInfo.value === \"\" && this.editPlaceholder) {\n\t\tdomNode.setAttribute(\"placeholder\",this.editPlaceholder);\n\t}\n\tif(this.editSize) {\n\t\tdomNode.setAttribute(\"size\",this.editSize);\n\t}\n\tif(this.editRows) {\n\t\tdomNode.setAttribute(\"rows\",this.editRows);\n\t}\n\t// Assign classes\n\tif(this.editClass) {\n\t\tdomNode.className = this.editClass;\n\t}\n\t// Set the text\n\tif(this.editTag === \"textarea\") {\n\t\tdomNode.appendChild(this.document.createTextNode(editInfo.value));\n\t} else {\n\t\tdomNode.value = editInfo.value;\n\t}\n\t// Add an input event handler\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \"focus\", handlerObject: this, handlerMethod: \"handleFocusEvent\"},\n\t\t{name: \"input\", handlerObject: this, handlerMethod: \"handleInputEvent\"}\n\t]);\n\t// Insert the element into the DOM\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.domNodes.push(domNode);\n\tif(this.postRender) {\n\t\tthis.postRender();\n\t}\n\t// Fix height\n\tthis.fixHeight();\n\t// Focus field\n\tif(this.editFocus === \"true\") {\n\t\tif(domNode.focus && domNode.select) {\n\t\t\tdomNode.focus();\n\t\t\tdomNode.select();\n\t\t}\n\t}\n};\n\n/*\nGet the tiddler being edited and current value\n*/\nEditTextWidget.prototype.getEditInfo = function() {\n\t// Get the edit value\n\tvar self = this,\n\t\tvalue,\n\t\tupdate;\n\tif(this.editIndex) {\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.editTitle,this.editIndex,this.editDefault);\n\t\tupdate = function(value) {\n\t\t\tvar data = self.wiki.getTiddlerData(self.editTitle,{});\n\t\t\tif(data[self.editIndex] !== value) {\n\t\t\t\tdata[self.editIndex] = value;\n\t\t\t\tself.wiki.setTiddlerData(self.editTitle,data);\n\t\t\t}\n\t\t};\n\t} else {\n\t\t// Get the current tiddler and the field name\n\t\tvar tiddler = this.wiki.getTiddler(this.editTitle);\n\t\tif(tiddler) {\n\t\t\t// If we've got a tiddler, the value to display is the field string value\n\t\t\tvalue = tiddler.getFieldString(this.editField);\n\t\t} else {\n\t\t\t// Otherwise, we need to construct a default value for the editor\n\t\t\tswitch(this.editField) {\n\t\t\t\tcase \"text\":\n\t\t\t\t\tvalue = \"Type the text for the tiddler '\" + this.editTitle + \"'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"title\":\n\t\t\t\t\tvalue = this.editTitle;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tvalue = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(this.editDefault !== undefined) {\n\t\t\t\tvalue = this.editDefault;\n\t\t\t}\n\t\t}\n\t\tupdate = function(value) {\n\t\t\tvar tiddler = self.wiki.getTiddler(self.editTitle),\n\t\t\t\tupdateFields = {\n\t\t\t\t\ttitle: self.editTitle\n\t\t\t\t};\n\t\t\tupdateFields[self.editField] = value;\n\t\t\tself.wiki.addTiddler(new $tw.Tiddler(self.wiki.getCreationFields(),tiddler,updateFields,self.wiki.getModificationFields()));\n\t\t};\n\t}\n\treturn {value: value, update: update};\n};\n\n/*\nCompute the internal state of the widget\n*/\nEditTextWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.editTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.editField = this.getAttribute(\"field\",\"text\");\n\tthis.editIndex = this.getAttribute(\"index\");\n\tthis.editDefault = this.getAttribute(\"default\");\n\tthis.editClass = this.getAttribute(\"class\");\n\tthis.editPlaceholder = this.getAttribute(\"placeholder\");\n\tthis.editSize = this.getAttribute(\"size\");\n\tthis.editRows = this.getAttribute(\"rows\");\n\tthis.editAutoHeight = this.getAttribute(\"autoHeight\",\"yes\") === \"yes\";\n\tthis.editMinHeight = this.getAttribute(\"minHeight\",DEFAULT_MIN_TEXT_AREA_HEIGHT);\n\tthis.editFocusPopup = this.getAttribute(\"focusPopup\");\n\tthis.editFocus = this.getAttribute(\"focus\");\n\t// Get the editor element tag and type\n\tvar tag,type;\n\tif(this.editField === \"text\") {\n\t\ttag = \"textarea\";\n\t} else {\n\t\ttag = \"input\";\n\t\tvar fieldModule = $tw.Tiddler.fieldModules[this.editField];\n\t\tif(fieldModule && fieldModule.editTag) {\n\t\t\ttag = fieldModule.editTag;\n\t\t}\n\t\tif(fieldModule && fieldModule.editType) {\n\t\t\ttype = fieldModule.editType;\n\t\t}\n\t\ttype = type || \"text\";\n\t}\n\t// Get the rest of our parameters\n\tthis.editTag = this.getAttribute(\"tag\",tag);\n\tthis.editType = this.getAttribute(\"type\",type);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nEditTextWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\t// Completely rerender if any of our attributes have changed\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes[\"default\"] || changedAttributes[\"class\"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else if(changedTiddlers[this.editTitle]) {\n\t\tthis.updateEditor(this.getEditInfo().value);\n\t\treturn true;\n\t}\n\t// Fix the height anyway in case there has been a reflow\n\tthis.fixHeight();\n\treturn false;\n};\n\n/*\nUpdate the editor with new text. This method is separate from updateEditorDomNode()\nso that subclasses can override updateEditor() and still use updateEditorDomNode()\n*/\nEditTextWidget.prototype.updateEditor = function(text) {\n\tthis.updateEditorDomNode(text);\n};\n\n/*\nUpdate the editor dom node with new text\n*/\nEditTextWidget.prototype.updateEditorDomNode = function(text) {\n\t// Replace the edit value if the tiddler we're editing has changed\n\tvar domNode = this.domNodes[0];\n\tif(!domNode.isTiddlyWikiFakeDom) {\n\t\tif(this.document.activeElement !== domNode) {\n\t\t\tdomNode.value = text;\n\t\t}\n\t\t// Fix the height if needed\n\t\tthis.fixHeight();\n\t}\n};\n\n/*\nGet the first parent element that has scrollbars or use the body as fallback.\n*/\nEditTextWidget.prototype.getScrollContainer = function(el) {\n\twhile(el.parentNode) {\t\n\t\tel = el.parentNode;\n\t\tif(el.scrollTop) {\n\t\t\treturn el;\n\t\t}\n\t}\n\treturn this.document.body;\n};\n\n/*\nFix the height of textareas to fit their content\n*/\nEditTextWidget.prototype.fixHeight = function() {\n\tvar domNode = this.domNodes[0];\n\tif(this.editAutoHeight && domNode && !domNode.isTiddlyWikiFakeDom && this.editTag === \"textarea\") {\n\t\t// Resize the textarea to fit its content, preserving scroll position\n\t\t// Get the scroll container and register the current scroll position\n\t\tvar container = this.getScrollContainer(domNode),\n\t\t\tscrollTop = container.scrollTop;\n // Measure the specified minimum height\n\t\tdomNode.style.height = this.editMinHeight;\n\t\tvar minHeight = domNode.offsetHeight;\n\t\t// Set its height to auto so that it snaps to the correct height\n\t\tdomNode.style.height = \"auto\";\n\t\t// Calculate the revised height\n\t\tvar newHeight = Math.max(domNode.scrollHeight + domNode.offsetHeight - domNode.clientHeight,minHeight);\n\t\t// Only try to change the height if it has changed\n\t\tif(newHeight !== domNode.offsetHeight) {\n\t\t\tdomNode.style.height = newHeight + \"px\";\n\t\t\t// Make sure that the dimensions of the textarea are recalculated\n\t\t\t$tw.utils.forceLayout(domNode);\n\t\t\t// Set the container to the position we registered at the beginning\n\t\t\tcontainer.scrollTop = scrollTop;\n\t\t}\n\t}\n};\n\n/*\nHandle a dom \"input\" event\n*/\nEditTextWidget.prototype.handleInputEvent = function(event) {\n\tthis.saveChanges(this.domNodes[0].value);\n\tthis.fixHeight();\n\treturn true;\n};\n\nEditTextWidget.prototype.handleFocusEvent = function(event) {\n\tif(this.editFocusPopup) {\n\t\t$tw.popup.triggerPopup({\n\t\t\tdomNode: this.domNodes[0],\n\t\t\ttitle: this.editFocusPopup,\n\t\t\twiki: this.wiki,\n\t\t\tforce: true\n\t\t});\n\t}\n\treturn true;\n};\n\nEditTextWidget.prototype.saveChanges = function(text) {\n\tvar editInfo = this.getEditInfo();\n\tif(text !== editInfo.value) {\n\t\teditInfo.update(text);\n\t}\n};\n\nexports[\"edit-text\"] = EditTextWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/edit-text.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/edit.js\ntype: application/javascript\nmodule-type: widget\n\nEdit widget is a meta-widget chooses the appropriate actual editting widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EditWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n// Mappings from content type to editor type are stored in tiddlers with this prefix\nvar EDITOR_MAPPING_PREFIX = \"$:/config/EditorTypeMappings/\";\n\n/*\nCompute the internal state of the widget\n*/\nEditWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.editTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.editField = this.getAttribute(\"field\",\"text\");\n\tthis.editIndex = this.getAttribute(\"index\");\n\tthis.editClass = this.getAttribute(\"class\");\n\tthis.editPlaceholder = this.getAttribute(\"placeholder\");\n\t// Choose the appropriate edit widget\n\tthis.editorType = this.getEditorType();\n\t// Make the child widgets\n\tthis.makeChildWidgets([{\n\t\ttype: \"edit-\" + this.editorType,\n\t\tattributes: {\n\t\t\ttiddler: {type: \"string\", value: this.editTitle},\n\t\t\tfield: {type: \"string\", value: this.editField},\n\t\t\tindex: {type: \"string\", value: this.editIndex},\n\t\t\t\"class\": {type: \"string\", value: this.editClass},\n\t\t\t\"placeholder\": {type: \"string\", value: this.editPlaceholder}\n\t\t}\n\t}]);\n};\n\nEditWidget.prototype.getEditorType = function() {\n\t// Get the content type of the thing we're editing\n\tvar type;\n\tif(this.editField === \"text\") {\n\t\tvar tiddler = this.wiki.getTiddler(this.editTitle);\n\t\tif(tiddler) {\n\t\t\ttype = tiddler.fields.type;\n\t\t}\n\t}\n\ttype = type || \"text/vnd.tiddlywiki\";\n\tvar editorType = this.wiki.getTiddlerText(EDITOR_MAPPING_PREFIX + type);\n\tif(!editorType) {\n\t\tvar typeInfo = $tw.config.contentTypeInfo[type];\n\t\tif(typeInfo && typeInfo.encoding === \"base64\") {\n\t\t\teditorType = \"binary\";\n\t\t} else {\n\t\t\teditorType = \"text\";\n\t\t}\n\t}\n\treturn editorType;\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nEditWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\t// Refresh if an attribute has changed, or the type associated with the target tiddler has changed\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || (changedTiddlers[this.editTitle] && this.getEditorType() !== this.editorType)) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.edit = EditWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/edit.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/element.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/element.js\ntype: application/javascript\nmodule-type: widget\n\nElement widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ElementWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nElementWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nElementWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Neuter blacklisted elements\n\tvar tag = this.parseTreeNode.tag;\n\tif($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {\n\t\ttag = \"safe-\" + tag;\n\t}\n\tvar domNode = this.document.createElementNS(this.namespace,tag);\n\tthis.assignAttributes(domNode,{excludeEventAttributes: true});\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nElementWidget.prototype.execute = function() {\n\t// Select the namespace for the tag\n\tvar tagNamespaces = {\n\t\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\t\tmath: \"http://www.w3.org/1998/Math/MathML\",\n\t\t\tbody: \"http://www.w3.org/1999/xhtml\"\n\t\t};\n\tthis.namespace = tagNamespaces[this.parseTreeNode.tag];\n\tif(this.namespace) {\n\t\tthis.setVariable(\"namespace\",this.namespace);\n\t} else {\n\t\tthis.namespace = this.getVariable(\"namespace\",{defaultValue: \"http://www.w3.org/1999/xhtml\"});\n\t}\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nElementWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes(),\n\t\thasChangedAttributes = $tw.utils.count(changedAttributes) > 0;\n\tif(hasChangedAttributes) {\n\t\t// Update our attributes\n\t\tthis.assignAttributes(this.domNodes[0],{excludeEventAttributes: true});\n\t}\n\treturn this.refreshChildren(changedTiddlers) || hasChangedAttributes;\n};\n\nexports.element = ElementWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/element.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/encrypt.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/encrypt.js\ntype: application/javascript\nmodule-type: widget\n\nEncrypt widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EncryptWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEncryptWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEncryptWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar textNode = this.document.createTextNode(this.encryptedText);\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nEncryptWidget.prototype.execute = function() {\n\t// Get parameters from our attributes\n\tthis.filter = this.getAttribute(\"filter\",\"[!is[system]]\");\n\t// Encrypt the filtered tiddlers\n\tvar tiddlers = this.wiki.filterTiddlers(this.filter),\n\t\tjson = {},\n\t\tself = this;\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = self.wiki.getTiddler(title),\n\t\t\tjsonTiddler = {};\n\t\tfor(var f in tiddler.fields) {\n\t\t\tjsonTiddler[f] = tiddler.getFieldString(f);\n\t\t}\n\t\tjson[title] = jsonTiddler;\n\t});\n\tthis.encryptedText = $tw.utils.htmlEncode($tw.crypto.encrypt(JSON.stringify(json)));\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nEncryptWidget.prototype.refresh = function(changedTiddlers) {\n\t// We don't need to worry about refreshing because the encrypt widget isn't for interactive use\n\treturn false;\n};\n\nexports.encrypt = EncryptWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/encrypt.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/entity.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/entity.js\ntype: application/javascript\nmodule-type: widget\n\nHTML entity widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EntityWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEntityWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEntityWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.execute();\n\tvar textNode = this.document.createTextNode($tw.utils.entityDecode(this.parseTreeNode.entity));\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nEntityWidget.prototype.execute = function() {\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nEntityWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nexports.entity = EntityWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/entity.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/fieldmangler.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/fieldmangler.js\ntype: application/javascript\nmodule-type: widget\n\nField mangler widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar FieldManglerWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.addEventListeners([\n\t\t{type: \"tm-remove-field\", handler: \"handleRemoveFieldEvent\"},\n\t\t{type: \"tm-add-field\", handler: \"handleAddFieldEvent\"},\n\t\t{type: \"tm-remove-tag\", handler: \"handleRemoveTagEvent\"},\n\t\t{type: \"tm-add-tag\", handler: \"handleAddTagEvent\"}\n\t]);\n};\n\n/*\nInherit from the base widget class\n*/\nFieldManglerWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nFieldManglerWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nFieldManglerWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.mangleTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nFieldManglerWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nFieldManglerWidget.prototype.handleRemoveFieldEvent = function(event) {\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle),\n\t\tdeletion = {};\n\tdeletion[event.param] = undefined;\n\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,deletion));\n\treturn true;\n};\n\nFieldManglerWidget.prototype.handleAddFieldEvent = function(event) {\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle),\n\t\taddition = this.wiki.getModificationFields(),\n\t\thadInvalidFieldName = false,\n\t\taddField = function(name,value) {\n\t\t\tvar trimmedName = name.toLowerCase().trim();\n\t\t\tif(!$tw.utils.isValidFieldName(trimmedName)) {\n\t\t\t\tif(!hadInvalidFieldName) {\n\t\t\t\t\talert($tw.language.getString(\n\t\t\t\t\t\t\"InvalidFieldName\",\n\t\t\t\t\t\t{variables:\n\t\t\t\t\t\t\t{fieldName: trimmedName}\n\t\t\t\t\t\t}\n\t\t\t\t\t));\n\t\t\t\t\thadInvalidFieldName = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!value && tiddler) {\n\t\t\t\t\tvalue = tiddler.fields[trimmedName];\n\t\t\t\t}\n\t\t\t\taddition[trimmedName] = value || \"\";\n\t\t\t}\n\t\t\treturn;\n\t\t};\n\taddition.title = this.mangleTitle;\n\tif(typeof event.param === \"string\") {\n\t\taddField(event.param,\"\");\n\t}\n\tif(typeof event.paramObject === \"object\") {\n\t\tfor(var name in event.paramObject) {\n\t\t\taddField(name,event.paramObject[name]);\n\t\t}\n\t}\n\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,addition));\n\treturn true;\n};\n\nFieldManglerWidget.prototype.handleRemoveTagEvent = function(event) {\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle);\n\tif(tiddler && tiddler.fields.tags) {\n\t\tvar p = tiddler.fields.tags.indexOf(event.param);\n\t\tif(p !== -1) {\n\t\t\tvar modification = this.wiki.getModificationFields();\n\t\t\tmodification.tags = (tiddler.fields.tags || []).slice(0);\n\t\t\tmodification.tags.splice(p,1);\n\t\t\tif(modification.tags.length === 0) {\n\t\t\t\tmodification.tags = undefined;\n\t\t\t}\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));\n\t\t}\n\t}\n\treturn true;\n};\n\nFieldManglerWidget.prototype.handleAddTagEvent = function(event) {\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle);\n\tif(tiddler && typeof event.param === \"string\") {\n\t\tvar tag = event.param.trim();\n\t\tif(tag !== \"\") {\n\t\t\tvar modification = this.wiki.getModificationFields();\n\t\t\tmodification.tags = (tiddler.fields.tags || []).slice(0);\n\t\t\t$tw.utils.pushTop(modification.tags,tag);\n\t\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));\t\t\t\n\t\t}\n\t} else if(typeof event.param === \"string\" && event.param.trim() !== \"\" && this.mangleTitle.trim() !== \"\") {\n\t\tvar tag = [];\n\t\ttag.push(event.param.trim());\n\t\tthis.wiki.addTiddler({title: this.mangleTitle, tags: tag});\t\t\n\t}\n\treturn true;\n};\n\nexports.fieldmangler = FieldManglerWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/fieldmangler.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/fields.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/fields.js\ntype: application/javascript\nmodule-type: widget\n\nFields widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar FieldsWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nFieldsWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nFieldsWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar textNode = this.document.createTextNode(this.text);\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nFieldsWidget.prototype.execute = function() {\n\t// Get parameters from our attributes\n\tthis.tiddlerTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.template = this.getAttribute(\"template\");\n\tthis.exclude = this.getAttribute(\"exclude\");\n\tthis.stripTitlePrefix = this.getAttribute(\"stripTitlePrefix\",\"no\") === \"yes\";\n\t// Get the value to display\n\tvar tiddler = this.wiki.getTiddler(this.tiddlerTitle);\n\t// Get the exclusion list\n\tvar exclude;\n\tif(this.exclude) {\n\t\texclude = this.exclude.split(\" \");\n\t} else {\n\t\texclude = [\"text\"]; \n\t}\n\t// Compose the template\n\tvar text = [];\n\tif(this.template && tiddler) {\n\t\tvar fields = [];\n\t\tfor(var fieldName in tiddler.fields) {\n\t\t\tif(exclude.indexOf(fieldName) === -1) {\n\t\t\t\tfields.push(fieldName);\n\t\t\t}\n\t\t}\n\t\tfields.sort();\n\t\tfor(var f=0; f<fields.length; f++) {\n\t\t\tfieldName = fields[f];\n\t\t\tif(exclude.indexOf(fieldName) === -1) {\n\t\t\t\tvar row = this.template,\n\t\t\t\t\tvalue = tiddler.getFieldString(fieldName);\n\t\t\t\tif(this.stripTitlePrefix && fieldName === \"title\") {\n\t\t\t\t\tvar reStrip = /^\\{[^\\}]+\\}(.+)/mg,\n\t\t\t\t\t\treMatch = reStrip.exec(value);\n\t\t\t\t\tif(reMatch) {\n\t\t\t\t\t\tvalue = reMatch[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trow = row.replace(\"$name$\",fieldName);\n\t\t\t\trow = row.replace(\"$value$\",value);\n\t\t\t\trow = row.replace(\"$encoded_value$\",$tw.utils.htmlEncode(value));\n\t\t\t\ttext.push(row);\n\t\t\t}\n\t\t}\n\t}\n\tthis.text = text.join(\"\");\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nFieldsWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.template || changedAttributes.exclude || changedAttributes.stripTitlePrefix || changedTiddlers[this.tiddlerTitle]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\n\t}\n};\n\nexports.fields = FieldsWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/fields.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/image.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/image.js\ntype: application/javascript\nmodule-type: widget\n\nThe image widget displays an image referenced with an external URI or with a local tiddler title.\n\n```\n<$image src=\"TiddlerTitle\" width=\"320\" height=\"400\" class=\"classnames\">\n```\n\nThe image source can be the title of an existing tiddler or the URL of an external image.\n\nExternal images always generate an HTML `<img>` tag.\n\nTiddlers that have a _canonical_uri field generate an HTML `<img>` tag with the src attribute containing the URI.\n\nTiddlers that contain image data generate an HTML `<img>` tag with the src attribute containing a base64 representation of the image.\n\nTiddlers that contain wikitext could be rendered to a DIV of the usual size of a tiddler, and then transformed to the size requested.\n\nThe width and height attributes are interpreted as a number of pixels, and do not need to include the \"px\" suffix.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ImageWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nImageWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nImageWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\t// Determine what type of image it is\n\tvar tag = \"img\", src = \"\",\n\t\ttiddler = this.wiki.getTiddler(this.imageSource);\n\tif(!tiddler) {\n\t\t// The source isn't the title of a tiddler, so we'll assume it's a URL\n\t\tsrc = this.getVariable(\"tv-get-export-image-link\",{params: [{name: \"src\",value: this.imageSource}],defaultValue: this.imageSource});\n\t} else {\n\t\t// Check if it is an image tiddler\n\t\tif(this.wiki.isImageTiddler(this.imageSource)) {\n\t\t\tvar type = tiddler.fields.type,\n\t\t\t\ttext = tiddler.fields.text,\n\t\t\t\t_canonical_uri = tiddler.fields._canonical_uri;\n\t\t\t// If the tiddler has body text then it doesn't need to be lazily loaded\n\t\t\tif(text) {\n\t\t\t\t// Render the appropriate element for the image type\n\t\t\t\tswitch(type) {\n\t\t\t\t\tcase \"application/pdf\":\n\t\t\t\t\t\ttag = \"embed\";\n\t\t\t\t\t\tsrc = \"data:application/pdf;base64,\" + text;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/svg+xml\":\n\t\t\t\t\t\tsrc = \"data:image/svg+xml,\" + encodeURIComponent(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tsrc = \"data:\" + type + \";base64,\" + text;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if(_canonical_uri) {\n\t\t\t\tswitch(type) {\n\t\t\t\t\tcase \"application/pdf\":\n\t\t\t\t\t\ttag = \"embed\";\n\t\t\t\t\t\tsrc = _canonical_uri;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/svg+xml\":\n\t\t\t\t\t\tsrc = _canonical_uri;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tsrc = _canonical_uri;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}\n\t// Create the element and assign the attributes\n\tvar domNode = this.document.createElement(tag);\n\tdomNode.setAttribute(\"src\",src);\n\tif(this.imageClass) {\n\t\tdomNode.setAttribute(\"class\",this.imageClass);\t\t\n\t}\n\tif(this.imageWidth) {\n\t\tdomNode.setAttribute(\"width\",this.imageWidth);\n\t}\n\tif(this.imageHeight) {\n\t\tdomNode.setAttribute(\"height\",this.imageHeight);\n\t}\n\tif(this.imageTooltip) {\n\t\tdomNode.setAttribute(\"title\",this.imageTooltip);\t\t\n\t}\n\tif(this.imageAlt) {\n\t\tdomNode.setAttribute(\"alt\",this.imageAlt);\t\t\n\t}\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.domNodes.push(domNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nImageWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.imageSource = this.getAttribute(\"source\");\n\tthis.imageWidth = this.getAttribute(\"width\");\n\tthis.imageHeight = this.getAttribute(\"height\");\n\tthis.imageClass = this.getAttribute(\"class\");\n\tthis.imageTooltip = this.getAttribute(\"tooltip\");\n\tthis.imageAlt = this.getAttribute(\"alt\");\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nImageWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.source || changedAttributes.width || changedAttributes.height || changedAttributes[\"class\"] || changedAttributes.tooltip || changedTiddlers[this.imageSource]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\t\n\t}\n};\n\nexports.image = ImageWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/image.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/importvariables.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/importvariables.js\ntype: application/javascript\nmodule-type: widget\n\nImport variable definitions from other tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ImportVariablesWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nImportVariablesWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nImportVariablesWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nImportVariablesWidget.prototype.execute = function(tiddlerList) {\n\tvar self = this;\n\t// Get our parameters\n\tthis.filter = this.getAttribute(\"filter\");\n\t// Compute the filter\n\tthis.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this);\n\t// Accumulate the <$set> widgets from each tiddler\n\tvar widgetStackStart,widgetStackEnd;\n\tfunction addWidgetNode(widgetNode) {\n\t\tif(widgetNode) {\n\t\t\tif(!widgetStackStart && !widgetStackEnd) {\n\t\t\t\twidgetStackStart = widgetNode;\n\t\t\t\twidgetStackEnd = widgetNode;\n\t\t\t} else {\n\t\t\t\twidgetStackEnd.children = [widgetNode];\n\t\t\t\twidgetStackEnd = widgetNode;\n\t\t\t}\n\t\t}\n\t}\n\t$tw.utils.each(this.tiddlerList,function(title) {\n\t\tvar parser = self.wiki.parseTiddler(title);\n\t\tif(parser) {\n\t\t\tvar parseTreeNode = parser.tree[0];\n\t\t\twhile(parseTreeNode && parseTreeNode.type === \"set\") {\n\t\t\t\taddWidgetNode({\n\t\t\t\t\ttype: \"set\",\n\t\t\t\t\tattributes: parseTreeNode.attributes,\n\t\t\t\t\tparams: parseTreeNode.params\n\t\t\t\t});\n\t\t\t\tparseTreeNode = parseTreeNode.children[0];\n\t\t\t}\n\t\t} \n\t});\n\t// Add our own children to the end of the pile\n\tvar parseTreeNodes;\n\tif(widgetStackStart && widgetStackEnd) {\n\t\tparseTreeNodes = [widgetStackStart];\n\t\twidgetStackEnd.children = this.parseTreeNode.children;\n\t} else {\n\t\tparseTreeNodes = this.parseTreeNode.children;\n\t}\n\t// Construct the child widgets\n\tthis.makeChildWidgets(parseTreeNodes);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nImportVariablesWidget.prototype.refresh = function(changedTiddlers) {\n\t// Recompute our attributes and the filter list\n\tvar changedAttributes = this.computeAttributes(),\n\t\ttiddlerList = this.wiki.filterTiddlers(this.getAttribute(\"filter\"),this);\n\t// Refresh if the filter has changed, or the list of tiddlers has changed, or any of the tiddlers in the list has changed\n\tfunction haveListedTiddlersChanged() {\n\t\tvar changed = false;\n\t\ttiddlerList.forEach(function(title) {\n\t\t\tif(changedTiddlers[title]) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t});\n\t\treturn changed;\n\t}\n\tif(changedAttributes.filter || !$tw.utils.isArrayEqual(this.tiddlerList,tiddlerList) || haveListedTiddlersChanged()) {\n\t\t// Compute the filter\n\t\tthis.removeChildDomNodes();\n\t\tthis.execute(tiddlerList);\n\t\tthis.renderChildren(this.parentDomNode,this.findNextSiblingDomNode());\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.importvariables = ImportVariablesWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/importvariables.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/keyboard.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/keyboard.js\ntype: application/javascript\nmodule-type: widget\n\nKeyboard shortcut widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar KeyboardWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nKeyboardWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nKeyboardWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\tvar domNode = this.document.createElement(\"div\");\n\t// Assign classes\n\tvar classes = (this[\"class\"] || \"\").split(\" \");\n\tclasses.push(\"tc-keyboard\");\n\tdomNode.className = classes.join(\" \");\n\t// Add a keyboard event handler\n\tdomNode.addEventListener(\"keydown\",function (event) {\n\t\tif($tw.utils.checkKeyDescriptor(event,self.keyInfo)) {\n\t\t\tself.invokeActions(this,event);\n\t\t\tself.dispatchMessage(event);\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},false);\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\nKeyboardWidget.prototype.dispatchMessage = function(event) {\n\tthis.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable(\"currentTiddler\")});\n};\n\n/*\nCompute the internal state of the widget\n*/\nKeyboardWidget.prototype.execute = function() {\n\t// Get attributes\n\tthis.message = this.getAttribute(\"message\");\n\tthis.param = this.getAttribute(\"param\");\n\tthis.key = this.getAttribute(\"key\");\n\tthis.keyInfo = $tw.utils.parseKeyDescriptor(this.key);\n\tthis[\"class\"] = this.getAttribute(\"class\");\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nKeyboardWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.message || changedAttributes.param || changedAttributes.key || changedAttributes[\"class\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.keyboard = KeyboardWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/keyboard.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/link.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/link.js\ntype: application/javascript\nmodule-type: widget\n\nLink widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar LinkWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nLinkWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nLinkWidget.prototype.render = function(parent,nextSibling) {\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Get the value of the tv-wikilinks configuration macro\n\tvar wikiLinksMacro = this.getVariable(\"tv-wikilinks\"),\n\t\tuseWikiLinks = wikiLinksMacro ? (wikiLinksMacro.trim() !== \"no\") : true;\n\t// Render the link if required\n\tif(useWikiLinks) {\n\t\tthis.renderLink(parent,nextSibling);\n\t} else {\n\t\t// Just insert the link text\n\t\tvar domNode = this.document.createElement(\"span\");\n\t\tparent.insertBefore(domNode,nextSibling);\n\t\tthis.renderChildren(domNode,null);\n\t\tthis.domNodes.push(domNode);\n\t}\n};\n\n/*\nRender this widget into the DOM\n*/\nLinkWidget.prototype.renderLink = function(parent,nextSibling) {\n\tvar self = this;\n\t// Sanitise the specified tag\n\tvar tag = this.linkTag;\n\tif($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {\n\t\ttag = \"a\";\n\t}\n\t// Create our element\n\tvar domNode = this.document.createElement(tag);\n\t// Assign classes\n\tvar classes = [];\n\tif(this.linkClasses) {\n\t\tclasses.push(this.linkClasses);\n\t}\n\tclasses.push(\"tc-tiddlylink\");\n\tif(this.isShadow) {\n\t\tclasses.push(\"tc-tiddlylink-shadow\");\n\t}\n\tif(this.isMissing && !this.isShadow) {\n\t\tclasses.push(\"tc-tiddlylink-missing\");\n\t} else {\n\t\tif(!this.isMissing) {\n\t\t\tclasses.push(\"tc-tiddlylink-resolves\");\n\t\t}\n\t}\n\tdomNode.setAttribute(\"class\",classes.join(\" \"));\n\t// Set an href\n\tvar wikiLinkTemplateMacro = this.getVariable(\"tv-wikilink-template\"),\n\t\twikiLinkTemplate = wikiLinkTemplateMacro ? wikiLinkTemplateMacro.trim() : \"#$uri_encoded$\",\n\t\twikiLinkText = wikiLinkTemplate.replace(\"$uri_encoded$\",encodeURIComponent(this.to));\n\twikiLinkText = wikiLinkText.replace(\"$uri_doubleencoded$\",encodeURIComponent(encodeURIComponent(this.to)));\n\twikiLinkText = this.getVariable(\"tv-get-export-link\",{params: [{name: \"to\",value: this.to}],defaultValue: wikiLinkText});\n\tif(tag === \"a\") {\n\t\tdomNode.setAttribute(\"href\",wikiLinkText);\n\t}\n\tif(this.tabIndex) {\n\t\tdomNode.setAttribute(\"tabindex\",this.tabIndex);\n\t}\n\t// Set the tooltip\n\t// HACK: Performance issues with re-parsing the tooltip prevent us defaulting the tooltip to \"<$transclude field='tooltip'><$transclude field='title'/></$transclude>\"\n\tvar tooltipWikiText = this.tooltip || this.getVariable(\"tv-wikilink-tooltip\");\n\tif(tooltipWikiText) {\n\t\tvar tooltipText = this.wiki.renderText(\"text/plain\",\"text/vnd.tiddlywiki\",tooltipWikiText,{\n\t\t\t\tparseAsInline: true,\n\t\t\t\tvariables: {\n\t\t\t\t\tcurrentTiddler: this.to\n\t\t\t\t},\n\t\t\t\tparentWidget: this\n\t\t\t});\n\t\tdomNode.setAttribute(\"title\",tooltipText);\n\t}\n\tif(this[\"aria-label\"]) {\n\t\tdomNode.setAttribute(\"aria-label\",this[\"aria-label\"]);\n\t}\n\t// Add a click event handler\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \"click\", handlerObject: this, handlerMethod: \"handleClickEvent\"},\n\t]);\n\tif(this.draggable === \"yes\") {\n\t\t$tw.utils.addEventListeners(domNode,[\n\t\t\t{name: \"dragstart\", handlerObject: this, handlerMethod: \"handleDragStartEvent\"},\n\t\t\t{name: \"dragend\", handlerObject: this, handlerMethod: \"handleDragEndEvent\"}\n\t\t]);\n\t}\n\t// Insert the link into the DOM and render any children\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\nLinkWidget.prototype.handleClickEvent = function(event) {\n\t// Send the click on its way as a navigate event\n\tvar bounds = this.domNodes[0].getBoundingClientRect();\n\tthis.dispatchEvent({\n\t\ttype: \"tm-navigate\",\n\t\tnavigateTo: this.to,\n\t\tnavigateFromTitle: this.getVariable(\"storyTiddler\"),\n\t\tnavigateFromNode: this,\n\t\tnavigateFromClientRect: { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height\n\t\t},\n\t\tnavigateSuppressNavigation: event.metaKey || event.ctrlKey || (event.button === 1)\n\t});\n\tif(this.domNodes[0].hasAttribute(\"href\")) {\n\t\tevent.preventDefault();\n\t}\n\tevent.stopPropagation();\n\treturn false;\n};\n\nLinkWidget.prototype.handleDragStartEvent = function(event) {\n\tif(event.target === this.domNodes[0]) {\n\t\tif(this.to) {\n\t\t\t$tw.dragInProgress = true;\n\t\t\t// Set the dragging class on the element being dragged\n\t\t\t$tw.utils.addClass(event.target,\"tc-tiddlylink-dragging\");\n\t\t\t// Create the drag image elements\n\t\t\tthis.dragImage = this.document.createElement(\"div\");\n\t\t\tthis.dragImage.className = \"tc-tiddler-dragger\";\n\t\t\tvar inner = this.document.createElement(\"div\");\n\t\t\tinner.className = \"tc-tiddler-dragger-inner\";\n\t\t\tinner.appendChild(this.document.createTextNode(this.to));\n\t\t\tthis.dragImage.appendChild(inner);\n\t\t\tthis.document.body.appendChild(this.dragImage);\n\t\t\t// Astoundingly, we need to cover the dragger up: http://www.kryogenix.org/code/browser/custom-drag-image.html\n\t\t\tvar cover = this.document.createElement(\"div\");\n\t\t\tcover.className = \"tc-tiddler-dragger-cover\";\n\t\t\tcover.style.left = (inner.offsetLeft - 16) + \"px\";\n\t\t\tcover.style.top = (inner.offsetTop - 16) + \"px\";\n\t\t\tcover.style.width = (inner.offsetWidth + 32) + \"px\";\n\t\t\tcover.style.height = (inner.offsetHeight + 32) + \"px\";\n\t\t\tthis.dragImage.appendChild(cover);\n\t\t\t// Set the data transfer properties\n\t\t\tvar dataTransfer = event.dataTransfer;\n\t\t\t// First the image\n\t\t\tdataTransfer.effectAllowed = \"copy\";\n\t\t\tif(dataTransfer.setDragImage) {\n\t\t\t\tdataTransfer.setDragImage(this.dragImage.firstChild,-16,-16);\n\t\t\t}\n\t\t\t// Then the data\n\t\t\tdataTransfer.clearData();\n\t\t\tvar jsonData = this.wiki.getTiddlerAsJson(this.to),\n\t\t\t\ttextData = this.wiki.getTiddlerText(this.to,\"\"),\n\t\t\t\ttitle = (new RegExp(\"^\" + $tw.config.textPrimitives.wikiLink + \"$\",\"mg\")).exec(this.to) ? this.to : \"[[\" + this.to + \"]]\";\n\t\t\t// IE doesn't like these content types\n\t\t\tif(!$tw.browser.isIE) {\n\t\t\t\tdataTransfer.setData(\"text/vnd.tiddler\",jsonData);\n\t\t\t\tdataTransfer.setData(\"text/plain\",title);\n\t\t\t\tdataTransfer.setData(\"text/x-moz-url\",\"data:text/vnd.tiddler,\" + encodeURIComponent(jsonData));\n\t\t\t}\n\t\t\tdataTransfer.setData(\"URL\",\"data:text/vnd.tiddler,\" + encodeURIComponent(jsonData));\n\t\t\tdataTransfer.setData(\"Text\",title);\n\t\t\tevent.stopPropagation();\n\t\t} else {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n};\n\nLinkWidget.prototype.handleDragEndEvent = function(event) {\n\tif(event.target === this.domNodes[0]) {\n\t\t$tw.dragInProgress = false;\n\t\t// Remove the dragging class on the element being dragged\n\t\t$tw.utils.removeClass(event.target,\"tc-tiddlylink-dragging\");\n\t\t// Delete the drag image element\n\t\tif(this.dragImage) {\n\t\t\tthis.dragImage.parentNode.removeChild(this.dragImage);\n\t\t}\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nLinkWidget.prototype.execute = function() {\n\t// Pick up our attributes\n\tthis.to = this.getAttribute(\"to\",this.getVariable(\"currentTiddler\"));\n\tthis.tooltip = this.getAttribute(\"tooltip\");\n\tthis[\"aria-label\"] = this.getAttribute(\"aria-label\");\n\tthis.linkClasses = this.getAttribute(\"class\");\n\tthis.tabIndex = this.getAttribute(\"tabindex\");\n\tthis.draggable = this.getAttribute(\"draggable\",\"yes\");\n\tthis.linkTag = this.getAttribute(\"tag\",\"a\");\n\t// Determine the link characteristics\n\tthis.isMissing = !this.wiki.tiddlerExists(this.to);\n\tthis.isShadow = this.wiki.isShadowTiddler(this.to);\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nLinkWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.to || changedTiddlers[this.to] || changedAttributes[\"aria-label\"] || changedAttributes.tooltip) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.link = LinkWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/link.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/linkcatcher.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/linkcatcher.js\ntype: application/javascript\nmodule-type: widget\n\nLinkcatcher widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar LinkCatcherWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.addEventListeners([\n\t\t{type: \"tm-navigate\", handler: \"handleNavigateEvent\"}\n\t]);\n};\n\n/*\nInherit from the base widget class\n*/\nLinkCatcherWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nLinkCatcherWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nLinkCatcherWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.catchTo = this.getAttribute(\"to\");\n\tthis.catchMessage = this.getAttribute(\"message\");\n\tthis.catchSet = this.getAttribute(\"set\");\n\tthis.catchSetTo = this.getAttribute(\"setTo\");\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nLinkCatcherWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.to || changedAttributes.message || changedAttributes.set || changedAttributes.setTo) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\n/*\nHandle a tm-navigate event\n*/\nLinkCatcherWidget.prototype.handleNavigateEvent = function(event) {\n\tif(this.catchTo) {\n\t\tthis.wiki.setTextReference(this.catchTo,event.navigateTo,this.getVariable(\"currentTiddler\"));\n\t}\n\tif(this.catchMessage && this.parentWidget) {\n\t\tthis.parentWidget.dispatchEvent({\n\t\t\ttype: this.catchMessage,\n\t\t\tparam: event.navigateTo,\n\t\t\tnavigateTo: event.navigateTo\n\t\t});\n\t}\n\tif(this.catchSet) {\n\t\tvar tiddler = this.wiki.getTiddler(this.catchSet);\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.catchSet, text: this.catchSetTo}));\n\t}\n\treturn false;\n};\n\nexports.linkcatcher = LinkCatcherWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/linkcatcher.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/list.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/list.js\ntype: application/javascript\nmodule-type: widget\n\nList and list item widgets\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\n/*\nThe list widget creates list element sub-widgets that reach back into the list widget for their configuration\n*/\n\nvar ListWidget = function(parseTreeNode,options) {\n\t// Initialise the storyviews if they've not been done already\n\tif(!this.storyViews) {\n\t\tListWidget.prototype.storyViews = {};\n\t\t$tw.modules.applyMethods(\"storyview\",this.storyViews);\n\t}\n\t// Main initialisation inherited from widget.js\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nListWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nListWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n\t// Construct the storyview\n\tvar StoryView = this.storyViews[this.storyViewName];\n\tif(StoryView && !this.document.isTiddlyWikiFakeDom) {\n\t\tthis.storyview = new StoryView(this);\n\t} else {\n\t\tthis.storyview = null;\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nListWidget.prototype.execute = function() {\n\t// Get our attributes\n\tthis.template = this.getAttribute(\"template\");\n\tthis.editTemplate = this.getAttribute(\"editTemplate\");\n\tthis.variableName = this.getAttribute(\"variable\",\"currentTiddler\");\n\tthis.storyViewName = this.getAttribute(\"storyview\");\n\tthis.historyTitle = this.getAttribute(\"history\");\n\t// Compose the list elements\n\tthis.list = this.getTiddlerList();\n\tvar members = [],\n\t\tself = this;\n\t// Check for an empty list\n\tif(this.list.length === 0) {\n\t\tmembers = this.getEmptyMessage();\n\t} else {\n\t\t$tw.utils.each(this.list,function(title,index) {\n\t\t\tmembers.push(self.makeItemTemplate(title));\n\t\t});\n\t}\n\t// Construct the child widgets\n\tthis.makeChildWidgets(members);\n\t// Clear the last history\n\tthis.history = [];\n};\n\nListWidget.prototype.getTiddlerList = function() {\n\tvar defaultFilter = \"[!is[system]sort[title]]\";\n\treturn this.wiki.filterTiddlers(this.getAttribute(\"filter\",defaultFilter),this);\n};\n\nListWidget.prototype.getEmptyMessage = function() {\n\tvar emptyMessage = this.getAttribute(\"emptyMessage\",\"\"),\n\t\tparser = this.wiki.parseText(\"text/vnd.tiddlywiki\",emptyMessage,{parseAsInline: true});\n\tif(parser) {\n\t\treturn parser.tree;\n\t} else {\n\t\treturn [];\n\t}\n};\n\n/*\nCompose the template for a list item\n*/\nListWidget.prototype.makeItemTemplate = function(title) {\n\t// Check if the tiddler is a draft\n\tvar tiddler = this.wiki.getTiddler(title),\n\t\tisDraft = tiddler && tiddler.hasField(\"draft.of\"),\n\t\ttemplate = this.template,\n\t\ttemplateTree;\n\tif(isDraft && this.editTemplate) {\n\t\ttemplate = this.editTemplate;\n\t}\n\t// Compose the transclusion of the template\n\tif(template) {\n\t\ttemplateTree = [{type: \"transclude\", attributes: {tiddler: {type: \"string\", value: template}}}];\n\t} else {\n\t\tif(this.parseTreeNode.children && this.parseTreeNode.children.length > 0) {\n\t\t\ttemplateTree = this.parseTreeNode.children;\n\t\t} else {\n\t\t\t// Default template is a link to the title\n\t\t\ttemplateTree = [{type: \"element\", tag: this.parseTreeNode.isBlock ? \"div\" : \"span\", children: [{type: \"link\", attributes: {to: {type: \"string\", value: title}}, children: [\n\t\t\t\t\t{type: \"text\", text: title}\n\t\t\t]}]}];\n\t\t}\n\t}\n\t// Return the list item\n\treturn {type: \"listitem\", itemTitle: title, variableName: this.variableName, children: templateTree};\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nListWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes(),\n\t\tresult;\n\t// Call the storyview\n\tif(this.storyview && this.storyview.refreshStart) {\n\t\tthis.storyview.refreshStart(changedTiddlers,changedAttributes);\n\t}\n\t// Completely refresh if any of our attributes have changed\n\tif(changedAttributes.filter || changedAttributes.template || changedAttributes.editTemplate || changedAttributes.emptyMessage || changedAttributes.storyview || changedAttributes.history) {\n\t\tthis.refreshSelf();\n\t\tresult = true;\n\t} else {\n\t\t// Handle any changes to the list\n\t\tresult = this.handleListChanges(changedTiddlers);\n\t\t// Handle any changes to the history stack\n\t\tif(this.historyTitle && changedTiddlers[this.historyTitle]) {\n\t\t\tthis.handleHistoryChanges();\n\t\t}\n\t}\n\t// Call the storyview\n\tif(this.storyview && this.storyview.refreshEnd) {\n\t\tthis.storyview.refreshEnd(changedTiddlers,changedAttributes);\n\t}\n\treturn result;\n};\n\n/*\nHandle any changes to the history list\n*/\nListWidget.prototype.handleHistoryChanges = function() {\n\t// Get the history data\n\tvar newHistory = this.wiki.getTiddlerDataCached(this.historyTitle,[]);\n\t// Ignore any entries of the history that match the previous history\n\tvar entry = 0;\n\twhile(entry < newHistory.length && entry < this.history.length && newHistory[entry].title === this.history[entry].title) {\n\t\tentry++;\n\t}\n\t// Navigate forwards to each of the new tiddlers\n\twhile(entry < newHistory.length) {\n\t\tif(this.storyview && this.storyview.navigateTo) {\n\t\t\tthis.storyview.navigateTo(newHistory[entry]);\n\t\t}\n\t\tentry++;\n\t}\n\t// Update the history\n\tthis.history = newHistory;\n};\n\n/*\nProcess any changes to the list\n*/\nListWidget.prototype.handleListChanges = function(changedTiddlers) {\n\t// Get the new list\n\tvar prevList = this.list;\n\tthis.list = this.getTiddlerList();\n\t// Check for an empty list\n\tif(this.list.length === 0) {\n\t\t// Check if it was empty before\n\t\tif(prevList.length === 0) {\n\t\t\t// If so, just refresh the empty message\n\t\t\treturn this.refreshChildren(changedTiddlers);\n\t\t} else {\n\t\t\t// Replace the previous content with the empty message\n\t\t\tfor(t=this.children.length-1; t>=0; t--) {\n\t\t\t\tthis.removeListItem(t);\n\t\t\t}\n\t\t\tvar nextSibling = this.findNextSiblingDomNode();\n\t\t\tthis.makeChildWidgets(this.getEmptyMessage());\n\t\t\tthis.renderChildren(this.parentDomNode,nextSibling);\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\t// If the list was empty then we need to remove the empty message\n\t\tif(prevList.length === 0) {\n\t\t\tthis.removeChildDomNodes();\n\t\t\tthis.children = [];\n\t\t}\n\t\t// Cycle through the list, inserting and removing list items as needed\n\t\tvar hasRefreshed = false;\n\t\tfor(var t=0; t<this.list.length; t++) {\n\t\t\tvar index = this.findListItem(t,this.list[t]);\n\t\t\tif(index === undefined) {\n\t\t\t\t// The list item must be inserted\n\t\t\t\tthis.insertListItem(t,this.list[t]);\n\t\t\t\thasRefreshed = true;\n\t\t\t} else {\n\t\t\t\t// There are intervening list items that must be removed\n\t\t\t\tfor(var n=index-1; n>=t; n--) {\n\t\t\t\t\tthis.removeListItem(n);\n\t\t\t\t\thasRefreshed = true;\n\t\t\t\t}\n\t\t\t\t// Refresh the item we're reusing\n\t\t\t\tvar refreshed = this.children[t].refresh(changedTiddlers);\n\t\t\t\thasRefreshed = hasRefreshed || refreshed;\n\t\t\t}\n\t\t}\n\t\t// Remove any left over items\n\t\tfor(t=this.children.length-1; t>=this.list.length; t--) {\n\t\t\tthis.removeListItem(t);\n\t\t\thasRefreshed = true;\n\t\t}\n\t\treturn hasRefreshed;\n\t}\n};\n\n/*\nFind the list item with a given title, starting from a specified position\n*/\nListWidget.prototype.findListItem = function(startIndex,title) {\n\twhile(startIndex < this.children.length) {\n\t\tif(this.children[startIndex].parseTreeNode.itemTitle === title) {\n\t\t\treturn startIndex;\n\t\t}\n\t\tstartIndex++;\n\t}\n\treturn undefined;\n};\n\n/*\nInsert a new list item at the specified index\n*/\nListWidget.prototype.insertListItem = function(index,title) {\n\t// Create, insert and render the new child widgets\n\tvar widget = this.makeChildWidget(this.makeItemTemplate(title));\n\twidget.parentDomNode = this.parentDomNode; // Hack to enable findNextSiblingDomNode() to work\n\tthis.children.splice(index,0,widget);\n\tvar nextSibling = widget.findNextSiblingDomNode();\n\twidget.render(this.parentDomNode,nextSibling);\n\t// Animate the insertion if required\n\tif(this.storyview && this.storyview.insert) {\n\t\tthis.storyview.insert(widget);\n\t}\n\treturn true;\n};\n\n/*\nRemove the specified list item\n*/\nListWidget.prototype.removeListItem = function(index) {\n\tvar widget = this.children[index];\n\t// Animate the removal if required\n\tif(this.storyview && this.storyview.remove) {\n\t\tthis.storyview.remove(widget);\n\t} else {\n\t\twidget.removeChildDomNodes();\n\t}\n\t// Remove the child widget\n\tthis.children.splice(index,1);\n};\n\nexports.list = ListWidget;\n\nvar ListItemWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nListItemWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nListItemWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nListItemWidget.prototype.execute = function() {\n\t// Set the current list item title\n\tthis.setVariable(this.parseTreeNode.variableName,this.parseTreeNode.itemTitle);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nListItemWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.listitem = ListItemWidget;\n\n})();",
"title": "$:/core/modules/widgets/list.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/macrocall.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/macrocall.js\ntype: application/javascript\nmodule-type: widget\n\nMacrocall widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar MacroCallWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nMacroCallWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nMacroCallWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nMacroCallWidget.prototype.execute = function() {\n\t// Get the parse type if specified\n\tthis.parseType = this.getAttribute(\"$type\",\"text/vnd.tiddlywiki\");\n\tthis.renderOutput = this.getAttribute(\"$output\",\"text/html\");\n\t// Merge together the parameters specified in the parse tree with the specified attributes\n\tvar params = this.parseTreeNode.params ? this.parseTreeNode.params.slice(0) : [];\n\t$tw.utils.each(this.attributes,function(attribute,name) {\n\t\tif(name.charAt(0) !== \"$\") {\n\t\t\tparams.push({name: name, value: attribute});\t\t\t\n\t\t}\n\t});\n\t// Get the macro value\n\tvar text = this.getVariable(this.parseTreeNode.name || this.getAttribute(\"$name\"),{params: params}),\n\t\tparseTreeNodes;\n\t// Are we rendering to HTML?\n\tif(this.renderOutput === \"text/html\") {\n\t\t// If so we'll return the parsed macro\n\t\tvar parser = this.wiki.parseText(this.parseType,text,\n\t\t\t\t\t\t\t{parseAsInline: !this.parseTreeNode.isBlock});\n\t\tparseTreeNodes = parser ? parser.tree : [];\n\t} else {\n\t\t// Otherwise, we'll render the text\n\t\tvar plainText = this.wiki.renderText(\"text/plain\",this.parseType,text,{parentWidget: this});\n\t\tparseTreeNodes = [{type: \"text\", text: plainText}];\n\t}\n\t// Construct the child widgets\n\tthis.makeChildWidgets(parseTreeNodes);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nMacroCallWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif($tw.utils.count(changedAttributes) > 0) {\n\t\t// Rerender ourselves\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\n\t}\n};\n\nexports.macrocall = MacroCallWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/macrocall.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/navigator.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/navigator.js\ntype: application/javascript\nmodule-type: widget\n\nNavigator widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar IMPORT_TITLE = \"$:/Import\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar NavigatorWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.addEventListeners([\n\t\t{type: \"tm-navigate\", handler: \"handleNavigateEvent\"},\n\t\t{type: \"tm-edit-tiddler\", handler: \"handleEditTiddlerEvent\"},\n\t\t{type: \"tm-delete-tiddler\", handler: \"handleDeleteTiddlerEvent\"},\n\t\t{type: \"tm-save-tiddler\", handler: \"handleSaveTiddlerEvent\"},\n\t\t{type: \"tm-cancel-tiddler\", handler: \"handleCancelTiddlerEvent\"},\n\t\t{type: \"tm-close-tiddler\", handler: \"handleCloseTiddlerEvent\"},\n\t\t{type: \"tm-close-all-tiddlers\", handler: \"handleCloseAllTiddlersEvent\"},\n\t\t{type: \"tm-close-other-tiddlers\", handler: \"handleCloseOtherTiddlersEvent\"},\n\t\t{type: \"tm-new-tiddler\", handler: \"handleNewTiddlerEvent\"},\n\t\t{type: \"tm-import-tiddlers\", handler: \"handleImportTiddlersEvent\"},\n\t\t{type: \"tm-perform-import\", handler: \"handlePerformImportEvent\"},\n\t\t{type: \"tm-fold-tiddler\", handler: \"handleFoldTiddlerEvent\"},\n\t\t{type: \"tm-fold-other-tiddlers\", handler: \"handleFoldOtherTiddlersEvent\"},\n\t\t{type: \"tm-fold-all-tiddlers\", handler: \"handleFoldAllTiddlersEvent\"},\n\t\t{type: \"tm-unfold-all-tiddlers\", handler: \"handleUnfoldAllTiddlersEvent\"},\n\t\t{type: \"tm-rename-tiddler\", handler: \"handleRenameTiddlerEvent\"}\n\t]);\n};\n\n/*\nInherit from the base widget class\n*/\nNavigatorWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nNavigatorWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nNavigatorWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.storyTitle = this.getAttribute(\"story\");\n\tthis.historyTitle = this.getAttribute(\"history\");\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nNavigatorWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.story || changedAttributes.history) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nNavigatorWidget.prototype.getStoryList = function() {\n\treturn this.storyTitle ? this.wiki.getTiddlerList(this.storyTitle) : null;\n};\n\nNavigatorWidget.prototype.saveStoryList = function(storyList) {\n\tvar storyTiddler = this.wiki.getTiddler(this.storyTitle);\n\tthis.wiki.addTiddler(new $tw.Tiddler(\n\t\t{title: this.storyTitle},\n\t\tstoryTiddler,\n\t\t{list: storyList}\n\t));\n};\n\nNavigatorWidget.prototype.removeTitleFromStory = function(storyList,title) {\n\tvar p = storyList.indexOf(title);\n\twhile(p !== -1) {\n\t\tstoryList.splice(p,1);\n\t\tp = storyList.indexOf(title);\n\t}\n};\n\nNavigatorWidget.prototype.replaceFirstTitleInStory = function(storyList,oldTitle,newTitle) {\n\tvar pos = storyList.indexOf(oldTitle);\n\tif(pos !== -1) {\n\t\tstoryList[pos] = newTitle;\n\t\tdo {\n\t\t\tpos = storyList.indexOf(oldTitle,pos + 1);\n\t\t\tif(pos !== -1) {\n\t\t\t\tstoryList.splice(pos,1);\n\t\t\t}\n\t\t} while(pos !== -1);\n\t} else {\n\t\tstoryList.splice(0,0,newTitle);\n\t}\n};\n\nNavigatorWidget.prototype.addToStory = function(title,fromTitle) {\n\tvar storyList = this.getStoryList();\n\t// Quit if we cannot get hold of the story list\n\tif(!storyList) {\n\t\treturn;\n\t}\n\t// See if the tiddler is already there\n\tvar slot = storyList.indexOf(title);\n\t// Quit if it already exists in the story river\n\tif(slot >= 0) {\n\t\treturn;\n\t}\n\t// First we try to find the position of the story element we navigated from\n\tvar fromIndex = storyList.indexOf(fromTitle);\n\tif(fromIndex >= 0) {\n\t\t// The tiddler is added from inside the river\n\t\t// Determine where to insert the tiddler; Fallback is \"below\"\n\t\tswitch(this.getAttribute(\"openLinkFromInsideRiver\",\"below\")) {\n\t\t\tcase \"top\":\n\t\t\t\tslot = 0;\n\t\t\t\tbreak;\n\t\t\tcase \"bottom\":\n\t\t\t\tslot = storyList.length;\n\t\t\t\tbreak;\n\t\t\tcase \"above\":\n\t\t\t\tslot = fromIndex;\n\t\t\t\tbreak;\n\t\t\tcase \"below\": // Intentional fall-through\n\t\t\tdefault:\n\t\t\t\tslot = fromIndex + 1;\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\t\t// The tiddler is opened from outside the river. Determine where to insert the tiddler; default is \"top\"\n\t\tif(this.getAttribute(\"openLinkFromOutsideRiver\",\"top\") === \"bottom\") {\n\t\t\t// Insert at bottom\n\t\t\tslot = storyList.length;\n\t\t} else {\n\t\t\t// Insert at top\n\t\t\tslot = 0;\n\t\t}\n\t}\n\t// Add the tiddler\n\tstoryList.splice(slot,0,title);\n\t// Save the story\n\tthis.saveStoryList(storyList);\n};\n\n/*\nAdd a new record to the top of the history stack\ntitle: a title string or an array of title strings\nfromPageRect: page coordinates of the origin of the navigation\n*/\nNavigatorWidget.prototype.addToHistory = function(title,fromPageRect) {\n\tthis.wiki.addToHistory(title,fromPageRect,this.historyTitle);\n};\n\n/*\nHandle a tm-navigate event\n*/\nNavigatorWidget.prototype.handleNavigateEvent = function(event) {\n\tif(event.navigateTo) {\n\t\tthis.addToStory(event.navigateTo,event.navigateFromTitle);\n\t\tif(!event.navigateSuppressNavigation) {\n\t\t\tthis.addToHistory(event.navigateTo,event.navigateFromClientRect);\n\t\t}\n\t}\n\treturn false;\n};\n\n// Close a specified tiddler\nNavigatorWidget.prototype.handleCloseTiddlerEvent = function(event) {\n\tvar title = event.param || event.tiddlerTitle,\n\t\tstoryList = this.getStoryList();\n\t// Look for tiddlers with this title to close\n\tthis.removeTitleFromStory(storyList,title);\n\tthis.saveStoryList(storyList);\n\treturn false;\n};\n\n// Close all tiddlers\nNavigatorWidget.prototype.handleCloseAllTiddlersEvent = function(event) {\n\tthis.saveStoryList([]);\n\treturn false;\n};\n\n// Close other tiddlers\nNavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {\n\tvar title = event.param || event.tiddlerTitle;\n\tthis.saveStoryList([title]);\n\treturn false;\n};\n\n// Place a tiddler in edit mode\nNavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {\n\tvar self = this;\n\tfunction isUnmodifiedShadow(title) {\n\t\treturn self.wiki.isShadowTiddler(title) && !self.wiki.tiddlerExists(title);\n\t}\n\tfunction confirmEditShadow(title) {\n\t\treturn confirm($tw.language.getString(\n\t\t\t\"ConfirmEditShadowTiddler\",\n\t\t\t{variables:\n\t\t\t\t{title: title}\n\t\t\t}\n\t\t));\n\t}\n\tvar title = event.param || event.tiddlerTitle;\n\tif(isUnmodifiedShadow(title) && !confirmEditShadow(title)) {\n\t\treturn false;\n\t}\n\t// Replace the specified tiddler with a draft in edit mode\n\tvar draftTiddler = this.makeDraftTiddler(title);\n\t// Update the story and history if required\n\tif(!event.paramObject || event.paramObject.suppressNavigation !== \"yes\") {\n\t\tvar draftTitle = draftTiddler.fields.title,\n\t\t\tstoryList = this.getStoryList();\n\t\tthis.removeTitleFromStory(storyList,draftTitle);\n\t\tthis.replaceFirstTitleInStory(storyList,title,draftTitle);\n\t\tthis.addToHistory(draftTitle,event.navigateFromClientRect);\n\t\tthis.saveStoryList(storyList);\n\t\treturn false;\n\t}\n};\n\n// Delete a tiddler\nNavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {\n\t// Get the tiddler we're deleting\n\tvar title = event.param || event.tiddlerTitle,\n\t\ttiddler = this.wiki.getTiddler(title),\n\t\tstoryList = this.getStoryList(),\n\t\toriginalTitle = tiddler ? tiddler.fields[\"draft.of\"] : \"\",\n\t\tconfirmationTitle;\n\tif(!tiddler) {\n\t\treturn false;\n\t}\n\t// Check if the tiddler we're deleting is in draft mode\n\tif(originalTitle) {\n\t\t// If so, we'll prompt for confirmation referencing the original tiddler\n\t\tconfirmationTitle = originalTitle;\n\t} else {\n\t\t// If not a draft, then prompt for confirmation referencing the specified tiddler\n\t\tconfirmationTitle = title;\n\t}\n\t// Seek confirmation\n\tif((this.wiki.getTiddler(originalTitle) || (tiddler.fields.text || \"\") !== \"\") && !confirm($tw.language.getString(\n\t\t\t\t\"ConfirmDeleteTiddler\",\n\t\t\t\t{variables:\n\t\t\t\t\t{title: confirmationTitle}\n\t\t\t\t}\n\t\t\t))) {\n\t\treturn false;\n\t}\n\t// Delete the original tiddler\n\tif(originalTitle) {\n\t\tthis.wiki.deleteTiddler(originalTitle);\n\t\tthis.removeTitleFromStory(storyList,originalTitle);\n\t}\n\t// Delete this tiddler\n\tthis.wiki.deleteTiddler(title);\n\t// Remove the closed tiddler from the story\n\tthis.removeTitleFromStory(storyList,title);\n\tthis.saveStoryList(storyList);\n\t// Trigger an autosave\n\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\n\treturn false;\n};\n\n/*\nCreate/reuse the draft tiddler for a given title\n*/\nNavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {\n\t// See if there is already a draft tiddler for this tiddler\n\tvar draftTitle = this.wiki.findDraft(targetTitle);\n\tif(draftTitle) {\n\t\treturn this.wiki.getTiddler(draftTitle);\n\t}\n\t// Get the current value of the tiddler we're editing\n\tvar tiddler = this.wiki.getTiddler(targetTitle);\n\t// Save the initial value of the draft tiddler\n\tdraftTitle = this.generateDraftTitle(targetTitle);\n\tvar draftTiddler = new $tw.Tiddler(\n\t\t\ttiddler,\n\t\t\t{\n\t\t\t\ttitle: draftTitle,\n\t\t\t\t\"draft.title\": targetTitle,\n\t\t\t\t\"draft.of\": targetTitle\n\t\t\t},\n\t\t\tthis.wiki.getModificationFields()\n\t\t);\n\tthis.wiki.addTiddler(draftTiddler);\n\treturn draftTiddler;\n};\n\n/*\nGenerate a title for the draft of a given tiddler\n*/\nNavigatorWidget.prototype.generateDraftTitle = function(title) {\n\tvar c = 0,\n\t\tdraftTitle;\n\tdo {\n\t\tdraftTitle = \"Draft \" + (c ? (c + 1) + \" \" : \"\") + \"of '\" + title + \"'\";\n\t\tc++;\n\t} while(this.wiki.tiddlerExists(draftTitle));\n\treturn draftTitle;\n};\n\n// Take a tiddler out of edit mode, saving the changes\nNavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {\n\tvar title = event.param || event.tiddlerTitle,\n\t\ttiddler = this.wiki.getTiddler(title),\n\t\tstoryList = this.getStoryList();\n\t// Replace the original tiddler with the draft\n\tif(tiddler) {\n\t\tvar draftTitle = (tiddler.fields[\"draft.title\"] || \"\").trim(),\n\t\t\tdraftOf = (tiddler.fields[\"draft.of\"] || \"\").trim();\n\t\tif(draftTitle) {\n\t\t\tvar isRename = draftOf !== draftTitle,\n\t\t\t\tisConfirmed = true;\n\t\t\tif(isRename && this.wiki.tiddlerExists(draftTitle)) {\n\t\t\t\tisConfirmed = confirm($tw.language.getString(\n\t\t\t\t\t\"ConfirmOverwriteTiddler\",\n\t\t\t\t\t{variables:\n\t\t\t\t\t\t{title: draftTitle}\n\t\t\t\t\t}\n\t\t\t\t));\n\t\t\t}\n\t\t\tif(isConfirmed) {\n\t\t\t\t// Create the new tiddler and pass it through the th-saving-tiddler hook\n\t\t\t\tvar newTiddler = new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,{\n\t\t\t\t\ttitle: draftTitle,\n\t\t\t\t\t\"draft.title\": undefined,\n\t\t\t\t\t\"draft.of\": undefined\n\t\t\t\t},this.wiki.getModificationFields());\n\t\t\t\tnewTiddler = $tw.hooks.invokeHook(\"th-saving-tiddler\",newTiddler);\n\t\t\t\tthis.wiki.addTiddler(newTiddler);\n\t\t\t\t// Remove the draft tiddler\n\t\t\t\tthis.wiki.deleteTiddler(title);\n\t\t\t\t// Remove the original tiddler if we're renaming it\n\t\t\t\tif(isRename) {\n\t\t\t\t\tthis.wiki.deleteTiddler(draftOf);\n\t\t\t\t}\n\t\t\t\tif(!event.paramObject || event.paramObject.suppressNavigation !== \"yes\") {\n\t\t\t\t\t// Replace the draft in the story with the original\n\t\t\t\t\tthis.replaceFirstTitleInStory(storyList,title,draftTitle);\n\t\t\t\t\tthis.addToHistory(draftTitle,event.navigateFromClientRect);\n\t\t\t\t\tif(draftTitle !== this.storyTitle) {\n\t\t\t\t\t\tthis.saveStoryList(storyList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Trigger an autosave\n\t\t\t\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n\n// Take a tiddler out of edit mode without saving the changes\nNavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {\n\t// Flip the specified tiddler from draft back to the original\n\tvar draftTitle = event.param || event.tiddlerTitle,\n\t\tdraftTiddler = this.wiki.getTiddler(draftTitle),\n\t\toriginalTitle = draftTiddler && draftTiddler.fields[\"draft.of\"];\n\tif(draftTiddler && originalTitle) {\n\t\t// Ask for confirmation if the tiddler text has changed\n\t\tvar isConfirmed = true,\n\t\t\toriginalTiddler = this.wiki.getTiddler(originalTitle),\n\t\t\tstoryList = this.getStoryList();\n\t\tif(this.wiki.isDraftModified(draftTitle)) {\n\t\t\tisConfirmed = confirm($tw.language.getString(\n\t\t\t\t\"ConfirmCancelTiddler\",\n\t\t\t\t{variables:\n\t\t\t\t\t{title: draftTitle}\n\t\t\t\t}\n\t\t\t));\n\t\t}\n\t\t// Remove the draft tiddler\n\t\tif(isConfirmed) {\n\t\t\tthis.wiki.deleteTiddler(draftTitle);\n\t\t\tif(!event.paramObject || event.paramObject.suppressNavigation !== \"yes\") {\n\t\t\t\tif(originalTiddler) {\n\t\t\t\t\tthis.replaceFirstTitleInStory(storyList,draftTitle,originalTitle);\n\t\t\t\t\tthis.addToHistory(originalTitle,event.navigateFromClientRect);\n\t\t\t\t} else {\n\t\t\t\t\tthis.removeTitleFromStory(storyList,draftTitle);\n\t\t\t\t}\n\t\t\t\tthis.saveStoryList(storyList);\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n\n// Create a new draft tiddler\n// event.param can either be the title of a template tiddler, or a hashmap of fields.\n//\n// The title of the newly created tiddler follows these rules:\n// * If a hashmap was used and a title field was specified, use that title\n// * If a hashmap was used without a title field, use a default title, if necessary making it unique with a numeric suffix\n// * If a template tiddler was used, use the title of the template, if necessary making it unique with a numeric suffix\n//\n// If a draft of the target tiddler already exists then it is reused\nNavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {\n\t// Get the story details\n\tvar storyList = this.getStoryList(),\n\t\ttemplateTiddler, additionalFields, title, draftTitle, existingTiddler;\n\t// Get the template tiddler (if any)\n\tif(typeof event.param === \"string\") {\n\t\t// Get the template tiddler\n\t\ttemplateTiddler = this.wiki.getTiddler(event.param);\n\t\t// Generate a new title\n\t\ttitle = this.wiki.generateNewTitle(event.param || $tw.language.getString(\"DefaultNewTiddlerTitle\"));\n\t}\n\t// Get the specified additional fields\n\tif(typeof event.paramObject === \"object\") {\n\t\tadditionalFields = event.paramObject;\n\t}\n\tif(typeof event.param === \"object\") { // Backwards compatibility with 5.1.3\n\t\tadditionalFields = event.param;\n\t}\n\tif(additionalFields && additionalFields.title) {\n\t\ttitle = additionalFields.title;\n\t}\n\t// Generate a title if we don't have one\n\ttitle = title || this.wiki.generateNewTitle($tw.language.getString(\"DefaultNewTiddlerTitle\"));\n\t// Find any existing draft for this tiddler\n\tdraftTitle = this.wiki.findDraft(title);\n\t// Pull in any existing tiddler\n\tif(draftTitle) {\n\t\texistingTiddler = this.wiki.getTiddler(draftTitle);\n\t} else {\n\t\tdraftTitle = this.generateDraftTitle(title);\n\t\texistingTiddler = this.wiki.getTiddler(title);\n\t}\n\t// Merge the tags\n\tvar mergedTags = [];\n\tif(existingTiddler && existingTiddler.fields.tags) {\n\t\t$tw.utils.pushTop(mergedTags,existingTiddler.fields.tags)\n\t}\n\tif(additionalFields && additionalFields.tags) {\n\t\t// Merge tags\n\t\tmergedTags = $tw.utils.pushTop(mergedTags,$tw.utils.parseStringArray(additionalFields.tags));\n\t}\n\tif(templateTiddler && templateTiddler.fields.tags) {\n\t\t// Merge tags\n\t\tmergedTags = $tw.utils.pushTop(mergedTags,templateTiddler.fields.tags);\n\t}\n\t// Save the draft tiddler\n\tvar draftTiddler = new $tw.Tiddler({\n\t\t\ttext: \"\",\n\t\t\t\"draft.title\": title\n\t\t},\n\t\ttemplateTiddler,\n\t\texistingTiddler,\n\t\tadditionalFields,\n\t\tthis.wiki.getCreationFields(),\n\t\t{\n\t\t\ttitle: draftTitle,\n\t\t\t\"draft.of\": title,\n\t\t\ttags: mergedTags\n\t\t},this.wiki.getModificationFields());\n\tthis.wiki.addTiddler(draftTiddler);\n\t// Update the story to insert the new draft at the top and remove any existing tiddler\n\tif(storyList.indexOf(draftTitle) === -1) {\n\t\tvar slot = storyList.indexOf(event.navigateFromTitle);\n\t\tstoryList.splice(slot + 1,0,draftTitle);\n\t}\n\tif(storyList.indexOf(title) !== -1) {\n\t\tstoryList.splice(storyList.indexOf(title),1);\t\t\n\t}\n\tthis.saveStoryList(storyList);\n\t// Add a new record to the top of the history stack\n\tthis.addToHistory(draftTitle);\n\treturn false;\n};\n\n// Import JSON tiddlers into a pending import tiddler\nNavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {\n\tvar self = this;\n\t// Get the tiddlers\n\tvar tiddlers = [];\n\ttry {\n\t\ttiddlers = JSON.parse(event.param);\t\n\t} catch(e) {\n\t}\n\t// Get the current $:/Import tiddler\n\tvar importTiddler = this.wiki.getTiddler(IMPORT_TITLE),\n\t\timportData = this.wiki.getTiddlerData(IMPORT_TITLE,{}),\n\t\tnewFields = new Object({\n\t\t\ttitle: IMPORT_TITLE,\n\t\t\ttype: \"application/json\",\n\t\t\t\"plugin-type\": \"import\",\n\t\t\t\"status\": \"pending\"\n\t\t}),\n\t\tincomingTiddlers = [];\n\t// Process each tiddler\n\timportData.tiddlers = importData.tiddlers || {};\n\t$tw.utils.each(tiddlers,function(tiddlerFields) {\n\t\tvar title = tiddlerFields.title;\n\t\tif(title) {\n\t\t\tincomingTiddlers.push(title);\n\t\t\timportData.tiddlers[title] = tiddlerFields;\n\t\t}\n\t});\n\t// Give the active upgrader modules a chance to process the incoming tiddlers\n\tvar messages = this.wiki.invokeUpgraders(incomingTiddlers,importData.tiddlers);\n\t$tw.utils.each(messages,function(message,title) {\n\t\tnewFields[\"message-\" + title] = message;\n\t});\n\t// Deselect any suppressed tiddlers\n\t$tw.utils.each(importData.tiddlers,function(tiddler,title) {\n\t\tif($tw.utils.count(tiddler) === 0) {\n\t\t\tnewFields[\"selection-\" + title] = \"unchecked\";\n\t\t}\n\t});\n\t// Save the $:/Import tiddler\n\tnewFields.text = JSON.stringify(importData,null,$tw.config.preferences.jsonSpaces);\n\tthis.wiki.addTiddler(new $tw.Tiddler(importTiddler,newFields));\n\t// Update the story and history details\n\tif(this.getVariable(\"tv-auto-open-on-import\") !== \"no\") {\n\t\tvar storyList = this.getStoryList(),\n\t\t\thistory = [];\n\t\t// Add it to the story\n\t\tif(storyList.indexOf(IMPORT_TITLE) === -1) {\n\t\t\tstoryList.unshift(IMPORT_TITLE);\n\t\t}\n\t\t// And to history\n\t\thistory.push(IMPORT_TITLE);\n\t\t// Save the updated story and history\n\t\tthis.saveStoryList(storyList);\n\t\tthis.addToHistory(history);\t\t\n\t}\n\treturn false;\n};\n\n// \nNavigatorWidget.prototype.handlePerformImportEvent = function(event) {\n\tvar self = this,\n\t\timportTiddler = this.wiki.getTiddler(event.param),\n\t\timportData = this.wiki.getTiddlerDataCached(event.param,{tiddlers: {}}),\n\t\timportReport = [];\n\t// Add the tiddlers to the store\n\timportReport.push($tw.language.getString(\"Import/Imported\") + \"\\n\");\n\t$tw.utils.each(importData.tiddlers,function(tiddlerFields) {\n\t\tvar title = tiddlerFields.title;\n\t\tif(title && importTiddler && importTiddler.fields[\"selection-\" + title] !== \"unchecked\") {\n\t\t\tself.wiki.addTiddler(new $tw.Tiddler(tiddlerFields));\n\t\t\timportReport.push(\"# [[\" + tiddlerFields.title + \"]]\");\n\t\t}\n\t});\n\t// Replace the $:/Import tiddler with an import report\n\tthis.wiki.addTiddler(new $tw.Tiddler({\n\t\ttitle: event.param,\n\t\ttext: importReport.join(\"\\n\"),\n\t\t\"status\": \"complete\"\n\t}));\n\t// Navigate to the $:/Import tiddler\n\tthis.addToHistory([event.param]);\n\t// Trigger an autosave\n\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\n};\n\nNavigatorWidget.prototype.handleFoldTiddlerEvent = function(event) {\n\tvar self = this,\n\t\tparamObject = event.paramObject || {};\n\tif(paramObject.foldedState) {\n\t\tvar foldedState = this.wiki.getTiddlerText(paramObject.foldedState,\"show\") === \"show\" ? \"hide\" : \"show\";\n\t\tthis.wiki.setText(paramObject.foldedState,\"text\",null,foldedState);\n\t}\n};\n\nNavigatorWidget.prototype.handleFoldOtherTiddlersEvent = function(event) {\n\tvar self = this,\n\t\tparamObject = event.paramObject || {},\n\t\tprefix = paramObject.foldedStatePrefix;\n\t$tw.utils.each(this.getStoryList(),function(title) {\n\t\tself.wiki.setText(prefix + title,\"text\",null,event.param === title ? \"show\" : \"hide\");\n\t});\n};\n\nNavigatorWidget.prototype.handleFoldAllTiddlersEvent = function(event) {\n\tvar self = this,\n\t\tparamObject = event.paramObject || {},\n\t\tprefix = paramObject.foldedStatePrefix;\n\t$tw.utils.each(this.getStoryList(),function(title) {\n\t\tself.wiki.setText(prefix + title,\"text\",null,\"hide\");\n\t});\n};\n\nNavigatorWidget.prototype.handleUnfoldAllTiddlersEvent = function(event) {\n\tvar self = this,\n\t\tparamObject = event.paramObject || {},\n\t\tprefix = paramObject.foldedStatePrefix;\n\t$tw.utils.each(this.getStoryList(),function(title) {\n\t\tself.wiki.setText(prefix + title,\"text\",null,\"show\");\n\t});\n};\n\nNavigatorWidget.prototype.handleRenameTiddlerEvent = function(event) {\n\tvar self = this,\n\t\tparamObject = event.paramObject || {},\n\t\tfrom = paramObject.from || event.tiddlerTitle,\n\t\tto = paramObject.to;\n\t$tw.wiki.renameTiddler(from,to);\n};\n\nexports.navigator = NavigatorWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/navigator.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/password.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/password.js\ntype: application/javascript\nmodule-type: widget\n\nPassword widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar PasswordWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nPasswordWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nPasswordWidget.prototype.render = function(parent,nextSibling) {\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Get the current password\n\tvar password = $tw.browser ? $tw.utils.getPassword(this.passwordName) || \"\" : \"\";\n\t// Create our element\n\tvar domNode = this.document.createElement(\"input\");\n\tdomNode.setAttribute(\"type\",\"password\");\n\tdomNode.setAttribute(\"value\",password);\n\t// Add a click event handler\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \"change\", handlerObject: this, handlerMethod: \"handleChangeEvent\"}\n\t]);\n\t// Insert the label into the DOM and render any children\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\nPasswordWidget.prototype.handleChangeEvent = function(event) {\n\tvar password = this.domNodes[0].value;\n\treturn $tw.utils.savePassword(this.passwordName,password);\n};\n\n/*\nCompute the internal state of the widget\n*/\nPasswordWidget.prototype.execute = function() {\n\t// Get the parameters from the attributes\n\tthis.passwordName = this.getAttribute(\"name\",\"\");\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nPasswordWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.name) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\n\t}\n};\n\nexports.password = PasswordWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/password.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/radio.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/radio.js\ntype: application/javascript\nmodule-type: widget\n\nRadio widget\n\nWill set a field to the selected value:\n\n```\n\t<$radio field=\"myfield\" value=\"check 1\">one</$radio>\n\t<$radio field=\"myfield\" value=\"check 2\">two</$radio>\n\t<$radio field=\"myfield\" value=\"check 3\">three</$radio>\n```\n\n|Parameter |Description |h\n|tiddler |Name of the tiddler in which the field should be set. Defaults to current tiddler |\n|field |The name of the field to be set |\n|value |The value to set |\n|class |Optional class name(s) |\n\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar RadioWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nRadioWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nRadioWidget.prototype.render = function(parent,nextSibling) {\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Create our elements\n\tthis.labelDomNode = this.document.createElement(\"label\");\n\tthis.labelDomNode.setAttribute(\"class\",this.radioClass);\n\tthis.inputDomNode = this.document.createElement(\"input\");\n\tthis.inputDomNode.setAttribute(\"type\",\"radio\");\n\tif(this.getValue() == this.radioValue) {\n\t\tthis.inputDomNode.setAttribute(\"checked\",\"true\");\n\t}\n\tthis.labelDomNode.appendChild(this.inputDomNode);\n\tthis.spanDomNode = this.document.createElement(\"span\");\n\tthis.labelDomNode.appendChild(this.spanDomNode);\n\t// Add a click event handler\n\t$tw.utils.addEventListeners(this.inputDomNode,[\n\t\t{name: \"change\", handlerObject: this, handlerMethod: \"handleChangeEvent\"}\n\t]);\n\t// Insert the label into the DOM and render any children\n\tparent.insertBefore(this.labelDomNode,nextSibling);\n\tthis.renderChildren(this.spanDomNode,null);\n\tthis.domNodes.push(this.labelDomNode);\n};\n\nRadioWidget.prototype.getValue = function() {\n\tvar tiddler = this.wiki.getTiddler(this.radioTitle);\n\treturn tiddler && tiddler.getFieldString(this.radioField);\n};\n\nRadioWidget.prototype.setValue = function() {\n\tif(this.radioField) {\n\t\tvar tiddler = this.wiki.getTiddler(this.radioTitle),\n\t\t\taddition = {};\n\t\taddition[this.radioField] = this.radioValue;\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),{title: this.radioTitle},tiddler,addition,this.wiki.getModificationFields()));\n\t}\n};\n\nRadioWidget.prototype.handleChangeEvent = function(event) {\n\tif(this.inputDomNode.checked) {\n\t\tthis.setValue();\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nRadioWidget.prototype.execute = function() {\n\t// Get the parameters from the attributes\n\tthis.radioTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.radioField = this.getAttribute(\"field\",\"text\");\n\tthis.radioValue = this.getAttribute(\"value\");\n\tthis.radioClass = this.getAttribute(\"class\",\"\");\n\tif(this.radioClass !== \"\") {\n\t\tthis.radioClass += \" \";\n\t}\n\tthis.radioClass += \"tc-radio\";\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nRadioWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.value || changedAttributes[\"class\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\tvar refreshed = false;\n\t\tif(changedTiddlers[this.radioTitle]) {\n\t\t\tthis.inputDomNode.checked = this.getValue() === this.radioValue;\n\t\t\trefreshed = true;\n\t\t}\n\t\treturn this.refreshChildren(changedTiddlers) || refreshed;\n\t}\n};\n\nexports.radio = RadioWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/radio.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/raw.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/raw.js\ntype: application/javascript\nmodule-type: widget\n\nRaw widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar RawWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nRawWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nRawWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.execute();\n\tvar div = this.document.createElement(\"div\");\n\tdiv.innerHTML=this.parseTreeNode.html;\n\tparent.insertBefore(div,nextSibling);\n\tthis.domNodes.push(div);\t\n};\n\n/*\nCompute the internal state of the widget\n*/\nRawWidget.prototype.execute = function() {\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nRawWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nexports.raw = RawWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/raw.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/reveal.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/reveal.js\ntype: application/javascript\nmodule-type: widget\n\nReveal widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar RevealWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nRevealWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nRevealWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar tag = this.parseTreeNode.isBlock ? \"div\" : \"span\";\n\tif(this.revealTag && $tw.config.htmlUnsafeElements.indexOf(this.revealTag) === -1) {\n\t\ttag = this.revealTag;\n\t}\n\tvar domNode = this.document.createElement(tag);\n\tvar classes = this[\"class\"].split(\" \") || [];\n\tclasses.push(\"tc-reveal\");\n\tdomNode.className = classes.join(\" \");\n\tif(this.style) {\n\t\tdomNode.setAttribute(\"style\",this.style);\n\t}\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tif(!domNode.isTiddlyWikiFakeDom && this.type === \"popup\" && this.isOpen) {\n\t\tthis.positionPopup(domNode);\n\t\t$tw.utils.addClass(domNode,\"tc-popup\"); // Make sure that clicks don't dismiss popups within the revealed content\n\t}\n\tif(!this.isOpen) {\n\t\tdomNode.setAttribute(\"hidden\",\"true\");\n\t}\n\tthis.domNodes.push(domNode);\n};\n\nRevealWidget.prototype.positionPopup = function(domNode) {\n\tdomNode.style.position = \"absolute\";\n\tdomNode.style.zIndex = \"1000\";\n\tswitch(this.position) {\n\t\tcase \"left\":\n\t\t\tdomNode.style.left = (this.popup.left - domNode.offsetWidth) + \"px\";\n\t\t\tdomNode.style.top = this.popup.top + \"px\";\n\t\t\tbreak;\n\t\tcase \"above\":\n\t\t\tdomNode.style.left = this.popup.left + \"px\";\n\t\t\tdomNode.style.top = (this.popup.top - domNode.offsetHeight) + \"px\";\n\t\t\tbreak;\n\t\tcase \"aboveright\":\n\t\t\tdomNode.style.left = (this.popup.left + this.popup.width) + \"px\";\n\t\t\tdomNode.style.top = (this.popup.top + this.popup.height - domNode.offsetHeight) + \"px\";\n\t\t\tbreak;\n\t\tcase \"right\":\n\t\t\tdomNode.style.left = (this.popup.left + this.popup.width) + \"px\";\n\t\t\tdomNode.style.top = this.popup.top + \"px\";\n\t\t\tbreak;\n\t\tcase \"belowleft\":\n\t\t\tdomNode.style.left = (this.popup.left + this.popup.width - domNode.offsetWidth) + \"px\";\n\t\t\tdomNode.style.top = (this.popup.top + this.popup.height) + \"px\";\n\t\t\tbreak;\n\t\tdefault: // Below\n\t\t\tdomNode.style.left = this.popup.left + \"px\";\n\t\t\tdomNode.style.top = (this.popup.top + this.popup.height) + \"px\";\n\t\t\tbreak;\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nRevealWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.state = this.getAttribute(\"state\");\n\tthis.revealTag = this.getAttribute(\"tag\");\n\tthis.type = this.getAttribute(\"type\");\n\tthis.text = this.getAttribute(\"text\");\n\tthis.position = this.getAttribute(\"position\");\n\tthis[\"class\"] = this.getAttribute(\"class\",\"\");\n\tthis.style = this.getAttribute(\"style\",\"\");\n\tthis[\"default\"] = this.getAttribute(\"default\",\"\");\n\tthis.animate = this.getAttribute(\"animate\",\"no\");\n\tthis.retain = this.getAttribute(\"retain\",\"no\");\n\tthis.openAnimation = this.animate === \"no\" ? undefined : \"open\";\n\tthis.closeAnimation = this.animate === \"no\" ? undefined : \"close\";\n\t// Compute the title of the state tiddler and read it\n\tthis.stateTitle = this.state;\n\tthis.readState();\n\t// Construct the child widgets\n\tvar childNodes = this.isOpen ? this.parseTreeNode.children : [];\n\tthis.hasChildNodes = this.isOpen;\n\tthis.makeChildWidgets(childNodes);\n};\n\n/*\nRead the state tiddler\n*/\nRevealWidget.prototype.readState = function() {\n\t// Read the information from the state tiddler\n\tvar state = this.stateTitle ? this.wiki.getTextReference(this.stateTitle,this[\"default\"],this.getVariable(\"currentTiddler\")) : this[\"default\"];\n\tswitch(this.type) {\n\t\tcase \"popup\":\n\t\t\tthis.readPopupState(state);\n\t\t\tbreak;\n\t\tcase \"match\":\n\t\t\tthis.readMatchState(state);\n\t\t\tbreak;\n\t\tcase \"nomatch\":\n\t\t\tthis.readMatchState(state);\n\t\t\tthis.isOpen = !this.isOpen;\n\t\t\tbreak;\n\t}\n};\n\nRevealWidget.prototype.readMatchState = function(state) {\n\tthis.isOpen = state === this.text;\n};\n\nRevealWidget.prototype.readPopupState = function(state) {\n\tvar popupLocationRegExp = /^\\((-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+)\\)$/,\n\t\tmatch = popupLocationRegExp.exec(state);\n\t// Check if the state matches the location regexp\n\tif(match) {\n\t\t// If so, we're open\n\t\tthis.isOpen = true;\n\t\t// Get the location\n\t\tthis.popup = {\n\t\t\tleft: parseFloat(match[1]),\n\t\t\ttop: parseFloat(match[2]),\n\t\t\twidth: parseFloat(match[3]),\n\t\t\theight: parseFloat(match[4])\n\t\t};\n\t} else {\n\t\t// If not, we're closed\n\t\tthis.isOpen = false;\n\t}\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nRevealWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.state || changedAttributes.type || changedAttributes.text || changedAttributes.position || changedAttributes[\"default\"] || changedAttributes.animate) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\tvar refreshed = false,\n\t\t\tcurrentlyOpen = this.isOpen;\n\t\tthis.readState();\n\t\tif(this.isOpen !== currentlyOpen) {\n\t\t\tif(this.retain === \"yes\") {\n\t\t\t\tthis.updateState();\n\t\t\t} else {\n\t\t\t\tthis.refreshSelf();\n\t\t\t\trefreshed = true;\n\t\t\t}\n\t\t}\n\t\treturn this.refreshChildren(changedTiddlers) || refreshed;\n\t}\n};\n\n/*\nCalled by refresh() to dynamically show or hide the content\n*/\nRevealWidget.prototype.updateState = function() {\n\t// Read the current state\n\tthis.readState();\n\t// Construct the child nodes if needed\n\tvar domNode = this.domNodes[0];\n\tif(this.isOpen && !this.hasChildNodes) {\n\t\tthis.hasChildNodes = true;\n\t\tthis.makeChildWidgets(this.parseTreeNode.children);\n\t\tthis.renderChildren(domNode,null);\n\t}\n\t// Animate our DOM node\n\tif(!domNode.isTiddlyWikiFakeDom && this.type === \"popup\" && this.isOpen) {\n\t\tthis.positionPopup(domNode);\n\t\t$tw.utils.addClass(domNode,\"tc-popup\"); // Make sure that clicks don't dismiss popups within the revealed content\n\n\t}\n\tif(this.isOpen) {\n\t\tdomNode.removeAttribute(\"hidden\");\n $tw.anim.perform(this.openAnimation,domNode);\n\t} else {\n\t\t$tw.anim.perform(this.closeAnimation,domNode,{callback: function() {\n\t\t\tdomNode.setAttribute(\"hidden\",\"true\");\n }});\n\t}\n};\n\nexports.reveal = RevealWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/reveal.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/scrollable.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/scrollable.js\ntype: application/javascript\nmodule-type: widget\n\nScrollable widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ScrollableWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.scaleFactor = 1;\n\tthis.addEventListeners([\n\t\t{type: \"tm-scroll\", handler: \"handleScrollEvent\"}\n\t]);\n\tif($tw.browser) {\n\t\tthis.requestAnimationFrame = window.requestAnimationFrame ||\n\t\t\twindow.webkitRequestAnimationFrame ||\n\t\t\twindow.mozRequestAnimationFrame ||\n\t\t\tfunction(callback) {\n\t\t\t\treturn window.setTimeout(callback, 1000/60);\n\t\t\t};\n\t\tthis.cancelAnimationFrame = window.cancelAnimationFrame ||\n\t\t\twindow.webkitCancelAnimationFrame ||\n\t\t\twindow.webkitCancelRequestAnimationFrame ||\n\t\t\twindow.mozCancelAnimationFrame ||\n\t\t\twindow.mozCancelRequestAnimationFrame ||\n\t\t\tfunction(id) {\n\t\t\t\twindow.clearTimeout(id);\n\t\t\t};\n\t}\n};\n\n/*\nInherit from the base widget class\n*/\nScrollableWidget.prototype = new Widget();\n\nScrollableWidget.prototype.cancelScroll = function() {\n\tif(this.idRequestFrame) {\n\t\tthis.cancelAnimationFrame.call(window,this.idRequestFrame);\n\t\tthis.idRequestFrame = null;\n\t}\n};\n\n/*\nHandle a scroll event\n*/\nScrollableWidget.prototype.handleScrollEvent = function(event) {\n\t// Pass the scroll event through if our offsetsize is larger than our scrollsize\n\tif(this.outerDomNode.scrollWidth <= this.outerDomNode.offsetWidth && this.outerDomNode.scrollHeight <= this.outerDomNode.offsetHeight && this.fallthrough === \"yes\") {\n\t\treturn true;\n\t}\n\tthis.scrollIntoView(event.target);\n\treturn false; // Handled event\n};\n\n/*\nScroll an element into view\n*/\nScrollableWidget.prototype.scrollIntoView = function(element) {\n\tvar duration = $tw.utils.getAnimationDuration();\n\tthis.cancelScroll();\n\tthis.startTime = Date.now();\n\tvar scrollPosition = {\n\t\tx: this.outerDomNode.scrollLeft,\n\t\ty: this.outerDomNode.scrollTop\n\t};\n\t// Get the client bounds of the element and adjust by the scroll position\n\tvar scrollableBounds = this.outerDomNode.getBoundingClientRect(),\n\t\tclientTargetBounds = element.getBoundingClientRect(),\n\t\tbounds = {\n\t\t\tleft: clientTargetBounds.left + scrollPosition.x - scrollableBounds.left,\n\t\t\ttop: clientTargetBounds.top + scrollPosition.y - scrollableBounds.top,\n\t\t\twidth: clientTargetBounds.width,\n\t\t\theight: clientTargetBounds.height\n\t\t};\n\t// We'll consider the horizontal and vertical scroll directions separately via this function\n\tvar getEndPos = function(targetPos,targetSize,currentPos,currentSize) {\n\t\t\t// If the target is already visible then stay where we are\n\t\t\tif(targetPos >= currentPos && (targetPos + targetSize) <= (currentPos + currentSize)) {\n\t\t\t\treturn currentPos;\n\t\t\t// If the target is above/left of the current view, then scroll to its top/left\n\t\t\t} else if(targetPos <= currentPos) {\n\t\t\t\treturn targetPos;\n\t\t\t// If the target is smaller than the window and the scroll position is too far up, then scroll till the target is at the bottom of the window\n\t\t\t} else if(targetSize < currentSize && currentPos < (targetPos + targetSize - currentSize)) {\n\t\t\t\treturn targetPos + targetSize - currentSize;\n\t\t\t// If the target is big, then just scroll to the top\n\t\t\t} else if(currentPos < targetPos) {\n\t\t\t\treturn targetPos;\n\t\t\t// Otherwise, stay where we are\n\t\t\t} else {\n\t\t\t\treturn currentPos;\n\t\t\t}\n\t\t},\n\t\tendX = getEndPos(bounds.left,bounds.width,scrollPosition.x,this.outerDomNode.offsetWidth),\n\t\tendY = getEndPos(bounds.top,bounds.height,scrollPosition.y,this.outerDomNode.offsetHeight);\n\t// Only scroll if necessary\n\tif(endX !== scrollPosition.x || endY !== scrollPosition.y) {\n\t\tvar self = this,\n\t\t\tdrawFrame;\n\t\tdrawFrame = function () {\n\t\t\tvar t;\n\t\t\tif(duration <= 0) {\n\t\t\t\tt = 1;\n\t\t\t} else {\n\t\t\t\tt = ((Date.now()) - self.startTime) / duration;\t\n\t\t\t}\n\t\t\tif(t >= 1) {\n\t\t\t\tself.cancelScroll();\n\t\t\t\tt = 1;\n\t\t\t}\n\t\t\tt = $tw.utils.slowInSlowOut(t);\n\t\t\tself.outerDomNode.scrollLeft = scrollPosition.x + (endX - scrollPosition.x) * t;\n\t\t\tself.outerDomNode.scrollTop = scrollPosition.y + (endY - scrollPosition.y) * t;\n\t\t\tif(t < 1) {\n\t\t\t\tself.idRequestFrame = self.requestAnimationFrame.call(window,drawFrame);\n\t\t\t}\n\t\t};\n\t\tdrawFrame();\n\t}\n};\n\n/*\nRender this widget into the DOM\n*/\nScrollableWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create elements\n\tthis.outerDomNode = this.document.createElement(\"div\");\n\t$tw.utils.setStyle(this.outerDomNode,[\n\t\t{overflowY: \"auto\"},\n\t\t{overflowX: \"auto\"},\n\t\t{webkitOverflowScrolling: \"touch\"}\n\t]);\n\tthis.innerDomNode = this.document.createElement(\"div\");\n\tthis.outerDomNode.appendChild(this.innerDomNode);\n\t// Assign classes\n\tthis.outerDomNode.className = this[\"class\"] || \"\";\n\t// Insert element\n\tparent.insertBefore(this.outerDomNode,nextSibling);\n\tthis.renderChildren(this.innerDomNode,null);\n\tthis.domNodes.push(this.outerDomNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nScrollableWidget.prototype.execute = function() {\n\t// Get attributes\n\tthis.fallthrough = this.getAttribute(\"fallthrough\",\"yes\");\n\tthis[\"class\"] = this.getAttribute(\"class\");\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nScrollableWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes[\"class\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.scrollable = ScrollableWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/scrollable.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/select.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/select.js\ntype: application/javascript\nmodule-type: widget\n\nSelect widget:\n\n```\n<$select tiddler=\"MyTiddler\" field=\"text\">\n<$list filter=\"[tag[chapter]]\">\n<option value=<<currentTiddler>>>\n<$view field=\"description\"/>\n</option>\n</$list>\n</$select>\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar SelectWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nSelectWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nSelectWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n\tthis.setSelectValue();\n\t$tw.utils.addEventListeners(this.getSelectDomNode(),[\n\t\t{name: \"change\", handlerObject: this, handlerMethod: \"handleChangeEvent\"}\n\t]);\n};\n\n/*\nHandle a change event\n*/\nSelectWidget.prototype.handleChangeEvent = function(event) {\n\tif(this.selectMultiple == false) {\n\t\tvar value = this.getSelectDomNode().value;\n\t} else {\n\t\tvar value = this.getSelectValues()\n\t\t\t\tvalue = $tw.utils.stringifyList(value);\n\t}\n\tthis.wiki.setText(this.selectTitle,this.selectField,this.selectIndex,value);\n};\n\n/*\nIf necessary, set the value of the select element to the current value\n*/\nSelectWidget.prototype.setSelectValue = function() {\n\tvar value = this.selectDefault;\n\t// Get the value\n\tif(this.selectIndex) {\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.selectTitle,this.selectIndex);\n\t} else {\n\t\tvar tiddler = this.wiki.getTiddler(this.selectTitle);\n\t\tif(tiddler) {\n\t\t\tif(this.selectField === \"text\") {\n\t\t\t\t// Calling getTiddlerText() triggers lazy loading of skinny tiddlers\n\t\t\t\tvalue = this.wiki.getTiddlerText(this.selectTitle);\n\t\t\t} else {\n\t\t\t\tif($tw.utils.hop(tiddler.fields,this.selectField)) {\n\t\t\t\t\tvalue = tiddler.getFieldString(this.selectField);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif(this.selectField === \"title\") {\n\t\t\t\tvalue = this.selectTitle;\n\t\t\t}\n\t\t}\n\t}\n\t// Assign it to the select element if it's different than the current value\n\tif (this.selectMultiple) {\n\t\tvalue = value === undefined ? \"\" : value;\n\t\tvar select = this.getSelectDomNode();\n\t\tvar values = Array.isArray(value) ? value : $tw.utils.parseStringArray(value);\n\t\tfor(var i=0; i < select.children.length; i++){\n\t\t\tif(values.indexOf(select.children[i].value) != -1) {\n\t\t\t\tselect.children[i].selected = true;\n\t\t\t}\n\t\t}\n\t\t\n\t} else {\n\t\tvar domNode = this.getSelectDomNode();\n\t\tif(domNode.value !== value) {\n\t\t\tdomNode.value = value;\n\t\t}\n\t}\n};\n\n/*\nGet the DOM node of the select element\n*/\nSelectWidget.prototype.getSelectDomNode = function() {\n\treturn this.children[0].domNodes[0];\n};\n\n// Return an array of the selected opion values\n// select is an HTML select element\nSelectWidget.prototype.getSelectValues = function() {\n\tvar select, result, options, opt;\n\tselect = this.getSelectDomNode();\n\tresult = [];\n\toptions = select && select.options;\n\tfor (var i=0; i<options.length; i++) {\n\t\topt = options[i];\n\t\tif (opt.selected) {\n\t\t\tresult.push(opt.value || opt.text);\n\t\t}\n\t}\n\treturn result;\n}\n\n/*\nCompute the internal state of the widget\n*/\nSelectWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.selectTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.selectField = this.getAttribute(\"field\",\"text\");\n\tthis.selectIndex = this.getAttribute(\"index\");\n\tthis.selectClass = this.getAttribute(\"class\");\n\tthis.selectDefault = this.getAttribute(\"default\");\n\tthis.selectMultiple = this.getAttribute(\"multiple\", false);\n\tthis.selectSize = this.getAttribute(\"size\");\n\t// Make the child widgets\n\tvar selectNode = {\n\t\ttype: \"element\",\n\t\ttag: \"select\",\n\t\tchildren: this.parseTreeNode.children\n\t};\n\tif(this.selectClass) {\n\t\t$tw.utils.addAttributeToParseTreeNode(selectNode,\"class\",this.selectClass);\n\t}\n\tif(this.selectMultiple) {\n\t\t$tw.utils.addAttributeToParseTreeNode(selectNode,\"multiple\",\"multiple\");\n\t}\n\tif(this.selectSize) {\n\t\t$tw.utils.addAttributeToParseTreeNode(selectNode,\"size\",this.selectSize);\n\t}\n\tthis.makeChildWidgets([selectNode]);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nSelectWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\t// If we're using a different tiddler/field/index then completely refresh ourselves\n\tif(changedAttributes.selectTitle || changedAttributes.selectField || changedAttributes.selectIndex) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t// If the target tiddler value has changed, just update setting and refresh the children\n\t} else {\n\t\tvar childrenRefreshed = this.refreshChildren(changedTiddlers);\n\t\tif(changedTiddlers[this.selectTitle] || childrenRefreshed) {\n\t\t\tthis.setSelectValue();\n\t\t} \n\t\treturn childrenRefreshed;\n\t}\n};\n\nexports.select = SelectWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/select.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/set.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/set.js\ntype: application/javascript\nmodule-type: widget\n\nSet variable widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar SetWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nSetWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nSetWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nSetWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.setName = this.getAttribute(\"name\",\"currentTiddler\");\n\tthis.setFilter = this.getAttribute(\"filter\");\n\tthis.setValue = this.getAttribute(\"value\");\n\tthis.setEmptyValue = this.getAttribute(\"emptyValue\");\n\t// Set context variable\n\tthis.setVariable(this.setName,this.getValue(),this.parseTreeNode.params);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nGet the value to be assigned\n*/\nSetWidget.prototype.getValue = function() {\n\tvar value = this.setValue;\n\tif(this.setFilter) {\n\t\tvar results = this.wiki.filterTiddlers(this.setFilter,this);\n\t\tif(!this.setValue) {\n\t\t\tvalue = $tw.utils.stringifyList(results);\n\t\t}\n\t\tif(results.length === 0 && this.setEmptyValue !== undefined) {\n\t\t\tvalue = this.setEmptyValue;\n\t\t}\n\t} else if(!value && this.setEmptyValue) {\n\t\tvalue = this.setEmptyValue;\n\t}\n\treturn value;\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nSetWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.name || changedAttributes.filter || changedAttributes.value || changedAttributes.emptyValue ||\n\t (this.setFilter && this.getValue() != this.variables[this.setName].value)) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\n\t}\n};\n\nexports.setvariable = SetWidget;\nexports.set = SetWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/set.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/text.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/text.js\ntype: application/javascript\nmodule-type: widget\n\nText node widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar TextNodeWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nTextNodeWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nTextNodeWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar text = this.getAttribute(\"text\",this.parseTreeNode.text || \"\");\n\ttext = text.replace(/\\r/mg,\"\");\n\tvar textNode = this.document.createTextNode(text);\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nTextNodeWidget.prototype.execute = function() {\n\t// Nothing to do for a text node\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nTextNodeWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.text) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\n\t}\n};\n\nexports.text = TextNodeWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/text.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/tiddler.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/tiddler.js\ntype: application/javascript\nmodule-type: widget\n\nTiddler widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar TiddlerWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nTiddlerWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nTiddlerWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nTiddlerWidget.prototype.execute = function() {\n\tthis.tiddlerState = this.computeTiddlerState();\n\tthis.setVariable(\"currentTiddler\",this.tiddlerState.currentTiddler);\n\tthis.setVariable(\"missingTiddlerClass\",this.tiddlerState.missingTiddlerClass);\n\tthis.setVariable(\"shadowTiddlerClass\",this.tiddlerState.shadowTiddlerClass);\n\tthis.setVariable(\"systemTiddlerClass\",this.tiddlerState.systemTiddlerClass);\n\tthis.setVariable(\"tiddlerTagClasses\",this.tiddlerState.tiddlerTagClasses);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nCompute the tiddler state flags\n*/\nTiddlerWidget.prototype.computeTiddlerState = function() {\n\t// Get our parameters\n\tthis.tiddlerTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\t// Compute the state\n\tvar state = {\n\t\tcurrentTiddler: this.tiddlerTitle || \"\",\n\t\tmissingTiddlerClass: (this.wiki.tiddlerExists(this.tiddlerTitle) || this.wiki.isShadowTiddler(this.tiddlerTitle)) ? \"tc-tiddler-exists\" : \"tc-tiddler-missing\",\n\t\tshadowTiddlerClass: this.wiki.isShadowTiddler(this.tiddlerTitle) ? \"tc-tiddler-shadow\" : \"\",\n\t\tsystemTiddlerClass: this.wiki.isSystemTiddler(this.tiddlerTitle) ? \"tc-tiddler-system\" : \"\",\n\t\ttiddlerTagClasses: this.getTagClasses()\n\t};\n\t// Compute a simple hash to make it easier to detect changes\n\tstate.hash = state.currentTiddler + state.missingTiddlerClass + state.shadowTiddlerClass + state.systemTiddlerClass + state.tiddlerTagClasses;\n\treturn state;\n};\n\n/*\nCreate a string of CSS classes derived from the tags of the current tiddler\n*/\nTiddlerWidget.prototype.getTagClasses = function() {\n\tvar tiddler = this.wiki.getTiddler(this.tiddlerTitle);\n\tif(tiddler) {\n\t\tvar tags = [];\n\t\t$tw.utils.each(tiddler.fields.tags,function(tag) {\n\t\t\ttags.push(\"tc-tagged-\" + encodeURIComponent(tag));\n\t\t});\n\t\treturn tags.join(\" \");\n\t} else {\n\t\treturn \"\";\n\t}\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nTiddlerWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes(),\n\t\tnewTiddlerState = this.computeTiddlerState();\n\tif(changedAttributes.tiddler || newTiddlerState.hash !== this.tiddlerState.hash) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.tiddler = TiddlerWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/tiddler.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/transclude.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/transclude.js\ntype: application/javascript\nmodule-type: widget\n\nTransclude widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar TranscludeWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nTranscludeWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nTranscludeWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nTranscludeWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.transcludeTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.transcludeSubTiddler = this.getAttribute(\"subtiddler\");\n\tthis.transcludeField = this.getAttribute(\"field\");\n\tthis.transcludeIndex = this.getAttribute(\"index\");\n\tthis.transcludeMode = this.getAttribute(\"mode\");\n\t// Parse the text reference\n\tvar parseAsInline = !this.parseTreeNode.isBlock;\n\tif(this.transcludeMode === \"inline\") {\n\t\tparseAsInline = true;\n\t} else if(this.transcludeMode === \"block\") {\n\t\tparseAsInline = false;\n\t}\n\tvar parser = this.wiki.parseTextReference(\n\t\t\t\t\t\tthis.transcludeTitle,\n\t\t\t\t\t\tthis.transcludeField,\n\t\t\t\t\t\tthis.transcludeIndex,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparseAsInline: parseAsInline,\n\t\t\t\t\t\t\tsubTiddler: this.transcludeSubTiddler\n\t\t\t\t\t\t}),\n\t\tparseTreeNodes = parser ? parser.tree : this.parseTreeNode.children;\n\t// Set context variables for recursion detection\n\tvar recursionMarker = this.makeRecursionMarker();\n\tthis.setVariable(\"transclusion\",recursionMarker);\n\t// Check for recursion\n\tif(parser) {\n\t\tif(this.parentWidget && this.parentWidget.hasVariable(\"transclusion\",recursionMarker)) {\n\t\t\tparseTreeNodes = [{type: \"element\", tag: \"span\", attributes: {\n\t\t\t\t\"class\": {type: \"string\", value: \"tc-error\"}\n\t\t\t}, children: [\n\t\t\t\t{type: \"text\", text: \"Recursive transclusion error in transclude widget\"}\n\t\t\t]}];\n\t\t}\n\t}\n\t// Construct the child widgets\n\tthis.makeChildWidgets(parseTreeNodes);\n};\n\n/*\nCompose a string comprising the title, field and/or index to identify this transclusion for recursion detection\n*/\nTranscludeWidget.prototype.makeRecursionMarker = function() {\n\tvar output = [];\n\toutput.push(\"{\");\n\toutput.push(this.getVariable(\"currentTiddler\",{defaultValue: \"\"}));\n\toutput.push(\"|\");\n\toutput.push(this.transcludeTitle || \"\");\n\toutput.push(\"|\");\n\toutput.push(this.transcludeField || \"\");\n\toutput.push(\"|\");\n\toutput.push(this.transcludeIndex || \"\");\n\toutput.push(\"|\");\n\toutput.push(this.transcludeSubTiddler || \"\");\n\toutput.push(\"}\");\n\treturn output.join(\"\");\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nTranscludeWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedTiddlers[this.transcludeTitle]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.transclude = TranscludeWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/transclude.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/vars.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/vars.js\ntype: application/javascript\nmodule-type: widget\n\nThis widget allows multiple variables to be set in one go:\n\n```\n\\define helloworld() Hello world!\n<$vars greeting=\"Hi\" me={{!!title}} sentence=<<helloworld>>>\n <<greeting>>! I am <<me>> and I say: <<sentence>>\n</$vars>\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar VarsWidget = function(parseTreeNode,options) {\n\t// Call the constructor\n\tWidget.call(this);\n\t// Initialise\t\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nVarsWidget.prototype = Object.create(Widget.prototype);\n\n/*\nRender this widget into the DOM\n*/\nVarsWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nVarsWidget.prototype.execute = function() {\n\t// Parse variables\n\tvar self = this;\n\t$tw.utils.each(this.attributes,function(val,key) {\n\t\tif(key.charAt(0) !== \"$\") {\n\t\t\tself.setVariable(key,val);\n\t\t}\n\t});\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nVarsWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(Object.keys(changedAttributes).length) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports[\"vars\"] = VarsWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/vars.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/view.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/view.js\ntype: application/javascript\nmodule-type: widget\n\nView widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ViewWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nViewWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nViewWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tif(this.text) {\n\t\tvar textNode = this.document.createTextNode(this.text);\n\t\tparent.insertBefore(textNode,nextSibling);\n\t\tthis.domNodes.push(textNode);\n\t} else {\n\t\tthis.makeChildWidgets();\n\t\tthis.renderChildren(parent,nextSibling);\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nViewWidget.prototype.execute = function() {\n\t// Get parameters from our attributes\n\tthis.viewTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.viewSubtiddler = this.getAttribute(\"subtiddler\");\n\tthis.viewField = this.getAttribute(\"field\",\"text\");\n\tthis.viewIndex = this.getAttribute(\"index\");\n\tthis.viewFormat = this.getAttribute(\"format\",\"text\");\n\tthis.viewTemplate = this.getAttribute(\"template\",\"\");\n\tswitch(this.viewFormat) {\n\t\tcase \"htmlwikified\":\n\t\t\tthis.text = this.getValueAsHtmlWikified();\n\t\t\tbreak;\n\t\tcase \"htmlencodedplainwikified\":\n\t\t\tthis.text = this.getValueAsHtmlEncodedPlainWikified();\n\t\t\tbreak;\n\t\tcase \"htmlencoded\":\n\t\t\tthis.text = this.getValueAsHtmlEncoded();\n\t\t\tbreak;\n\t\tcase \"urlencoded\":\n\t\t\tthis.text = this.getValueAsUrlEncoded();\n\t\t\tbreak;\n\t\tcase \"doubleurlencoded\":\n\t\t\tthis.text = this.getValueAsDoubleUrlEncoded();\n\t\t\tbreak;\n\t\tcase \"date\":\n\t\t\tthis.text = this.getValueAsDate(this.viewTemplate);\n\t\t\tbreak;\n\t\tcase \"relativedate\":\n\t\t\tthis.text = this.getValueAsRelativeDate();\n\t\t\tbreak;\n\t\tcase \"stripcomments\":\n\t\t\tthis.text = this.getValueAsStrippedComments();\n\t\t\tbreak;\n\t\tcase \"jsencoded\":\n\t\t\tthis.text = this.getValueAsJsEncoded();\n\t\t\tbreak;\n\t\tdefault: // \"text\"\n\t\t\tthis.text = this.getValueAsText();\n\t\t\tbreak;\n\t}\n};\n\n/*\nThe various formatter functions are baked into this widget for the moment. Eventually they will be replaced by macro functions\n*/\n\n/*\nRetrieve the value of the widget. Options are:\nasString: Optionally return the value as a string\n*/\nViewWidget.prototype.getValue = function(options) {\n\toptions = options || {};\n\tvar value = options.asString ? \"\" : undefined;\n\tif(this.viewIndex) {\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.viewTitle,this.viewIndex);\n\t} else {\n\t\tvar tiddler;\n\t\tif(this.viewSubtiddler) {\n\t\t\ttiddler = this.wiki.getSubTiddler(this.viewTitle,this.viewSubtiddler);\t\n\t\t} else {\n\t\t\ttiddler = this.wiki.getTiddler(this.viewTitle);\n\t\t}\n\t\tif(tiddler) {\n\t\t\tif(this.viewField === \"text\" && !this.viewSubtiddler) {\n\t\t\t\t// Calling getTiddlerText() triggers lazy loading of skinny tiddlers\n\t\t\t\tvalue = this.wiki.getTiddlerText(this.viewTitle);\n\t\t\t} else {\n\t\t\t\tif($tw.utils.hop(tiddler.fields,this.viewField)) {\n\t\t\t\t\tif(options.asString) {\n\t\t\t\t\t\tvalue = tiddler.getFieldString(this.viewField);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue = tiddler.fields[this.viewField];\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif(this.viewField === \"title\") {\n\t\t\t\tvalue = this.viewTitle;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n\nViewWidget.prototype.getValueAsText = function() {\n\treturn this.getValue({asString: true});\n};\n\nViewWidget.prototype.getValueAsHtmlWikified = function() {\n\treturn this.wiki.renderText(\"text/html\",\"text/vnd.tiddlywiki\",this.getValueAsText(),{parentWidget: this});\n};\n\nViewWidget.prototype.getValueAsHtmlEncodedPlainWikified = function() {\n\treturn $tw.utils.htmlEncode(this.wiki.renderText(\"text/plain\",\"text/vnd.tiddlywiki\",this.getValueAsText(),{parentWidget: this}));\n};\n\nViewWidget.prototype.getValueAsHtmlEncoded = function() {\n\treturn $tw.utils.htmlEncode(this.getValueAsText());\n};\n\nViewWidget.prototype.getValueAsUrlEncoded = function() {\n\treturn encodeURIComponent(this.getValueAsText());\n};\n\nViewWidget.prototype.getValueAsDoubleUrlEncoded = function() {\n\treturn encodeURIComponent(encodeURIComponent(this.getValueAsText()));\n};\n\nViewWidget.prototype.getValueAsDate = function(format) {\n\tformat = format || \"YYYY MM DD 0hh:0mm\";\n\tvar value = $tw.utils.parseDate(this.getValue());\n\tif(value && $tw.utils.isDate(value) && value.toString() !== \"Invalid Date\") {\n\t\treturn $tw.utils.formatDateString(value,format);\n\t} else {\n\t\treturn \"\";\n\t}\n};\n\nViewWidget.prototype.getValueAsRelativeDate = function(format) {\n\tvar value = $tw.utils.parseDate(this.getValue());\n\tif(value && $tw.utils.isDate(value) && value.toString() !== \"Invalid Date\") {\n\t\treturn $tw.utils.getRelativeDate((new Date()) - (new Date(value))).description;\n\t} else {\n\t\treturn \"\";\n\t}\n};\n\nViewWidget.prototype.getValueAsStrippedComments = function() {\n\tvar lines = this.getValueAsText().split(\"\\n\"),\n\t\tout = [];\n\tfor(var line=0; line<lines.length; line++) {\n\t\tvar text = lines[line];\n\t\tif(!/^\\s*\\/\\/#/.test(text)) {\n\t\t\tout.push(text);\n\t\t}\n\t}\n\treturn out.join(\"\\n\");\n};\n\nViewWidget.prototype.getValueAsJsEncoded = function() {\n\treturn $tw.utils.stringify(this.getValueAsText());\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nViewWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.template || changedAttributes.format || changedTiddlers[this.viewTitle]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\n\t}\n};\n\nexports.view = ViewWidget;\n\n})();\n",
"title": "$:/core/modules/widgets/view.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/widget.js": {
"text": "/*\\\ntitle: $:/core/modules/widgets/widget.js\ntype: application/javascript\nmodule-type: widget\n\nWidget base class\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nCreate a widget object for a parse tree node\n\tparseTreeNode: reference to the parse tree node to be rendered\n\toptions: see below\nOptions include:\n\twiki: mandatory reference to wiki associated with this render tree\n\tparentWidget: optional reference to a parent renderer node for the context chain\n\tdocument: optional document object to use instead of global document\n*/\nvar Widget = function(parseTreeNode,options) {\n\tif(arguments.length > 0) {\n\t\tthis.initialise(parseTreeNode,options);\n\t}\n};\n\n/*\nInitialise widget properties. These steps are pulled out of the constructor so that we can reuse them in subclasses\n*/\nWidget.prototype.initialise = function(parseTreeNode,options) {\n\toptions = options || {};\n\t// Save widget info\n\tthis.parseTreeNode = parseTreeNode;\n\tthis.wiki = options.wiki;\n\tthis.parentWidget = options.parentWidget;\n\tthis.variablesConstructor = function() {};\n\tthis.variablesConstructor.prototype = this.parentWidget ? this.parentWidget.variables : {};\n\tthis.variables = new this.variablesConstructor();\n\tthis.document = options.document;\n\tthis.attributes = {};\n\tthis.children = [];\n\tthis.domNodes = [];\n\tthis.eventListeners = {};\n\t// Hashmap of the widget classes\n\tif(!this.widgetClasses) {\n\t\tWidget.prototype.widgetClasses = $tw.modules.applyMethods(\"widget\");\n\t}\n};\n\n/*\nRender this widget into the DOM\n*/\nWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nWidget.prototype.execute = function() {\n\tthis.makeChildWidgets();\n};\n\n/*\nSet the value of a context variable\nname: name of the variable\nvalue: value of the variable\nparams: array of {name:, default:} for each parameter\n*/\nWidget.prototype.setVariable = function(name,value,params) {\n\tthis.variables[name] = {value: value, params: params};\n};\n\n/*\nGet the prevailing value of a context variable\nname: name of variable\noptions: see below\nOptions include\nparams: array of {name:, value:} for each parameter\ndefaultValue: default value if the variable is not defined\n*/\nWidget.prototype.getVariable = function(name,options) {\n\toptions = options || {};\n\tvar actualParams = options.params || [],\n\t\tparentWidget = this.parentWidget;\n\t// Check for the variable defined in the parent widget (or an ancestor in the prototype chain)\n\tif(parentWidget && name in parentWidget.variables) {\n\t\tvar variable = parentWidget.variables[name],\n\t\t\tvalue = variable.value;\n\t\t// Substitute any parameters specified in the definition\n\t\tvalue = this.substituteVariableParameters(value,variable.params,actualParams);\n\t\tvalue = this.substituteVariableReferences(value);\n\t\treturn value;\n\t}\n\t// If the variable doesn't exist in the parent widget then look for a macro module\n\treturn this.evaluateMacroModule(name,actualParams,options.defaultValue);\n};\n\nWidget.prototype.substituteVariableParameters = function(text,formalParams,actualParams) {\n\tif(formalParams) {\n\t\tvar nextAnonParameter = 0, // Next candidate anonymous parameter in macro call\n\t\t\tparamInfo, paramValue;\n\t\t// Step through each of the parameters in the macro definition\n\t\tfor(var p=0; p<formalParams.length; p++) {\n\t\t\t// Check if we've got a macro call parameter with the same name\n\t\t\tparamInfo = formalParams[p];\n\t\t\tparamValue = undefined;\n\t\t\tfor(var m=0; m<actualParams.length; m++) {\n\t\t\t\tif(actualParams[m].name === paramInfo.name) {\n\t\t\t\t\tparamValue = actualParams[m].value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If not, use the next available anonymous macro call parameter\n\t\t\twhile(nextAnonParameter < actualParams.length && actualParams[nextAnonParameter].name) {\n\t\t\t\tnextAnonParameter++;\n\t\t\t}\n\t\t\tif(paramValue === undefined && nextAnonParameter < actualParams.length) {\n\t\t\t\tparamValue = actualParams[nextAnonParameter++].value;\n\t\t\t}\n\t\t\t// If we've still not got a value, use the default, if any\n\t\t\tparamValue = paramValue || paramInfo[\"default\"] || \"\";\n\t\t\t// Replace any instances of this parameter\n\t\t\ttext = text.replace(new RegExp(\"\\\\$\" + $tw.utils.escapeRegExp(paramInfo.name) + \"\\\\$\",\"mg\"),paramValue);\n\t\t}\n\t}\n\treturn text;\n};\n\nWidget.prototype.substituteVariableReferences = function(text) {\n\tvar self = this;\n\treturn (text || \"\").replace(/\\$\\(([^\\)\\$]+)\\)\\$/g,function(match,p1,offset,string) {\n\t\treturn self.getVariable(p1,{defaultValue: \"\"});\n\t});\n};\n\nWidget.prototype.evaluateMacroModule = function(name,actualParams,defaultValue) {\n\tif($tw.utils.hop($tw.macros,name)) {\n\t\tvar macro = $tw.macros[name],\n\t\t\targs = [];\n\t\tif(macro.params.length > 0) {\n\t\t\tvar nextAnonParameter = 0, // Next candidate anonymous parameter in macro call\n\t\t\t\tparamInfo, paramValue;\n\t\t\t// Step through each of the parameters in the macro definition\n\t\t\tfor(var p=0; p<macro.params.length; p++) {\n\t\t\t\t// Check if we've got a macro call parameter with the same name\n\t\t\t\tparamInfo = macro.params[p];\n\t\t\t\tparamValue = undefined;\n\t\t\t\tfor(var m=0; m<actualParams.length; m++) {\n\t\t\t\t\tif(actualParams[m].name === paramInfo.name) {\n\t\t\t\t\t\tparamValue = actualParams[m].value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If not, use the next available anonymous macro call parameter\n\t\t\t\twhile(nextAnonParameter < actualParams.length && actualParams[nextAnonParameter].name) {\n\t\t\t\t\tnextAnonParameter++;\n\t\t\t\t}\n\t\t\t\tif(paramValue === undefined && nextAnonParameter < actualParams.length) {\n\t\t\t\t\tparamValue = actualParams[nextAnonParameter++].value;\n\t\t\t\t}\n\t\t\t\t// If we've still not got a value, use the default, if any\n\t\t\t\tparamValue = paramValue || paramInfo[\"default\"] || \"\";\n\t\t\t\t// Save the parameter\n\t\t\t\targs.push(paramValue);\n\t\t\t}\n\t\t}\n\t\telse for(var i=0; i<actualParams.length; ++i) {\n\t\t\targs.push(actualParams[i].value);\n\t\t}\n\t\treturn (macro.run.apply(this,args) || \"\").toString();\n\t} else {\n\t\treturn defaultValue;\n\t}\n};\n\n/*\nCheck whether a given context variable value exists in the parent chain\n*/\nWidget.prototype.hasVariable = function(name,value) {\n\tvar node = this;\n\twhile(node) {\n\t\tif($tw.utils.hop(node.variables,name) && node.variables[name].value === value) {\n\t\t\treturn true;\n\t\t}\n\t\tnode = node.parentWidget;\n\t}\n\treturn false;\n};\n\n/*\nConstruct a qualifying string based on a hash of concatenating the values of a given variable in the parent chain\n*/\nWidget.prototype.getStateQualifier = function(name) {\n\tthis.qualifiers = this.qualifiers || Object.create(null);\n\tname = name || \"transclusion\";\n\tif(this.qualifiers[name]) {\n\t\treturn this.qualifiers[name];\n\t} else {\n\t\tvar output = [],\n\t\t\tnode = this;\n\t\twhile(node && node.parentWidget) {\n\t\t\tif($tw.utils.hop(node.parentWidget.variables,name)) {\n\t\t\t\toutput.push(node.getVariable(name));\n\t\t\t}\n\t\t\tnode = node.parentWidget;\n\t\t}\n\t\tvar value = $tw.utils.hashString(output.join(\"\"));\n\t\tthis.qualifiers[name] = value;\n\t\treturn value;\n\t}\n};\n\n/*\nCompute the current values of the attributes of the widget. Returns a hashmap of the names of the attributes that have changed\n*/\nWidget.prototype.computeAttributes = function() {\n\tvar changedAttributes = {},\n\t\tself = this,\n\t\tvalue;\n\t$tw.utils.each(this.parseTreeNode.attributes,function(attribute,name) {\n\t\tif(attribute.type === \"indirect\") {\n\t\t\tvalue = self.wiki.getTextReference(attribute.textReference,\"\",self.getVariable(\"currentTiddler\"));\n\t\t} else if(attribute.type === \"macro\") {\n\t\t\tvalue = self.getVariable(attribute.value.name,{params: attribute.value.params});\n\t\t} else { // String attribute\n\t\t\tvalue = attribute.value;\n\t\t}\n\t\t// Check whether the attribute has changed\n\t\tif(self.attributes[name] !== value) {\n\t\t\tself.attributes[name] = value;\n\t\t\tchangedAttributes[name] = true;\n\t\t}\n\t});\n\treturn changedAttributes;\n};\n\n/*\nCheck for the presence of an attribute\n*/\nWidget.prototype.hasAttribute = function(name) {\n\treturn $tw.utils.hop(this.attributes,name);\n};\n\n/*\nGet the value of an attribute\n*/\nWidget.prototype.getAttribute = function(name,defaultText) {\n\tif($tw.utils.hop(this.attributes,name)) {\n\t\treturn this.attributes[name];\n\t} else {\n\t\treturn defaultText;\n\t}\n};\n\n/*\nAssign the computed attributes of the widget to a domNode\noptions include:\nexcludeEventAttributes: ignores attributes whose name begins with \"on\"\n*/\nWidget.prototype.assignAttributes = function(domNode,options) {\n\toptions = options || {};\n\tvar self = this;\n\t$tw.utils.each(this.attributes,function(v,a) {\n\t\t// Check exclusions\n\t\tif(options.excludeEventAttributes && a.substr(0,2) === \"on\") {\n\t\t\tv = undefined;\n\t\t}\n\t\tif(v !== undefined) {\n\t\t\tvar b = a.split(\":\");\n\t\t\t// Setting certain attributes can cause a DOM error (eg xmlns on the svg element)\n\t\t\ttry {\n\t\t\t\tif (b.length == 2 && b[0] == \"xlink\"){\n\t\t\t\t\tdomNode.setAttributeNS(\"http://www.w3.org/1999/xlink\",b[1],v);\n\t\t\t\t} else {\n\t\t\t\t\tdomNode.setAttributeNS(null,a,v);\n\t\t\t\t}\n\t\t\t} catch(e) {\n\t\t\t}\n\t\t}\n\t});\n};\n\n/*\nMake child widgets correspondng to specified parseTreeNodes\n*/\nWidget.prototype.makeChildWidgets = function(parseTreeNodes) {\n\tthis.children = [];\n\tvar self = this;\n\t$tw.utils.each(parseTreeNodes || (this.parseTreeNode && this.parseTreeNode.children),function(childNode) {\n\t\tself.children.push(self.makeChildWidget(childNode));\n\t});\n};\n\n/*\nConstruct the widget object for a parse tree node\n*/\nWidget.prototype.makeChildWidget = function(parseTreeNode) {\n\tvar WidgetClass = this.widgetClasses[parseTreeNode.type];\n\tif(!WidgetClass) {\n\t\tWidgetClass = this.widgetClasses.text;\n\t\tparseTreeNode = {type: \"text\", text: \"Undefined widget '\" + parseTreeNode.type + \"'\"};\n\t}\n\treturn new WidgetClass(parseTreeNode,{\n\t\twiki: this.wiki,\n\t\tvariables: {},\n\t\tparentWidget: this,\n\t\tdocument: this.document\n\t});\n};\n\n/*\nGet the next sibling of this widget\n*/\nWidget.prototype.nextSibling = function() {\n\tif(this.parentWidget) {\n\t\tvar index = this.parentWidget.children.indexOf(this);\n\t\tif(index !== -1 && index < this.parentWidget.children.length-1) {\n\t\t\treturn this.parentWidget.children[index+1];\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nGet the previous sibling of this widget\n*/\nWidget.prototype.previousSibling = function() {\n\tif(this.parentWidget) {\n\t\tvar index = this.parentWidget.children.indexOf(this);\n\t\tif(index !== -1 && index > 0) {\n\t\t\treturn this.parentWidget.children[index-1];\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nRender the children of this widget into the DOM\n*/\nWidget.prototype.renderChildren = function(parent,nextSibling) {\n\t$tw.utils.each(this.children,function(childWidget) {\n\t\tchildWidget.render(parent,nextSibling);\n\t});\n};\n\n/*\nAdd a list of event listeners from an array [{type:,handler:},...]\n*/\nWidget.prototype.addEventListeners = function(listeners) {\n\tvar self = this;\n\t$tw.utils.each(listeners,function(listenerInfo) {\n\t\tself.addEventListener(listenerInfo.type,listenerInfo.handler);\n\t});\n};\n\n/*\nAdd an event listener\n*/\nWidget.prototype.addEventListener = function(type,handler) {\n\tvar self = this;\n\tif(typeof handler === \"string\") { // The handler is a method name on this widget\n\t\tthis.eventListeners[type] = function(event) {\n\t\t\treturn self[handler].call(self,event);\n\t\t};\n\t} else { // The handler is a function\n\t\tthis.eventListeners[type] = function(event) {\n\t\t\treturn handler.call(self,event);\n\t\t};\n\t}\n};\n\n/*\nDispatch an event to a widget. If the widget doesn't handle the event then it is also dispatched to the parent widget\n*/\nWidget.prototype.dispatchEvent = function(event) {\n\t// Dispatch the event if this widget handles it\n\tvar listener = this.eventListeners[event.type];\n\tif(listener) {\n\t\t// Don't propagate the event if the listener returned false\n\t\tif(!listener(event)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t// Dispatch the event to the parent widget\n\tif(this.parentWidget) {\n\t\treturn this.parentWidget.dispatchEvent(event);\n\t}\n\treturn true;\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nRebuild a previously rendered widget\n*/\nWidget.prototype.refreshSelf = function() {\n\tvar nextSibling = this.findNextSiblingDomNode();\n\tthis.removeChildDomNodes();\n\tthis.render(this.parentDomNode,nextSibling);\n};\n\n/*\nRefresh all the children of a widget\n*/\nWidget.prototype.refreshChildren = function(changedTiddlers) {\n\tvar self = this,\n\t\trefreshed = false;\n\t$tw.utils.each(this.children,function(childWidget) {\n\t\trefreshed = childWidget.refresh(changedTiddlers) || refreshed;\n\t});\n\treturn refreshed;\n};\n\n/*\nFind the next sibling in the DOM to this widget. This is done by scanning the widget tree through all next siblings and their descendents that share the same parent DOM node\n*/\nWidget.prototype.findNextSiblingDomNode = function(startIndex) {\n\t// Refer to this widget by its index within its parents children\n\tvar parent = this.parentWidget,\n\t\tindex = startIndex !== undefined ? startIndex : parent.children.indexOf(this);\nif(index === -1) {\n\tthrow \"node not found in parents children\";\n}\n\t// Look for a DOM node in the later siblings\n\twhile(++index < parent.children.length) {\n\t\tvar domNode = parent.children[index].findFirstDomNode();\n\t\tif(domNode) {\n\t\t\treturn domNode;\n\t\t}\n\t}\n\t// Go back and look for later siblings of our parent if it has the same parent dom node\n\tvar grandParent = parent.parentWidget;\n\tif(grandParent && parent.parentDomNode === this.parentDomNode) {\n\t\tindex = grandParent.children.indexOf(parent);\n\t\tif(index !== -1) {\n\t\t\treturn parent.findNextSiblingDomNode(index);\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nFind the first DOM node generated by a widget or its children\n*/\nWidget.prototype.findFirstDomNode = function() {\n\t// Return the first dom node of this widget, if we've got one\n\tif(this.domNodes.length > 0) {\n\t\treturn this.domNodes[0];\n\t}\n\t// Otherwise, recursively call our children\n\tfor(var t=0; t<this.children.length; t++) {\n\t\tvar domNode = this.children[t].findFirstDomNode();\n\t\tif(domNode) {\n\t\t\treturn domNode;\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nRemove any DOM nodes created by this widget or its children\n*/\nWidget.prototype.removeChildDomNodes = function() {\n\t// If this widget has directly created DOM nodes, delete them and exit. This assumes that any child widgets are contained within the created DOM nodes, which would normally be the case\n\tif(this.domNodes.length > 0) {\n\t\t$tw.utils.each(this.domNodes,function(domNode) {\n\t\t\tdomNode.parentNode.removeChild(domNode);\n\t\t});\n\t\tthis.domNodes = [];\n\t} else {\n\t\t// Otherwise, ask the child widgets to delete their DOM nodes\n\t\t$tw.utils.each(this.children,function(childWidget) {\n\t\t\tchildWidget.removeChildDomNodes();\n\t\t});\n\t}\n};\n\n/*\nInvoke the action widgets that are descendents of the current widget.\n*/\nWidget.prototype.invokeActions = function(triggeringWidget,event) {\n\tvar handled = false;\n\t// For each child widget\n\tfor(var t=0; t<this.children.length; t++) {\n\t\tvar child = this.children[t];\n\t\t// Invoke the child if it is an action widget\n\t\tif(child.invokeAction && child.invokeAction(triggeringWidget,event)) {\n\t\t\thandled = true;\n\t\t}\n\t\t// Propagate through through the child if it permits it\n\t\tif(child.allowActionPropagation() && child.invokeActions(triggeringWidget,event)) {\n\t\t\thandled = true;\n\t\t}\n\t}\n\treturn handled;\n};\n\n\nWidget.prototype.allowActionPropagation = function() {\n\treturn true;\n};\n\nexports.widget = Widget;\n\n})();\n",
"title": "$:/core/modules/widgets/widget.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/wiki-bulkops.js": {
"text": "/*\\\ntitle: $:/core/modules/wiki-bulkops.js\ntype: application/javascript\nmodule-type: wikimethod\n\nBulk tiddler operations such as rename.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nRename a tiddler, and relink any tags or lists that reference it.\n*/\nexports.renameTiddler = function(fromTitle,toTitle) {\n\tvar self = this;\n\tfromTitle = (fromTitle || \"\").trim();\n\ttoTitle = (toTitle || \"\").trim();\n\tif(fromTitle && toTitle && fromTitle !== toTitle) {\n\t\t// Rename the tiddler itself\n\t\tvar tiddler = this.getTiddler(fromTitle);\n\t\tthis.addTiddler(new $tw.Tiddler(tiddler,{title: toTitle},this.getModificationFields()));\n\t\tthis.deleteTiddler(fromTitle);\n\t\t// Rename any tags or lists that reference it\n\t\tthis.each(function(tiddler,title) {\n\t\t\tvar tags = (tiddler.fields.tags || []).slice(0),\n\t\t\t\tlist = (tiddler.fields.list || []).slice(0),\n\t\t\t\tisModified = false;\n\t\t\t// Rename tags\n\t\t\t$tw.utils.each(tags,function (title,index) {\n\t\t\t\tif(title === fromTitle) {\n\t\t\t\t\ttags[index] = toTitle;\n\t\t\t\t\tisModified = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\t// Rename lists\n\t\t\t$tw.utils.each(list,function (title,index) {\n\t\t\t\tif(title === fromTitle) {\n\t\t\t\t\tlist[index] = toTitle;\n\t\t\t\t\tisModified = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif(isModified) {\n\t\t\t\tself.addTiddler(new $tw.Tiddler(tiddler,{tags: tags, list: list},self.getModificationFields()));\n\t\t\t}\n\t\t});\n\t}\n}\n\n})();\n",
"title": "$:/core/modules/wiki-bulkops.js",
"type": "application/javascript",
"module-type": "wikimethod"
},
"$:/core/modules/wiki.js": {
"text": "/*\\\ntitle: $:/core/modules/wiki.js\ntype: application/javascript\nmodule-type: wikimethod\n\nExtension methods for the $tw.Wiki object\n\nAdds the following properties to the wiki object:\n\n* `eventListeners` is a hashmap by type of arrays of listener functions\n* `changedTiddlers` is a hashmap describing changes to named tiddlers since wiki change events were last dispatched. Each entry is a hashmap containing two fields:\n\tmodified: true/false\n\tdeleted: true/false\n* `changeCount` is a hashmap by tiddler title containing a numerical index that starts at zero and is incremented each time a tiddler is created changed or deleted\n* `caches` is a hashmap by tiddler title containing a further hashmap of named cache objects. Caches are automatically cleared when a tiddler is modified or deleted\n* `globalCache` is a hashmap by cache name of cache objects that are cleared whenever any tiddler change occurs\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nvar USER_NAME_TITLE = \"$:/status/UserName\";\n\n/*\nGet the value of a text reference. Text references can have any of these forms:\n\t<tiddlertitle>\n\t<tiddlertitle>!!<fieldname>\n\t!!<fieldname> - specifies a field of the current tiddlers\n\t<tiddlertitle>##<index>\n*/\nexports.getTextReference = function(textRef,defaultText,currTiddlerTitle) {\n\tvar tr = $tw.utils.parseTextReference(textRef),\n\t\ttitle = tr.title || currTiddlerTitle;\n\tif(tr.field) {\n\t\tvar tiddler = this.getTiddler(title);\n\t\tif(tr.field === \"title\") { // Special case so we can return the title of a non-existent tiddler\n\t\t\treturn title;\n\t\t} else if(tiddler && $tw.utils.hop(tiddler.fields,tr.field)) {\n\t\t\treturn tiddler.getFieldString(tr.field);\n\t\t} else {\n\t\t\treturn defaultText;\n\t\t}\n\t} else if(tr.index) {\n\t\treturn this.extractTiddlerDataItem(title,tr.index,defaultText);\n\t} else {\n\t\treturn this.getTiddlerText(title,defaultText);\n\t}\n};\n\nexports.setTextReference = function(textRef,value,currTiddlerTitle) {\n\tvar tr = $tw.utils.parseTextReference(textRef),\n\t\ttitle = tr.title || currTiddlerTitle;\n\tthis.setText(title,tr.field,tr.index,value);\n};\n\nexports.setText = function(title,field,index,value,options) {\n\toptions = options || {};\n\tvar creationFields = options.suppressTimestamp ? {} : this.getCreationFields(),\n\t\tmodificationFields = options.suppressTimestamp ? {} : this.getModificationFields();\n\t// Check if it is a reference to a tiddler field\n\tif(index) {\n\t\tvar data = this.getTiddlerData(title,Object.create(null));\n\t\tif(value !== undefined) {\n\t\t\tdata[index] = value;\n\t\t} else {\n\t\t\tdelete data[index];\n\t\t}\n\t\tthis.setTiddlerData(title,data,modificationFields);\n\t} else {\n\t\tvar tiddler = this.getTiddler(title),\n\t\t\tfields = {title: title};\n\t\tfields[field || \"text\"] = value;\n\t\tthis.addTiddler(new $tw.Tiddler(creationFields,tiddler,fields,modificationFields));\n\t}\n};\n\nexports.deleteTextReference = function(textRef,currTiddlerTitle) {\n\tvar tr = $tw.utils.parseTextReference(textRef),\n\t\ttitle,tiddler,fields;\n\t// Check if it is a reference to a tiddler\n\tif(tr.title && !tr.field) {\n\t\tthis.deleteTiddler(tr.title);\n\t// Else check for a field reference\n\t} else if(tr.field) {\n\t\ttitle = tr.title || currTiddlerTitle;\n\t\ttiddler = this.getTiddler(title);\n\t\tif(tiddler && $tw.utils.hop(tiddler.fields,tr.field)) {\n\t\t\tfields = Object.create(null);\n\t\t\tfields[tr.field] = undefined;\n\t\t\tthis.addTiddler(new $tw.Tiddler(tiddler,fields,this.getModificationFields()));\n\t\t}\n\t}\n};\n\nexports.addEventListener = function(type,listener) {\n\tthis.eventListeners = this.eventListeners || {};\n\tthis.eventListeners[type] = this.eventListeners[type] || [];\n\tthis.eventListeners[type].push(listener);\t\n};\n\nexports.removeEventListener = function(type,listener) {\n\tvar listeners = this.eventListeners[type];\n\tif(listeners) {\n\t\tvar p = listeners.indexOf(listener);\n\t\tif(p !== -1) {\n\t\t\tlisteners.splice(p,1);\n\t\t}\n\t}\n};\n\nexports.dispatchEvent = function(type /*, args */) {\n\tvar args = Array.prototype.slice.call(arguments,1),\n\t\tlisteners = this.eventListeners[type];\n\tif(listeners) {\n\t\tfor(var p=0; p<listeners.length; p++) {\n\t\t\tvar listener = listeners[p];\n\t\t\tlistener.apply(listener,args);\n\t\t}\n\t}\n};\n\n/*\nCauses a tiddler to be marked as changed, incrementing the change count, and triggers event handlers.\nThis method should be called after the changes it describes have been made to the wiki.tiddlers[] array.\n\ttitle: Title of tiddler\n\tisDeleted: defaults to false (meaning the tiddler has been created or modified),\n\t\ttrue if the tiddler has been deleted\n*/\nexports.enqueueTiddlerEvent = function(title,isDeleted) {\n\t// Record the touch in the list of changed tiddlers\n\tthis.changedTiddlers = this.changedTiddlers || Object.create(null);\n\tthis.changedTiddlers[title] = this.changedTiddlers[title] || Object.create(null);\n\tthis.changedTiddlers[title][isDeleted ? \"deleted\" : \"modified\"] = true;\n\t// Increment the change count\n\tthis.changeCount = this.changeCount || Object.create(null);\n\tif($tw.utils.hop(this.changeCount,title)) {\n\t\tthis.changeCount[title]++;\n\t} else {\n\t\tthis.changeCount[title] = 1;\n\t}\n\t// Trigger events\n\tthis.eventListeners = this.eventListeners || {};\n\tif(!this.eventsTriggered) {\n\t\tvar self = this;\n\t\t$tw.utils.nextTick(function() {\n\t\t\tvar changes = self.changedTiddlers;\n\t\t\tself.changedTiddlers = Object.create(null);\n\t\t\tself.eventsTriggered = false;\n\t\t\tif($tw.utils.count(changes) > 0) {\n\t\t\t\tself.dispatchEvent(\"change\",changes);\n\t\t\t}\n\t\t});\n\t\tthis.eventsTriggered = true;\n\t}\n};\n\nexports.getSizeOfTiddlerEventQueue = function() {\n\treturn $tw.utils.count(this.changedTiddlers);\n};\n\nexports.clearTiddlerEventQueue = function() {\n\tthis.changedTiddlers = Object.create(null);\n\tthis.changeCount = Object.create(null);\n};\n\nexports.getChangeCount = function(title) {\n\tthis.changeCount = this.changeCount || Object.create(null);\n\tif($tw.utils.hop(this.changeCount,title)) {\n\t\treturn this.changeCount[title];\n\t} else {\n\t\treturn 0;\n\t}\n};\n\n/*\nGenerate an unused title from the specified base\n*/\nexports.generateNewTitle = function(baseTitle,options) {\n\toptions = options || {};\n\tvar c = 0,\n\t\ttitle = baseTitle;\n\twhile(this.tiddlerExists(title) || this.isShadowTiddler(title) || this.findDraft(title)) {\n\t\ttitle = baseTitle + \n\t\t\t(options.prefix || \" \") + \n\t\t\t(++c);\n\t}\n\treturn title;\n};\n\nexports.isSystemTiddler = function(title) {\n\treturn title && title.indexOf(\"$:/\") === 0;\n};\n\nexports.isTemporaryTiddler = function(title) {\n\treturn title && title.indexOf(\"$:/temp/\") === 0;\n};\n\nexports.isImageTiddler = function(title) {\n\tvar tiddler = this.getTiddler(title);\n\tif(tiddler) {\t\t\n\t\tvar contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type || \"text/vnd.tiddlywiki\"];\n\t\treturn !!contentTypeInfo && contentTypeInfo.flags.indexOf(\"image\") !== -1;\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/*\nLike addTiddler() except it will silently reject any plugin tiddlers that are older than the currently loaded version. Returns true if the tiddler was imported\n*/\nexports.importTiddler = function(tiddler) {\n\tvar existingTiddler = this.getTiddler(tiddler.fields.title);\n\t// Check if we're dealing with a plugin\n\tif(tiddler && tiddler.hasField(\"plugin-type\") && tiddler.hasField(\"version\") && existingTiddler && existingTiddler.hasField(\"plugin-type\") && existingTiddler.hasField(\"version\")) {\n\t\t// Reject the incoming plugin if it is older\n\t\tif(!$tw.utils.checkVersions(tiddler.fields.version,existingTiddler.fields.version)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t// Fall through to adding the tiddler\n\tthis.addTiddler(tiddler);\n\treturn true;\n};\n\n/*\nReturn a hashmap of the fields that should be set when a tiddler is created\n*/\nexports.getCreationFields = function() {\n\tvar fields = {\n\t\t\tcreated: new Date()\n\t\t},\n\t\tcreator = this.getTiddlerText(USER_NAME_TITLE);\n\tif(creator) {\n\t\tfields.creator = creator;\n\t}\n\treturn fields;\n};\n\n/*\nReturn a hashmap of the fields that should be set when a tiddler is modified\n*/\nexports.getModificationFields = function() {\n\tvar fields = Object.create(null),\n\t\tmodifier = this.getTiddlerText(USER_NAME_TITLE);\n\tfields.modified = new Date();\n\tif(modifier) {\n\t\tfields.modifier = modifier;\n\t}\n\treturn fields;\n};\n\n/*\nReturn a sorted array of tiddler titles. Options include:\nsortField: field to sort by\nexcludeTag: tag to exclude\nincludeSystem: whether to include system tiddlers (defaults to false)\n*/\nexports.getTiddlers = function(options) {\n\toptions = options || Object.create(null);\n\tvar self = this,\n\t\tsortField = options.sortField || \"title\",\n\t\ttiddlers = [], t, titles = [];\n\tthis.each(function(tiddler,title) {\n\t\tif(options.includeSystem || !self.isSystemTiddler(title)) {\n\t\t\tif(!options.excludeTag || !tiddler.hasTag(options.excludeTag)) {\n\t\t\t\ttiddlers.push(tiddler);\n\t\t\t}\n\t\t}\n\t});\n\ttiddlers.sort(function(a,b) {\n\t\tvar aa = a.fields[sortField].toLowerCase() || \"\",\n\t\t\tbb = b.fields[sortField].toLowerCase() || \"\";\n\t\tif(aa < bb) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\tif(aa > bb) {\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t});\n\tfor(t=0; t<tiddlers.length; t++) {\n\t\ttitles.push(tiddlers[t].fields.title);\n\t}\n\treturn titles;\n};\n\nexports.countTiddlers = function(excludeTag) {\n\tvar tiddlers = this.getTiddlers({excludeTag: excludeTag});\n\treturn $tw.utils.count(tiddlers);\n};\n\n/*\nReturns a function iterator(callback) that iterates through the specified titles, and invokes the callback with callback(tiddler,title)\n*/\nexports.makeTiddlerIterator = function(titles) {\n\tvar self = this;\n\tif(!$tw.utils.isArray(titles)) {\n\t\ttitles = Object.keys(titles);\n\t} else {\n\t\ttitles = titles.slice(0);\n\t}\n\treturn function(callback) {\n\t\ttitles.forEach(function(title) {\n\t\t\tcallback(self.getTiddler(title),title);\n\t\t});\n\t};\n};\n\n/*\nSort an array of tiddler titles by a specified field\n\ttitles: array of titles (sorted in place)\n\tsortField: name of field to sort by\n\tisDescending: true if the sort should be descending\n\tisCaseSensitive: true if the sort should consider upper and lower case letters to be different\n*/\nexports.sortTiddlers = function(titles,sortField,isDescending,isCaseSensitive,isNumeric) {\n\tvar self = this;\n\ttitles.sort(function(a,b) {\n\t\tvar x,y,\n\t\t\tcompareNumbers = function(x,y) {\n\t\t\t\tvar result = \n\t\t\t\t\tisNaN(x) && !isNaN(y) ? (isDescending ? -1 : 1) :\n\t\t\t\t\t!isNaN(x) && isNaN(y) ? (isDescending ? 1 : -1) :\n\t\t\t\t\t (isDescending ? y - x : x - y);\n\t\t\t\treturn result;\n\t\t\t};\n\t\tif(sortField !== \"title\") {\n\t\t\tvar tiddlerA = self.getTiddler(a),\n\t\t\t\ttiddlerB = self.getTiddler(b);\n\t\t\tif(tiddlerA) {\n\t\t\t\ta = tiddlerA.fields[sortField] || \"\";\n\t\t\t} else {\n\t\t\t\ta = \"\";\n\t\t\t}\n\t\t\tif(tiddlerB) {\n\t\t\t\tb = tiddlerB.fields[sortField] || \"\";\n\t\t\t} else {\n\t\t\t\tb = \"\";\n\t\t\t}\n\t\t}\n\t\tx = Number(a);\n\t\ty = Number(b);\n\t\tif(isNumeric && (!isNaN(x) || !isNaN(y))) {\n\t\t\treturn compareNumbers(x,y);\n\t\t} else if($tw.utils.isDate(a) && $tw.utils.isDate(b)) {\n\t\t\treturn isDescending ? b - a : a - b;\n\t\t} else {\n\t\t\ta = String(a);\n\t\t\tb = String(b);\n\t\t\tif(!isCaseSensitive) {\n\t\t\t\ta = a.toLowerCase();\n\t\t\t\tb = b.toLowerCase();\n\t\t\t}\n\t\t\treturn isDescending ? b.localeCompare(a) : a.localeCompare(b);\n\t\t}\n\t});\n};\n\n/*\nFor every tiddler invoke a callback(title,tiddler) with `this` set to the wiki object. Options include:\nsortField: field to sort by\nexcludeTag: tag to exclude\nincludeSystem: whether to include system tiddlers (defaults to false)\n*/\nexports.forEachTiddler = function(/* [options,]callback */) {\n\tvar arg = 0,\n\t\toptions = arguments.length >= 2 ? arguments[arg++] : {},\n\t\tcallback = arguments[arg++],\n\t\ttitles = this.getTiddlers(options),\n\t\tt, tiddler;\n\tfor(t=0; t<titles.length; t++) {\n\t\ttiddler = this.getTiddler(titles[t]);\n\t\tif(tiddler) {\n\t\t\tcallback.call(this,tiddler.fields.title,tiddler);\n\t\t}\n\t}\n};\n\n/*\nReturn an array of tiddler titles that are directly linked from the specified tiddler\n*/\nexports.getTiddlerLinks = function(title) {\n\tvar self = this;\n\t// We'll cache the links so they only get computed if the tiddler changes\n\treturn this.getCacheForTiddler(title,\"links\",function() {\n\t\t// Parse the tiddler\n\t\tvar parser = self.parseTiddler(title);\n\t\t// Count up the links\n\t\tvar links = [],\n\t\t\tcheckParseTree = function(parseTree) {\n\t\t\t\tfor(var t=0; t<parseTree.length; t++) {\n\t\t\t\t\tvar parseTreeNode = parseTree[t];\n\t\t\t\t\tif(parseTreeNode.type === \"link\" && parseTreeNode.attributes.to && parseTreeNode.attributes.to.type === \"string\") {\n\t\t\t\t\t\tvar value = parseTreeNode.attributes.to.value;\n\t\t\t\t\t\tif(links.indexOf(value) === -1) {\n\t\t\t\t\t\t\tlinks.push(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(parseTreeNode.children) {\n\t\t\t\t\t\tcheckParseTree(parseTreeNode.children);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\tif(parser) {\n\t\t\tcheckParseTree(parser.tree);\n\t\t}\n\t\treturn links;\n\t});\n};\n\n/*\nReturn an array of tiddler titles that link to the specified tiddler\n*/\nexports.getTiddlerBacklinks = function(targetTitle) {\n\tvar self = this,\n\t\tbacklinks = [];\n\tthis.forEachTiddler(function(title,tiddler) {\n\t\tvar links = self.getTiddlerLinks(title);\n\t\tif(links.indexOf(targetTitle) !== -1) {\n\t\t\tbacklinks.push(title);\n\t\t}\n\t});\n\treturn backlinks;\n};\n\n/*\nReturn a hashmap of tiddler titles that are referenced but not defined. Each value is the number of times the missing tiddler is referenced\n*/\nexports.getMissingTitles = function() {\n\tvar self = this,\n\t\tmissing = [];\n// We should cache the missing tiddler list, even if we recreate it every time any tiddler is modified\n\tthis.forEachTiddler(function(title,tiddler) {\n\t\tvar links = self.getTiddlerLinks(title);\n\t\t$tw.utils.each(links,function(link) {\n\t\t\tif((!self.tiddlerExists(link) && !self.isShadowTiddler(link)) && missing.indexOf(link) === -1) {\n\t\t\t\tmissing.push(link);\n\t\t\t}\n\t\t});\n\t});\n\treturn missing;\n};\n\nexports.getOrphanTitles = function() {\n\tvar self = this,\n\t\torphans = this.getTiddlers();\n\tthis.forEachTiddler(function(title,tiddler) {\n\t\tvar links = self.getTiddlerLinks(title);\n\t\t$tw.utils.each(links,function(link) {\n\t\t\tvar p = orphans.indexOf(link);\n\t\t\tif(p !== -1) {\n\t\t\t\torphans.splice(p,1);\n\t\t\t}\n\t\t});\n\t});\n\treturn orphans; // Todo\n};\n\n/*\nRetrieves a list of the tiddler titles that are tagged with a given tag\n*/\nexports.getTiddlersWithTag = function(tag) {\n\tvar self = this;\n\treturn this.getGlobalCache(\"taglist-\" + tag,function() {\n\t\tvar tagmap = self.getTagMap();\n\t\treturn self.sortByList(tagmap[tag],tag);\n\t});\n};\n\n/*\nGet a hashmap by tag of arrays of tiddler titles\n*/\nexports.getTagMap = function() {\n\tvar self = this;\n\treturn this.getGlobalCache(\"tagmap\",function() {\n\t\tvar tags = Object.create(null),\n\t\t\tstoreTags = function(tagArray,title) {\n\t\t\t\tif(tagArray) {\n\t\t\t\t\tfor(var index=0; index<tagArray.length; index++) {\n\t\t\t\t\t\tvar tag = tagArray[index];\n\t\t\t\t\t\tif($tw.utils.hop(tags,tag)) {\n\t\t\t\t\t\t\ttags[tag].push(title);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttags[tag] = [title];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\ttitle, tiddler;\n\t\t// Collect up all the tags\n\t\tself.eachShadow(function(tiddler,title) {\n\t\t\tif(!self.tiddlerExists(title)) {\n\t\t\t\ttiddler = self.getTiddler(title);\n\t\t\t\tstoreTags(tiddler.fields.tags,title);\n\t\t\t}\n\t\t});\n\t\tself.each(function(tiddler,title) {\n\t\t\tstoreTags(tiddler.fields.tags,title);\n\t\t});\n\t\treturn tags;\n\t});\n};\n\n/*\nLookup a given tiddler and return a list of all the tiddlers that include it in the specified list field\n*/\nexports.findListingsOfTiddler = function(targetTitle,fieldName) {\n\tfieldName = fieldName || \"list\";\n\tvar titles = [];\n\tthis.each(function(tiddler,title) {\n\t\tvar list = $tw.utils.parseStringArray(tiddler.fields[fieldName]);\n\t\tif(list && list.indexOf(targetTitle) !== -1) {\n\t\t\ttitles.push(title);\n\t\t}\n\t});\n\treturn titles;\n};\n\n/*\nSorts an array of tiddler titles according to an ordered list\n*/\nexports.sortByList = function(array,listTitle) {\n\tvar list = this.getTiddlerList(listTitle);\n\tif(!array || array.length === 0) {\n\t\treturn [];\n\t} else {\n\t\tvar titles = [], t, title;\n\t\t// First place any entries that are present in the list\n\t\tfor(t=0; t<list.length; t++) {\n\t\t\ttitle = list[t];\n\t\t\tif(array.indexOf(title) !== -1) {\n\t\t\t\ttitles.push(title);\n\t\t\t}\n\t\t}\n\t\t// Then place any remaining entries\n\t\tfor(t=0; t<array.length; t++) {\n\t\t\ttitle = array[t];\n\t\t\tif(list.indexOf(title) === -1) {\n\t\t\t\ttitles.push(title);\n\t\t\t}\n\t\t}\n\t\t// Finally obey the list-before and list-after fields of each tiddler in turn\n\t\tvar sortedTitles = titles.slice(0);\n\t\tfor(t=0; t<sortedTitles.length; t++) {\n\t\t\ttitle = sortedTitles[t];\n\t\t\tvar currPos = titles.indexOf(title),\n\t\t\t\tnewPos = -1,\n\t\t\t\ttiddler = this.getTiddler(title);\n\t\t\tif(tiddler) {\n\t\t\t\tvar beforeTitle = tiddler.fields[\"list-before\"],\n\t\t\t\t\tafterTitle = tiddler.fields[\"list-after\"];\n\t\t\t\tif(beforeTitle === \"\") {\n\t\t\t\t\tnewPos = 0;\n\t\t\t\t} else if(beforeTitle) {\n\t\t\t\t\tnewPos = titles.indexOf(beforeTitle);\n\t\t\t\t} else if(afterTitle) {\n\t\t\t\t\tnewPos = titles.indexOf(afterTitle);\n\t\t\t\t\tif(newPos >= 0) {\n\t\t\t\t\t\t++newPos;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(newPos === -1) {\n\t\t\t\t\tnewPos = currPos;\n\t\t\t\t}\n\t\t\t\tif(newPos !== currPos) {\n\t\t\t\t\ttitles.splice(currPos,1);\n\t\t\t\t\tif(newPos >= currPos) {\n\t\t\t\t\t\tnewPos--;\n\t\t\t\t\t}\n\t\t\t\t\ttitles.splice(newPos,0,title);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn titles;\n\t}\n};\n\nexports.getSubTiddler = function(title,subTiddlerTitle) {\n\tvar bundleInfo = this.getPluginInfo(title) || this.getTiddlerDataCached(title);\n\tif(bundleInfo && bundleInfo.tiddlers) {\n\t\tvar subTiddler = bundleInfo.tiddlers[subTiddlerTitle];\n\t\tif(subTiddler) {\n\t\t\treturn new $tw.Tiddler(subTiddler);\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nRetrieve a tiddler as a JSON string of the fields\n*/\nexports.getTiddlerAsJson = function(title) {\n\tvar tiddler = this.getTiddler(title);\n\tif(tiddler) {\n\t\tvar fields = Object.create(null);\n\t\t$tw.utils.each(tiddler.fields,function(value,name) {\n\t\t\tfields[name] = tiddler.getFieldString(name);\n\t\t});\n\t\treturn JSON.stringify(fields);\n\t} else {\n\t\treturn JSON.stringify({title: title});\n\t}\n};\n\n/*\nGet the content of a tiddler as a JavaScript object. How this is done depends on the type of the tiddler:\n\napplication/json: the tiddler JSON is parsed into an object\napplication/x-tiddler-dictionary: the tiddler is parsed as sequence of name:value pairs\n\nOther types currently just return null.\n\ntitleOrTiddler: string tiddler title or a tiddler object\ndefaultData: default data to be returned if the tiddler is missing or doesn't contain data\n\nNote that the same value is returned for repeated calls for the same tiddler data. The value is frozen to prevent modification; otherwise modifications would be visible to all callers\n*/\nexports.getTiddlerDataCached = function(titleOrTiddler,defaultData) {\n\tvar self = this,\n\t\ttiddler = titleOrTiddler;\n\tif(!(tiddler instanceof $tw.Tiddler)) {\n\t\ttiddler = this.getTiddler(tiddler);\t\n\t}\n\tif(tiddler) {\n\t\treturn this.getCacheForTiddler(tiddler.fields.title,\"data\",function() {\n\t\t\t// Return the frozen value\n\t\t\tvar value = self.getTiddlerData(tiddler.fields.title,defaultData);\n\t\t\t$tw.utils.deepFreeze(value);\n\t\t\treturn value;\n\t\t});\n\t} else {\n\t\treturn defaultData;\n\t}\n};\n\n/*\nAlternative, uncached version of getTiddlerDataCached(). The return value can be mutated freely and reused\n*/\nexports.getTiddlerData = function(titleOrTiddler,defaultData) {\n\tvar tiddler = titleOrTiddler,\n\t\tdata;\n\tif(!(tiddler instanceof $tw.Tiddler)) {\n\t\ttiddler = this.getTiddler(tiddler);\t\n\t}\n\tif(tiddler && tiddler.fields.text) {\n\t\tswitch(tiddler.fields.type) {\n\t\t\tcase \"application/json\":\n\t\t\t\t// JSON tiddler\n\t\t\t\ttry {\n\t\t\t\t\tdata = JSON.parse(tiddler.fields.text);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\treturn defaultData;\n\t\t\t\t}\n\t\t\t\treturn data;\n\t\t\tcase \"application/x-tiddler-dictionary\":\n\t\t\t\treturn $tw.utils.parseFields(tiddler.fields.text);\n\t\t}\n\t}\n\treturn defaultData;\n};\n\n/*\nExtract an indexed field from within a data tiddler\n*/\nexports.extractTiddlerDataItem = function(titleOrTiddler,index,defaultText) {\n\tvar data = this.getTiddlerData(titleOrTiddler,Object.create(null)),\n\t\ttext;\n\tif(data && $tw.utils.hop(data,index)) {\n\t\ttext = data[index];\n\t}\n\tif(typeof text === \"string\" || typeof text === \"number\") {\n\t\treturn text.toString();\n\t} else {\n\t\treturn defaultText;\n\t}\n};\n\n/*\nSet a tiddlers content to a JavaScript object. Currently this is done by setting the tiddler's type to \"application/json\" and setting the text to the JSON text of the data.\ntitle: title of tiddler\ndata: object that can be serialised to JSON\nfields: optional hashmap of additional tiddler fields to be set\n*/\nexports.setTiddlerData = function(title,data,fields) {\n\tvar existingTiddler = this.getTiddler(title),\n\t\tnewFields = {\n\t\t\ttitle: title\n\t};\n\tif(existingTiddler && existingTiddler.fields.type === \"application/x-tiddler-dictionary\") {\n\t\tnewFields.text = $tw.utils.makeTiddlerDictionary(data);\n\t} else {\n\t\tnewFields.type = \"application/json\";\n\t\tnewFields.text = JSON.stringify(data,null,$tw.config.preferences.jsonSpaces);\n\t}\n\tthis.addTiddler(new $tw.Tiddler(this.getCreationFields(),existingTiddler,fields,newFields,this.getModificationFields()));\n};\n\n/*\nReturn the content of a tiddler as an array containing each line\n*/\nexports.getTiddlerList = function(title,field,index) {\n\tif(index) {\n\t\treturn $tw.utils.parseStringArray(this.extractTiddlerDataItem(title,index,\"\"));\n\t}\n\tfield = field || \"list\";\n\tvar tiddler = this.getTiddler(title);\n\tif(tiddler) {\n\t\treturn ($tw.utils.parseStringArray(tiddler.fields[field]) || []).slice(0);\n\t}\n\treturn [];\n};\n\n// Return a named global cache object. Global cache objects are cleared whenever a tiddler change occurs\nexports.getGlobalCache = function(cacheName,initializer) {\n\tthis.globalCache = this.globalCache || Object.create(null);\n\tif($tw.utils.hop(this.globalCache,cacheName)) {\n\t\treturn this.globalCache[cacheName];\n\t} else {\n\t\tthis.globalCache[cacheName] = initializer();\n\t\treturn this.globalCache[cacheName];\n\t}\n};\n\nexports.clearGlobalCache = function() {\n\tthis.globalCache = Object.create(null);\n};\n\n// Return the named cache object for a tiddler. If the cache doesn't exist then the initializer function is invoked to create it\nexports.getCacheForTiddler = function(title,cacheName,initializer) {\n\tthis.caches = this.caches || Object.create(null);\n\tvar caches = this.caches[title];\n\tif(caches && caches[cacheName]) {\n\t\treturn caches[cacheName];\n\t} else {\n\t\tif(!caches) {\n\t\t\tcaches = Object.create(null);\n\t\t\tthis.caches[title] = caches;\n\t\t}\n\t\tcaches[cacheName] = initializer();\n\t\treturn caches[cacheName];\n\t}\n};\n\n// Clear all caches associated with a particular tiddler, or, if the title is null, clear all the caches for all the tiddlers\nexports.clearCache = function(title) {\n\tif(title) {\n\t\tthis.caches = this.caches || Object.create(null);\n\t\tif($tw.utils.hop(this.caches,title)) {\n\t\t\tdelete this.caches[title];\n\t\t}\n\t} else {\n\t\tthis.caches = Object.create(null);\n\t}\n};\n\nexports.initParsers = function(moduleType) {\n\t// Install the parser modules\n\t$tw.Wiki.parsers = {};\n\tvar self = this;\n\t$tw.modules.forEachModuleOfType(\"parser\",function(title,module) {\n\t\tfor(var f in module) {\n\t\t\tif($tw.utils.hop(module,f)) {\n\t\t\t\t$tw.Wiki.parsers[f] = module[f]; // Store the parser class\n\t\t\t}\n\t\t}\n\t});\n};\n\n/*\nParse a block of text of a specified MIME type\n\ttype: content type of text to be parsed\n\ttext: text\n\toptions: see below\nOptions include:\n\tparseAsInline: if true, the text of the tiddler will be parsed as an inline run\n\t_canonical_uri: optional string of the canonical URI of this content\n*/\nexports.parseText = function(type,text,options) {\n\toptions = options || {};\n\t// Select a parser\n\tvar Parser = $tw.Wiki.parsers[type];\n\tif(!Parser && $tw.utils.getFileExtensionInfo(type)) {\n\t\tParser = $tw.Wiki.parsers[$tw.utils.getFileExtensionInfo(type).type];\n\t}\n\tif(!Parser) {\n\t\tParser = $tw.Wiki.parsers[options.defaultType || \"text/vnd.tiddlywiki\"];\n\t}\n\tif(!Parser) {\n\t\treturn null;\n\t}\n\t// Return the parser instance\n\treturn new Parser(type,text,{\n\t\tparseAsInline: options.parseAsInline,\n\t\twiki: this,\n\t\t_canonical_uri: options._canonical_uri\n\t});\n};\n\n/*\nParse a tiddler according to its MIME type\n*/\nexports.parseTiddler = function(title,options) {\n\toptions = $tw.utils.extend({},options);\n\tvar cacheType = options.parseAsInline ? \"inlineParseTree\" : \"blockParseTree\",\n\t\ttiddler = this.getTiddler(title),\n\t\tself = this;\n\treturn tiddler ? this.getCacheForTiddler(title,cacheType,function() {\n\t\t\tif(tiddler.hasField(\"_canonical_uri\")) {\n\t\t\t\toptions._canonical_uri = tiddler.fields._canonical_uri;\n\t\t\t}\n\t\t\treturn self.parseText(tiddler.fields.type,tiddler.fields.text,options);\n\t\t}) : null;\n};\n\nexports.parseTextReference = function(title,field,index,options) {\n\tvar tiddler,text;\n\tif(options.subTiddler) {\n\t\ttiddler = this.getSubTiddler(title,options.subTiddler);\n\t} else {\n\t\ttiddler = this.getTiddler(title);\n\t\tif(field === \"text\" || (!field && !index)) {\n\t\t\tthis.getTiddlerText(title); // Force the tiddler to be lazily loaded\n\t\t\treturn this.parseTiddler(title,options);\n\t\t}\n\t}\n\tif(field === \"text\" || (!field && !index)) {\n\t\tif(tiddler && tiddler.fields) {\n\t\t\treturn this.parseText(tiddler.fields.type || \"text/vnd.tiddlywiki\",tiddler.fields.text,options);\t\t\t\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t} else if(field) {\n\t\tif(field === \"title\") {\n\t\t\ttext = title;\n\t\t} else {\n\t\t\tif(!tiddler || !tiddler.hasField(field)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\ttext = tiddler.fields[field];\n\t\t}\n\t\treturn this.parseText(\"text/vnd.tiddlywiki\",text.toString(),options);\n\t} else if(index) {\n\t\tthis.getTiddlerText(title); // Force the tiddler to be lazily loaded\n\t\ttext = this.extractTiddlerDataItem(tiddler,index,undefined);\n\t\tif(text === undefined) {\n\t\t\treturn null;\n\t\t}\n\t\treturn this.parseText(\"text/vnd.tiddlywiki\",text,options);\n\t}\n};\n\n/*\nMake a widget tree for a parse tree\nparser: parser object\noptions: see below\nOptions include:\ndocument: optional document to use\nvariables: hashmap of variables to set\nparentWidget: optional parent widget for the root node\n*/\nexports.makeWidget = function(parser,options) {\n\toptions = options || {};\n\tvar widgetNode = {\n\t\t\ttype: \"widget\",\n\t\t\tchildren: []\n\t\t},\n\t\tcurrWidgetNode = widgetNode;\n\t// Create set variable widgets for each variable\n\t$tw.utils.each(options.variables,function(value,name) {\n\t\tvar setVariableWidget = {\n\t\t\ttype: \"set\",\n\t\t\tattributes: {\n\t\t\t\tname: {type: \"string\", value: name},\n\t\t\t\tvalue: {type: \"string\", value: value}\n\t\t\t},\n\t\t\tchildren: []\n\t\t};\n\t\tcurrWidgetNode.children = [setVariableWidget];\n\t\tcurrWidgetNode = setVariableWidget;\n\t});\n\t// Add in the supplied parse tree nodes\n\tcurrWidgetNode.children = parser ? parser.tree : [];\n\t// Create the widget\n\treturn new widget.widget(widgetNode,{\n\t\twiki: this,\n\t\tdocument: options.document || $tw.fakeDocument,\n\t\tparentWidget: options.parentWidget\n\t});\n};\n\n/*\nMake a widget tree for transclusion\ntitle: target tiddler title\noptions: as for wiki.makeWidget() plus:\noptions.field: optional field to transclude (defaults to \"text\")\noptions.mode: transclusion mode \"inline\" or \"block\"\noptions.children: optional array of children for the transclude widget\n*/\nexports.makeTranscludeWidget = function(title,options) {\n\toptions = options || {};\n\tvar parseTree = {tree: [{\n\t\t\ttype: \"element\",\n\t\t\ttag: \"div\",\n\t\t\tchildren: [{\n\t\t\t\ttype: \"transclude\",\n\t\t\t\tattributes: {\n\t\t\t\t\ttiddler: {\n\t\t\t\t\t\tname: \"tiddler\",\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tvalue: title}},\n\t\t\t\tisBlock: !options.parseAsInline}]}\n\t]};\n\tif(options.field) {\n\t\tparseTree.tree[0].children[0].attributes.field = {type: \"string\", value: options.field};\n\t}\n\tif(options.mode) {\n\t\tparseTree.tree[0].children[0].attributes.mode = {type: \"string\", value: options.mode};\n\t}\n\tif(options.children) {\n\t\tparseTree.tree[0].children[0].children = options.children;\n\t}\n\treturn $tw.wiki.makeWidget(parseTree,options);\n};\n\n/*\nParse text in a specified format and render it into another format\n\toutputType: content type for the output\n\ttextType: content type of the input text\n\ttext: input text\n\toptions: see below\nOptions include:\nvariables: hashmap of variables to set\nparentWidget: optional parent widget for the root node\n*/\nexports.renderText = function(outputType,textType,text,options) {\n\toptions = options || {};\n\tvar parser = this.parseText(textType,text,options),\n\t\twidgetNode = this.makeWidget(parser,options);\n\tvar container = $tw.fakeDocument.createElement(\"div\");\n\twidgetNode.render(container,null);\n\treturn outputType === \"text/html\" ? container.innerHTML : container.textContent;\n};\n\n/*\nParse text from a tiddler and render it into another format\n\toutputType: content type for the output\n\ttitle: title of the tiddler to be rendered\n\toptions: see below\nOptions include:\nvariables: hashmap of variables to set\nparentWidget: optional parent widget for the root node\n*/\nexports.renderTiddler = function(outputType,title,options) {\n\toptions = options || {};\n\tvar parser = this.parseTiddler(title,options),\n\t\twidgetNode = this.makeWidget(parser,options);\n\tvar container = $tw.fakeDocument.createElement(\"div\");\n\twidgetNode.render(container,null);\n\treturn outputType === \"text/html\" ? container.innerHTML : (outputType === \"text/plain-formatted\" ? container.formattedTextContent : container.textContent);\n};\n\n/*\nReturn an array of tiddler titles that match a search string\n\ttext: The text string to search for\n\toptions: see below\nOptions available:\n\tsource: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title)\n\texclude: An array of tiddler titles to exclude from the search\n\tinvert: If true returns tiddlers that do not contain the specified string\n\tcaseSensitive: If true forces a case sensitive search\n\tliteral: If true, searches for literal string, rather than separate search terms\n\tfield: If specified, restricts the search to the specified field\n*/\nexports.search = function(text,options) {\n\toptions = options || {};\n\tvar self = this,\n\t\tt,\n\t\tinvert = !!options.invert;\n\t// Convert the search string into a regexp for each term\n\tvar terms, searchTermsRegExps,\n\t\tflags = options.caseSensitive ? \"\" : \"i\";\n\tif(options.literal) {\n\t\tif(text.length === 0) {\n\t\t\tsearchTermsRegExps = null;\n\t\t} else {\n\t\t\tsearchTermsRegExps = [new RegExp(\"(\" + $tw.utils.escapeRegExp(text) + \")\",flags)];\n\t\t}\n\t} else {\n\t\tterms = text.split(/ +/);\n\t\tif(terms.length === 1 && terms[0] === \"\") {\n\t\t\tsearchTermsRegExps = null;\n\t\t} else {\n\t\t\tsearchTermsRegExps = [];\n\t\t\tfor(t=0; t<terms.length; t++) {\n\t\t\t\tsearchTermsRegExps.push(new RegExp(\"(\" + $tw.utils.escapeRegExp(terms[t]) + \")\",flags));\n\t\t\t}\n\t\t}\n\t}\n\t// Function to check a given tiddler for the search term\n\tvar searchTiddler = function(title) {\n\t\tif(!searchTermsRegExps) {\n\t\t\treturn true;\n\t\t}\n\t\tvar tiddler = self.getTiddler(title);\n\t\tif(!tiddler) {\n\t\t\ttiddler = new $tw.Tiddler({title: title, text: \"\", type: \"text/vnd.tiddlywiki\"});\n\t\t}\n\t\tvar contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type] || $tw.config.contentTypeInfo[\"text/vnd.tiddlywiki\"],\n\t\t\tmatch;\n\t\tfor(var t=0; t<searchTermsRegExps.length; t++) {\n\t\t\tmatch = false;\n\t\t\tif(options.field) {\n\t\t\t\tmatch = searchTermsRegExps[t].test(tiddler.getFieldString(options.field));\n\t\t\t} else {\n\t\t\t\t// Search title, tags and body\n\t\t\t\tif(contentTypeInfo.encoding === \"utf8\") {\n\t\t\t\t\tmatch = match || searchTermsRegExps[t].test(tiddler.fields.text);\n\t\t\t\t}\n\t\t\t\tvar tags = tiddler.fields.tags ? tiddler.fields.tags.join(\"\\0\") : \"\";\n\t\t\t\tmatch = match || searchTermsRegExps[t].test(tags) || searchTermsRegExps[t].test(tiddler.fields.title);\n\t\t\t}\n\t\t\tif(!match) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t};\n\t// Loop through all the tiddlers doing the search\n\tvar results = [],\n\t\tsource = options.source || this.each;\n\tsource(function(tiddler,title) {\n\t\tif(searchTiddler(title) !== options.invert) {\n\t\t\tresults.push(title);\n\t\t}\n\t});\n\t// Remove any of the results we have to exclude\n\tif(options.exclude) {\n\t\tfor(t=0; t<options.exclude.length; t++) {\n\t\t\tvar p = results.indexOf(options.exclude[t]);\n\t\t\tif(p !== -1) {\n\t\t\t\tresults.splice(p,1);\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n};\n\n/*\nTrigger a load for a tiddler if it is skinny. Returns the text, or undefined if the tiddler is missing, null if the tiddler is being lazily loaded.\n*/\nexports.getTiddlerText = function(title,defaultText) {\n\tvar tiddler = this.getTiddler(title);\n\t// Return undefined if the tiddler isn't found\n\tif(!tiddler) {\n\t\treturn defaultText;\n\t}\n\tif(tiddler.fields.text !== undefined) {\n\t\t// Just return the text if we've got it\n\t\treturn tiddler.fields.text;\n\t} else {\n\t\t// Tell any listeners about the need to lazily load this tiddler\n\t\tthis.dispatchEvent(\"lazyLoad\",title);\n\t\t// Indicate that the text is being loaded\n\t\treturn null;\n\t}\n};\n\n/*\nRead an array of browser File objects, invoking callback(tiddlerFieldsArray) once they're all read\n*/\nexports.readFiles = function(files,callback) {\n\tvar result = [],\n\t\toutstanding = files.length;\n\tfor(var f=0; f<files.length; f++) {\n\t\tthis.readFile(files[f],function(tiddlerFieldsArray) {\n\t\t\tresult.push.apply(result,tiddlerFieldsArray);\n\t\t\tif(--outstanding === 0) {\n\t\t\t\tcallback(result);\n\t\t\t}\n\t\t});\n\t}\n\treturn files.length;\n};\n\n/*\nRead a browser File object, invoking callback(tiddlerFieldsArray) with an array of tiddler fields objects\n*/\nexports.readFile = function(file,callback) {\n\t// Get the type, falling back to the filename extension\n\tvar self = this,\n\t\ttype = file.type;\n\tif(type === \"\" || !type) {\n\t\tvar dotPos = file.name.lastIndexOf(\".\");\n\t\tif(dotPos !== -1) {\n\t\t\tvar fileExtensionInfo = $tw.utils.getFileExtensionInfo(file.name.substr(dotPos));\n\t\t\tif(fileExtensionInfo) {\n\t\t\t\ttype = fileExtensionInfo.type;\n\t\t\t}\n\t\t}\n\t}\n\t// Figure out if we're reading a binary file\n\tvar contentTypeInfo = $tw.config.contentTypeInfo[type],\n\t\tisBinary = contentTypeInfo ? contentTypeInfo.encoding === \"base64\" : false;\n\t// Log some debugging information\n\tif($tw.log.IMPORT) {\n\t\tconsole.log(\"Importing file '\" + file.name + \"', type: '\" + type + \"', isBinary: \" + isBinary);\n\t}\n\t// Create the FileReader\n\tvar reader = new FileReader();\n\t// Onload\n\treader.onload = function(event) {\n\t\t// Deserialise the file contents\n\t\tvar text = event.target.result,\n\t\t\ttiddlerFields = {title: file.name || \"Untitled\", type: type};\n\t\t// Are we binary?\n\t\tif(isBinary) {\n\t\t\t// The base64 section starts after the first comma in the data URI\n\t\t\tvar commaPos = text.indexOf(\",\");\n\t\t\tif(commaPos !== -1) {\n\t\t\t\ttiddlerFields.text = text.substr(commaPos+1);\n\t\t\t\tcallback([tiddlerFields]);\n\t\t\t}\n\t\t} else {\n\t\t\t// Check whether this is an encrypted TiddlyWiki file\n\t\t\tvar encryptedJson = $tw.utils.extractEncryptedStoreArea(text);\n\t\t\tif(encryptedJson) {\n\t\t\t\t// If so, attempt to decrypt it with the current password\n\t\t\t\t$tw.utils.decryptStoreAreaInteractive(encryptedJson,function(tiddlers) {\n\t\t\t\t\tcallback(tiddlers);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Otherwise, just try to deserialise any tiddlers in the file\n\t\t\t\tcallback(self.deserializeTiddlers(type,text,tiddlerFields));\n\t\t\t}\n\t\t}\n\t};\n\t// Kick off the read\n\tif(isBinary) {\n\t\treader.readAsDataURL(file);\n\t} else {\n\t\treader.readAsText(file);\n\t}\n};\n\n/*\nFind any existing draft of a specified tiddler\n*/\nexports.findDraft = function(targetTitle) {\n\tvar draftTitle = undefined;\n\tthis.forEachTiddler({includeSystem: true},function(title,tiddler) {\n\t\tif(tiddler.fields[\"draft.title\"] && tiddler.fields[\"draft.of\"] === targetTitle) {\n\t\t\tdraftTitle = title;\n\t\t}\n\t});\n\treturn draftTitle;\n}\n\n/*\nCheck whether the specified draft tiddler has been modified\n*/\nexports.isDraftModified = function(title) {\n\tvar tiddler = this.getTiddler(title);\n\tif(!tiddler.isDraft()) {\n\t\treturn false;\n\t}\n\tvar ignoredFields = [\"created\", \"modified\", \"title\", \"draft.title\", \"draft.of\"],\n\t\torigTiddler = this.getTiddler(tiddler.fields[\"draft.of\"]);\n\tif(!origTiddler) {\n\t\treturn tiddler.fields.text !== \"\";\n\t}\n\treturn tiddler.fields[\"draft.title\"] !== tiddler.fields[\"draft.of\"] || !tiddler.isEqual(origTiddler,ignoredFields);\n};\n\n/*\nAdd a new record to the top of the history stack\ntitle: a title string or an array of title strings\nfromPageRect: page coordinates of the origin of the navigation\nhistoryTitle: title of history tiddler (defaults to $:/HistoryList)\n*/\nexports.addToHistory = function(title,fromPageRect,historyTitle) {\n\tvar story = new $tw.Story({wiki: this, historyTitle: historyTitle});\n\tstory.addToHistory(title,fromPageRect);\n};\n\n/*\nInvoke the available upgrader modules\ntitles: array of tiddler titles to be processed\ntiddlers: hashmap by title of tiddler fields of pending import tiddlers. These can be modified by the upgraders. An entry with no fields indicates a tiddler that was pending import has been suppressed. When entries are added to the pending import the tiddlers hashmap may have entries that are not present in the titles array\nReturns a hashmap of messages keyed by tiddler title.\n*/\nexports.invokeUpgraders = function(titles,tiddlers) {\n\t// Collect up the available upgrader modules\n\tvar self = this;\n\tif(!this.upgraderModules) {\n\t\tthis.upgraderModules = [];\n\t\t$tw.modules.forEachModuleOfType(\"upgrader\",function(title,module) {\n\t\t\tif(module.upgrade) {\n\t\t\t\tself.upgraderModules.push(module);\n\t\t\t}\n\t\t});\n\t}\n\t// Invoke each upgrader in turn\n\tvar messages = {};\n\tfor(var t=0; t<this.upgraderModules.length; t++) {\n\t\tvar upgrader = this.upgraderModules[t],\n\t\t\tupgraderMessages = upgrader.upgrade(this,titles,tiddlers);\n\t\t$tw.utils.extend(messages,upgraderMessages);\n\t}\n\treturn messages;\n};\n\n})();\n",
"title": "$:/core/modules/wiki.js",
"type": "application/javascript",
"module-type": "wikimethod"
},
"$:/palettes/Blanca": {
"title": "$:/palettes/Blanca",
"name": "Blanca",
"description": "A clean white palette to let you focus",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background:\nbutton-foreground:\nbutton-border:\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndirty-indicator: #ff0000\ndownload-background: #66cccc\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #999999\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #ffffff\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #7897f3\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #ccc\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\nsidebar-foreground: #acacac\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #ffffff\nsidebar-tab-background: <<colour tab-background>>\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: <<colour tab-divider>>\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #7897f3\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #eeeeee\ntab-border-selected: #cccccc\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: <<colour tab-foreground>>\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #ffeedd\ntag-foreground: #000\ntiddler-background: <<colour background>>\ntiddler-border: #eee\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #ff9900\ntoolbar-new-button:\ntoolbar-options-button:\ntoolbar-save-button:\ntoolbar-info-button:\ntoolbar-edit-button:\ntoolbar-close-button:\ntoolbar-delete-button:\ntoolbar-cancel-button:\ntoolbar-done-button:\nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/palettes/Blue": {
"title": "$:/palettes/Blue",
"name": "Blue",
"description": "A blue theme",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #fff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background:\nbutton-foreground:\nbutton-border:\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndirty-indicator: #ff0000\ndownload-background: #34c734\ndownload-foreground: <<colour foreground>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333353\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #999999\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #ddddff\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #5778d8\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #ffffff\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\nsidebar-foreground: #acacac\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: <<colour page-background>>\nsidebar-tab-background: <<colour tab-background>>\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: <<colour tab-divider>>\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #5959c0\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: <<colour background>>\ntab-background: #ccccdd\ntab-border-selected: #ccccdd\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: <<colour tab-foreground>>\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #eeeeff\ntag-foreground: #000\ntiddler-background: <<colour background>>\ntiddler-border: <<colour background>>\ntiddler-controls-foreground-hover: #666666\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #ffffff\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #ffffff\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #5959c0\ntoolbar-new-button: #5eb95e\ntoolbar-options-button: rgb(128, 88, 165)\ntoolbar-save-button: #0e90d2\ntoolbar-info-button: #0e90d2\ntoolbar-edit-button: rgb(243, 123, 29)\ntoolbar-close-button: #dd514c\ntoolbar-delete-button: #dd514c\ntoolbar-cancel-button: rgb(243, 123, 29)\ntoolbar-done-button: #5eb95e\nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/palettes/Muted": {
"title": "$:/palettes/Muted",
"name": "Muted",
"description": "Bright tiddlers on a muted background",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background:\nbutton-foreground:\nbutton-border:\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndirty-indicator: #ff0000\ndownload-background: #34c734\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #bbb\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #6f6f70\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #29a6ee\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #c2c1c2\nsidebar-foreground-shadow: rgba(255,255,255,0)\nsidebar-foreground: #d3d2d4\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #6f6f70\nsidebar-tab-background: #666667\nsidebar-tab-border-selected: #999\nsidebar-tab-border: #515151\nsidebar-tab-divider: #999\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: #999\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #d1d0d2\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #d8d8d8\ntab-border-selected: #d8d8d8\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: <<colour tab-foreground>>\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #d5ad34\ntag-foreground: #ffffff\ntiddler-background: <<colour background>>\ntiddler-border: <<colour background>>\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #182955\ntoolbar-new-button: \ntoolbar-options-button: \ntoolbar-save-button: \ntoolbar-info-button: \ntoolbar-edit-button: \ntoolbar-close-button: \ntoolbar-delete-button: \ntoolbar-cancel-button: \ntoolbar-done-button: \nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/palettes/ContrastLight": {
"title": "$:/palettes/ContrastLight",
"name": "Contrast (Light)",
"description": "High contrast and unambiguous (light version)",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #f00\nalert-border: <<colour background>>\nalert-highlight: <<colour foreground>>\nalert-muted-foreground: #800\nbackground: #fff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background: <<colour background>>\nbutton-foreground: <<colour foreground>>\nbutton-border: <<colour foreground>>\ncode-background: <<colour background>>\ncode-border: <<colour foreground>>\ncode-foreground: <<colour foreground>>\ndirty-indicator: #f00\ndownload-background: #080\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: <<colour foreground>>\ndropdown-tab-background: <<colour foreground>>\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #00a\nexternal-link-foreground: #00e\nforeground: #000\nmessage-background: <<colour foreground>>\nmessage-border: <<colour background>>\nmessage-foreground: <<colour background>>\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: <<colour foreground>>\nmodal-footer-background: <<colour background>>\nmodal-footer-border: <<colour foreground>>\nmodal-header-border: <<colour foreground>>\nmuted-foreground: <<colour foreground>>\nnotification-background: <<colour background>>\nnotification-border: <<colour foreground>>\npage-background: <<colour background>>\npre-background: <<colour background>>\npre-border: <<colour foreground>>\nprimary: #00f\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: <<colour background>>\nsidebar-controls-foreground: <<colour foreground>>\nsidebar-foreground-shadow: rgba(0,0,0, 0)\nsidebar-foreground: <<colour foreground>>\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: <<colour foreground>>\nsidebar-tab-background-selected: <<colour background>>\nsidebar-tab-background: <<colour tab-background>>\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: <<colour tab-divider>>\nsidebar-tab-foreground-selected: <<colour foreground>>\nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: <<colour foreground>>\nsidebar-tiddler-link-foreground: <<colour primary>>\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: <<colour background>>\ntab-background: <<colour foreground>>\ntab-border-selected: <<colour foreground>>\ntab-border: <<colour foreground>>\ntab-divider: <<colour foreground>>\ntab-foreground-selected: <<colour foreground>>\ntab-foreground: <<colour background>>\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #000\ntag-foreground: #fff\ntiddler-background: <<colour background>>\ntiddler-border: <<colour foreground>>\ntiddler-controls-foreground-hover: #ddd\ntiddler-controls-foreground-selected: #fdd\ntiddler-controls-foreground: <<colour foreground>>\ntiddler-editor-background: <<colour background>>\ntiddler-editor-border-image: <<colour foreground>>\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: <<colour background>>\ntiddler-editor-fields-odd: <<colour background>>\ntiddler-info-background: <<colour background>>\ntiddler-info-border: <<colour foreground>>\ntiddler-info-tab-background: <<colour background>>\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: <<colour foreground>>\ntiddler-title-foreground: <<colour foreground>>\ntoolbar-new-button: \ntoolbar-options-button: \ntoolbar-save-button: \ntoolbar-info-button: \ntoolbar-edit-button: \ntoolbar-close-button: \ntoolbar-delete-button: \ntoolbar-cancel-button: \ntoolbar-done-button: \nuntagged-background: <<colour foreground>>\nvery-muted-foreground: #888888\n"
},
"$:/palettes/ContrastDark": {
"title": "$:/palettes/ContrastDark",
"name": "Contrast (Dark)",
"description": "High contrast and unambiguous (dark version)",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #f00\nalert-border: <<colour background>>\nalert-highlight: <<colour foreground>>\nalert-muted-foreground: #800\nbackground: #000\nblockquote-bar: <<colour muted-foreground>>\nbutton-background: <<colour background>>\nbutton-foreground: <<colour foreground>>\nbutton-border: <<colour foreground>>\ncode-background: <<colour background>>\ncode-border: <<colour foreground>>\ncode-foreground: <<colour foreground>>\ndirty-indicator: #f00\ndownload-background: #080\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: <<colour foreground>>\ndropdown-tab-background: <<colour foreground>>\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #00a\nexternal-link-foreground: #00e\nforeground: #fff\nmessage-background: <<colour foreground>>\nmessage-border: <<colour background>>\nmessage-foreground: <<colour background>>\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: <<colour foreground>>\nmodal-footer-background: <<colour background>>\nmodal-footer-border: <<colour foreground>>\nmodal-header-border: <<colour foreground>>\nmuted-foreground: <<colour foreground>>\nnotification-background: <<colour background>>\nnotification-border: <<colour foreground>>\npage-background: <<colour background>>\npre-background: <<colour background>>\npre-border: <<colour foreground>>\nprimary: #00f\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: <<colour background>>\nsidebar-controls-foreground: <<colour foreground>>\nsidebar-foreground-shadow: rgba(0,0,0, 0)\nsidebar-foreground: <<colour foreground>>\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: <<colour foreground>>\nsidebar-tab-background-selected: <<colour background>>\nsidebar-tab-background: <<colour tab-background>>\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: <<colour tab-divider>>\nsidebar-tab-foreground-selected: <<colour foreground>>\nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: <<colour foreground>>\nsidebar-tiddler-link-foreground: <<colour primary>>\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: <<colour background>>\ntab-background: <<colour foreground>>\ntab-border-selected: <<colour foreground>>\ntab-border: <<colour foreground>>\ntab-divider: <<colour foreground>>\ntab-foreground-selected: <<colour foreground>>\ntab-foreground: <<colour background>>\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #fff\ntag-foreground: #000\ntiddler-background: <<colour background>>\ntiddler-border: <<colour foreground>>\ntiddler-controls-foreground-hover: #ddd\ntiddler-controls-foreground-selected: #fdd\ntiddler-controls-foreground: <<colour foreground>>\ntiddler-editor-background: <<colour background>>\ntiddler-editor-border-image: <<colour foreground>>\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: <<colour background>>\ntiddler-editor-fields-odd: <<colour background>>\ntiddler-info-background: <<colour background>>\ntiddler-info-border: <<colour foreground>>\ntiddler-info-tab-background: <<colour background>>\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: <<colour foreground>>\ntiddler-title-foreground: <<colour foreground>>\ntoolbar-new-button: \ntoolbar-options-button: \ntoolbar-save-button: \ntoolbar-info-button: \ntoolbar-edit-button: \ntoolbar-close-button: \ntoolbar-delete-button: \ntoolbar-cancel-button: \ntoolbar-done-button: \nuntagged-background: <<colour foreground>>\nvery-muted-foreground: #888888\n"
},
"$:/palettes/DarkPhotos": {
"created": "20150402111612188",
"description": "Good with dark photo backgrounds",
"modified": "20150402112344080",
"name": "DarkPhotos",
"tags": "$:/tags/Palette",
"title": "$:/palettes/DarkPhotos",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background: \nbutton-foreground: \nbutton-border: \ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndirty-indicator: #ff0000\ndownload-background: #34c734\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #ddd\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #336438\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #5778d8\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: #ccf\nsidebar-controls-foreground: #fff\nsidebar-foreground-shadow: rgba(0,0,0, 0.5)\nsidebar-foreground: #fff\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #eee\nsidebar-tab-background-selected: rgba(255,255,255, 0.8)\nsidebar-tab-background: rgba(255,255,255, 0.4)\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: rgba(255,255,255, 0.2)\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: #aaf\nsidebar-tiddler-link-foreground: #ddf\nsite-title-foreground: #fff\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #d8d8d8\ntab-border-selected: #d8d8d8\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: <<colour tab-foreground>>\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #ec6\ntag-foreground: #ffffff\ntiddler-background: <<colour background>>\ntiddler-border: <<colour background>>\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #182955\ntoolbar-new-button: \ntoolbar-options-button: \ntoolbar-save-button: \ntoolbar-info-button: \ntoolbar-edit-button: \ntoolbar-close-button: \ntoolbar-delete-button: \ntoolbar-cancel-button: \ntoolbar-done-button: \nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/palettes/Rocker": {
"title": "$:/palettes/Rocker",
"name": "Rocker",
"description": "A dark theme",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background:\nbutton-foreground:\nbutton-border:\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndirty-indicator: #ff0000\ndownload-background: #34c734\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #999999\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #000\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #cc0000\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #ffffff\nsidebar-foreground-shadow: rgba(255,255,255, 0.0)\nsidebar-foreground: #acacac\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #000\nsidebar-tab-background: <<colour tab-background>>\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: <<colour tab-divider>>\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: #ffbb99\nsidebar-tiddler-link-foreground: #cc0000\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #d8d8d8\ntab-border-selected: #d8d8d8\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: <<colour tab-foreground>>\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #ffbb99\ntag-foreground: #000\ntiddler-background: <<colour background>>\ntiddler-border: <<colour background>>\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #cc0000\ntoolbar-new-button:\ntoolbar-options-button:\ntoolbar-save-button:\ntoolbar-info-button:\ntoolbar-edit-button:\ntoolbar-close-button:\ntoolbar-delete-button:\ntoolbar-cancel-button:\ntoolbar-done-button:\nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/palettes/SolarFlare": {
"title": "$:/palettes/SolarFlare",
"name": "Solar Flare",
"description": "Warm, relaxing earth colours",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": ": Background Tones\n\nbase03: #002b36\nbase02: #073642\n\n: Content Tones\n\nbase01: #586e75\nbase00: #657b83\nbase0: #839496\nbase1: #93a1a1\n\n: Background Tones\n\nbase2: #eee8d5\nbase3: #fdf6e3\n\n: Accent Colors\n\nyellow: #b58900\norange: #cb4b16\nred: #dc322f\nmagenta: #d33682\nviolet: #6c71c4\nblue: #268bd2\ncyan: #2aa198\ngreen: #859900\n\n: Additional Tones (RA)\n\nbase10: #c0c4bb\nviolet-muted: #7c81b0\nblue-muted: #4e7baa\n\nyellow-hot: #ffcc44\norange-hot: #eb6d20\nred-hot: #ff2222\nblue-hot: #2298ee\ngreen-hot: #98ee22\n\n: Palette\n\n: Do not use colour macro for background and foreground\nbackground: #fdf6e3\n download-foreground: <<colour background>>\n dragger-foreground: <<colour background>>\n dropdown-background: <<colour background>>\n modal-background: <<colour background>>\n sidebar-foreground-shadow: <<colour background>>\n tiddler-background: <<colour background>>\n tiddler-border: <<colour background>>\n tiddler-link-background: <<colour background>>\n tab-background-selected: <<colour background>>\n dropdown-tab-background-selected: <<colour tab-background-selected>>\nforeground: #657b83\n dragger-background: <<colour foreground>>\n tab-foreground: <<colour foreground>>\n tab-foreground-selected: <<colour tab-foreground>>\n sidebar-tab-foreground-selected: <<colour tab-foreground-selected>>\n sidebar-tab-foreground: <<colour tab-foreground>>\n sidebar-button-foreground: <<colour foreground>>\n sidebar-controls-foreground: <<colour foreground>>\n sidebar-foreground: <<colour foreground>>\n: base03\n: base02\n: base01\n alert-muted-foreground: <<colour base01>>\n: base00\n code-foreground: <<colour base00>>\n message-foreground: <<colour base00>>\n tag-foreground: <<colour base00>>\n: base0\n sidebar-tiddler-link-foreground: <<colour base0>>\n: base1\n muted-foreground: <<colour base1>>\n blockquote-bar: <<colour muted-foreground>>\n dropdown-border: <<colour muted-foreground>>\n sidebar-muted-foreground: <<colour muted-foreground>>\n tiddler-title-foreground: <<colour muted-foreground>>\n site-title-foreground: <<colour tiddler-title-foreground>>\n: base2\n modal-footer-background: <<colour base2>>\n page-background: <<colour base2>>\n modal-backdrop: <<colour page-background>>\n notification-background: <<colour page-background>>\n code-background: <<colour page-background>>\n code-border: <<colour code-background>>\n pre-background: <<colour page-background>>\n pre-border: <<colour pre-background>>\n sidebar-tab-background-selected: <<colour page-background>>\n table-header-background: <<colour base2>>\n tag-background: <<colour base2>>\n tiddler-editor-background: <<colour base2>>\n tiddler-info-background: <<colour base2>>\n tiddler-info-tab-background: <<colour base2>>\n tab-background: <<colour base2>>\n dropdown-tab-background: <<colour tab-background>>\n: base3\n alert-background: <<colour base3>>\n message-background: <<colour base3>>\n: yellow\n: orange\n: red\n: magenta\n alert-highlight: <<colour magenta>>\n: violet\n external-link-foreground: <<colour violet>>\n: blue\n: cyan\n: green\n: base10\n tiddler-controls-foreground: <<colour base10>>\n: violet-muted\n external-link-foreground-visited: <<colour violet-muted>>\n: blue-muted\n primary: <<colour blue-muted>>\n download-background: <<colour primary>>\n tiddler-link-foreground: <<colour primary>>\n\nalert-border: #b99e2f\ndirty-indicator: #ff0000\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nmessage-border: #cfd6e6\nmodal-border: #999999\nsidebar-controls-foreground-hover:\nsidebar-muted-foreground-hover:\nsidebar-tab-background: #ded8c5\nsidebar-tiddler-link-foreground-hover:\nstatic-alert-foreground: #aaaaaa\ntab-border: #cccccc\n modal-footer-border: <<colour tab-border>>\n modal-header-border: <<colour tab-border>>\n notification-border: <<colour tab-border>>\n sidebar-tab-border: <<colour tab-border>>\n tab-border-selected: <<colour tab-border>>\n sidebar-tab-border-selected: <<colour tab-border-selected>>\ntab-divider: #d8d8d8\n sidebar-tab-divider: <<colour tab-divider>>\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-border: #dddddd\ntiddler-subtitle-foreground: #c0c0c0\ntoolbar-new-button:\ntoolbar-options-button:\ntoolbar-save-button:\ntoolbar-info-button:\ntoolbar-edit-button:\ntoolbar-close-button:\ntoolbar-delete-button:\ntoolbar-cancel-button:\ntoolbar-done-button:\nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/palettes/Vanilla": {
"title": "$:/palettes/Vanilla",
"name": "Vanilla",
"description": "Pale and unobtrusive",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background:\nbutton-foreground:\nbutton-border:\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndirty-indicator: #ff0000\ndownload-background: #34c734\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #bbb\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #f4f4f4\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #5778d8\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #aaaaaa\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\nsidebar-foreground: #acacac\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #f4f4f4\nsidebar-tab-background: #e0e0e0\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: #e4e4e4\nsidebar-tab-foreground-selected:\nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #999999\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #d8d8d8\ntab-border-selected: #d8d8d8\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: <<colour tab-foreground>>\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #ec6\ntag-foreground: #ffffff\ntiddler-background: <<colour background>>\ntiddler-border: <<colour background>>\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #182955\ntoolbar-new-button:\ntoolbar-options-button:\ntoolbar-save-button:\ntoolbar-info-button:\ntoolbar-edit-button:\ntoolbar-close-button:\ntoolbar-delete-button:\ntoolbar-cancel-button:\ntoolbar-done-button:\nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/core/readme": {
"title": "$:/core/readme",
"text": "This plugin contains TiddlyWiki's core components, comprising:\n\n* JavaScript code modules\n* Icons\n* Templates needed to create TiddlyWiki's user interface\n* British English (''en-GB'') translations of the localisable strings used by the core\n"
},
"$:/core/templates/MOTW.html": {
"title": "$:/core/templates/MOTW.html",
"text": "\\rules only filteredtranscludeinline transcludeinline entity\n<!-- The following comment is called a MOTW comment and is necessary for the TiddlyIE Internet Explorer extension -->\n<!-- saved from url=(0021)http://tiddlywiki.com --> "
},
"$:/core/templates/alltiddlers.template.html": {
"title": "$:/core/templates/alltiddlers.template.html",
"type": "text/vnd.tiddlywiki-html",
"text": "<!-- This template is provided for backwards compatibility with older versions of TiddlyWiki -->\n\n<$set name=\"exportFilter\" value=\"[!is[system]sort[title]]\">\n\n{{$:/core/templates/exporters/StaticRiver}}\n\n</$set>\n"
},
"$:/core/templates/canonical-uri-external-image": {
"title": "$:/core/templates/canonical-uri-external-image",
"text": "<!--\n\nThis template is used to assign the ''_canonical_uri'' field to external images.\n\nChange the `./images/` part to a different base URI. The URI can be relative or absolute.\n\n-->\n./images/<$view field=\"title\" format=\"doubleurlencoded\"/>"
},
"$:/core/templates/canonical-uri-external-text": {
"title": "$:/core/templates/canonical-uri-external-text",
"text": "<!--\n\nThis template is used to assign the ''_canonical_uri'' field to external text files.\n\nChange the `./text/` part to a different base URI. The URI can be relative or absolute.\n\n-->\n./text/<$view field=\"title\" format=\"doubleurlencoded\"/>.tid"
},
"$:/core/templates/css-tiddler": {
"title": "$:/core/templates/css-tiddler",
"text": "<!--\n\nThis template is used for saving CSS tiddlers as a style tag with data attributes representing the tiddler fields.\n\n-->`<style`<$fields template=' data-tiddler-$name$=\"$encoded_value$\"'></$fields>` type=\"text/css\">`<$view field=\"text\" format=\"text\" />`</style>`"
},
"$:/core/templates/exporters/CsvFile": {
"title": "$:/core/templates/exporters/CsvFile",
"tags": "$:/tags/Exporter",
"description": "{{$:/language/Exporters/CsvFile}}",
"extension": ".csv",
"text": "\\define renderContent()\n<$text text=<<csvtiddlers filter:\"\"\"$(exportFilter)$\"\"\" format:\"quoted-comma-sep\">>/>\n\\end\n<<renderContent>>\n"
},
"$:/core/templates/exporters/JsonFile": {
"title": "$:/core/templates/exporters/JsonFile",
"tags": "$:/tags/Exporter",
"description": "{{$:/language/Exporters/JsonFile}}",
"extension": ".json",
"text": "\\define renderContent()\n<$text text=<<jsontiddlers filter:\"\"\"$(exportFilter)$\"\"\">>/>\n\\end\n<<renderContent>>\n"
},
"$:/core/templates/exporters/StaticRiver": {
"title": "$:/core/templates/exporters/StaticRiver",
"tags": "$:/tags/Exporter",
"description": "{{$:/language/Exporters/StaticRiver}}",
"extension": ".html",
"text": "\\define tv-wikilink-template() #$uri_encoded$\n\\define tv-config-toolbar-icons() no\n\\define tv-config-toolbar-text() no\n\\define tv-config-toolbar-class() tc-btn-invisible\n\\rules only filteredtranscludeinline transcludeinline\n<!doctype html>\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n<meta name=\"generator\" content=\"TiddlyWiki\" />\n<meta name=\"tiddlywiki-version\" content=\"{{$:/core/templates/version}}\" />\n<meta name=\"format-detection\" content=\"telephone=no\">\n<link id=\"faviconLink\" rel=\"shortcut icon\" href=\"favicon.ico\">\n<title>{{$:/core/wiki/title}}</title>\n<div id=\"styleArea\">\n{{$:/boot/boot.css||$:/core/templates/css-tiddler}}\n</div>\n<style type=\"text/css\">\n{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}\n</style>\n</head>\n<body class=\"tc-body\">\n{{$:/StaticBanner||$:/core/templates/html-tiddler}}\n<section class=\"tc-story-river\">\n{{$:/core/templates/exporters/StaticRiver/Content||$:/core/templates/html-tiddler}}\n</section>\n</body>\n</html>\n"
},
"$:/core/templates/exporters/StaticRiver/Content": {
"title": "$:/core/templates/exporters/StaticRiver/Content",
"text": "\\define renderContent()\n{{{ $(exportFilter)$ ||$:/core/templates/static-tiddler}}}\n\\end\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n<<renderContent>>\n</$importvariables>\n"
},
"$:/core/templates/exporters/TidFile": {
"title": "$:/core/templates/exporters/TidFile",
"tags": "$:/tags/Exporter",
"description": "{{$:/language/Exporters/TidFile}}",
"extension": ".tid",
"text": "\\define renderContent()\n{{{ $(exportFilter)$ +[limit[1]] ||$:/core/templates/tid-tiddler}}}\n\\end\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\"><<renderContent>></$importvariables>"
},
"$:/core/templates/html-div-tiddler": {
"title": "$:/core/templates/html-div-tiddler",
"text": "<!--\n\nThis template is used for saving tiddlers as an HTML DIV tag with attributes representing the tiddler fields.\n\n-->`<div`<$fields template=' $name$=\"$encoded_value$\"'></$fields>`>\n<pre>`<$view field=\"text\" format=\"htmlencoded\" />`</pre>\n</div>`\n"
},
"$:/core/templates/html-tiddler": {
"title": "$:/core/templates/html-tiddler",
"text": "<!--\n\nThis template is used for saving tiddlers as raw HTML\n\n--><$view field=\"text\" format=\"htmlwikified\" />"
},
"$:/core/templates/javascript-tiddler": {
"title": "$:/core/templates/javascript-tiddler",
"text": "<!--\n\nThis template is used for saving JavaScript tiddlers as a script tag with data attributes representing the tiddler fields.\n\n-->`<script`<$fields template=' data-tiddler-$name$=\"$encoded_value$\"'></$fields>` type=\"text/javascript\">`<$view field=\"text\" format=\"text\" />`</script>`"
},
"$:/core/templates/module-tiddler": {
"title": "$:/core/templates/module-tiddler",
"text": "<!--\n\nThis template is used for saving JavaScript tiddlers as a script tag with data attributes representing the tiddler fields. The body of the tiddler is wrapped in a call to the `$tw.modules.define` function in order to define the body of the tiddler as a module\n\n-->`<script`<$fields template=' data-tiddler-$name$=\"$encoded_value$\"'></$fields>` type=\"text/javascript\" data-module=\"yes\">$tw.modules.define(\"`<$view field=\"title\" format=\"jsencoded\" />`\",\"`<$view field=\"module-type\" format=\"jsencoded\" />`\",function(module,exports,require) {`<$view field=\"text\" format=\"text\" />`});\n</script>`"
},
"$:/core/templates/plain-text-tiddler": {
"title": "$:/core/templates/plain-text-tiddler",
"text": "<$view field=\"text\" format=\"text\" />"
},
"$:/core/save/all": {
"title": "$:/core/save/all",
"text": "\\define saveTiddlerFilter()\n[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$\n\\end\n{{$:/core/templates/tiddlywiki5.html}}\n"
},
"$:/core/save/empty": {
"title": "$:/core/save/empty",
"text": "\\define saveTiddlerFilter()\n[is[system]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]\n\\end\n{{$:/core/templates/tiddlywiki5.html}}\n"
},
"$:/core/save/lazy-all": {
"title": "$:/core/save/lazy-all",
"text": "\\define saveTiddlerFilter()\n[is[system]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] \n\\end\n{{$:/core/templates/tiddlywiki5.html}}\n"
},
"$:/core/save/lazy-images": {
"title": "$:/core/save/lazy-images",
"text": "\\define saveTiddlerFilter()\n[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[!is[system]is[image]] +[sort[title]] \n\\end\n{{$:/core/templates/tiddlywiki5.html}}\n"
},
"$:/core/templates/single.tiddler.window": {
"title": "$:/core/templates/single.tiddler.window",
"text": "<$set name=\"themeTitle\" value={{$:/view}}>\n\n<$set name=\"tempCurrentTiddler\" value=<<currentTiddler>>>\n\n<$set name=\"currentTiddler\" value={{$:/language}}>\n\n<$set name=\"languageTitle\" value={{!!name}}>\n\n<$set name=\"currentTiddler\" value=<<tempCurrentTiddler>>>\n\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n\n<$navigator story=\"$:/StoryList\" history=\"$:/HistoryList\">\n\n<$transclude mode=\"block\"/>\n\n</$navigator>\n\n</$importvariables>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n"
},
"$:/core/templates/split-recipe": {
"title": "$:/core/templates/split-recipe",
"text": "<$list filter=\"[!is[system]]\">\ntiddler: <$view field=\"title\" format=\"urlencoded\"/>.tid\n</$list>\n"
},
"$:/core/templates/static-tiddler": {
"title": "$:/core/templates/static-tiddler",
"text": "<a name=<<currentTiddler>>>\n<$transclude tiddler=\"$:/core/ui/ViewTemplate\"/>\n</a>"
},
"$:/core/templates/static.area": {
"title": "$:/core/templates/static.area",
"text": "<$reveal type=\"nomatch\" state=\"$:/isEncrypted\" text=\"yes\">\n{{$:/core/templates/static.content||$:/core/templates/html-tiddler}}\n</$reveal>\n<$reveal type=\"match\" state=\"$:/isEncrypted\" text=\"yes\">\nThis file contains an encrypted ~TiddlyWiki. Enable ~JavaScript and enter the decryption password when prompted.\n</$reveal>\n"
},
"$:/core/templates/static.content": {
"title": "$:/core/templates/static.content",
"type": "text/vnd.tiddlywiki",
"text": "<!-- For Google, and people without JavaScript-->\nThis [[TiddlyWiki|http://tiddlywiki.com]] contains the following tiddlers:\n\n<ul>\n<$list filter=<<saveTiddlerFilter>>>\n<li><$view field=\"title\" format=\"text\"></$view></li>\n</$list>\n</ul>\n"
},
"$:/core/templates/static.template.css": {
"title": "$:/core/templates/static.template.css",
"text": "{{$:/boot/boot.css||$:/core/templates/plain-text-tiddler}}\n\n{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}\n"
},
"$:/core/templates/static.template.html": {
"title": "$:/core/templates/static.template.html",
"type": "text/vnd.tiddlywiki-html",
"text": "\\define tv-wikilink-template() static/$uri_doubleencoded$.html\n\\define tv-config-toolbar-icons() no\n\\define tv-config-toolbar-text() no\n\\define tv-config-toolbar-class() tc-btn-invisible\n\\rules only filteredtranscludeinline transcludeinline\n<!doctype html>\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n<meta name=\"generator\" content=\"TiddlyWiki\" />\n<meta name=\"tiddlywiki-version\" content=\"{{$:/core/templates/version}}\" />\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\n<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\" />\n<meta name=\"format-detection\" content=\"telephone=no\">\n<link id=\"faviconLink\" rel=\"shortcut icon\" href=\"favicon.ico\">\n<title>{{$:/core/wiki/title}}</title>\n<div id=\"styleArea\">\n{{$:/boot/boot.css||$:/core/templates/css-tiddler}}\n</div>\n<style type=\"text/css\">\n{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}\n</style>\n</head>\n<body class=\"tc-body\">\n{{$:/StaticBanner||$:/core/templates/html-tiddler}}\n{{$:/core/ui/PageTemplate||$:/core/templates/html-tiddler}}\n</body>\n</html>\n"
},
"$:/core/templates/static.tiddler.html": {
"title": "$:/core/templates/static.tiddler.html",
"text": "\\define tv-wikilink-template() $uri_doubleencoded$.html\n\\define tv-config-toolbar-icons() no\n\\define tv-config-toolbar-text() no\n\\define tv-config-toolbar-class() tc-btn-invisible\n`<!doctype html>\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n<meta name=\"generator\" content=\"TiddlyWiki\" />\n<meta name=\"tiddlywiki-version\" content=\"`{{$:/core/templates/version}}`\" />\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\n<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\" />\n<meta name=\"format-detection\" content=\"telephone=no\">\n<link id=\"faviconLink\" rel=\"shortcut icon\" href=\"favicon.ico\">\n<link rel=\"stylesheet\" href=\"static.css\">\n<title>`<$view field=\"caption\"><$view field=\"title\"/></$view>: {{$:/core/wiki/title}}`</title>\n</head>\n<body class=\"tc-body\">\n`{{$:/StaticBanner||$:/core/templates/html-tiddler}}`\n<section class=\"tc-story-river\">\n`<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n<$view tiddler=\"$:/core/ui/ViewTemplate\" format=\"htmlwikified\"/>\n</$importvariables>`\n</section>\n</body>\n</html>\n`"
},
"$:/core/templates/store.area.template.html": {
"title": "$:/core/templates/store.area.template.html",
"text": "<$reveal type=\"nomatch\" state=\"$:/isEncrypted\" text=\"yes\">\n`<div id=\"storeArea\" style=\"display:none;\">`\n<$list filter=<<saveTiddlerFilter>> template=\"$:/core/templates/html-div-tiddler\"/>\n`</div>`\n</$reveal>\n<$reveal type=\"match\" state=\"$:/isEncrypted\" text=\"yes\">\n`<!--~~ Encrypted tiddlers ~~-->`\n`<pre id=\"encryptedStoreArea\" type=\"text/plain\" style=\"display:none;\">`\n<$encrypt filter=<<saveTiddlerFilter>>/>\n`</pre>`\n</$reveal>"
},
"$:/core/templates/tid-tiddler": {
"title": "$:/core/templates/tid-tiddler",
"text": "<!--\n\nThis template is used for saving tiddlers in TiddlyWeb *.tid format\n\n--><$fields exclude='text bag' template='$name$: $value$\n'></$fields>`\n`<$view field=\"text\" format=\"text\" />"
},
"$:/core/templates/tiddler-metadata": {
"title": "$:/core/templates/tiddler-metadata",
"text": "<!--\n\nThis template is used for saving tiddler metadata *.meta files\n\n--><$fields exclude='text bag' template='$name$: $value$\n'></$fields>"
},
"$:/core/templates/tiddlywiki5.html": {
"title": "$:/core/templates/tiddlywiki5.html",
"text": "\\rules only filteredtranscludeinline transcludeinline\n<!doctype html>\n{{$:/core/templates/MOTW.html}}<html>\n<head>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\t\t<!-- Force IE standards mode for Intranet and HTA - should be the first meta -->\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n<meta name=\"application-name\" content=\"TiddlyWiki\" />\n<meta name=\"generator\" content=\"TiddlyWiki\" />\n<meta name=\"tiddlywiki-version\" content=\"{{$:/core/templates/version}}\" />\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\n<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\" />\n<meta name=\"format-detection\" content=\"telephone=no\" />\n<meta name=\"copyright\" content=\"{{$:/core/copyright.txt}}\" />\n<link id=\"faviconLink\" rel=\"shortcut icon\" href=\"favicon.ico\">\n<title>{{$:/core/wiki/title}}</title>\n<!--~~ This is a Tiddlywiki file. The points of interest in the file are marked with this pattern ~~-->\n\n<!--~~ Raw markup ~~-->\n{{{ [all[shadows+tiddlers]tag[$:/core/wiki/rawmarkup]] [all[shadows+tiddlers]tag[$:/tags/RawMarkup]] ||$:/core/templates/plain-text-tiddler}}}\n</head>\n<body class=\"tc-body\">\n<!--~~ Static styles ~~-->\n<div id=\"styleArea\">\n{{$:/boot/boot.css||$:/core/templates/css-tiddler}}\n</div>\n<!--~~ Static content for Google and browsers without JavaScript ~~-->\n<noscript>\n<div id=\"splashArea\">\n{{$:/core/templates/static.area}}\n</div>\n</noscript>\n<!--~~ Ordinary tiddlers ~~-->\n{{$:/core/templates/store.area.template.html}}\n<!--~~ Library modules ~~-->\n<div id=\"libraryModules\" style=\"display:none;\">\n{{{ [is[system]type[application/javascript]library[yes]] ||$:/core/templates/javascript-tiddler}}}\n</div>\n<!--~~ Boot kernel prologue ~~-->\n<div id=\"bootKernelPrefix\" style=\"display:none;\">\n{{ $:/boot/bootprefix.js ||$:/core/templates/javascript-tiddler}}\n</div>\n<!--~~ Boot kernel ~~-->\n<div id=\"bootKernel\" style=\"display:none;\">\n{{ $:/boot/boot.js ||$:/core/templates/javascript-tiddler}}\n</div>\n</body>\n</html>\n"
},
"$:/core/templates/version": {
"title": "$:/core/templates/version",
"text": "<<version>>"
},
"$:/core/templates/wikified-tiddler": {
"title": "$:/core/templates/wikified-tiddler",
"text": "<$transclude />"
},
"$:/core/ui/AboveStory/tw2-plugin-check": {
"title": "$:/core/ui/AboveStory/tw2-plugin-check",
"tags": "$:/tags/AboveStory",
"text": "\\define lingo-base() $:/language/AboveStory/ClassicPlugin/\n<$list filter=\"[all[system+tiddlers]tag[systemConfig]limit[1]]\">\n\n<div class=\"tc-message-box\">\n\n<<lingo Warning>>\n\n<ul>\n\n<$list filter=\"[all[system+tiddlers]tag[systemConfig]limit[1]]\">\n\n<li>\n\n<$link><$view field=\"title\"/></$link>\n\n</li>\n\n</$list>\n\n</ul>\n\n</div>\n\n</$list>\n"
},
"$:/core/ui/AdvancedSearch/Filter": {
"title": "$:/core/ui/AdvancedSearch/Filter",
"tags": "$:/tags/AdvancedSearch",
"caption": "{{$:/language/Search/Filter/Caption}}",
"text": "\\define lingo-base() $:/language/Search/\n<$linkcatcher to=\"$:/temp/advancedsearch\">\n\n<<lingo Filter/Hint>>\n\n<div class=\"tc-search tc-advanced-search\">\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\n<$button popup=<<qualify \"$:/state/filterDropdown\">> class=\"tc-btn-invisible\">\n{{$:/core/images/down-arrow}}\n</$button>\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $field=\"text\" $value=\"\"/>\n{{$:/core/images/close-button}}\n</$button>\n<$macrocall $name=\"exportButton\" exportFilter={{$:/temp/advancedsearch}} lingoBase=\"$:/language/Buttons/ExportTiddlers/\"/>\n</$reveal>\n</div>\n\n<div class=\"tc-block-dropdown-wrapper\">\n<$reveal state=<<qualify \"$:/state/filterDropdown\">> type=\"nomatch\" text=\"\" default=\"\">\n<div class=\"tc-block-dropdown tc-edit-type-dropdown\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Filter]]\"><$link to={{!!filter}}><$transclude field=\"description\"/></$link>\n</$list>\n</div>\n</$reveal>\n</div>\n\n</$linkcatcher>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$set name=\"resultCount\" value=\"\"\"<$count filter={{$:/temp/advancedsearch}}/>\"\"\">\n<div class=\"tc-search-results\">\n<<lingo Filter/Matches>>\n<$list filter={{$:/temp/advancedsearch}} template=\"$:/core/ui/ListItemTemplate\"/>\n</div>\n</$set>\n</$reveal>\n"
},
"$:/core/ui/AdvancedSearch/Shadows": {
"title": "$:/core/ui/AdvancedSearch/Shadows",
"tags": "$:/tags/AdvancedSearch",
"caption": "{{$:/language/Search/Shadows/Caption}}",
"text": "\\define lingo-base() $:/language/Search/\n<$linkcatcher to=\"$:/temp/advancedsearch\">\n\n<<lingo Shadows/Hint>>\n\n<div class=\"tc-search\">\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $field=\"text\" $value=\"\"/>\n{{$:/core/images/close-button}}\n</$button>\n</$reveal>\n</div>\n\n</$linkcatcher>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n\n<$set name=\"resultCount\" value=\"\"\"<$count filter=\"[all[shadows]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]\"/>\"\"\">\n\n<div class=\"tc-search-results\">\n\n<<lingo Shadows/Matches>>\n\n<$list filter=\"[all[shadows]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n\n</div>\n\n</$set>\n\n</$reveal>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"match\" text=\"\">\n\n</$reveal>\n"
},
"$:/core/ui/AdvancedSearch/Standard": {
"title": "$:/core/ui/AdvancedSearch/Standard",
"tags": "$:/tags/AdvancedSearch",
"caption": "{{$:/language/Search/Standard/Caption}}",
"text": "\\define lingo-base() $:/language/Search/\n<$linkcatcher to=\"$:/temp/advancedsearch\">\n\n<<lingo Standard/Hint>>\n\n<div class=\"tc-search\">\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $field=\"text\" $value=\"\"/>\n{{$:/core/images/close-button}}\n</$button>\n</$reveal>\n</div>\n\n</$linkcatcher>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$set name=\"searchTiddler\" value=\"$:/temp/advancedsearch\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]\" emptyMessage=\"\"\"\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]\">\n<$transclude/>\n</$list>\n\"\"\">\n<$macrocall $name=\"tabs\" tabsList=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]\" default={{$:/config/SearchResults/Default}}/>\n</$list>\n</$set>\n</$reveal>\n"
},
"$:/core/ui/AdvancedSearch/System": {
"title": "$:/core/ui/AdvancedSearch/System",
"tags": "$:/tags/AdvancedSearch",
"caption": "{{$:/language/Search/System/Caption}}",
"text": "\\define lingo-base() $:/language/Search/\n<$linkcatcher to=\"$:/temp/advancedsearch\">\n\n<<lingo System/Hint>>\n\n<div class=\"tc-search\">\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $field=\"text\" $value=\"\"/>\n{{$:/core/images/close-button}}\n</$button>\n</$reveal>\n</div>\n\n</$linkcatcher>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n\n<$set name=\"resultCount\" value=\"\"\"<$count filter=\"[is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]\"/>\"\"\">\n\n<div class=\"tc-search-results\">\n\n<<lingo System/Matches>>\n\n<$list filter=\"[is[system]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n\n</div>\n\n</$set>\n\n</$reveal>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"match\" text=\"\">\n\n</$reveal>\n"
},
"$:/AdvancedSearch": {
"title": "$:/AdvancedSearch",
"icon": "$:/core/images/advanced-search-button",
"color": "#bbb",
"text": "<div class=\"tc-advanced-search\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch]!has[draft.of]]\" \"$:/core/ui/AdvancedSearch/System\">>\n</div>\n"
},
"$:/core/ui/AlertTemplate": {
"title": "$:/core/ui/AlertTemplate",
"text": "<div class=\"tc-alert\">\n<div class=\"tc-alert-toolbar\">\n<$button class=\"tc-btn-invisible\"><$action-deletetiddler $tiddler=<<currentTiddler>>/>{{$:/core/images/delete-button}}</$button>\n</div>\n<div class=\"tc-alert-subtitle\">\n<$view field=\"component\"/> - <$view field=\"modified\" format=\"date\" template=\"0hh:0mm:0ss DD MM YYYY\"/> <$reveal type=\"nomatch\" state=\"!!count\" text=\"\"><span class=\"tc-alert-highlight\">(count: <$view field=\"count\"/>)</span></$reveal>\n</div>\n<div class=\"tc-alert-body\">\n\n<$transclude/>\n\n</div>\n</div>\n"
},
"$:/core/ui/BinaryWarning": {
"title": "$:/core/ui/BinaryWarning",
"text": "\\define lingo-base() $:/language/BinaryWarning/\n<div class=\"tc-binary-warning\">\n\n<<lingo Prompt>>\n\n</div>\n"
},
"$:/core/ui/Components/tag-link": {
"title": "$:/core/ui/Components/tag-link",
"text": "<$link>\n<$set name=\"backgroundColor\" value={{!!color}}>\n<span style=<<tag-styles>> class=\"tc-tag-label\">\n<$view field=\"title\" format=\"text\"/>\n</span>\n</$set>\n</$link>"
},
"$:/core/ui/ControlPanel/Advanced": {
"title": "$:/core/ui/ControlPanel/Advanced",
"tags": "$:/tags/ControlPanel/Info",
"caption": "{{$:/language/ControlPanel/Advanced/Caption}}",
"text": "{{$:/language/ControlPanel/Advanced/Hint}}\n\n<div class=\"tc-control-panel\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Advanced]!has[draft.of]]\" \"$:/core/ui/ControlPanel/TiddlerFields\">>\n</div>\n"
},
"$:/core/ui/ControlPanel/Appearance": {
"title": "$:/core/ui/ControlPanel/Appearance",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Appearance/Caption}}",
"text": "{{$:/language/ControlPanel/Appearance/Hint}}\n\n<div class=\"tc-control-panel\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Appearance]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Theme\">>\n</div>\n"
},
"$:/core/ui/ControlPanel/Basics": {
"title": "$:/core/ui/ControlPanel/Basics",
"tags": "$:/tags/ControlPanel/Info",
"caption": "{{$:/language/ControlPanel/Basics/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Basics/\n\n\\define show-filter-count(filter)\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $value=\"\"\"$filter$\"\"\"/>\n<$action-setfield $tiddler=\"$:/state/tab--1498284803\" $value=\"$:/core/ui/AdvancedSearch/Filter\"/>\n<$action-navigate $to=\"$:/AdvancedSearch\"/>\n''<$count filter=\"\"\"$filter$\"\"\"/>''\n{{$:/core/images/advanced-search-button}}\n</$button>\n\\end\n\n|<<lingo Version/Prompt>> |''<<version>>'' |\n|<$link to=\"$:/SiteTitle\"><<lingo Title/Prompt>></$link> |<$edit-text tiddler=\"$:/SiteTitle\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/SiteSubtitle\"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler=\"$:/SiteSubtitle\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/status/UserName\"><<lingo Username/Prompt>></$link> |<$edit-text tiddler=\"$:/status/UserName\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/config/AnimationDuration\"><<lingo AnimDuration/Prompt>></$link> |<$edit-text tiddler=\"$:/config/AnimationDuration\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/DefaultTiddlers\"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit-text tag=\"textarea\" tiddler=\"$:/DefaultTiddlers\"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |\n|<$link to=\"$:/config/NewJournal/Title\"><<lingo NewJournal/Title/Prompt>></$link> |<$edit-text tiddler=\"$:/config/NewJournal/Title\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/config/NewJournal/Tags\"><<lingo NewJournal/Tags/Prompt>></$link> |<$edit-text tiddler=\"$:/config/NewJournal/Tags\" default=\"\" tag=\"input\"/> |\n|<<lingo Language/Prompt>> |{{$:/snippets/minilanguageswitcher}} |\n|<<lingo Tiddlers/Prompt>> |<<show-filter-count \"[!is[system]sort[title]]\">> |\n|<<lingo Tags/Prompt>> |<<show-filter-count \"[tags[]sort[title]]\">> |\n|<<lingo SystemTiddlers/Prompt>> |<<show-filter-count \"[is[system]sort[title]]\">> |\n|<<lingo ShadowTiddlers/Prompt>> |<<show-filter-count \"[all[shadows]sort[title]]\">> |\n|<<lingo OverriddenShadowTiddlers/Prompt>> |<<show-filter-count \"[is[tiddler]is[shadow]sort[title]]\">> |\n"
},
"$:/core/ui/ControlPanel/EditorTypes": {
"title": "$:/core/ui/ControlPanel/EditorTypes",
"tags": "$:/tags/ControlPanel/Advanced",
"caption": "{{$:/language/ControlPanel/EditorTypes/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/EditorTypes/\n\n<<lingo Hint>>\n\n<table>\n<tbody>\n<tr>\n<th><<lingo Type/Caption>></th>\n<th><<lingo Editor/Caption>></th>\n</tr>\n<$list filter=\"[all[shadows+tiddlers]prefix[$:/config/EditorTypeMappings/]sort[title]]\">\n<tr>\n<td>\n<$link>\n<$list filter=\"[all[current]removeprefix[$:/config/EditorTypeMappings/]]\">\n<$text text={{!!title}}/>\n</$list>\n</$link>\n</td>\n<td>\n<$view field=\"text\"/>\n</td>\n</tr>\n</$list>\n</tbody>\n</table>\n"
},
"$:/core/ui/ControlPanel/Info": {
"title": "$:/core/ui/ControlPanel/Info",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Info/Caption}}",
"text": "{{$:/language/ControlPanel/Info/Hint}}\n\n<div class=\"tc-control-panel\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Info]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Basics\">>\n</div>\n"
},
"$:/core/ui/ControlPanel/LoadedModules": {
"title": "$:/core/ui/ControlPanel/LoadedModules",
"tags": "$:/tags/ControlPanel/Advanced",
"caption": "{{$:/language/ControlPanel/LoadedModules/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/\n<<lingo LoadedModules/Hint>>\n\n{{$:/snippets/modules}}\n"
},
"$:/core/ui/ControlPanel/Modals/AddPlugins": {
"title": "$:/core/ui/ControlPanel/Modals/AddPlugins",
"subtitle": "{{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/Add/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Plugins/\n\n\\define install-plugin-button()\n<$button>\n<$action-sendmessage $message=\"tm-load-plugin-from-library\" url={{!!url}} title={{$(assetInfo)$!!original-title}}/>\n<$list filter=\"[<assetInfo>get[original-title]get[version]]\" variable=\"installedVersion\" emptyMessage=\"\"\"{{$:/language/ControlPanel/Plugins/Install}}\"\"\">\n{{$:/language/ControlPanel/Plugins/Reinstall}}\n</$list>\n</$button>\n\\end\n\n\\define popup-state-macro()\n$:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$\n\\end\n\n\\define display-plugin-info(type)\n<$set name=\"popup-state\" value=<<popup-state-macro>>>\n<div class=\"tc-plugin-info\">\n<div class=\"tc-plugin-info-chunk tc-small-icon\">\n<$reveal type=\"nomatch\" state=<<popup-state>> text=\"yes\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<popup-state>> setTo=\"yes\">\n{{$:/core/images/right-arrow}}\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<popup-state>> text=\"yes\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<popup-state>> setTo=\"no\">\n{{$:/core/images/down-arrow}}\n</$button>\n</$reveal>\n</div>\n<div class=\"tc-plugin-info-chunk\">\n<$list filter=\"[<assetInfo>has[icon]]\" emptyMessage=\"\"\"<$transclude tiddler=\"$:/core/images/plugin-generic-$type$\"/>\"\"\">\n<img src={{$(assetInfo)$!!icon}}/>\n</$list>\n</div>\n<div class=\"tc-plugin-info-chunk\">\n<h1><$view tiddler=<<assetInfo>> field=\"description\"/></h1>\n<h2><$view tiddler=<<assetInfo>> field=\"original-title\"/></h2>\n<div><em><$view tiddler=<<assetInfo>> field=\"version\"/></em></div>\n</div>\n<div class=\"tc-plugin-info-chunk\">\n<<install-plugin-button>>\n</div>\n</div>\n<$reveal type=\"match\" text=\"yes\" state=<<popup-state>>>\n<div class=\"tc-plugin-info-dropdown\">\n<div class=\"tc-plugin-info-dropdown-message\">\n<$list filter=\"[<assetInfo>get[original-title]get[version]]\" variable=\"installedVersion\" emptyMessage=\"\"\"This plugin is not currently installed\"\"\">\n<em>\nThis plugin is already installed at version <$text text=<<installedVersion>>/>\n</em>\n</$list>\n</div>\n<div class=\"tc-plugin-info-dropdown-body\">\n<$transclude tiddler=<<assetInfo>> field=\"readme\" mode=\"block\"/>\n</div>\n</div>\n</$reveal>\n</$set>\n\\end\n\n\\define load-plugin-library-button()\n<$button class=\"tc-btn-big-green\">\n<$action-sendmessage $message=\"tm-load-plugin-library\" url={{!!url}} infoTitlePrefix=\"$:/temp/RemoteAssetInfo/\"/>\n{{$:/core/images/chevron-right}} {{$:/language/ControlPanel/Plugins/OpenPluginLibrary}}\n</$button>\n\\end\n\n\\define display-server-assets(type)\n{{$:/language/Search/Search}}: <$edit-text tiddler=\"\"\"$:/temp/RemoteAssetSearch/$(currentTiddler)$\"\"\" default=\"\" type=\"search\" tag=\"input\"/>\n<$reveal state=\"\"\"$:/temp/RemoteAssetSearch/$(currentTiddler)$\"\"\" type=\"nomatch\" text=\"\">\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"\"\"$:/temp/RemoteAssetSearch/$(currentTiddler)$\"\"\" $field=\"text\" $value=\"\"/>\n{{$:/core/images/close-button}}\n</$button>\n</$reveal>\n<div class=\"tc-plugin-library-listing\">\n<$list filter=\"[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]search{$:/temp/RemoteAssetSearch/$(currentTiddler)$}sort[description]]\" variable=\"assetInfo\">\n<<display-plugin-info \"$type$\">>\n</$list>\n</div>\n\\end\n\n\\define display-server-connection()\n<$list filter=\"[all[tiddlers+shadows]tag[$:/tags/ServerConnection]suffix{!!url}]\" variable=\"connectionTiddler\" emptyMessage=<<load-plugin-library-button>>>\n\n<<tabs \"[[$:/core/ui/ControlPanel/Plugins/Add/Plugins]] [[$:/core/ui/ControlPanel/Plugins/Add/Themes]] [[$:/core/ui/ControlPanel/Plugins/Add/Languages]]\" \"$:/core/ui/ControlPanel/Plugins/Add/Plugins\">>\n\n</$list>\n\\end\n\n\\define plugin-library-listing()\n<$list filter=\"[all[tiddlers+shadows]tag[$:/tags/PluginLibrary]]\">\n<div class=\"tc-plugin-library\">\n\n!! <$link><$transclude field=\"caption\"><$view field=\"title\"/></$transclude></$link>\n\n//<$view field=\"url\"/>//\n\n<$transclude/>\n\n<<display-server-connection>>\n</div>\n</$list>\n\\end\n\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n\n<div>\n<<plugin-library-listing>>\n</div>\n\n</$importvariables>\n"
},
"$:/core/ui/ControlPanel/Palette": {
"title": "$:/core/ui/ControlPanel/Palette",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ControlPanel/Palette/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Palette/\n\n{{$:/snippets/paletteswitcher}}\n\n<$reveal type=\"nomatch\" state=\"$:/state/ShowPaletteEditor\" text=\"yes\">\n\n<$button set=\"$:/state/ShowPaletteEditor\" setTo=\"yes\"><<lingo ShowEditor/Caption>></$button>\n\n</$reveal>\n\n<$reveal type=\"match\" state=\"$:/state/ShowPaletteEditor\" text=\"yes\">\n\n<$button set=\"$:/state/ShowPaletteEditor\" setTo=\"no\"><<lingo HideEditor/Caption>></$button>\n{{$:/snippets/paletteeditor}}\n\n</$reveal>\n\n"
},
"$:/core/ui/ControlPanel/Parsing": {
"title": "$:/core/ui/ControlPanel/Parsing",
"tags": "$:/tags/ControlPanel/Advanced",
"caption": "{{$:/language/ControlPanel/Parsing/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Parsing/\n\n\\define parsing-inner(typeCap)\n<li>\n<$checkbox tiddler=\"\"\"$:/config/WikiParserRules/$typeCap$/$(currentTiddler)$\"\"\" field=\"text\" checked=\"enable\" unchecked=\"disable\" default=\"enable\"> ''<$text text=<<currentTiddler>>/>'': </$checkbox>\n</li>\n\\end\n\n\\define parsing-outer(typeLower,typeCap)\n<ul>\n<$list filter=\"[wikiparserrules[$typeLower$]]\">\n<<parsing-inner typeCap:\"$typeCap$\">>\n</$list>\n</ul>\n\\end\n\n<<lingo Hint>>\n\n! <<lingo Pragma/Caption>>\n\n<<parsing-outer typeLower:\"pragma\" typeCap:\"Pragma\">>\n\n! <<lingo Inline/Caption>>\n\n<<parsing-outer typeLower:\"inline\" typeCap:\"Inline\">>\n\n! <<lingo Block/Caption>>\n\n<<parsing-outer typeLower:\"block\" typeCap:\"Block\">>\n"
},
"$:/core/ui/ControlPanel/Plugins/Add/Languages": {
"title": "$:/core/ui/ControlPanel/Plugins/Add/Languages",
"caption": "{{$:/language/ControlPanel/Plugins/Languages/Caption}} (<$count filter=\"[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[language]]\"/>)",
"text": "<<display-server-assets language>>\n"
},
"$:/core/ui/ControlPanel/Plugins/Add/Plugins": {
"title": "$:/core/ui/ControlPanel/Plugins/Add/Plugins",
"caption": "{{$:/language/ControlPanel/Plugins/Plugins/Caption}} (<$count filter=\"[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[plugin]]\"/>)",
"text": "<<display-server-assets plugin>>\n"
},
"$:/core/ui/ControlPanel/Plugins/Add/Themes": {
"title": "$:/core/ui/ControlPanel/Plugins/Add/Themes",
"caption": "{{$:/language/ControlPanel/Plugins/Themes/Caption}} (<$count filter=\"[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[theme]]\"/>)",
"text": "<<display-server-assets theme>>\n"
},
"$:/core/ui/ControlPanel/Plugins/AddPlugins": {
"title": "$:/core/ui/ControlPanel/Plugins/AddPlugins",
"text": "\\define lingo-base() $:/language/ControlPanel/Plugins/\n\n<$button message=\"tm-modal\" param=\"$:/core/ui/ControlPanel/Modals/AddPlugins\" tooltip={{$:/language/ControlPanel/Plugins/Add/Hint}} class=\"tc-btn-big-green\" style=\"background:blue;\">\n{{$:/core/images/download-button}} <<lingo Add/Caption>>\n</$button>\n"
},
"$:/core/ui/ControlPanel/Plugins/Installed/Languages": {
"title": "$:/core/ui/ControlPanel/Plugins/Installed/Languages",
"caption": "{{$:/language/ControlPanel/Plugins/Languages/Caption}} (<$count filter=\"[!has[draft.of]plugin-type[language]]\"/>)",
"text": "<<plugin-table language>>\n"
},
"$:/core/ui/ControlPanel/Plugins/Installed/Plugins": {
"title": "$:/core/ui/ControlPanel/Plugins/Installed/Plugins",
"caption": "{{$:/language/ControlPanel/Plugins/Plugins/Caption}} (<$count filter=\"[!has[draft.of]plugin-type[plugin]]\"/>)",
"text": "<<plugin-table plugin>>\n"
},
"$:/core/ui/ControlPanel/Plugins/Installed/Themes": {
"title": "$:/core/ui/ControlPanel/Plugins/Installed/Themes",
"caption": "{{$:/language/ControlPanel/Plugins/Themes/Caption}} (<$count filter=\"[!has[draft.of]plugin-type[theme]]\"/>)",
"text": "<<plugin-table theme>>\n"
},
"$:/core/ui/ControlPanel/Plugins": {
"title": "$:/core/ui/ControlPanel/Plugins",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Plugins/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Plugins/\n\n\\define popup-state-macro()\n$(qualified-state)$-$(currentTiddler)$\n\\end\n\n\\define tabs-state-macro()\n$(popup-state)$-$(pluginInfoType)$\n\\end\n\n\\define plugin-icon-title()\n$(currentTiddler)$/icon\n\\end\n\n\\define plugin-disable-title()\n$:/config/Plugins/Disabled/$(currentTiddler)$\n\\end\n\n\\define plugin-table-body(type,disabledMessage)\n<div class=\"tc-plugin-info-chunk tc-small-icon\">\n<$reveal type=\"nomatch\" state=<<popup-state>> text=\"yes\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<popup-state>> setTo=\"yes\">\n{{$:/core/images/right-arrow}}\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<popup-state>> text=\"yes\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<popup-state>> setTo=\"no\">\n{{$:/core/images/down-arrow}}\n</$button>\n</$reveal>\n</div>\n<div class=\"tc-plugin-info-chunk\">\n<$transclude tiddler=<<currentTiddler>> subtiddler=<<plugin-icon-title>>>\n<$transclude tiddler=\"$:/core/images/plugin-generic-$type$\"/>\n</$transclude>\n</div>\n<div class=\"tc-plugin-info-chunk\">\n<h1>\n''<$view field=\"description\"><$view field=\"title\"/></$view>'' $disabledMessage$\n</h1>\n<h2>\n<$view field=\"title\"/>\n</h2>\n<h2>\n<div><em><$view field=\"version\"/></em></div>\n</h2>\n</div>\n\\end\n\n\\define plugin-table(type)\n<$set name=\"qualified-state\" value=<<qualify \"$:/state/plugin-info\">>>\n<$list filter=\"[!has[draft.of]plugin-type[$type$]sort[description]]\" emptyMessage=<<lingo \"Empty/Hint\">>>\n<$set name=\"popup-state\" value=<<popup-state-macro>>>\n<$reveal type=\"nomatch\" state=<<plugin-disable-title>> text=\"yes\">\n<$link to={{!!title}} class=\"tc-plugin-info\">\n<<plugin-table-body type:\"$type$\">>\n</$link>\n</$reveal>\n<$reveal type=\"match\" state=<<plugin-disable-title>> text=\"yes\">\n<$link to={{!!title}} class=\"tc-plugin-info tc-plugin-info-disabled\">\n<<plugin-table-body type:\"$type$\" disabledMessage:\"<$macrocall $name='lingo' title='Disabled/Status'/>\">>\n</$link>\n</$reveal>\n<$reveal type=\"match\" text=\"yes\" state=<<popup-state>>>\n<div class=\"tc-plugin-info-dropdown\">\n<div class=\"tc-plugin-info-dropdown-body\">\n<$list filter=\"[all[current]] -[[$:/core]]\">\n<div style=\"float:right;\">\n<$reveal type=\"nomatch\" state=<<plugin-disable-title>> text=\"yes\">\n<$button set=<<plugin-disable-title>> setTo=\"yes\" tooltip={{$:/language/ControlPanel/Plugins/Disable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Disable/Caption}}>\n<<lingo Disable/Caption>>\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<plugin-disable-title>> text=\"yes\">\n<$button set=<<plugin-disable-title>> setTo=\"no\" tooltip={{$:/language/ControlPanel/Plugins/Enable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Enable/Caption}}>\n<<lingo Enable/Caption>>\n</$button>\n</$reveal>\n</div>\n</$list>\n<$reveal type=\"nomatch\" text=\"\" state=\"!!list\">\n<$macrocall $name=\"tabs\" state=<<tabs-state-macro>> tabsList={{!!list}} default=\"readme\" template=\"$:/core/ui/PluginInfo\"/>\n</$reveal>\n<$reveal type=\"match\" text=\"\" state=\"!!list\">\nNo information provided\n</$reveal>\n</div>\n</div>\n</$reveal>\n</$set>\n</$list>\n</$set>\n\\end\n\n{{$:/core/ui/ControlPanel/Plugins/AddPlugins}}\n\n<<lingo Installed/Hint>>\n\n<<tabs \"[[$:/core/ui/ControlPanel/Plugins/Installed/Plugins]] [[$:/core/ui/ControlPanel/Plugins/Installed/Themes]] [[$:/core/ui/ControlPanel/Plugins/Installed/Languages]]\" \"$:/core/ui/ControlPanel/Plugins/Installed/Plugins\">>\n"
},
"$:/core/ui/ControlPanel/Saving": {
"title": "$:/core/ui/ControlPanel/Saving",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Saving/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Saving/\n\\define backupURL()\nhttp://$(userName)$.tiddlyspot.com/backup/\n\\end\n\\define backupLink()\n<$reveal type=\"nomatch\" state=\"$:/UploadName\" text=\"\">\n<$set name=\"userName\" value={{$:/UploadName}}>\n<$reveal type=\"match\" state=\"$:/UploadURL\" text=\"\">\n<<backupURL>>\n</$reveal>\n<$reveal type=\"nomatch\" state=\"$:/UploadURL\" text=\"\">\n<$macrocall $name=resolvePath source={{$:/UploadBackupDir}} root={{$:/UploadURL}}>>\n</$reveal>\n</$set>\n</$reveal>\n\\end\n! <<lingo TiddlySpot/Heading>>\n\n<<lingo TiddlySpot/Description>>\n\n|<<lingo TiddlySpot/UserName>> |<$edit-text tiddler=\"$:/UploadName\" default=\"\" tag=\"input\"/> |\n|<<lingo TiddlySpot/Password>> |<$password name=\"upload\"/> |\n|<<lingo TiddlySpot/Backups>> |<<backupLink>> |\n\n''<<lingo TiddlySpot/Advanced/Heading>>''\n\n|<<lingo TiddlySpot/ServerURL>> |<$edit-text tiddler=\"$:/UploadURL\" default=\"\" tag=\"input\"/> |\n|<<lingo TiddlySpot/Filename>> |<$edit-text tiddler=\"$:/UploadFilename\" default=\"index.html\" tag=\"input\"/> |\n|<<lingo TiddlySpot/UploadDir>> |<$edit-text tiddler=\"$:/UploadDir\" default=\".\" tag=\"input\"/> |\n|<<lingo TiddlySpot/BackupDir>> |<$edit-text tiddler=\"$:/UploadBackupDir\" default=\".\" tag=\"input\"/> |\n\n<<lingo TiddlySpot/Hint>>"
},
"$:/core/ui/ControlPanel/Settings/AutoSave": {
"title": "$:/core/ui/ControlPanel/Settings/AutoSave",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/AutoSave/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/AutoSave/\n\n<$link to=\"$:/config/AutoSave\"><<lingo Hint>></$link>\n\n<$radio tiddler=\"$:/config/AutoSave\" value=\"yes\"> <<lingo Enabled/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/AutoSave\" value=\"no\"> <<lingo Disabled/Description>> </$radio>\n"
},
"$:/core/buttonstyles/Borderless": {
"title": "$:/core/buttonstyles/Borderless",
"tags": "$:/tags/ToolbarButtonStyle",
"caption": "{{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Borderless}}",
"text": "tc-btn-invisible"
},
"$:/core/buttonstyles/Boxed": {
"title": "$:/core/buttonstyles/Boxed",
"tags": "$:/tags/ToolbarButtonStyle",
"caption": "{{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Boxed}}",
"text": "tc-btn-boxed"
},
"$:/core/buttonstyles/Rounded": {
"title": "$:/core/buttonstyles/Rounded",
"tags": "$:/tags/ToolbarButtonStyle",
"caption": "{{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Rounded}}",
"text": "tc-btn-rounded"
},
"$:/core/ui/ControlPanel/Settings/CamelCase": {
"title": "$:/core/ui/ControlPanel/Settings/CamelCase",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/CamelCase/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/CamelCase/\n<<lingo Hint>>\n\n<$checkbox tiddler=\"$:/config/WikiParserRules/Inline/wikilink\" field=\"text\" checked=\"enable\" unchecked=\"disable\" default=\"enable\"> <$link to=\"$:/config/WikiParserRules/Inline/wikilink\"><<lingo Description>></$link> </$checkbox>\n"
},
"$:/core/ui/ControlPanel/Settings/DefaultSidebarTab": {
"caption": "{{$:/language/ControlPanel/Settings/DefaultSidebarTab/Caption}}",
"tags": "$:/tags/ControlPanel/Settings",
"title": "$:/core/ui/ControlPanel/Settings/DefaultSidebarTab",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/DefaultSidebarTab/\n\n<$link to=\"$:/config/DefaultSidebarTab\"><<lingo Hint>></$link>\n\n<$select tiddler=\"$:/config/DefaultSidebarTab\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]\">\n<option value=<<currentTiddler>>><$transclude field=\"caption\"><$text text=<<currentTiddler>>/></$transclude></option>\n</$list>\n</$select>\n"
},
"$:/core/ui/ControlPanel/Settings/LinkToBehaviour": {
"title": "$:/core/ui/ControlPanel/Settings/LinkToBehaviour",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/LinkToBehaviour/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/\n\n<$link to=\"$:/config/Navigation/openLinkFromInsideRiver\"><<lingo \"InsideRiver/Hint\">></$link>\n\n<$select tiddler=\"$:/config/Navigation/openLinkFromInsideRiver\">\n <option value=\"above\"><<lingo \"OpenAbove\">></option>\n <option value=\"below\"><<lingo \"OpenBelow\">></option>\n <option value=\"top\"><<lingo \"OpenAtTop\">></option>\n <option value=\"bottom\"><<lingo \"OpenAtBottom\">></option>\n</$select>\n\n<$link to=\"$:/config/Navigation/openLinkFromOutsideRiver\"><<lingo \"OutsideRiver/Hint\">></$link>\n\n<$select tiddler=\"$:/config/Navigation/openLinkFromOutsideRiver\">\n <option value=\"top\"><<lingo \"OpenAtTop\">></option>\n <option value=\"bottom\"><<lingo \"OpenAtBottom\">></option>\n</$select>\n"
},
"$:/core/ui/ControlPanel/Settings/NavigationAddressBar": {
"title": "$:/core/ui/ControlPanel/Settings/NavigationAddressBar",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/NavigationAddressBar/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/NavigationAddressBar/\n\n<$link to=\"$:/config/Navigation/UpdateAddressBar\"><<lingo Hint>></$link>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateAddressBar\" value=\"permaview\"> <<lingo Permaview/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateAddressBar\" value=\"permalink\"> <<lingo Permalink/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateAddressBar\" value=\"no\"> <<lingo No/Description>> </$radio>\n"
},
"$:/core/ui/ControlPanel/Settings/NavigationHistory": {
"title": "$:/core/ui/ControlPanel/Settings/NavigationHistory",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/NavigationHistory/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/NavigationHistory/\n<$link to=\"$:/config/Navigation/UpdateHistory\"><<lingo Hint>></$link>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateHistory\" value=\"yes\"> <<lingo Yes/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateHistory\" value=\"no\"> <<lingo No/Description>> </$radio>\n"
},
"$:/core/ui/ControlPanel/Settings/PerformanceInstrumentation": {
"title": "$:/core/ui/ControlPanel/Settings/PerformanceInstrumentation",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/PerformanceInstrumentation/\n<<lingo Hint>>\n\n<$checkbox tiddler=\"$:/config/Performance/Instrumentation\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"no\"> <$link to=\"$:/config/Performance/Instrumentation\"><<lingo Description>></$link> </$checkbox>\n"
},
"$:/core/ui/ControlPanel/Settings/TitleLinks": {
"title": "$:/core/ui/ControlPanel/Settings/TitleLinks",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/TitleLinks/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/TitleLinks/\n<$link to=\"$:/config/Tiddlers/TitleLinks\"><<lingo Hint>></$link>\n\n<$radio tiddler=\"$:/config/Tiddlers/TitleLinks\" value=\"yes\"> <<lingo Yes/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/Tiddlers/TitleLinks\" value=\"no\"> <<lingo No/Description>> </$radio>\n"
},
"$:/core/ui/ControlPanel/Settings/ToolbarButtonStyle": {
"title": "$:/core/ui/ControlPanel/Settings/ToolbarButtonStyle",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/\n<$link to=\"$:/config/Toolbar/ButtonClass\"><<lingo \"Hint\">></$link>\n\n<$select tiddler=\"$:/config/Toolbar/ButtonClass\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ToolbarButtonStyle]]\">\n<option value={{!!text}}>{{!!caption}}</option>\n</$list>\n</$select>\n"
},
"$:/core/ui/ControlPanel/Settings/ToolbarButtons": {
"title": "$:/core/ui/ControlPanel/Settings/ToolbarButtons",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/ToolbarButtons/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtons/\n<<lingo Hint>>\n\n<$checkbox tiddler=\"$:/config/Toolbar/Icons\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"> <$link to=\"$:/config/Toolbar/Icons\"><<lingo Icons/Description>></$link> </$checkbox>\n\n<$checkbox tiddler=\"$:/config/Toolbar/Text\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"no\"> <$link to=\"$:/config/Toolbar/Text\"><<lingo Text/Description>></$link> </$checkbox>\n"
},
"$:/core/ui/ControlPanel/Settings": {
"title": "$:/core/ui/ControlPanel/Settings",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Settings/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/\n\n<<lingo Hint>>\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]\">\n\n<div style=\"border-top:1px solid #eee;\">\n\n!! <$link><$transclude field=\"caption\"/></$link>\n\n<$transclude/>\n\n</div>\n\n</$list>\n"
},
"$:/core/ui/ControlPanel/StoryView": {
"title": "$:/core/ui/ControlPanel/StoryView",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ControlPanel/StoryView/Caption}}",
"text": "{{$:/snippets/viewswitcher}}\n"
},
"$:/core/ui/ControlPanel/Theme": {
"title": "$:/core/ui/ControlPanel/Theme",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ControlPanel/Theme/Caption}}",
"text": "{{$:/snippets/themeswitcher}}\n"
},
"$:/core/ui/ControlPanel/TiddlerFields": {
"title": "$:/core/ui/ControlPanel/TiddlerFields",
"tags": "$:/tags/ControlPanel/Advanced",
"caption": "{{$:/language/ControlPanel/TiddlerFields/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/\n\n<<lingo TiddlerFields/Hint>>\n\n{{$:/snippets/allfields}}"
},
"$:/core/ui/ControlPanel/Toolbars/EditToolbar": {
"title": "$:/core/ui/ControlPanel/Toolbars/EditToolbar",
"tags": "$:/tags/ControlPanel/Toolbars",
"caption": "{{$:/language/ControlPanel/Toolbars/EditToolbar/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n\\define config-title()\n$:/config/EditToolbarButtons/Visibility/$(listItem)$\n\\end\n\n{{$:/language/ControlPanel/Toolbars/EditToolbar/Hint}}\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]\" variable=\"listItem\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>> field=\"caption\"/> <i class=\"tc-muted\">-- <$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</$list>\n\n</$set>\n\n</$set>\n"
},
"$:/core/ui/ControlPanel/Toolbars/PageControls": {
"title": "$:/core/ui/ControlPanel/Toolbars/PageControls",
"tags": "$:/tags/ControlPanel/Toolbars",
"caption": "{{$:/language/ControlPanel/Toolbars/PageControls/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n\\define config-title()\n$:/config/PageControlButtons/Visibility/$(listItem)$\n\\end\n\n{{$:/language/ControlPanel/Toolbars/PageControls/Hint}}\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]\" variable=\"listItem\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>> field=\"caption\"/> <i class=\"tc-muted\">-- <$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</$list>\n\n</$set>\n\n</$set>\n"
},
"$:/core/ui/ControlPanel/Toolbars/ViewToolbar": {
"title": "$:/core/ui/ControlPanel/Toolbars/ViewToolbar",
"tags": "$:/tags/ControlPanel/Toolbars",
"caption": "{{$:/language/ControlPanel/Toolbars/ViewToolbar/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n\\define config-title()\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\n\\end\n\n{{$:/language/ControlPanel/Toolbars/ViewToolbar/Hint}}\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]\" variable=\"listItem\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>> field=\"caption\"/> <i class=\"tc-muted\">-- <$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</$list>\n\n</$set>\n\n</$set>\n"
},
"$:/core/ui/ControlPanel/Toolbars": {
"title": "$:/core/ui/ControlPanel/Toolbars",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ControlPanel/Toolbars/Caption}}",
"text": "{{$:/language/ControlPanel/Toolbars/Hint}}\n\n<div class=\"tc-control-panel\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Toolbars]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Toolbars/ViewToolbar\" \"$:/state/tabs/controlpanel/toolbars\" \"tc-vertical\">>\n</div>\n"
},
"$:/ControlPanel": {
"title": "$:/ControlPanel",
"icon": "$:/core/images/options-button",
"color": "#bbb",
"text": "<div class=\"tc-control-panel\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Info\">>\n</div>\n"
},
"$:/core/ui/DefaultSearchResultList": {
"title": "$:/core/ui/DefaultSearchResultList",
"tags": "$:/tags/SearchResults",
"caption": "{{$:/language/Search/DefaultResults/Caption}}",
"text": "\\define searchResultList()\n//<small>{{$:/language/Search/Matches/Title}}</small>//\n\n<$list filter=\"[!is[system]search:title{$(searchTiddler)$}sort[title]limit[250]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n\n//<small>{{$:/language/Search/Matches/All}}</small>//\n\n<$list filter=\"[!is[system]search{$(searchTiddler)$}sort[title]limit[250]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n\n\\end\n<<searchResultList>>\n"
},
"$:/core/ui/EditTemplate/body": {
"title": "$:/core/ui/EditTemplate/body",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/Body/\n<$list filter=\"[is[current]has[_canonical_uri]]\">\n\n<div class=\"tc-message-box\">\n\n<<lingo External/Hint>>\n\n<a href={{!!_canonical_uri}}><$text text={{!!_canonical_uri}}/></a>\n\n<$edit-text field=\"_canonical_uri\" class=\"tc-edit-fields\"></$edit-text>\n\n</div>\n\n</$list>\n\n<$list filter=\"[is[current]!has[_canonical_uri]]\">\n\n<$reveal state=\"$:/state/showeditpreview\" type=\"match\" text=\"yes\">\n\n<em class=\"tc-edit\"><<lingo Hint>></em> <$button type=\"set\" set=\"$:/state/showeditpreview\" setTo=\"no\"><<lingo Preview/Button/Hide>></$button>\n\n<div class=\"tc-tiddler-preview\">\n<div class=\"tc-tiddler-preview-preview\">\n<$set name=\"tv-tiddler-preview\" value=\"yes\">\n\n<$transclude />\n\n</$set>\n</div>\n\n<div class=\"tc-tiddler-preview-edit\">\n<$edit field=\"text\" class=\"tc-edit-texteditor\" placeholder={{$:/language/EditTemplate/Body/Placeholder}}/>\n\n</div>\n\n</div>\n\n</$reveal>\n\n<$reveal state=\"$:/state/showeditpreview\" type=\"nomatch\" text=\"yes\">\n\n<em class=\"tc-edit\"><<lingo Hint>></em> <$button type=\"set\" set=\"$:/state/showeditpreview\" setTo=\"yes\"><<lingo Preview/Button/Show>></$button>\n<$edit field=\"text\" class=\"tc-edit-texteditor\" placeholder={{$:/language/EditTemplate/Body/Placeholder}}/>\n\n</$reveal>\n\n</$list>\n"
},
"$:/core/ui/EditTemplate/controls": {
"title": "$:/core/ui/EditTemplate/controls",
"tags": "$:/tags/EditTemplate",
"text": "\\define config-title()\n$:/config/EditToolbarButtons/Visibility/$(listItem)$\n\\end\n<div class=\"tc-tiddler-title tc-tiddler-edit-title\">\n<$view field=\"title\"/>\n<span class=\"tc-tiddler-controls tc-titlebar\"><$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]\" variable=\"listItem\"><$reveal type=\"nomatch\" state=<<config-title>> text=\"hide\"><$transclude tiddler=<<listItem>>/></$reveal></$list></span>\n<div style=\"clear: both;\"></div>\n</div>\n"
},
"$:/core/ui/EditTemplate/fields": {
"title": "$:/core/ui/EditTemplate/fields",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/\n\\define config-title()\n$:/config/EditTemplateFields/Visibility/$(currentField)$\n\\end\n\n\\define config-filter()\n[[hide]] -[title{$(config-title)$}]\n\\end\n\n\\define new-field-inner()\n<$reveal type=\"nomatch\" text=\"\" default=<<name>>>\n<$button>\n<$action-sendmessage $message=\"tm-add-field\" $name=<<name>> $value=<<value>>/>\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldname\"/>\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldvalue\"/>\n<<lingo Fields/Add/Button>>\n</$button>\n</$reveal>\n<$reveal type=\"match\" text=\"\" default=<<name>>>\n<$button>\n<<lingo Fields/Add/Button>>\n</$button>\n</$reveal>\n\\end\n\n\\define new-field()\n<$set name=\"name\" value={{$:/temp/newfieldname}}>\n<$set name=\"value\" value={{$:/temp/newfieldvalue}}>\n<<new-field-inner>>\n</$set>\n</$set>\n\\end\n\n<div class=\"tc-edit-fields\">\n<table class=\"tc-edit-fields\">\n<tbody>\n<$list filter=\"[all[current]fields[]] +[sort[title]]\" variable=\"currentField\">\n<$list filter=<<config-filter>> variable=\"temp\">\n<tr class=\"tc-edit-field\">\n<td class=\"tc-edit-field-name\">\n<$text text=<<currentField>>/>:</td>\n<td class=\"tc-edit-field-value\">\n<$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}}/>\n</td>\n<td class=\"tc-edit-field-remove\">\n<$button class=\"tc-btn-invisible\" tooltip={{$:/language/EditTemplate/Field/Remove/Hint}} aria-label={{$:/language/EditTemplate/Field/Remove/Caption}}>\n<$action-deletefield $field=<<currentField>>/>\n{{$:/core/images/delete-button}}\n</$button>\n</td>\n</tr>\n</$list>\n</$list>\n</tbody>\n</table>\n</div>\n\n<$fieldmangler>\n<div class=\"tc-edit-field-add\">\n<em class=\"tc-edit\">\n<<lingo Fields/Add/Prompt>>\n</em>\n<span class=\"tc-edit-field-add-name\">\n<$edit-text tiddler=\"$:/temp/newfieldname\" tag=\"input\" default=\"\" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} focusPopup=<<qualify \"$:/state/popup/field-dropdown\">> class=\"tc-edit-texteditor tc-popup-handle\"/>\n</span>\n<$button popup=<<qualify \"$:/state/popup/field-dropdown\">> class=\"tc-btn-invisible tc-btn-dropdown\" tooltip={{$:/language/EditTemplate/Field/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Field/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button>\n<$reveal state=<<qualify \"$:/state/popup/field-dropdown\">> type=\"nomatch\" text=\"\" default=\"\">\n<div class=\"tc-block-dropdown tc-edit-type-dropdown\">\n<$linkcatcher to=\"$:/temp/newfieldname\">\n<div class=\"tc-dropdown-item\">\n<<lingo Fields/Add/Dropdown/User>>\n</div>\n<$list filter=\"[!is[shadow]!is[system]fields[]sort[]] -created -creator -draft.of -draft.title -modified -modifier -tags -text -title -type\" variable=\"currentField\">\n<$link to=<<currentField>>>\n<<currentField>>\n</$link>\n</$list>\n<div class=\"tc-dropdown-item\">\n<<lingo Fields/Add/Dropdown/System>>\n</div>\n<$list filter=\"[fields[]sort[]] -[!is[shadow]!is[system]fields[]]\" variable=\"currentField\">\n<$link to=<<currentField>>>\n<<currentField>>\n</$link>\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>\n<span class=\"tc-edit-field-add-value\">\n<$edit-text tiddler=\"$:/temp/newfieldvalue\" tag=\"input\" default=\"\" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} class=\"tc-edit-texteditor\"/>\n</span>\n<span class=\"tc-edit-field-add-button\">\n<$macrocall $name=\"new-field\"/>\n</span>\n</div>\n</$fieldmangler>\n\n"
},
"$:/core/ui/EditTemplate/shadow": {
"title": "$:/core/ui/EditTemplate/shadow",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/Shadow/\n\\define pluginLinkBody()\n<$link to=\"\"\"$(pluginTitle)$\"\"\">\n<$text text=\"\"\"$(pluginTitle)$\"\"\"/>\n</$link>\n\\end\n<$list filter=\"[all[current]get[draft.of]is[shadow]!is[tiddler]]\">\n\n<$list filter=\"[all[current]shadowsource[]]\" variable=\"pluginTitle\">\n\n<$set name=\"pluginLink\" value=<<pluginLinkBody>>>\n<div class=\"tc-message-box\">\n\n<<lingo Warning>>\n\n</div>\n</$set>\n</$list>\n\n</$list>\n\n<$list filter=\"[all[current]get[draft.of]is[shadow]is[tiddler]]\">\n\n<$list filter=\"[all[current]shadowsource[]]\" variable=\"pluginTitle\">\n\n<$set name=\"pluginLink\" value=<<pluginLinkBody>>>\n<div class=\"tc-message-box\">\n\n<<lingo OverriddenWarning>>\n\n</div>\n</$set>\n</$list>\n\n</$list>"
},
"$:/core/ui/EditTemplate/tags": {
"title": "$:/core/ui/EditTemplate/tags",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/\n\\define tag-styles()\nbackground-color:$(backgroundColor)$;\n\\end\n<div class=\"tc-edit-tags\">\n<$fieldmangler>\n<$list filter=\"[all[current]tags[]sort[title]]\" storyview=\"pop\"><$set name=\"backgroundColor\" value={{!!color}}><span style=<<tag-styles>> class=\"tc-tag-label\">\n<$view field=\"title\" format=\"text\" />\n<$button message=\"tm-remove-tag\" param={{!!title}} class=\"tc-btn-invisible tc-remove-tag-button\">×</$button></span>\n</$set>\n</$list>\n\n<div class=\"tc-edit-add-tag\">\n<span class=\"tc-add-tag-name\">\n<$edit-text tiddler=\"$:/temp/NewTagName\" tag=\"input\" default=\"\" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<<qualify \"$:/state/popup/tags-auto-complete\">> class=\"tc-edit-texteditor tc-popup-handle\"/>\n</span> <$button popup=<<qualify \"$:/state/popup/tags-auto-complete\">> class=\"tc-btn-invisible tc-btn-dropdown\" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button> <span class=\"tc-add-tag-button\">\n<$button message=\"tm-add-tag\" param={{$:/temp/NewTagName}} set=\"$:/temp/NewTagName\" setTo=\"\" class=\"\">\n<<lingo Tags/Add/Button>>\n</$button>\n</span>\n</div>\n\n<div class=\"tc-block-dropdown-wrapper\">\n<$reveal state=<<qualify \"$:/state/popup/tags-auto-complete\">> type=\"nomatch\" text=\"\" default=\"\">\n<div class=\"tc-block-dropdown\">\n<$linkcatcher set=\"$:/temp/NewTagName\" setTo=\"\" message=\"tm-add-tag\">\n<$list filter=\"[tags[]!is[system]search:title{$:/temp/NewTagName}sort[]]\">\n{{||$:/core/ui/Components/tag-link}}\n</$list>\n<hr>\n<$list filter=\"[tags[]is[system]search:title{$:/temp/NewTagName}sort[]]\">\n{{||$:/core/ui/Components/tag-link}}\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>\n</div>\n</$fieldmangler>\n</div>"
},
"$:/core/ui/EditTemplate/title": {
"title": "$:/core/ui/EditTemplate/title",
"tags": "$:/tags/EditTemplate",
"text": "<$edit-text field=\"draft.title\" class=\"tc-titlebar tc-edit-texteditor\" focus=\"true\"/>"
},
"$:/core/ui/EditTemplate/type": {
"title": "$:/core/ui/EditTemplate/type",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/\n<div class=\"tc-type-selector\"><$fieldmangler>\n<em class=\"tc-edit\"><<lingo Type/Prompt>></em> <$edit-text field=\"type\" tag=\"input\" default=\"\" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<<qualify \"$:/state/popup/type-dropdown\">> class=\"tc-edit-typeeditor tc-popup-handle\"/> <$button popup=<<qualify \"$:/state/popup/type-dropdown\">> class=\"tc-btn-invisible tc-btn-dropdown\" tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button> <$button message=\"tm-remove-field\" param=\"type\" class=\"tc-btn-invisible tc-btn-icon\" tooltip={{$:/language/EditTemplate/Type/Delete/Hint}} aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}>{{$:/core/images/delete-button}}</$button>\n</$fieldmangler></div>\n\n<div class=\"tc-block-dropdown-wrapper\">\n<$reveal state=<<qualify \"$:/state/popup/type-dropdown\">> type=\"nomatch\" text=\"\" default=\"\">\n<div class=\"tc-block-dropdown tc-edit-type-dropdown\">\n<$linkcatcher to=\"!!type\">\n<$list filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]sort[group]]'>\n<div class=\"tc-dropdown-item\">\n<$text text={{!!group}}/>\n</div>\n<$list filter=\"[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]]\"><$link to={{!!name}}><$view field=\"description\"/> (<$view field=\"name\"/>)</$link>\n</$list>\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>\n</div>"
},
"$:/core/ui/EditTemplate": {
"title": "$:/core/ui/EditTemplate",
"text": "\\define frame-classes()\ntc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$\n\\end\n<div class=<<frame-classes>>>\n<$set name=\"storyTiddler\" value=<<currentTiddler>>>\n<$keyboard key={{$:/config/shortcuts/cancel-edit-tiddler}} message=\"tm-cancel-tiddler\">\n<$keyboard key={{$:/config/shortcuts/save-tiddler}} message=\"tm-save-tiddler\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]\" variable=\"listItem\">\n<$transclude tiddler=<<listItem>>/>\n</$list>\n</$keyboard>\n</$keyboard>\n</$set>\n</div>\n"
},
"$:/core/ui/Buttons/cancel": {
"title": "$:/core/ui/Buttons/cancel",
"tags": "$:/tags/EditToolbar",
"caption": "{{$:/core/images/cancel-button}} {{$:/language/Buttons/Cancel/Caption}}",
"description": "{{$:/language/Buttons/Cancel/Hint}}",
"text": "<$button message=\"tm-cancel-tiddler\" tooltip={{$:/language/Buttons/Cancel/Hint}} aria-label={{$:/language/Buttons/Cancel/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/cancel-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Cancel/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/delete": {
"title": "$:/core/ui/Buttons/delete",
"tags": "$:/tags/EditToolbar $:/tags/ViewToolbar",
"caption": "{{$:/core/images/delete-button}} {{$:/language/Buttons/Delete/Caption}}",
"description": "{{$:/language/Buttons/Delete/Hint}}",
"text": "<$button message=\"tm-delete-tiddler\" tooltip={{$:/language/Buttons/Delete/Hint}} aria-label={{$:/language/Buttons/Delete/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/delete-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Delete/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/save": {
"title": "$:/core/ui/Buttons/save",
"tags": "$:/tags/EditToolbar",
"caption": "{{$:/core/images/done-button}} {{$:/language/Buttons/Save/Caption}}",
"description": "{{$:/language/Buttons/Save/Hint}}",
"text": "<$fieldmangler>\n<$button tooltip={{$:/language/Buttons/Save/Hint}} aria-label={{$:/language/Buttons/Save/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-add-tag\" $param={{$:/temp/NewTagName}}/>\n<$action-deletetiddler $tiddler=\"$:/temp/NewTagName\"/>\n<$action-sendmessage $message=\"tm-add-field\" $name={{$:/temp/newfieldname}} $value={{$:/temp/newfieldvalue}}/>\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldname\"/>\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldvalue\"/>\n<$action-sendmessage $message=\"tm-save-tiddler\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/done-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Save/Caption}}/></span>\n</$list>\n</$button>\n</$fieldmangler>\n"
},
"$:/core/Filters/AllTags": {
"title": "$:/core/Filters/AllTags",
"tags": "$:/tags/Filter",
"filter": "[tags[]!is[system]sort[title]]",
"description": "{{$:/language/Filters/AllTags}}",
"text": ""
},
"$:/core/Filters/AllTiddlers": {
"title": "$:/core/Filters/AllTiddlers",
"tags": "$:/tags/Filter",
"filter": "[!is[system]sort[title]]",
"description": "{{$:/language/Filters/AllTiddlers}}",
"text": ""
},
"$:/core/Filters/Drafts": {
"title": "$:/core/Filters/Drafts",
"tags": "$:/tags/Filter",
"filter": "[has[draft.of]sort[title]]",
"description": "{{$:/language/Filters/Drafts}}",
"text": ""
},
"$:/core/Filters/Missing": {
"title": "$:/core/Filters/Missing",
"tags": "$:/tags/Filter",
"filter": "[all[missing]sort[title]]",
"description": "{{$:/language/Filters/Missing}}",
"text": ""
},
"$:/core/Filters/Orphans": {
"title": "$:/core/Filters/Orphans",
"tags": "$:/tags/Filter",
"filter": "[all[orphans]sort[title]]",
"description": "{{$:/language/Filters/Orphans}}",
"text": ""
},
"$:/core/Filters/OverriddenShadowTiddlers": {
"title": "$:/core/Filters/OverriddenShadowTiddlers",
"tags": "$:/tags/Filter",
"filter": "[is[shadow]]",
"description": "{{$:/language/Filters/OverriddenShadowTiddlers}}",
"text": ""
},
"$:/core/Filters/RecentSystemTiddlers": {
"title": "$:/core/Filters/RecentSystemTiddlers",
"tags": "$:/tags/Filter",
"filter": "[has[modified]!sort[modified]limit[50]]",
"description": "{{$:/language/Filters/RecentSystemTiddlers}}",
"text": ""
},
"$:/core/Filters/RecentTiddlers": {
"title": "$:/core/Filters/RecentTiddlers",
"tags": "$:/tags/Filter",
"filter": "[!is[system]has[modified]!sort[modified]limit[50]]",
"description": "{{$:/language/Filters/RecentTiddlers}}",
"text": ""
},
"$:/core/Filters/ShadowTiddlers": {
"title": "$:/core/Filters/ShadowTiddlers",
"tags": "$:/tags/Filter",
"filter": "[all[shadows]sort[title]]",
"description": "{{$:/language/Filters/ShadowTiddlers}}",
"text": ""
},
"$:/core/Filters/SystemTags": {
"title": "$:/core/Filters/SystemTags",
"tags": "$:/tags/Filter",
"filter": "[all[shadows+tiddlers]tags[]is[system]sort[title]]",
"description": "{{$:/language/Filters/SystemTags}}",
"text": ""
},
"$:/core/Filters/SystemTiddlers": {
"title": "$:/core/Filters/SystemTiddlers",
"tags": "$:/tags/Filter",
"filter": "[is[system]sort[title]]",
"description": "{{$:/language/Filters/SystemTiddlers}}",
"text": ""
},
"$:/core/Filters/TypedTiddlers": {
"title": "$:/core/Filters/TypedTiddlers",
"tags": "$:/tags/Filter",
"filter": "[!is[system]has[type]each[type]sort[type]] -[type[text/vnd.tiddlywiki]]",
"description": "{{$:/language/Filters/TypedTiddlers}}",
"text": ""
},
"$:/core/ui/ImportListing": {
"title": "$:/core/ui/ImportListing",
"text": "\\define lingo-base() $:/language/Import/\n\\define messageField()\nmessage-$(payloadTiddler)$\n\\end\n\\define selectionField()\nselection-$(payloadTiddler)$\n\\end\n\\define previewPopupState()\n$(currentTiddler)$!!popup-$(payloadTiddler)$\n\\end\n<table>\n<tbody>\n<tr>\n<th>\n<<lingo Listing/Select/Caption>>\n</th>\n<th>\n<<lingo Listing/Title/Caption>>\n</th>\n<th>\n<<lingo Listing/Status/Caption>>\n</th>\n</tr>\n<$list filter=\"[all[current]plugintiddlers[]sort[title]]\" variable=\"payloadTiddler\">\n<tr>\n<td>\n<$checkbox field=<<selectionField>> checked=\"checked\" unchecked=\"unchecked\" default=\"checked\"/>\n</td>\n<td>\n<$reveal type=\"nomatch\" state=<<previewPopupState>> text=\"yes\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<previewPopupState>> setTo=\"yes\">\n{{$:/core/images/right-arrow}} <$text text=<<payloadTiddler>>/>\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<previewPopupState>> text=\"yes\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<previewPopupState>> setTo=\"no\">\n{{$:/core/images/down-arrow}} <$text text=<<payloadTiddler>>/>\n</$button>\n</$reveal>\n</td>\n<td>\n<$view field=<<messageField>>/>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\">\n<$reveal type=\"match\" text=\"yes\" state=<<previewPopupState>>>\n<$transclude subtiddler=<<payloadTiddler>> mode=\"block\"/>\n</$reveal>\n</td>\n</tr>\n</$list>\n</tbody>\n</table>\n"
},
"$:/core/ui/ListItemTemplate": {
"title": "$:/core/ui/ListItemTemplate",
"text": "<div class=\"tc-menu-list-item\">\n<$link to={{!!title}}>\n<$view field=\"title\"/>\n</$link>\n</div>"
},
"$:/core/ui/MissingTemplate": {
"title": "$:/core/ui/MissingTemplate",
"text": "<div class=\"tc-tiddler-missing\">\n<$button popup=<<qualify \"$:/state/popup/missing\">> class=\"tc-btn-invisible tc-missing-tiddler-label\">\n<$view field=\"title\" format=\"text\" />\n</$button>\n<$reveal state=<<qualify \"$:/state/popup/missing\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down\">\n<$transclude tiddler=\"$:/core/ui/ListItemTemplate\"/>\n<hr>\n<$list filter=\"[all[current]backlinks[]sort[title]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n</div>\n</$reveal>\n</div>\n"
},
"$:/core/ui/MoreSideBar/All": {
"title": "$:/core/ui/MoreSideBar/All",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/All/Caption}}",
"text": "<$list filter={{$:/core/Filters/AllTiddlers!!filter}} template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/MoreSideBar/Drafts": {
"title": "$:/core/ui/MoreSideBar/Drafts",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Drafts/Caption}}",
"text": "<$list filter={{$:/core/Filters/Drafts!!filter}} template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/MoreSideBar/Missing": {
"title": "$:/core/ui/MoreSideBar/Missing",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Missing/Caption}}",
"text": "<$list filter={{$:/core/Filters/Missing!!filter}} template=\"$:/core/ui/MissingTemplate\"/>\n"
},
"$:/core/ui/MoreSideBar/Orphans": {
"title": "$:/core/ui/MoreSideBar/Orphans",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Orphans/Caption}}",
"text": "<$list filter={{$:/core/Filters/Orphans!!filter}} template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/MoreSideBar/Recent": {
"title": "$:/core/ui/MoreSideBar/Recent",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Recent/Caption}}",
"text": "<$macrocall $name=\"timeline\" format={{$:/language/RecentChanges/DateFormat}}/>\n"
},
"$:/core/ui/MoreSideBar/Shadows": {
"title": "$:/core/ui/MoreSideBar/Shadows",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Shadows/Caption}}",
"text": "<$list filter={{$:/core/Filters/ShadowTiddlers!!filter}} template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/MoreSideBar/System": {
"title": "$:/core/ui/MoreSideBar/System",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/System/Caption}}",
"text": "<$list filter={{$:/core/Filters/SystemTiddlers!!filter}} template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/MoreSideBar/Tags": {
"title": "$:/core/ui/MoreSideBar/Tags",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Tags/Caption}}",
"text": "<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"\">\n\n{{$:/core/ui/Buttons/tag-manager}}\n\n</$set>\n\n</$set>\n\n</$set>\n\n<$list filter={{$:/core/Filters/AllTags!!filter}}>\n\n<$transclude tiddler=\"$:/core/ui/TagTemplate\"/>\n\n</$list>\n\n<hr class=\"tc-untagged-separator\">\n\n{{$:/core/ui/UntaggedTemplate}}\n"
},
"$:/core/ui/MoreSideBar/Types": {
"title": "$:/core/ui/MoreSideBar/Types",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Types/Caption}}",
"text": "<$list filter={{$:/core/Filters/TypedTiddlers!!filter}}>\n<div class=\"tc-menu-list-item\">\n<$view field=\"type\"/>\n<$list filter=\"[type{!!type}!is[system]sort[title]]\">\n<div class=\"tc-menu-list-subitem\">\n<$link to={{!!title}}><$view field=\"title\"/></$link>\n</div>\n</$list>\n</div>\n</$list>\n"
},
"$:/core/ui/Buttons/advanced-search": {
"title": "$:/core/ui/Buttons/advanced-search",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/advanced-search-button}} {{$:/language/Buttons/AdvancedSearch/Caption}}",
"description": "{{$:/language/Buttons/AdvancedSearch/Hint}}",
"text": "\\define control-panel-button(class)\n<$button to=\"$:/AdvancedSearch\" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=\"\"\"$(tv-config-toolbar-class)$ $class$\"\"\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/advanced-search-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/AdvancedSearch/Caption}}/></span>\n</$list>\n</$button>\n\\end\n\n<$list filter=\"[list[$:/StoryList]] +[field:title[$:/AdvancedSearch]]\" emptyMessage=<<control-panel-button>>>\n<<control-panel-button \"tc-selected\">>\n</$list>\n"
},
"$:/core/ui/Buttons/close-all": {
"title": "$:/core/ui/Buttons/close-all",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/close-all-button}} {{$:/language/Buttons/CloseAll/Caption}}",
"description": "{{$:/language/Buttons/CloseAll/Hint}}",
"text": "<$button message=\"tm-close-all-tiddlers\" tooltip={{$:/language/Buttons/CloseAll/Hint}} aria-label={{$:/language/Buttons/CloseAll/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/close-all-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/CloseAll/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/control-panel": {
"title": "$:/core/ui/Buttons/control-panel",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/options-button}} {{$:/language/Buttons/ControlPanel/Caption}}",
"description": "{{$:/language/Buttons/ControlPanel/Hint}}",
"text": "\\define control-panel-button(class)\n<$button to=\"$:/ControlPanel\" tooltip={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class=\"\"\"$(tv-config-toolbar-class)$ $class$\"\"\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/options-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/ControlPanel/Caption}}/></span>\n</$list>\n</$button>\n\\end\n\n<$list filter=\"[list[$:/StoryList]] +[field:title[$:/ControlPanel]]\" emptyMessage=<<control-panel-button>>>\n<<control-panel-button \"tc-selected\">>\n</$list>\n"
},
"$:/core/ui/Buttons/encryption": {
"title": "$:/core/ui/Buttons/encryption",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/locked-padlock}} {{$:/language/Buttons/Encryption/Caption}}",
"description": "{{$:/language/Buttons/Encryption/Hint}}",
"text": "<$reveal type=\"match\" state=\"$:/isEncrypted\" text=\"yes\">\n<$button message=\"tm-clear-password\" tooltip={{$:/language/Buttons/Encryption/ClearPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/ClearPassword/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/locked-padlock}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/></span>\n</$list>\n</$button>\n</$reveal>\n<$reveal type=\"nomatch\" state=\"$:/isEncrypted\" text=\"yes\">\n<$button message=\"tm-set-password\" tooltip={{$:/language/Buttons/Encryption/SetPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/SetPassword/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/unlocked-padlock}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/></span>\n</$list>\n</$button>\n</$reveal>"
},
"$:/core/ui/Buttons/export-page": {
"title": "$:/core/ui/Buttons/export-page",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/export-button}} {{$:/language/Buttons/ExportPage/Caption}}",
"description": "{{$:/language/Buttons/ExportPage/Hint}}",
"text": "<$macrocall $name=\"exportButton\" exportFilter=\"[!is[system]sort[title]]\" lingoBase=\"$:/language/Buttons/ExportPage/\"/>"
},
"$:/core/ui/Buttons/fold-all": {
"title": "$:/core/ui/Buttons/fold-all",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/fold-all-button}} {{$:/language/Buttons/FoldAll/Caption}}",
"description": "{{$:/language/Buttons/FoldAll/Hint}}",
"text": "<$button tooltip={{$:/language/Buttons/FoldAll/Hint}} aria-label={{$:/language/Buttons/FoldAll/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-fold-all-tiddlers\" $param=<<currentTiddler>> foldedStatePrefix=\"$:/state/folded/\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\" variable=\"listItem\">\n{{$:/core/images/fold-all-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/FoldAll/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/full-screen": {
"title": "$:/core/ui/Buttons/full-screen",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/full-screen-button}} {{$:/language/Buttons/FullScreen/Caption}}",
"description": "{{$:/language/Buttons/FullScreen/Hint}}",
"text": "<$button message=\"tm-full-screen\" tooltip={{$:/language/Buttons/FullScreen/Hint}} aria-label={{$:/language/Buttons/FullScreen/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/full-screen-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/FullScreen/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/home": {
"title": "$:/core/ui/Buttons/home",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/home-button}} {{$:/language/Buttons/Home/Caption}}",
"description": "{{$:/language/Buttons/Home/Hint}}",
"text": "<$button message=\"tm-home\" tooltip={{$:/language/Buttons/Home/Hint}} aria-label={{$:/language/Buttons/Home/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/home-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Home/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/import": {
"title": "$:/core/ui/Buttons/import",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/import-button}} {{$:/language/Buttons/Import/Caption}}",
"description": "{{$:/language/Buttons/Import/Hint}}",
"text": "<div class=\"tc-file-input-wrapper\">\n<$button tooltip={{$:/language/Buttons/Import/Hint}} aria-label={{$:/language/Buttons/Import/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/import-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Import/Caption}}/></span>\n</$list>\n</$button>\n<$browse tooltip={{$:/language/Buttons/Import/Hint}}/>\n</div>"
},
"$:/core/ui/Buttons/language": {
"title": "$:/core/ui/Buttons/language",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/globe}} {{$:/language/Buttons/Language/Caption}}",
"description": "{{$:/language/Buttons/Language/Hint}}",
"text": "\\define flag-title()\n$(languagePluginTitle)$/icon\n\\end\n<span class=\"tc-popup-keep\">\n<$button popup=<<qualify \"$:/state/popup/language\">> tooltip={{$:/language/Buttons/Language/Hint}} aria-label={{$:/language/Buttons/Language/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n<span class=\"tc-image-button\">\n<$set name=\"languagePluginTitle\" value={{$:/language}}>\n<$image source=<<flag-title>>/>\n</$set>\n</span>\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Language/Caption}}/></span>\n</$list>\n</$button>\n</span>\n<$reveal state=<<qualify \"$:/state/popup/language\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down tc-drop-down-language-chooser\">\n<$linkcatcher to=\"$:/language\">\n<$list filter=\"[[$:/languages/en-GB]] [plugin-type[language]sort[description]]\">\n<$link>\n<span class=\"tc-drop-down-bullet\">\n<$reveal type=\"match\" state=\"$:/language\" text=<<currentTiddler>>>\n•\n</$reveal>\n<$reveal type=\"nomatch\" state=\"$:/language\" text=<<currentTiddler>>>\n \n</$reveal>\n</span>\n<span class=\"tc-image-button\">\n<$set name=\"languagePluginTitle\" value=<<currentTiddler>>>\n<$transclude subtiddler=<<flag-title>>>\n<$list filter=\"[all[current]field:title[$:/languages/en-GB]]\">\n<$transclude tiddler=\"$:/languages/en-GB/icon\"/>\n</$list>\n</$transclude>\n</$set>\n</span>\n<$view field=\"description\">\n<$view field=\"name\">\n<$view field=\"title\"/>\n</$view>\n</$view>\n</$link>\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>"
},
"$:/core/ui/Buttons/more-page-actions": {
"title": "$:/core/ui/Buttons/more-page-actions",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}}",
"description": "{{$:/language/Buttons/More/Hint}}",
"text": "\\define config-title()\n$:/config/PageControlButtons/Visibility/$(listItem)$\n\\end\n<$button popup=<<qualify \"$:/state/popup/more\">> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/down-arrow}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/More/Caption}}/></span>\n</$list>\n</$button><$reveal state=<<qualify \"$:/state/popup/more\">> type=\"popup\" position=\"below\" animate=\"yes\">\n\n<div class=\"tc-drop-down\">\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"tc-btn-invisible\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]\" variable=\"listItem\">\n\n<$reveal type=\"match\" state=<<config-title>> text=\"hide\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n\n</$reveal>\n\n</$list>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</div>\n\n</$reveal>"
},
"$:/core/ui/Buttons/new-journal": {
"title": "$:/core/ui/Buttons/new-journal",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournal/Caption}}",
"description": "{{$:/language/Buttons/NewJournal/Hint}}",
"text": "\\define journalButton()\n<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-new-tiddler\" title=<<now \"$(journalTitleTemplate)$\">> tags=\"$(journalTags)$\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/new-journal-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/NewJournal/Caption}}/></span>\n</$list>\n</$button>\n\\end\n<$set name=\"journalTitleTemplate\" value={{$:/config/NewJournal/Title}}>\n<$set name=\"journalTags\" value={{$:/config/NewJournal/Tags}}>\n<<journalButton>>\n</$set></$set>"
},
"$:/core/ui/Buttons/new-tiddler": {
"title": "$:/core/ui/Buttons/new-tiddler",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/new-button}} {{$:/language/Buttons/NewTiddler/Caption}}",
"description": "{{$:/language/Buttons/NewTiddler/Hint}}",
"text": "<$button message=\"tm-new-tiddler\" tooltip={{$:/language/Buttons/NewTiddler/Hint}} aria-label={{$:/language/Buttons/NewTiddler/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/new-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/NewTiddler/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/palette": {
"title": "$:/core/ui/Buttons/palette",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/palette}} {{$:/language/Buttons/Palette/Caption}}",
"description": "{{$:/language/Buttons/Palette/Hint}}",
"text": "<span class=\"tc-popup-keep\">\n<$button popup=<<qualify \"$:/state/popup/palette\">> tooltip={{$:/language/Buttons/Palette/Hint}} aria-label={{$:/language/Buttons/Palette/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/palette}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Palette/Caption}}/></span>\n</$list>\n</$button>\n</span>\n<$reveal state=<<qualify \"$:/state/popup/palette\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down\" style=\"font-size:0.7em;\">\n{{$:/snippets/paletteswitcher}}\n</div>\n</$reveal>"
},
"$:/core/ui/Buttons/refresh": {
"title": "$:/core/ui/Buttons/refresh",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/refresh-button}} {{$:/language/Buttons/Refresh/Caption}}",
"description": "{{$:/language/Buttons/Refresh/Hint}}",
"text": "<$button message=\"tm-browser-refresh\" tooltip={{$:/language/Buttons/Refresh/Hint}} aria-label={{$:/language/Buttons/Refresh/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/refresh-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Refresh/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/save-wiki": {
"title": "$:/core/ui/Buttons/save-wiki",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/save-button}} {{$:/language/Buttons/SaveWiki/Caption}}",
"description": "{{$:/language/Buttons/SaveWiki/Hint}}",
"text": "<$button message=\"tm-save-wiki\" param={{$:/config/SaveWikiButton/Template}} tooltip={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class=<<tv-config-toolbar-class>>>\n<span class=\"tc-dirty-indicator\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/save-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/SaveWiki/Caption}}/></span>\n</$list>\n</span>\n</$button>"
},
"$:/core/ui/Buttons/storyview": {
"title": "$:/core/ui/Buttons/storyview",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/storyview-classic}} {{$:/language/Buttons/StoryView/Caption}}",
"description": "{{$:/language/Buttons/StoryView/Hint}}",
"text": "\\define icon()\n$:/core/images/storyview-$(storyview)$\n\\end\n<span class=\"tc-popup-keep\">\n<$button popup=<<qualify \"$:/state/popup/storyview\">> tooltip={{$:/language/Buttons/StoryView/Hint}} aria-label={{$:/language/Buttons/StoryView/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n<$set name=\"storyview\" value={{$:/view}}>\n<$transclude tiddler=<<icon>>/>\n</$set>\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/StoryView/Caption}}/></span>\n</$list>\n</$button>\n</span>\n<$reveal state=<<qualify \"$:/state/popup/storyview\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down\">\n<$linkcatcher to=\"$:/view\">\n<$list filter=\"[storyviews[]]\" variable=\"storyview\">\n<$link to=<<storyview>>>\n<span class=\"tc-drop-down-bullet\">\n<$reveal type=\"match\" state=\"$:/view\" text=<<storyview>>>\n•\n</$reveal>\n<$reveal type=\"nomatch\" state=\"$:/view\" text=<<storyview>>>\n \n</$reveal>\n</span>\n<$transclude tiddler=<<icon>>/>\n<$text text=<<storyview>>/></$link>\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>"
},
"$:/core/ui/Buttons/tag-manager": {
"title": "$:/core/ui/Buttons/tag-manager",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/tag-button}} {{$:/language/Buttons/TagManager/Caption}}",
"description": "{{$:/language/Buttons/TagManager/Hint}}",
"text": "\\define control-panel-button(class)\n<$button to=\"$:/TagManager\" tooltip={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class=\"\"\"$(tv-config-toolbar-class)$ $class$\"\"\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/tag-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/TagManager/Caption}}/></span>\n</$list>\n</$button>\n\\end\n\n<$list filter=\"[list[$:/StoryList]] +[field:title[$:/TagManager]]\" emptyMessage=<<control-panel-button>>>\n<<control-panel-button \"tc-selected\">>\n</$list>\n"
},
"$:/core/ui/Buttons/theme": {
"title": "$:/core/ui/Buttons/theme",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/theme-button}} {{$:/language/Buttons/Theme/Caption}}",
"description": "{{$:/language/Buttons/Theme/Hint}}",
"text": "<span class=\"tc-popup-keep\">\n<$button popup=<<qualify \"$:/state/popup/theme\">> tooltip={{$:/language/Buttons/Theme/Hint}} aria-label={{$:/language/Buttons/Theme/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/theme-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Theme/Caption}}/></span>\n</$list>\n</$button>\n</span>\n<$reveal state=<<qualify \"$:/state/popup/theme\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down\">\n<$linkcatcher to=\"$:/theme\">\n<$list filter=\"[plugin-type[theme]sort[title]]\" variable=\"themeTitle\">\n<$link to=<<themeTitle>>>\n<span class=\"tc-drop-down-bullet\">\n<$reveal type=\"match\" state=\"$:/theme\" text=<<themeTitle>>>\n•\n</$reveal>\n<$reveal type=\"nomatch\" state=\"$:/theme\" text=<<themeTitle>>>\n \n</$reveal>\n</span>\n<$view tiddler=<<themeTitle>> field=\"name\"/>\n</$link>\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>"
},
"$:/core/ui/Buttons/unfold-all": {
"title": "$:/core/ui/Buttons/unfold-all",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/unfold-all-button}} {{$:/language/Buttons/UnfoldAll/Caption}}",
"description": "{{$:/language/Buttons/UnfoldAll/Hint}}",
"text": "<$button tooltip={{$:/language/Buttons/UnfoldAll/Hint}} aria-label={{$:/language/Buttons/UnfoldAll/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-unfold-all-tiddlers\" $param=<<currentTiddler>> foldedStatePrefix=\"$:/state/folded/\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\" variable=\"listItem\">\n{{$:/core/images/unfold-all-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/UnfoldAll/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/PageTemplate/pagecontrols": {
"title": "$:/core/ui/PageTemplate/pagecontrols",
"text": "\\define config-title()\n$:/config/PageControlButtons/Visibility/$(listItem)$\n\\end\n<div class=\"tc-page-controls\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]\" variable=\"listItem\">\n<$reveal type=\"nomatch\" state=<<config-title>> text=\"hide\">\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n</$reveal>\n</$list>\n</div>\n\n"
},
"$:/core/ui/PageStylesheet": {
"title": "$:/core/ui/PageStylesheet",
"text": "<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n\n<$set name=\"currentTiddler\" value={{$:/language}}>\n\n<$set name=\"languageTitle\" value={{!!name}}>\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Stylesheet]!has[draft.of]]\">\n<$transclude mode=\"block\"/>\n</$list>\n\n</$set>\n\n</$set>\n\n</$importvariables>\n"
},
"$:/core/ui/PageTemplate/alerts": {
"title": "$:/core/ui/PageTemplate/alerts",
"tags": "$:/tags/PageTemplate",
"text": "<div class=\"tc-alerts\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Alert]!has[draft.of]]\" template=\"$:/core/ui/AlertTemplate\" storyview=\"pop\"/>\n\n</div>\n"
},
"$:/core/ui/PageTemplate/pluginreloadwarning": {
"title": "$:/core/ui/PageTemplate/pluginreloadwarning",
"tags": "$:/tags/PageTemplate",
"text": "\\define lingo-base() $:/language/\n\n<$list filter=\"[has[plugin-type]haschanged[]!plugin-type[import]limit[1]]\">\n\n<$reveal type=\"nomatch\" state=\"$:/temp/HidePluginWarning\" text=\"yes\">\n\n<div class=\"tc-plugin-reload-warning\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"\">\n\n<<lingo PluginReloadWarning>> <$button set=\"$:/temp/HidePluginWarning\" setTo=\"yes\" class=\"tc-btn-invisible\">{{$:/core/images/close-button}}</$button>\n\n</$set>\n\n</div>\n\n</$reveal>\n\n</$list>\n"
},
"$:/core/ui/PageTemplate/sidebar": {
"title": "$:/core/ui/PageTemplate/sidebar",
"tags": "$:/tags/PageTemplate",
"text": "<$scrollable fallthrough=\"no\" class=\"tc-sidebar-scrollable\">\n\n<div class=\"tc-sidebar-header\">\n\n<$reveal state=\"$:/state/sidebar\" type=\"match\" text=\"yes\" default=\"yes\" retain=\"yes\" animate=\"yes\">\n\n<h1 class=\"tc-site-title\">\n\n<$transclude tiddler=\"$:/SiteTitle\" mode=\"inline\"/>\n\n</h1>\n\n<div class=\"tc-site-subtitle\">\n\n<$transclude tiddler=\"$:/SiteSubtitle\" mode=\"inline\"/>\n\n</div>\n\n{{||$:/core/ui/PageTemplate/pagecontrols}}\n\n<$transclude tiddler=\"$:/core/ui/SideBarLists\" mode=\"inline\"/>\n\n</$reveal>\n\n</div>\n\n</$scrollable>"
},
"$:/core/ui/PageTemplate/story": {
"title": "$:/core/ui/PageTemplate/story",
"tags": "$:/tags/PageTemplate",
"text": "<section class=\"tc-story-river\">\n\n<section class=\"story-backdrop\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/AboveStory]!has[draft.of]]\">\n\n<$transclude/>\n\n</$list>\n\n</section>\n\n<$list filter=\"[list[$:/StoryList]]\" history=\"$:/HistoryList\" template=\"$:/core/ui/ViewTemplate\" editTemplate=\"$:/core/ui/EditTemplate\" storyview={{$:/view}} emptyMessage={{$:/config/EmptyStoryMessage}}/>\n\n<section class=\"story-frontdrop\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/BelowStory]!has[draft.of]]\">\n\n<$transclude/>\n\n</$list>\n\n</section>\n\n</section>\n"
},
"$:/core/ui/PageTemplate/topleftbar": {
"title": "$:/core/ui/PageTemplate/topleftbar",
"tags": "$:/tags/PageTemplate",
"text": "<span class=\"tc-topbar tc-topbar-left\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/TopLeftBar]!has[draft.of]]\" variable=\"listItem\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n\n</$list>\n\n</span>\n"
},
"$:/core/ui/PageTemplate/toprightbar": {
"title": "$:/core/ui/PageTemplate/toprightbar",
"tags": "$:/tags/PageTemplate",
"text": "<span class=\"tc-topbar tc-topbar-right\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/TopRightBar]!has[draft.of]]\" variable=\"listItem\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n\n</$list>\n\n</span>\n"
},
"$:/core/ui/PageTemplate": {
"title": "$:/core/ui/PageTemplate",
"text": "\\define containerClasses()\ntc-page-container tc-page-view-$(themeTitle)$ tc-language-$(languageTitle)$\n\\end\n\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n\n<$set name=\"tv-config-toolbar-icons\" value={{$:/config/Toolbar/Icons}}>\n\n<$set name=\"tv-config-toolbar-text\" value={{$:/config/Toolbar/Text}}>\n\n<$set name=\"tv-config-toolbar-class\" value={{$:/config/Toolbar/ButtonClass}}>\n\n<$set name=\"themeTitle\" value={{$:/view}}>\n\n<$set name=\"currentTiddler\" value={{$:/language}}>\n\n<$set name=\"languageTitle\" value={{!!name}}>\n\n<$set name=\"currentTiddler\" value=\"\">\n\n<div class=<<containerClasses>>>\n\n<$navigator story=\"$:/StoryList\" history=\"$:/HistoryList\" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}}>\n\n<$dropzone>\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageTemplate]!has[draft.of]]\" variable=\"listItem\">\n\n<$transclude tiddler=<<listItem>>/>\n\n</$list>\n\n</$dropzone>\n\n</$navigator>\n\n</div>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$importvariables>\n"
},
"$:/core/ui/PluginInfo": {
"title": "$:/core/ui/PluginInfo",
"text": "\\define localised-info-tiddler-title()\n$(currentTiddler)$/$(languageTitle)$/$(currentTab)$\n\\end\n\\define info-tiddler-title()\n$(currentTiddler)$/$(currentTab)$\n\\end\n<$transclude tiddler=<<localised-info-tiddler-title>> mode=\"block\">\n<$transclude tiddler=<<currentTiddler>> subtiddler=<<localised-info-tiddler-title>> mode=\"block\">\n<$transclude tiddler=<<currentTiddler>> subtiddler=<<info-tiddler-title>> mode=\"block\">\nNo ''\"<$text text=<<currentTab>>/>\"'' found\n</$transclude>\n</$transclude>\n</$transclude>\n"
},
"$:/core/ui/SearchResults": {
"title": "$:/core/ui/SearchResults",
"text": "<div class=\"tc-search-results\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]\" emptyMessage=\"\"\"\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]\">\n<$transclude mode=\"block\"/>\n</$list>\n\"\"\">\n\n<$macrocall $name=\"tabs\" tabsList=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]\" default={{$:/config/SearchResults/Default}}/>\n\n</$list>\n\n</div>\n"
},
"$:/core/ui/SideBar/More": {
"title": "$:/core/ui/SideBar/More",
"tags": "$:/tags/SideBar",
"caption": "{{$:/language/SideBar/More/Caption}}",
"text": "<div class=\"tc-more-sidebar\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]\" \"$:/core/ui/MoreSideBar/Tags\" \"$:/state/tab/moresidebar\" \"tc-vertical\">>\n</div>\n"
},
"$:/core/ui/SideBar/Open": {
"title": "$:/core/ui/SideBar/Open",
"tags": "$:/tags/SideBar",
"caption": "{{$:/language/SideBar/Open/Caption}}",
"text": "\\define lingo-base() $:/language/CloseAll/\n<$list filter=\"[list[$:/StoryList]]\" history=\"$:/HistoryList\" storyview=\"pop\">\n\n<$button message=\"tm-close-tiddler\" tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class=\"tc-btn-invisible tc-btn-mini\">×</$button> <$link to={{!!title}}><$view field=\"title\"/></$link>\n\n</$list>\n\n<$button message=\"tm-close-all-tiddlers\" class=\"tc-btn-invisible tc-btn-mini\"><<lingo Button>></$button>\n"
},
"$:/core/ui/SideBar/Recent": {
"title": "$:/core/ui/SideBar/Recent",
"tags": "$:/tags/SideBar",
"caption": "{{$:/language/SideBar/Recent/Caption}}",
"text": "<$macrocall $name=\"timeline\" format={{$:/language/RecentChanges/DateFormat}}/>\n"
},
"$:/core/ui/SideBar/Tools": {
"title": "$:/core/ui/SideBar/Tools",
"tags": "$:/tags/SideBar",
"caption": "{{$:/language/SideBar/Tools/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/\n\\define config-title()\n$:/config/PageControlButtons/Visibility/$(listItem)$\n\\end\n\n<<lingo Basics/Version/Prompt>> <<version>>\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]\" variable=\"listItem\">\n\n<div style=\"position:relative;\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>>/> <i class=\"tc-muted\"><$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</div>\n\n</$list>\n\n</$set>\n\n</$set>\n\n</$set>\n"
},
"$:/core/ui/SideBarLists": {
"title": "$:/core/ui/SideBarLists",
"text": "<div class=\"tc-sidebar-lists\">\n\n<$set name=\"searchTiddler\" value=\"$:/temp/search\">\n<div class=\"tc-search\">\n<$edit-text tiddler=\"$:/temp/search\" type=\"search\" tag=\"input\" focus={{$:/config/Search/AutoFocus}} focusPopup=<<qualify \"$:/state/popup/search-dropdown\">> class=\"tc-popup-handle\"/>\n<$reveal state=\"$:/temp/search\" type=\"nomatch\" text=\"\">\n<$button tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" text={{$:/temp/search}}/>\n<$action-setfield $tiddler=\"$:/temp/search\" text=\"\"/>\n<$action-navigate $to=\"$:/AdvancedSearch\"/>\n{{$:/core/images/advanced-search-button}}\n</$button>\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/search\" text=\"\" />\n{{$:/core/images/close-button}}\n</$button>\n<$button popup=<<qualify \"$:/state/popup/search-dropdown\">> class=\"tc-btn-invisible\">\n<$set name=\"resultCount\" value=\"\"\"<$count filter=\"[!is[system]search{$(searchTiddler)$}]\"/>\"\"\">\n{{$:/core/images/down-arrow}} {{$:/language/Search/Matches}}\n</$set>\n</$button>\n</$reveal>\n<$reveal state=\"$:/temp/search\" type=\"match\" text=\"\">\n<$button to=\"$:/AdvancedSearch\" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=\"tc-btn-invisible\">\n{{$:/core/images/advanced-search-button}}\n</$button>\n</$reveal>\n</div>\n\n<$reveal tag=\"div\" class=\"tc-block-dropdown-wrapper\" state=\"$:/temp/search\" type=\"nomatch\" text=\"\">\n\n<$reveal tag=\"div\" class=\"tc-block-dropdown tc-search-drop-down tc-popup-handle\" state=<<qualify \"$:/state/popup/search-dropdown\">> type=\"nomatch\" text=\"\" default=\"\">\n\n{{$:/core/ui/SearchResults}}\n\n</$reveal>\n\n</$reveal>\n\n</$set>\n\n<$macrocall $name=\"tabs\" tabsList=\"[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]\" default={{$:/config/DefaultSidebarTab}} state=\"$:/state/tab/sidebar\" />\n\n</div>\n"
},
"$:/TagManager": {
"title": "$:/TagManager",
"icon": "$:/core/images/tag-button",
"color": "#bbb",
"text": "\\define lingo-base() $:/language/TagManager/\n\\define iconEditorTab(type)\n<$list filter=\"[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[sort[title]] +[$type$is[system]]\">\n<$link to={{!!title}}>\n<$transclude/> <$view field=\"title\"/>\n</$link>\n</$list>\n\\end\n\\define iconEditor(title)\n<div class=\"tc-drop-down-wrapper\">\n<$button popup=<<qualify \"$:/state/popup/icon/$title$\">> class=\"tc-btn-invisible tc-btn-dropdown\">{{$:/core/images/down-arrow}}</$button>\n<$reveal state=<<qualify \"$:/state/popup/icon/$title$\">> type=\"popup\" position=\"belowleft\" text=\"\" default=\"\">\n<div class=\"tc-drop-down\">\n<$linkcatcher to=\"$title$!!icon\">\n<<iconEditorTab type:\"!\">>\n<hr/>\n<<iconEditorTab type:\"\">>\n</$linkcatcher>\n</div>\n</$reveal>\n</div>\n\\end\n\\define qualifyTitle(title)\n$title$$(currentTiddler)$\n\\end\n\\define toggleButton(state)\n<$reveal state=\"$state$\" type=\"match\" text=\"closed\" default=\"closed\">\n<$button set=\"$state$\" setTo=\"open\" class=\"tc-btn-invisible tc-btn-dropdown\" selectedClass=\"tc-selected\">\n{{$:/core/images/info-button}}\n</$button>\n</$reveal>\n<$reveal state=\"$state$\" type=\"match\" text=\"open\" default=\"closed\">\n<$button set=\"$state$\" setTo=\"closed\" class=\"tc-btn-invisible tc-btn-dropdown\" selectedClass=\"tc-selected\">\n{{$:/core/images/info-button}}\n</$button>\n</$reveal>\n\\end\n<table class=\"tc-tag-manager-table\">\n<tbody>\n<tr>\n<th><<lingo Colour/Heading>></th>\n<th class=\"tc-tag-manager-tag\"><<lingo Tag/Heading>></th>\n<th><<lingo Count/Heading>></th>\n<th><<lingo Icon/Heading>></th>\n<th><<lingo Info/Heading>></th>\n</tr>\n<$list filter=\"[tags[]!is[system]sort[title]]\">\n<tr>\n<td><$edit-text field=\"color\" tag=\"input\" type=\"color\"/></td>\n<td><$transclude tiddler=\"$:/core/ui/TagTemplate\"/></td>\n<td><$count filter=\"[all[current]tagging[]]\"/></td>\n<td>\n<$macrocall $name=\"iconEditor\" title={{!!title}}/>\n</td>\n<td>\n<$macrocall $name=\"toggleButton\" state=<<qualifyTitle \"$:/state/tag-manager/\">> /> \n</td>\n</tr>\n<tr>\n<td></td>\n<td colspan=\"4\">\n<$reveal state=<<qualifyTitle \"$:/state/tag-manager/\">> type=\"match\" text=\"open\" default=\"\">\n<table>\n<tbody>\n<tr><td><<lingo Colour/Heading>></td><td><$edit-text field=\"color\" tag=\"input\" type=\"text\" size=\"9\"/></td></tr>\n<tr><td><<lingo Icon/Heading>></td><td><$edit-text field=\"icon\" tag=\"input\" size=\"45\"/></td></tr>\n</tbody>\n</table>\n</$reveal>\n</td>\n</tr>\n</$list>\n<tr>\n<td></td>\n<td>\n{{$:/core/ui/UntaggedTemplate}}\n</td>\n<td>\n<small class=\"tc-menu-list-count\"><$count filter=\"[untagged[]!is[system]] -[tags[]]\"/></small>\n</td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n"
},
"$:/core/ui/TagTemplate": {
"title": "$:/core/ui/TagTemplate",
"text": "\\define tag-styles()\nbackground-color:$(backgroundColor)$;\nfill:$(foregroundColor)$;\ncolor:$(foregroundColor)$;\n\\end\n\n\\define tag-body-inner(colour,fallbackTarget,colourA,colourB)\n<$set name=\"foregroundColor\" value=<<contrastcolour target:\"\"\"$colour$\"\"\" fallbackTarget:\"\"\"$fallbackTarget$\"\"\" colourA:\"\"\"$colourA$\"\"\" colourB:\"\"\"$colourB$\"\"\">>>\n<$set name=\"backgroundColor\" value=\"\"\"$colour$\"\"\">\n<$button popup=<<qualify \"$:/state/popup/tag\">> class=\"tc-btn-invisible tc-tag-label\" style=<<tag-styles>>>\n<$transclude tiddler={{!!icon}}/> <$view field=\"title\" format=\"text\" />\n</$button>\n<$reveal state=<<qualify \"$:/state/popup/tag\">> type=\"popup\" position=\"below\" animate=\"yes\"><div class=\"tc-drop-down\"><$transclude tiddler=\"$:/core/ui/ListItemTemplate\"/>\n<hr>\n<$list filter=\"[all[current]tagging[]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n</div>\n</$reveal>\n</$set>\n</$set>\n\\end\n\n\\define tag-body(colour,palette)\n<span class=\"tc-tag-list-item\">\n<$macrocall $name=\"tag-body-inner\" colour=\"\"\"$colour$\"\"\" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}}/>\n</span>\n\\end\n\n<$macrocall $name=\"tag-body\" colour={{!!color}} palette={{$:/palette}}/>"
},
"$:/core/ui/TiddlerFieldTemplate": {
"title": "$:/core/ui/TiddlerFieldTemplate",
"text": "<tr class=\"tc-view-field\">\n<td class=\"tc-view-field-name\">\n<$text text=<<listItem>>/>\n</td>\n<td class=\"tc-view-field-value\">\n<$view field=<<listItem>>/>\n</td>\n</tr>"
},
"$:/core/ui/TiddlerFields": {
"title": "$:/core/ui/TiddlerFields",
"text": "<table class=\"tc-view-field-table\">\n<tbody>\n<$list filter=\"[all[current]fields[]sort[title]] -text\" template=\"$:/core/ui/TiddlerFieldTemplate\" variable=\"listItem\"/>\n</tbody>\n</table>\n"
},
"$:/core/ui/TiddlerInfo/Advanced/PluginInfo": {
"title": "$:/core/ui/TiddlerInfo/Advanced/PluginInfo",
"tags": "$:/tags/TiddlerInfo/Advanced",
"text": "\\define lingo-base() $:/language/TiddlerInfo/Advanced/PluginInfo/\n<$list filter=\"[all[current]has[plugin-type]]\">\n\n! <<lingo Heading>>\n\n<<lingo Hint>>\n<ul>\n<$list filter=\"[all[current]plugintiddlers[]sort[title]]\" emptyMessage=<<lingo Empty/Hint>>>\n<li>\n<$link to={{!!title}}>\n<$view field=\"title\"/>\n</$link>\n</li>\n</$list>\n</ul>\n\n</$list>\n"
},
"$:/core/ui/TiddlerInfo/Advanced/ShadowInfo": {
"title": "$:/core/ui/TiddlerInfo/Advanced/ShadowInfo",
"tags": "$:/tags/TiddlerInfo/Advanced",
"text": "\\define lingo-base() $:/language/TiddlerInfo/Advanced/ShadowInfo/\n<$set name=\"infoTiddler\" value=<<currentTiddler>>>\n\n''<<lingo Heading>>''\n\n<$list filter=\"[all[current]!is[shadow]]\">\n\n<<lingo NotShadow/Hint>>\n\n</$list>\n\n<$list filter=\"[all[current]is[shadow]]\">\n\n<<lingo Shadow/Hint>>\n\n<$list filter=\"[all[current]shadowsource[]]\">\n\n<$set name=\"pluginTiddler\" value=<<currentTiddler>>>\n<<lingo Shadow/Source>>\n</$set>\n\n</$list>\n\n<$list filter=\"[all[current]is[shadow]is[tiddler]]\">\n\n<<lingo OverriddenShadow/Hint>>\n\n</$list>\n\n\n</$list>\n</$set>\n"
},
"$:/core/ui/TiddlerInfo/Advanced": {
"title": "$:/core/ui/TiddlerInfo/Advanced",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Advanced/Caption}}",
"text": "<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo/Advanced]!has[draft.of]]\" variable=\"listItem\">\n<$transclude tiddler=<<listItem>>/>\n\n</$list>\n"
},
"$:/core/ui/TiddlerInfo/Fields": {
"title": "$:/core/ui/TiddlerInfo/Fields",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Fields/Caption}}",
"text": "<$transclude tiddler=\"$:/core/ui/TiddlerFields\"/>\n"
},
"$:/core/ui/TiddlerInfo/List": {
"title": "$:/core/ui/TiddlerInfo/List",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/List/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n<$list filter=\"[list{!!title}]\" emptyMessage=<<lingo List/Empty>> template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/TiddlerInfo/Listed": {
"title": "$:/core/ui/TiddlerInfo/Listed",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Listed/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n<$list filter=\"[all[current]listed[]!is[system]]\" emptyMessage=<<lingo Listed/Empty>> template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/TiddlerInfo/References": {
"title": "$:/core/ui/TiddlerInfo/References",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/References/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n<$list filter=\"[all[current]backlinks[]sort[title]]\" emptyMessage=<<lingo References/Empty>> template=\"$:/core/ui/ListItemTemplate\">\n</$list>\n"
},
"$:/core/ui/TiddlerInfo/Tagging": {
"title": "$:/core/ui/TiddlerInfo/Tagging",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Tagging/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n<$list filter=\"[all[current]tagging[]]\" emptyMessage=<<lingo Tagging/Empty>> template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/TiddlerInfo/Tools": {
"title": "$:/core/ui/TiddlerInfo/Tools",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Tools/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n\\define config-title()\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\n\\end\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]\" variable=\"listItem\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>>/> <i class=\"tc-muted\"><$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</$list>\n\n</$set>\n\n</$set>\n\n</$set>\n"
},
"$:/core/ui/TiddlerInfo": {
"title": "$:/core/ui/TiddlerInfo",
"text": "<$macrocall $name=\"tabs\" tabsList=\"[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo]!has[draft.of]]\" default={{$:/config/TiddlerInfo/Default}}/>"
},
"$:/core/ui/TopBar/menu": {
"title": "$:/core/ui/TopBar/menu",
"tags": "$:/tags/TopRightBar",
"text": "<$reveal state=\"$:/state/sidebar\" type=\"nomatch\" text=\"no\">\n<$button set=\"$:/state/sidebar\" setTo=\"no\" tooltip={{$:/language/Buttons/HideSideBar/Hint}} aria-label={{$:/language/Buttons/HideSideBar/Caption}} class=\"tc-btn-invisible\">{{$:/core/images/chevron-right}}</$button>\n</$reveal>\n<$reveal state=\"$:/state/sidebar\" type=\"match\" text=\"no\">\n<$button set=\"$:/state/sidebar\" setTo=\"yes\" tooltip={{$:/language/Buttons/ShowSideBar/Hint}} aria-label={{$:/language/Buttons/ShowSideBar/Caption}} class=\"tc-btn-invisible\">{{$:/core/images/chevron-left}}</$button>\n</$reveal>\n"
},
"$:/core/ui/UntaggedTemplate": {
"title": "$:/core/ui/UntaggedTemplate",
"text": "\\define lingo-base() $:/language/SideBar/\n<$button popup=<<qualify \"$:/state/popup/tag\">> class=\"tc-btn-invisible tc-untagged-label tc-tag-label\">\n<<lingo Tags/Untagged/Caption>>\n</$button>\n<$reveal state=<<qualify \"$:/state/popup/tag\">> type=\"popup\" position=\"below\">\n<div class=\"tc-drop-down\">\n<$list filter=\"[untagged[]!is[system]] -[tags[]] +[sort[title]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n</div>\n</$reveal>\n"
},
"$:/core/ui/ViewTemplate/body": {
"title": "$:/core/ui/ViewTemplate/body",
"tags": "$:/tags/ViewTemplate",
"text": "<$reveal tag=\"div\" class=\"tc-tiddler-body\" type=\"nomatch\" state=<<folded-state>> text=\"hide\" retain=\"yes\" animate=\"yes\">\n\n<$list filter=\"[all[current]!has[plugin-type]!field:hide-body[yes]]\">\n\n<$transclude>\n\n<$transclude tiddler=\"$:/language/MissingTiddler/Hint\"/>\n\n</$transclude>\n\n</$list>\n\n</$reveal>\n"
},
"$:/core/ui/ViewTemplate/classic": {
"title": "$:/core/ui/ViewTemplate/classic",
"tags": "$:/tags/ViewTemplate $:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/ClassicWarning/\n<$list filter=\"[all[current]type[text/x-tiddlywiki]]\">\n<div class=\"tc-message-box\">\n\n<<lingo Hint>>\n\n<$button set=\"!!type\" setTo=\"text/vnd.tiddlywiki\"><<lingo Upgrade/Caption>></$button>\n\n</div>\n</$list>\n"
},
"$:/core/ui/ViewTemplate/import": {
"title": "$:/core/ui/ViewTemplate/import",
"tags": "$:/tags/ViewTemplate",
"text": "\\define lingo-base() $:/language/Import/\n\n<$list filter=\"[all[current]field:plugin-type[import]]\">\n\n<div class=\"tc-import\">\n\n<<lingo Listing/Hint>>\n\n<$button message=\"tm-delete-tiddler\" param=<<currentTiddler>>><<lingo Listing/Cancel/Caption>></$button>\n<$button message=\"tm-perform-import\" param=<<currentTiddler>>><<lingo Listing/Import/Caption>></$button>\n\n{{||$:/core/ui/ImportListing}}\n\n<$button message=\"tm-delete-tiddler\" param=<<currentTiddler>>><<lingo Listing/Cancel/Caption>></$button>\n<$button message=\"tm-perform-import\" param=<<currentTiddler>>><<lingo Listing/Import/Caption>></$button>\n\n</div>\n\n</$list>\n"
},
"$:/core/ui/ViewTemplate/plugin": {
"title": "$:/core/ui/ViewTemplate/plugin",
"tags": "$:/tags/ViewTemplate",
"text": "<$list filter=\"[all[current]has[plugin-type]] -[all[current]field:plugin-type[import]]\">\n\n{{||$:/core/ui/TiddlerInfo/Advanced/PluginInfo}}\n\n</$list>\n"
},
"$:/core/ui/ViewTemplate/subtitle": {
"title": "$:/core/ui/ViewTemplate/subtitle",
"tags": "$:/tags/ViewTemplate",
"text": "<$reveal type=\"nomatch\" state=<<folded-state>> text=\"hide\" tag=\"div\" retain=\"yes\" animate=\"yes\">\n<div class=\"tc-subtitle\">\n<$link to={{!!modifier}}>\n<$view field=\"modifier\"/>\n</$link> <$view field=\"modified\" format=\"date\" template={{$:/language/Tiddler/DateFormat}}/>\n</div>\n</$reveal>\n"
},
"$:/core/ui/ViewTemplate/tags": {
"title": "$:/core/ui/ViewTemplate/tags",
"tags": "$:/tags/ViewTemplate",
"text": "<$reveal type=\"nomatch\" state=<<folded-state>> text=\"hide\" tag=\"div\" retain=\"yes\" animate=\"yes\">\n<div class=\"tc-tags-wrapper\"><$list filter=\"[all[current]tags[]sort[title]]\" template=\"$:/core/ui/TagTemplate\" storyview=\"pop\"/></div>\n</$reveal>"
},
"$:/core/ui/ViewTemplate/title": {
"title": "$:/core/ui/ViewTemplate/title",
"tags": "$:/tags/ViewTemplate",
"text": "\\define title-styles()\nfill:$(foregroundColor)$;\n\\end\n\\define config-title()\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\n\\end\n<div class=\"tc-tiddler-title\">\n<div class=\"tc-titlebar\">\n<span class=\"tc-tiddler-controls\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]\" variable=\"listItem\"><$reveal type=\"nomatch\" state=<<config-title>> text=\"hide\"><$transclude tiddler=<<listItem>>/></$reveal></$list>\n</span>\n<$set name=\"tv-wikilinks\" value={{$:/config/Tiddlers/TitleLinks}}>\n<$link>\n<$set name=\"foregroundColor\" value={{!!color}}>\n<span class=\"tc-tiddler-title-icon\" style=<<title-styles>>>\n<$transclude tiddler={{!!icon}}/>\n</span>\n</$set>\n<$list filter=\"[all[current]removeprefix[$:/]]\">\n<h2 class=\"tc-title\" title={{$:/language/SystemTiddler/Tooltip}}>\n<span class=\"tc-system-title-prefix\">$:/</span><$text text=<<currentTiddler>>/>\n</h2>\n</$list>\n<$list filter=\"[all[current]!prefix[$:/]]\">\n<h2 class=\"tc-title\">\n<$view field=\"title\"/>\n</h2>\n</$list>\n</$link>\n</$set>\n</div>\n\n<$reveal type=\"nomatch\" text=\"\" default=\"\" state=<<tiddlerInfoState>> class=\"tc-tiddler-info tc-popup-handle\" animate=\"yes\" retain=\"yes\">\n\n<$transclude tiddler=\"$:/core/ui/TiddlerInfo\"/>\n\n</$reveal>\n</div>"
},
"$:/core/ui/ViewTemplate/unfold": {
"title": "$:/core/ui/ViewTemplate/unfold",
"tags": "$:/tags/ViewTemplate",
"text": "<$reveal tag=\"div\" type=\"nomatch\" state=\"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-bar\" text=\"hide\">\n<$reveal tag=\"div\" type=\"nomatch\" state=<<folded-state>> text=\"hide\" default=\"show\" retain=\"yes\" animate=\"yes\">\n<$button tooltip={{$:/language/Buttons/Fold/Hint}} aria-label={{$:/language/Buttons/Fold/Caption}} class=\"tc-fold-banner\">\n<$action-sendmessage $message=\"tm-fold-tiddler\" $param=<<currentTiddler>> foldedState=<<folded-state>>/>\n{{$:/core/images/chevron-up}}\n</$button>\n</$reveal>\n<$reveal tag=\"div\" type=\"nomatch\" state=<<folded-state>> text=\"show\" default=\"show\" retain=\"yes\" animate=\"yes\">\n<$button tooltip={{$:/language/Buttons/Unfold/Hint}} aria-label={{$:/language/Buttons/Unfold/Caption}} class=\"tc-unfold-banner\">\n<$action-sendmessage $message=\"tm-fold-tiddler\" $param=<<currentTiddler>> foldedState=<<folded-state>>/>\n{{$:/core/images/chevron-down}}\n</$button>\n</$reveal>\n</$reveal>\n"
},
"$:/core/ui/ViewTemplate": {
"title": "$:/core/ui/ViewTemplate",
"text": "\\define frame-classes()\ntc-tiddler-frame tc-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(tiddlerTagClasses)$\n\\end\n\\define folded-state()\n$:/state/folded/$(currentTiddler)$\n\\end\n<$set name=\"storyTiddler\" value=<<currentTiddler>>><$set name=\"tiddlerInfoState\" value=<<qualify \"$:/state/popup/tiddler-info\">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]\" variable=\"listItem\"><$transclude tiddler=<<listItem>>/></$list>\n</div>\n</$tiddler></$set></$set>\n"
},
"$:/core/ui/Buttons/clone": {
"title": "$:/core/ui/Buttons/clone",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/clone-button}} {{$:/language/Buttons/Clone/Caption}}",
"description": "{{$:/language/Buttons/Clone/Hint}}",
"text": "<$button message=\"tm-new-tiddler\" param=<<currentTiddler>> tooltip={{$:/language/Buttons/Clone/Hint}} aria-label={{$:/language/Buttons/Clone/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/clone-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Clone/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/close-others": {
"title": "$:/core/ui/Buttons/close-others",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/close-others-button}} {{$:/language/Buttons/CloseOthers/Caption}}",
"description": "{{$:/language/Buttons/CloseOthers/Hint}}",
"text": "<$button message=\"tm-close-other-tiddlers\" param=<<currentTiddler>> tooltip={{$:/language/Buttons/CloseOthers/Hint}} aria-label={{$:/language/Buttons/CloseOthers/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/close-others-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/CloseOthers/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/close": {
"title": "$:/core/ui/Buttons/close",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/close-button}} {{$:/language/Buttons/Close/Caption}}",
"description": "{{$:/language/Buttons/Close/Hint}}",
"text": "<$button message=\"tm-close-tiddler\" tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/close-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Close/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/edit": {
"title": "$:/core/ui/Buttons/edit",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/edit-button}} {{$:/language/Buttons/Edit/Caption}}",
"description": "{{$:/language/Buttons/Edit/Hint}}",
"text": "<$button message=\"tm-edit-tiddler\" tooltip={{$:/language/Buttons/Edit/Hint}} aria-label={{$:/language/Buttons/Edit/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/edit-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Edit/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/export-tiddler": {
"title": "$:/core/ui/Buttons/export-tiddler",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/export-button}} {{$:/language/Buttons/ExportTiddler/Caption}}",
"description": "{{$:/language/Buttons/ExportTiddler/Hint}}",
"text": "\\define makeExportFilter()\n[[$(currentTiddler)$]]\n\\end\n<$macrocall $name=\"exportButton\" exportFilter=<<makeExportFilter>> lingoBase=\"$:/language/Buttons/ExportTiddler/\" baseFilename=<<currentTiddler>>/>"
},
"$:/core/ui/Buttons/fold-bar": {
"title": "$:/core/ui/Buttons/fold-bar",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/language/Buttons/Fold/FoldBar/Caption}}",
"description": "{{$:/language/Buttons/Fold/FoldBar/Hint}}",
"text": "<!-- This dummy toolbar button is here to allow visibility of the fold-bar to be controlled as if it were a toolbar button -->"
},
"$:/core/ui/Buttons/fold-others": {
"title": "$:/core/ui/Buttons/fold-others",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/fold-others-button}} {{$:/language/Buttons/FoldOthers/Caption}}",
"description": "{{$:/language/Buttons/FoldOthers/Hint}}",
"text": "<$button tooltip={{$:/language/Buttons/FoldOthers/Hint}} aria-label={{$:/language/Buttons/FoldOthers/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-fold-other-tiddlers\" $param=<<currentTiddler>> foldedStatePrefix=\"$:/state/folded/\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\" variable=\"listItem\">\n{{$:/core/images/fold-others-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/FoldOthers/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/fold": {
"title": "$:/core/ui/Buttons/fold",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/fold-button}} {{$:/language/Buttons/Fold/Caption}}",
"description": "{{$:/language/Buttons/Fold/Hint}}",
"text": "<$reveal type=\"nomatch\" state=<<folded-state>> text=\"hide\" default=\"show\"><$button tooltip={{$:/language/Buttons/Fold/Hint}} aria-label={{$:/language/Buttons/Fold/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-fold-tiddler\" $param=<<currentTiddler>> foldedState=<<folded-state>>/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\" variable=\"listItem\">\n{{$:/core/images/fold-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text={{$:/language/Buttons/Fold/Caption}}/>\n</span>\n</$list>\n</$button></$reveal><$reveal type=\"match\" state=<<folded-state>> text=\"hide\" default=\"show\"><$button tooltip={{$:/language/Buttons/Unfold/Hint}} aria-label={{$:/language/Buttons/Unfold/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-fold-tiddler\" $param=<<currentTiddler>> foldedState=<<folded-state>>/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\" variable=\"listItem\">\n{{$:/core/images/unfold-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text={{$:/language/Buttons/Unfold/Caption}}/>\n</span>\n</$list>\n</$button></$reveal>"
},
"$:/core/ui/Buttons/info": {
"title": "$:/core/ui/Buttons/info",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/info-button}} {{$:/language/Buttons/Info/Caption}}",
"description": "{{$:/language/Buttons/Info/Hint}}",
"text": "<$button popup=<<tiddlerInfoState>> tooltip={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/info-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Info/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/more-tiddler-actions": {
"title": "$:/core/ui/Buttons/more-tiddler-actions",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}}",
"description": "{{$:/language/Buttons/More/Hint}}",
"text": "\\define config-title()\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\n\\end\n<$button popup=<<qualify \"$:/state/popup/more\">> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/down-arrow}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/More/Caption}}/></span>\n</$list>\n</$button><$reveal state=<<qualify \"$:/state/popup/more\">> type=\"popup\" position=\"below\" animate=\"yes\">\n\n<div class=\"tc-drop-down\">\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"tc-btn-invisible\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]\" variable=\"listItem\">\n\n<$reveal type=\"match\" state=<<config-title>> text=\"hide\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n\n</$reveal>\n\n</$list>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</div>\n\n</$reveal>"
},
"$:/core/ui/Buttons/new-here": {
"title": "$:/core/ui/Buttons/new-here",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/new-here-button}} {{$:/language/Buttons/NewHere/Caption}}",
"description": "{{$:/language/Buttons/NewHere/Hint}}",
"text": "\\define newHereButtonTags()\n[[$(currentTiddler)$]]\n\\end\n\\define newHereButton()\n<$button tooltip={{$:/language/Buttons/NewHere/Hint}} aria-label={{$:/language/Buttons/NewHere/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-new-tiddler\" tags=<<newHereButtonTags>>/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/new-here-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/NewHere/Caption}}/></span>\n</$list>\n</$button>\n\\end\n<<newHereButton>>"
},
"$:/core/ui/Buttons/new-journal-here": {
"title": "$:/core/ui/Buttons/new-journal-here",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournalHere/Caption}}",
"description": "{{$:/language/Buttons/NewJournalHere/Hint}}",
"text": "\\define journalButtonTags()\n[[$(currentTiddlerTag)$]] $(journalTags)$\n\\end\n\\define journalButton()\n<$button tooltip={{$:/language/Buttons/NewJournalHere/Hint}} aria-label={{$:/language/Buttons/NewJournalHere/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-new-tiddler\" title=<<now \"$(journalTitleTemplate)$\">> tags=<<journalButtonTags>>/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/new-journal-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/NewJournalHere/Caption}}/></span>\n</$list>\n</$button>\n\\end\n<$set name=\"journalTitleTemplate\" value={{$:/config/NewJournal/Title}}>\n<$set name=\"journalTags\" value={{$:/config/NewJournal/Tags}}>\n<$set name=\"currentTiddlerTag\" value=<<currentTiddler>>>\n<<journalButton>>\n</$set></$set></$set>"
},
"$:/core/ui/Buttons/open-window": {
"title": "$:/core/ui/Buttons/open-window",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/open-window}} {{$:/language/Buttons/OpenWindow/Caption}}",
"description": "{{$:/language/Buttons/OpenWindow/Hint}}",
"text": "<$button message=\"tm-open-window\" tooltip={{$:/language/Buttons/OpenWindow/Hint}} aria-label={{$:/language/Buttons/OpenWindow/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/open-window}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/OpenWindow/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/permalink": {
"title": "$:/core/ui/Buttons/permalink",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/permalink-button}} {{$:/language/Buttons/Permalink/Caption}}",
"description": "{{$:/language/Buttons/Permalink/Hint}}",
"text": "<$button message=\"tm-permalink\" tooltip={{$:/language/Buttons/Permalink/Hint}} aria-label={{$:/language/Buttons/Permalink/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/permalink-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Permalink/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/permaview": {
"title": "$:/core/ui/Buttons/permaview",
"tags": "$:/tags/ViewToolbar $:/tags/PageControls",
"caption": "{{$:/core/images/permaview-button}} {{$:/language/Buttons/Permaview/Caption}}",
"description": "{{$:/language/Buttons/Permaview/Hint}}",
"text": "<$button message=\"tm-permaview\" tooltip={{$:/language/Buttons/Permaview/Hint}} aria-label={{$:/language/Buttons/Permaview/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/permaview-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Permaview/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/DefaultTiddlers": {
"title": "$:/DefaultTiddlers",
"text": "GettingStarted\n"
},
"$:/temp/advancedsearch": {
"title": "$:/temp/advancedsearch",
"text": ""
},
"$:/snippets/allfields": {
"title": "$:/snippets/allfields",
"text": "\\define renderfield(title)\n<tr class=\"tc-view-field\"><td class=\"tc-view-field-name\">''$title$'':</td><td class=\"tc-view-field-value\">//{{$:/language/Docs/Fields/$title$}}//</td></tr>\n\\end\n<table class=\"tc-view-field-table\"><tbody><$list filter=\"[fields[]sort[title]]\" variable=\"listItem\"><$macrocall $name=\"renderfield\" title=<<listItem>>/></$list>\n</tbody></table>\n"
},
"$:/config/AnimationDuration": {
"title": "$:/config/AnimationDuration",
"text": "400"
},
"$:/config/AutoSave": {
"title": "$:/config/AutoSave",
"text": "yes"
},
"$:/config/BitmapEditor/Colour": {
"title": "$:/config/BitmapEditor/Colour",
"text": "#ff0"
},
"$:/config/BitmapEditor/LineWidth": {
"title": "$:/config/BitmapEditor/LineWidth",
"text": "3"
},
"$:/config/DefaultSidebarTab": {
"title": "$:/config/DefaultSidebarTab",
"text": "$:/core/ui/SideBar/Open"
},
"$:/config/Drafts/TypingTimeout": {
"title": "$:/config/Drafts/TypingTimeout",
"text": "400"
},
"$:/config/EditTemplateFields/Visibility/title": {
"title": "$:/config/EditTemplateFields/Visibility/title",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/tags": {
"title": "$:/config/EditTemplateFields/Visibility/tags",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/text": {
"title": "$:/config/EditTemplateFields/Visibility/text",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/creator": {
"title": "$:/config/EditTemplateFields/Visibility/creator",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/created": {
"title": "$:/config/EditTemplateFields/Visibility/created",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/modified": {
"title": "$:/config/EditTemplateFields/Visibility/modified",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/modifier": {
"title": "$:/config/EditTemplateFields/Visibility/modifier",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/type": {
"title": "$:/config/EditTemplateFields/Visibility/type",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/draft.title": {
"title": "$:/config/EditTemplateFields/Visibility/draft.title",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/draft.of": {
"title": "$:/config/EditTemplateFields/Visibility/draft.of",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/revision": {
"title": "$:/config/EditTemplateFields/Visibility/revision",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/bag": {
"title": "$:/config/EditTemplateFields/Visibility/bag",
"text": "hide"
},
"$:/config/EditorTypeMappings/image/gif": {
"title": "$:/config/EditorTypeMappings/image/gif",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/image/jpeg": {
"title": "$:/config/EditorTypeMappings/image/jpeg",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/image/jpg": {
"title": "$:/config/EditorTypeMappings/image/jpg",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/image/png": {
"title": "$:/config/EditorTypeMappings/image/png",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/image/x-icon": {
"title": "$:/config/EditorTypeMappings/image/x-icon",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/text/vnd.tiddlywiki": {
"title": "$:/config/EditorTypeMappings/text/vnd.tiddlywiki",
"text": "text"
},
"$:/config/Navigation/UpdateAddressBar": {
"title": "$:/config/Navigation/UpdateAddressBar",
"text": "no"
},
"$:/config/Navigation/UpdateHistory": {
"title": "$:/config/Navigation/UpdateHistory",
"text": "no"
},
"$:/config/OfficialPluginLibrary": {
"title": "$:/config/OfficialPluginLibrary",
"tags": "$:/tags/PluginLibrary",
"url": "http://tiddlywiki.com/library/v5.1.11/index.html",
"caption": "{{$:/language/OfficialPluginLibrary}}",
"text": "{{$:/language/OfficialPluginLibrary/Hint}}\n"
},
"$:/config/Navigation/openLinkFromInsideRiver": {
"title": "$:/config/Navigation/openLinkFromInsideRiver",
"text": "below"
},
"$:/config/Navigation/openLinkFromOutsideRiver": {
"title": "$:/config/Navigation/openLinkFromOutsideRiver",
"text": "top"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/advanced-search": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/advanced-search",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/close-all": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/close-all",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/encryption": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/encryption",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/export-page": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/export-page",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/fold-all": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/fold-all",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/full-screen": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/full-screen",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/home": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/home",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/refresh": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/refresh",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/import": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/import",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/language": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/language",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/tag-manager": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/tag-manager",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/more-page-actions": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/more-page-actions",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/new-journal": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/new-journal",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/palette": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/palette",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/permaview": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/permaview",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/storyview": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/storyview",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/theme": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/theme",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/unfold-all": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/unfold-all",
"text": "hide"
},
"$:/config/Performance/Instrumentation": {
"title": "$:/config/Performance/Instrumentation",
"text": "no"
},
"$:/config/SaveWikiButton/Template": {
"title": "$:/config/SaveWikiButton/Template",
"text": "$:/core/save/all"
},
"$:/config/SaverFilter": {
"title": "$:/config/SaverFilter",
"text": "[all[]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[[$:/UploadName]] -[prefix[$:/state/]] -[prefix[$:/temp/]]"
},
"$:/config/Search/AutoFocus": {
"title": "$:/config/Search/AutoFocus",
"text": "true"
},
"$:/config/SearchResults/Default": {
"title": "$:/config/SearchResults/Default",
"text": "$:/core/ui/DefaultSearchResultList"
},
"$:/config/SyncFilter": {
"title": "$:/config/SyncFilter",
"text": "[is[tiddler]] -[[$:/HistoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status/]] -[prefix[$:/state/]] -[prefix[$:/temp/]]"
},
"$:/config/TiddlerInfo/Default": {
"title": "$:/config/TiddlerInfo/Default",
"text": "$:/core/ui/TiddlerInfo/Fields"
},
"$:/config/Tiddlers/TitleLinks": {
"title": "$:/config/Tiddlers/TitleLinks",
"text": "no"
},
"$:/config/Toolbar/ButtonClass": {
"title": "$:/config/Toolbar/ButtonClass",
"text": "tc-btn-invisible"
},
"$:/config/Toolbar/Icons": {
"title": "$:/config/Toolbar/Icons",
"text": "yes"
},
"$:/config/Toolbar/Text": {
"title": "$:/config/Toolbar/Text",
"text": "no"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/clone": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/clone",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/close-others": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/close-others",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/export-tiddler": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/export-tiddler",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/info": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/info",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/more-tiddler-actions": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/more-tiddler-actions",
"text": "show"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-here": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-here",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-journal-here": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-journal-here",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/open-window": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/open-window",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/permalink": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/permalink",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/permaview": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/permaview",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/delete": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/delete",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-bar": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-bar",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-others": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-others",
"text": "hide"
},
"$:/config/shortcuts/cancel-edit-tiddler": {
"title": "$:/config/shortcuts/cancel-edit-tiddler",
"text": "escape"
},
"$:/config/shortcuts/save-tiddler": {
"title": "$:/config/shortcuts/save-tiddler",
"text": "ctrl+enter"
},
"$:/config/WikiParserRules/Inline/wikilink": {
"title": "$:/config/WikiParserRules/Inline/wikilink",
"text": "enable"
},
"$:/snippets/currpalettepreview": {
"title": "$:/snippets/currpalettepreview",
"text": "\\define swatchStyle()\nbackground-color: $(swatchColour)$;\n\\end\n\\define swatch(colour)\n<$set name=\"swatchColour\" value={{##$colour$}}>\n<div class=\"tc-swatch\" style=<<swatchStyle>>/>\n</$set>\n\\end\n<div class=\"tc-swatches-horiz\">\n<<swatch foreground>>\n<<swatch background>>\n<<swatch muted-foreground>>\n<<swatch primary>>\n<<swatch page-background>>\n<<swatch tab-background>>\n<<swatch tiddler-info-background>>\n</div>\n"
},
"$:/snippets/download-wiki-button": {
"title": "$:/snippets/download-wiki-button",
"text": "\\define lingo-base() $:/language/ControlPanel/Tools/Download/\n<$button class=\"tc-btn-big-green\">\n<$action-sendmessage $message=\"tm-download-file\" $param=\"$:/core/save/all\" filename=\"index.html\"/>\n<<lingo Full/Caption>> {{$:/core/images/save-button}}\n</$button>"
},
"$:/language": {
"title": "$:/language",
"text": "$:/languages/en-GB"
},
"$:/snippets/languageswitcher": {
"title": "$:/snippets/languageswitcher",
"text": "{{$:/language/ControlPanel/Basics/Language/Prompt}} <$select tiddler=\"$:/language\">\n<$list filter=\"[[$:/languages/en-GB]] [plugin-type[language]sort[description]]\">\n<option value=<<currentTiddler>>><$view field=\"description\"><$view field=\"name\"><$view field=\"title\"/></$view></$view></option>\n</$list>\n</$select>"
},
"$:/core/macros/CSS": {
"title": "$:/core/macros/CSS",
"tags": "$:/tags/Macro",
"text": "\\define colour(name)\n<$transclude tiddler={{$:/palette}} index=\"$name$\"><$transclude tiddler=\"$:/palettes/Vanilla\" index=\"$name$\"/></$transclude>\n\\end\n\n\\define color(name)\n<<colour $name$>>\n\\end\n\n\\define box-shadow(shadow)\n``\n -webkit-box-shadow: $shadow$;\n -moz-box-shadow: $shadow$;\n box-shadow: $shadow$;\n``\n\\end\n\n\\define filter(filter)\n``\n -webkit-filter: $filter$;\n -moz-filter: $filter$;\n filter: $filter$;\n``\n\\end\n\n\\define transition(transition)\n``\n -webkit-transition: $transition$;\n -moz-transition: $transition$;\n transition: $transition$;\n``\n\\end\n\n\\define transform-origin(origin)\n``\n -webkit-transform-origin: $origin$;\n -moz-transform-origin: $origin$;\n transform-origin: $origin$;\n``\n\\end\n\n\\define background-linear-gradient(gradient)\n``\nbackground-image: linear-gradient($gradient$);\nbackground-image: -o-linear-gradient($gradient$);\nbackground-image: -moz-linear-gradient($gradient$);\nbackground-image: -webkit-linear-gradient($gradient$);\nbackground-image: -ms-linear-gradient($gradient$);\n``\n\\end\n\n\\define datauri(title)\n<$macrocall $name=\"makedatauri\" type={{$title$!!type}} text={{$title$}}/>\n\\end\n\n\\define if-sidebar(text)\n<$reveal state=\"$:/state/sidebar\" type=\"match\" text=\"yes\" default=\"yes\">$text$</$reveal>\n\\end\n\n\\define if-no-sidebar(text)\n<$reveal state=\"$:/state/sidebar\" type=\"nomatch\" text=\"yes\" default=\"yes\">$text$</$reveal>\n\\end\n"
},
"$:/core/macros/export": {
"title": "$:/core/macros/export",
"tags": "$:/tags/Macro",
"text": "\\define exportButtonFilename(baseFilename)\n$baseFilename$$(extension)$\n\\end\n\n\\define exportButton(exportFilter:\"[!is[system]sort[title]]\",lingoBase,baseFilename:\"tiddlers\")\n<span class=\"tc-popup-keep\">\n<$button popup=<<qualify \"$:/state/popup/export\">> tooltip={{$lingoBase$Hint}} aria-label={{$lingoBase$Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/export-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$lingoBase$Caption}}/></span>\n</$list>\n</$button>\n</span>\n<$reveal state=<<qualify \"$:/state/popup/export\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Exporter]]\">\n<$set name=\"extension\" value={{!!extension}}>\n<$button class=\"tc-btn-invisible\">\n<$action-sendmessage $message=\"tm-download-file\" $param=<<currentTiddler>> exportFilter=\"\"\"$exportFilter$\"\"\" filename=<<exportButtonFilename \"\"\"$baseFilename$\"\"\">>/>\n<$action-deletetiddler $tiddler=<<qualify \"$:/state/popup/export\">>/>\n<$transclude field=\"description\"/>\n</$button>\n</$set>\n</$list>\n</div>\n</$reveal>\n\\end\n"
},
"$:/core/macros/lingo": {
"title": "$:/core/macros/lingo",
"tags": "$:/tags/Macro",
"text": "\\define lingo-base()\n$:/language/\n\\end\n\n\\define lingo(title)\n{{$(lingo-base)$$title$}}\n\\end\n"
},
"$:/core/macros/list": {
"title": "$:/core/macros/list",
"tags": "$:/tags/Macro",
"text": "\\define list-links(filter,type:\"ul\",subtype:\"li\",class:\"\")\n<$type$ class=\"$class$\">\n<$list filter=\"$filter$\">\n<$subtype$>\n<$link to={{!!title}}>\n<$transclude field=\"caption\">\n<$view field=\"title\"/>\n</$transclude>\n</$link>\n</$subtype$>\n</$list>\n</$type$>\n\\end\n"
},
"$:/core/macros/tabs": {
"title": "$:/core/macros/tabs",
"tags": "$:/tags/Macro",
"text": "\\define tabs(tabsList,default,state:\"$:/state/tab\",class,template)\n<div class=\"tc-tab-set $class$\">\n<div class=\"tc-tab-buttons $class$\">\n<$list filter=\"$tabsList$\" variable=\"currentTab\"><$set name=\"save-currentTiddler\" value=<<currentTiddler>>><$tiddler tiddler=<<currentTab>>><$button set=<<qualify \"$state$\">> setTo=<<currentTab>> default=\"$default$\" selectedClass=\"tc-tab-selected\" tooltip={{!!tooltip}}>\n<$tiddler tiddler=<<save-currentTiddler>>>\n<$set name=\"tv-wikilinks\" value=\"no\">\n<$transclude tiddler=<<currentTab>> field=\"caption\">\n<$macrocall $name=\"currentTab\" $type=\"text/plain\" $output=\"text/plain\"/>\n</$transclude>\n</$set></$tiddler></$button></$tiddler></$set></$list>\n</div>\n<div class=\"tc-tab-divider $class$\"/>\n<div class=\"tc-tab-content $class$\">\n<$list filter=\"$tabsList$\" variable=\"currentTab\">\n\n<$reveal type=\"match\" state=<<qualify \"$state$\">> text=<<currentTab>> default=\"$default$\">\n\n<$transclude tiddler=\"$template$\" mode=\"block\">\n\n<$transclude tiddler=<<currentTab>> mode=\"block\"/>\n\n</$transclude>\n\n</$reveal>\n\n</$list>\n</div>\n</div>\n\\end\n"
},
"$:/core/macros/tag": {
"title": "$:/core/macros/tag",
"tags": "$:/tags/Macro",
"text": "\\define tag(tag)\n{{$tag$||$:/core/ui/TagTemplate}}\n\\end\n"
},
"$:/core/macros/thumbnails": {
"title": "$:/core/macros/thumbnails",
"tags": "$:/tags/Macro",
"text": "\\define thumbnail(link,icon,color,background-color,image,caption,width:\"280\",height:\"157\")\n<$link to=\"\"\"$link$\"\"\"><div class=\"tc-thumbnail-wrapper\">\n<div class=\"tc-thumbnail-image\" style=\"width:$width$px;height:$height$px;\"><$reveal type=\"nomatch\" text=\"\" default=\"\"\"$image$\"\"\" tag=\"div\" style=\"width:$width$px;height:$height$px;\">\n[img[$image$]]\n</$reveal><$reveal type=\"match\" text=\"\" default=\"\"\"$image$\"\"\" tag=\"div\" class=\"tc-thumbnail-background\" style=\"width:$width$px;height:$height$px;background-color:$background-color$;\"></$reveal></div><div class=\"tc-thumbnail-icon\" style=\"fill:$color$;color:$color$;\">\n$icon$\n</div><div class=\"tc-thumbnail-caption\">\n$caption$\n</div>\n</div></$link>\n\\end\n\n\\define thumbnail-right(link,icon,color,background-color,image,caption,width:\"280\",height:\"157\")\n<div class=\"tc-thumbnail-right-wrapper\"><<thumbnail \"\"\"$link$\"\"\" \"\"\"$icon$\"\"\" \"\"\"$color$\"\"\" \"\"\"$background-color$\"\"\" \"\"\"$image$\"\"\" \"\"\"$caption$\"\"\" \"\"\"$width$\"\"\" \"\"\"$height$\"\"\">></div>\n\\end\n\n\\define list-thumbnails(filter,width:\"280\",height:\"157\")\n<$list filter=\"\"\"$filter$\"\"\"><$macrocall $name=\"thumbnail\" link={{!!link}} icon={{!!icon}} color={{!!color}} background-color={{!!background-color}} image={{!!image}} caption={{!!caption}} width=\"\"\"$width$\"\"\" height=\"\"\"$height$\"\"\"/></$list>\n\\end\n"
},
"$:/core/macros/timeline": {
"created": "20141212105914482",
"modified": "20141212110330815",
"tags": "$:/tags/Macro",
"title": "$:/core/macros/timeline",
"type": "text/vnd.tiddlywiki",
"text": "\\define timeline-title()\n<!-- Override this macro with a global macro \n of the same name if you need to change \n how titles are displayed on the timeline \n -->\n<$view field=\"title\"/>\n\\end\n\\define timeline(limit:\"100\",format:\"DDth MMM YYYY\",subfilter:\"\",dateField:\"modified\")\n<div class=\"tc-timeline\">\n<$list filter=\"[!is[system]$subfilter$has[$dateField$]!sort[$dateField$]limit[$limit$]eachday[$dateField$]]\">\n<div class=\"tc-menu-list-item\">\n<$view field=\"$dateField$\" format=\"date\" template=\"$format$\"/>\n<$list filter=\"[sameday:$dateField${!!$dateField$}!is[system]$subfilter$!sort[$dateField$]]\">\n<div class=\"tc-menu-list-subitem\">\n<$link to={{!!title}}>\n<<timeline-title>>\n</$link>\n</div>\n</$list>\n</div>\n</$list>\n</div>\n\\end\n"
},
"$:/core/macros/toc": {
"title": "$:/core/macros/toc",
"tags": "$:/tags/Macro",
"text": "\\define toc-caption()\n<$set name=\"tv-wikilinks\" value=\"no\">\n<$transclude field=\"caption\">\n<$view field=\"title\"/>\n</$transclude>\n</$set>\n\\end\n\n\\define toc-body(rootTag,tag,sort:\"\",itemClassFilter)\n<ol class=\"tc-toc\">\n<$list filter=\"\"\"[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]\"\"\">\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\n<li class=<<toc-item-class>>>\n<$list filter=\"[all[current]toc-link[no]]\" emptyMessage=\"<$link><$view field='caption'><$view field='title'/></$view></$link>\">\n<<toc-caption>>\n</$list>\n<$list filter=\"\"\"[all[current]] -[[$rootTag$]]\"\"\">\n<$macrocall $name=\"toc-body\" rootTag=\"\"\"$rootTag$\"\"\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\"/>\n</$list>\n</li>\n</$set>\n</$list>\n</ol>\n\\end\n\n\\define toc(tag,sort:\"\",itemClassFilter)\n<<toc-body rootTag:\"\"\"$tag$\"\"\" tag:\"\"\"$tag$\"\"\" sort:\"\"\"$sort$\"\"\" itemClassFilter:\"\"\"itemClassFilter\"\"\">>\n\\end\n\n\\define toc-linked-expandable-body(tag,sort:\"\",itemClassFilter)\n<$set name=\"toc-state\" value=<<qualify \"$:/state/toc/$tag$-$(currentTiddler)$\">>>\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\n<li class=<<toc-item-class>>>\n<$link>\n<$reveal type=\"nomatch\" state=<<toc-state>> text=\"open\">\n<$button set=<<toc-state>> setTo=\"open\" class=\"tc-btn-invisible\">\n{{$:/core/images/right-arrow}}\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n<$button set=<<toc-state>> setTo=\"close\" class=\"tc-btn-invisible\">\n{{$:/core/images/down-arrow}}\n</$button>\n</$reveal>\n<<toc-caption>>\n</$link>\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n<$macrocall $name=\"toc-expandable\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\"/>\n</$reveal>\n</li>\n</$set>\n</$set>\n\\end\n\n\\define toc-unlinked-expandable-body(tag,sort:\"\",itemClassFilter)\n<$set name=\"toc-state\" value=<<qualify \"$:/state/toc/$tag$-$(currentTiddler)$\">>>\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\n<li class=<<toc-item-class>>>\n<$reveal type=\"nomatch\" state=<<toc-state>> text=\"open\">\n<$button set=<<toc-state>> setTo=\"open\" class=\"tc-btn-invisible\">\n{{$:/core/images/right-arrow}}\n<<toc-caption>>\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n<$button set=<<toc-state>> setTo=\"close\" class=\"tc-btn-invisible\">\n{{$:/core/images/down-arrow}}\n<<toc-caption>>\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n<$macrocall $name=\"toc-expandable\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\"/>\n</$reveal>\n</li>\n</$set>\n</$set>\n\\end\n\n\\define toc-expandable(tag,sort:\"\",itemClassFilter)\n<ol class=\"tc-toc toc-expandable\">\n<$list filter=\"[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]\">\n<$list filter=\"[all[current]toc-link[no]]\" emptyMessage=\"<<toc-linked-expandable-body tag:'$tag$' sort:'$sort$' itemClassFilter:'$itemClassFilter$'>>\">\n<<toc-unlinked-expandable-body tag:\"\"\"$tag$\"\"\" sort:\"\"\"$sort$\"\"\" itemClassFilter:\"\"\"itemClassFilter\"\"\">>\n</$list>\n</$list>\n</ol>\n\\end\n\n\\define toc-linked-selective-expandable-body(tag,sort:\"\",itemClassFilter)\n<$set name=\"toc-state\" value=<<qualify \"$:/state/toc/$tag$-$(currentTiddler)$\">>>\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\n<li class=<<toc-item-class>>>\n<$link>\n<$list filter=\"[all[current]tagging[]limit[1]]\" variable=\"ignore\" emptyMessage=\"<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button>\">\n<$reveal type=\"nomatch\" state=<<toc-state>> text=\"open\">\n<$button set=<<toc-state>> setTo=\"open\" class=\"tc-btn-invisible\">\n{{$:/core/images/right-arrow}}\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n<$button set=<<toc-state>> setTo=\"close\" class=\"tc-btn-invisible\">\n{{$:/core/images/down-arrow}}\n</$button>\n</$reveal>\n</$list>\n<<toc-caption>>\n</$link>\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n<$macrocall $name=\"toc-selective-expandable\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\"/>\n</$reveal>\n</li>\n</$set>\n</$set>\n\\end\n\n\\define toc-unlinked-selective-expandable-body(tag,sort:\"\",itemClassFilter)\n<$set name=\"toc-state\" value=<<qualify \"$:/state/toc/$tag$-$(currentTiddler)$\">>>\n<$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" value=\"toc-item-selected\" emptyValue=\"toc-item\">\n<li class=<<toc-item-class>>>\n<$list filter=\"[all[current]tagging[]limit[1]]\" variable=\"ignore\" emptyMessage=\"<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>\">\n<$reveal type=\"nomatch\" state=<<toc-state>> text=\"open\">\n<$button set=<<toc-state>> setTo=\"open\" class=\"tc-btn-invisible\">\n{{$:/core/images/right-arrow}}\n<<toc-caption>>\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n<$button set=<<toc-state>> setTo=\"close\" class=\"tc-btn-invisible\">\n{{$:/core/images/down-arrow}}\n<<toc-caption>>\n</$button>\n</$reveal>\n</$list>\n<$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n<$macrocall $name=\"\"\"toc-selective-expandable\"\"\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\"/>\n</$reveal>\n</li>\n</$set>\n</$set>\n\\end\n\n\\define toc-selective-expandable(tag,sort:\"\",itemClassFilter)\n<ol class=\"tc-toc toc-selective-expandable\">\n<$list filter=\"[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]\">\n<$list filter=\"[all[current]toc-link[no]]\" variable=\"ignore\" emptyMessage=\"<<toc-linked-selective-expandable-body tag:'$tag$' sort:'$sort$' itemClassFilter:'$itemClassFilter$'>>\">\n<<toc-unlinked-selective-expandable-body tag:\"\"\"$tag$\"\"\" sort:\"\"\"$sort$\"\"\" itemClassFilter:\"\"\"$itemClassFilter$\"\"\">>\n</$list>\n</$list>\n</ol>\n\\end\n\n\\define toc-tabbed-selected-item-filter(selectedTiddler)\n[all[current]field:title{$selectedTiddler$}]\n\\end\n\n\\define toc-tabbed-external-nav(tag,sort:\"\",selectedTiddler:\"$:/temp/toc/selectedTiddler\",unselectedText,missingText,template:\"\")\n<$tiddler tiddler={{$selectedTiddler$}}>\n<div class=\"tc-tabbed-table-of-contents\">\n<$linkcatcher to=\"$selectedTiddler$\">\n<div class=\"tc-table-of-contents\">\n<$macrocall $name=\"toc-selective-expandable\" tag=\"\"\"$tag$\"\"\" sort=\"\"\"$sort$\"\"\" itemClassFilter=<<toc-tabbed-selected-item-filter selectedTiddler:\"\"\"$selectedTiddler$\"\"\">>/>\n</div>\n</$linkcatcher>\n<div class=\"tc-tabbed-table-of-contents-content\">\n<$reveal state=\"\"\"$selectedTiddler$\"\"\" type=\"nomatch\" text=\"\">\n<$transclude mode=\"block\" tiddler=\"$template$\">\n<h1><<toc-caption>></h1>\n<$transclude mode=\"block\">$missingText$</$transclude>\n</$transclude>\n</$reveal>\n<$reveal state=\"\"\"$selectedTiddler$\"\"\" type=\"match\" text=\"\">\n$unselectedText$\n</$reveal>\n</div>\n</div>\n</$tiddler>\n\\end\n\n\\define toc-tabbed-internal-nav(tag,sort:\"\",selectedTiddler:\"$:/temp/toc/selectedTiddler\",unselectedText,missingText,template:\"\")\n<$linkcatcher to=\"\"\"$selectedTiddler$\"\"\">\n<$macrocall $name=\"toc-tabbed-external-nav\" tag=\"\"\"$tag$\"\"\" sort=\"\"\"$sort$\"\"\" selectedTiddler=\"\"\"$selectedTiddler$\"\"\" unselectedText=\"\"\"$unselectedText$\"\"\" missingText=\"\"\"$missingText$\"\"\" template=\"\"\"$template$\"\"\"/>\n</$linkcatcher>\n\\end\n\n"
},
"$:/snippets/minilanguageswitcher": {
"title": "$:/snippets/minilanguageswitcher",
"text": "<$select tiddler=\"$:/language\">\n<$list filter=\"[[$:/languages/en-GB]] [plugin-type[language]sort[title]]\">\n<option value=<<currentTiddler>>><$view field=\"description\"><$view field=\"name\"><$view field=\"title\"/></$view></$view></option>\n</$list>\n</$select>"
},
"$:/snippets/minithemeswitcher": {
"title": "$:/snippets/minithemeswitcher",
"text": "\\define lingo-base() $:/language/ControlPanel/Theme/\n<<lingo Prompt>> <$select tiddler=\"$:/theme\">\n<$list filter=\"[plugin-type[theme]sort[title]]\">\n<option value=<<currentTiddler>>><$view field=\"name\"><$view field=\"title\"/></$view></option>\n</$list>\n</$select>"
},
"$:/snippets/modules": {
"title": "$:/snippets/modules",
"text": "\\define describeModuleType(type)\n{{$:/language/Docs/ModuleTypes/$type$}}\n\\end\n<$list filter=\"[moduletypes[]]\">\n\n!! <$macrocall $name=\"currentTiddler\" $type=\"text/plain\" $output=\"text/plain\"/>\n\n<$macrocall $name=\"describeModuleType\" type=<<currentTiddler>>/>\n\n<ul><$list filter=\"[all[current]modules[]]\"><li><$link><<currentTiddler>></$link>\n</li>\n</$list>\n</ul>\n</$list>\n"
},
"$:/palette": {
"title": "$:/palette",
"text": "$:/palettes/Vanilla"
},
"$:/snippets/paletteeditor": {
"title": "$:/snippets/paletteeditor",
"text": "\\define lingo-base() $:/language/ControlPanel/Palette/Editor/\n\\define describePaletteColour(colour)\n<$transclude tiddler=\"$:/language/Docs/PaletteColours/$colour$\"><$text text=\"$colour$\"/></$transclude>\n\\end\n<$set name=\"currentTiddler\" value={{$:/palette}}>\n\n<<lingo Prompt>> <$link to={{$:/palette}}><$macrocall $name=\"currentTiddler\" $output=\"text/plain\"/></$link>\n\n<$list filter=\"[all[current]is[shadow]is[tiddler]]\" variable=\"listItem\">\n<<lingo Prompt/Modified>>\n<$button message=\"tm-delete-tiddler\" param={{$:/palette}}><<lingo Reset/Caption>></$button>\n</$list>\n\n<$list filter=\"[all[current]is[shadow]!is[tiddler]]\" variable=\"listItem\">\n<<lingo Clone/Prompt>>\n</$list>\n\n<$button message=\"tm-new-tiddler\" param={{$:/palette}}><<lingo Clone/Caption>></$button>\n\n<table>\n<tbody>\n<$list filter=\"[all[current]indexes[]]\" variable=\"colourName\">\n<tr>\n<td>\n''<$macrocall $name=\"describePaletteColour\" colour=<<colourName>>/>''<br/>\n<$macrocall $name=\"colourName\" $output=\"text/plain\"/>\n</td>\n<td>\n<$edit-text index=<<colourName>> tag=\"input\"/>\n<br>\n<$edit-text index=<<colourName>> type=\"color\" tag=\"input\"/>\n</td>\n</tr>\n</$list>\n</tbody>\n</table>\n</$set>\n"
},
"$:/snippets/palettepreview": {
"title": "$:/snippets/palettepreview",
"text": "<$set name=\"currentTiddler\" value={{$:/palette}}>\n<$transclude tiddler=\"$:/snippets/currpalettepreview\"/>\n</$set>\n"
},
"$:/snippets/paletteswitcher": {
"title": "$:/snippets/paletteswitcher",
"text": "\\define lingo-base() $:/language/ControlPanel/Palette/\n<div class=\"tc-prompt\">\n<<lingo Prompt>> <$view tiddler={{$:/palette}} field=\"name\"/>\n</div>\n\n<$linkcatcher to=\"$:/palette\">\n<div class=\"tc-chooser\"><$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Palette]sort[description]]\"><div class=\"tc-chooser-item\"><$link to={{!!title}}><div><$reveal state=\"$:/palette\" type=\"match\" text={{!!title}}>•</$reveal><$reveal state=\"$:/palette\" type=\"nomatch\" text={{!!title}}> </$reveal> ''<$view field=\"name\" format=\"text\"/>'' - <$view field=\"description\" format=\"text\"/></div><$transclude tiddler=\"$:/snippets/currpalettepreview\"/></$link></div>\n</$list>\n</div>\n</$linkcatcher>"
},
"$:/temp/search": {
"title": "$:/temp/search",
"text": ""
},
"$:/tags/AdvancedSearch": {
"title": "$:/tags/AdvancedSearch",
"list": "[[$:/core/ui/AdvancedSearch/Standard]] [[$:/core/ui/AdvancedSearch/System]] [[$:/core/ui/AdvancedSearch/Shadows]] [[$:/core/ui/AdvancedSearch/Filter]]"
},
"$:/tags/ControlPanel": {
"title": "$:/tags/ControlPanel",
"list": "$:/core/ui/ControlPanel/Info $:/core/ui/ControlPanel/Appearance $:/core/ui/ControlPanel/Settings $:/core/ui/ControlPanel/Saving $:/core/ui/ControlPanel/Plugins $:/core/ui/ControlPanel/Tools $:/core/ui/ControlPanel/Internals"
},
"$:/tags/ControlPanel/Info": {
"title": "$:/tags/ControlPanel/Info",
"list": "$:/core/ui/ControlPanel/Basics $:/core/ui/ControlPanel/Advanced"
},
"$:/tags/ControlPanel/Plugins": {
"title": "$:/tags/ControlPanel/Plugins",
"list": "[[$:/core/ui/ControlPanel/Plugins/Installed]] [[$:/core/ui/ControlPanel/Plugins/Add]]"
},
"$:/tags/EditTemplate": {
"title": "$:/tags/EditTemplate",
"list": "[[$:/core/ui/EditTemplate/controls]] [[$:/core/ui/EditTemplate/title]] [[$:/core/ui/EditTemplate/tags]] [[$:/core/ui/EditTemplate/shadow]] [[$:/core/ui/ViewTemplate/classic]] [[$:/core/ui/EditTemplate/body]] [[$:/core/ui/EditTemplate/type]] [[$:/core/ui/EditTemplate/fields]]"
},
"$:/tags/EditToolbar": {
"title": "$:/tags/EditToolbar",
"list": "[[$:/core/ui/Buttons/delete]] [[$:/core/ui/Buttons/cancel]] [[$:/core/ui/Buttons/save]]"
},
"$:/tags/MoreSideBar": {
"title": "$:/tags/MoreSideBar",
"list": "[[$:/core/ui/MoreSideBar/All]] [[$:/core/ui/MoreSideBar/Recent]] [[$:/core/ui/MoreSideBar/Tags]] [[$:/core/ui/MoreSideBar/Missing]] [[$:/core/ui/MoreSideBar/Drafts]] [[$:/core/ui/MoreSideBar/Orphans]] [[$:/core/ui/MoreSideBar/Types]] [[$:/core/ui/MoreSideBar/System]] [[$:/core/ui/MoreSideBar/Shadows]]",
"text": ""
},
"$:/tags/PageControls": {
"title": "$:/tags/PageControls",
"list": "[[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/fold-all]] [[$:/core/ui/Buttons/unfold-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/new-journal]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/export-page]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/advanced-search]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/palette]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]]"
},
"$:/tags/PageTemplate": {
"title": "$:/tags/PageTemplate",
"list": "[[$:/core/ui/PageTemplate/topleftbar]] [[$:/core/ui/PageTemplate/toprightbar]] [[$:/core/ui/PageTemplate/sidebar]] [[$:/core/ui/PageTemplate/story]] [[$:/core/ui/PageTemplate/alerts]]",
"text": ""
},
"$:/tags/SideBar": {
"title": "$:/tags/SideBar",
"list": "[[$:/core/ui/SideBar/Open]] [[$:/core/ui/SideBar/Recent]] [[$:/core/ui/SideBar/Tools]] [[$:/core/ui/SideBar/More]]",
"text": ""
},
"$:/tags/TiddlerInfo": {
"title": "$:/tags/TiddlerInfo",
"list": "[[$:/core/ui/TiddlerInfo/Tools]] [[$:/core/ui/TiddlerInfo/References]] [[$:/core/ui/TiddlerInfo/Tagging]] [[$:/core/ui/TiddlerInfo/List]] [[$:/core/ui/TiddlerInfo/Listed]] [[$:/core/ui/TiddlerInfo/Fields]]",
"text": ""
},
"$:/tags/TiddlerInfo/Advanced": {
"title": "$:/tags/TiddlerInfo/Advanced",
"list": "[[$:/core/ui/TiddlerInfo/Advanced/ShadowInfo]] [[$:/core/ui/TiddlerInfo/Advanced/PluginInfo]]"
},
"$:/tags/ViewTemplate": {
"title": "$:/tags/ViewTemplate",
"list": "[[$:/core/ui/ViewTemplate/title]] [[$:/core/ui/ViewTemplate/unfold]] [[$:/core/ui/ViewTemplate/subtitle]] [[$:/core/ui/ViewTemplate/tags]] [[$:/core/ui/ViewTemplate/classic]] [[$:/core/ui/ViewTemplate/body]]"
},
"$:/tags/ViewToolbar": {
"title": "$:/tags/ViewToolbar",
"list": "[[$:/core/ui/Buttons/more-tiddler-actions]] [[$:/core/ui/Buttons/info]] [[$:/core/ui/Buttons/new-here]] [[$:/core/ui/Buttons/new-journal-here]] [[$:/core/ui/Buttons/clone]] [[$:/core/ui/Buttons/export-tiddler]] [[$:/core/ui/Buttons/edit]] [[$:/core/ui/Buttons/delete]] [[$:/core/ui/Buttons/permalink]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/open-window]] [[$:/core/ui/Buttons/close-others]] [[$:/core/ui/Buttons/close]] [[$:/core/ui/Buttons/fold-others]] [[$:/core/ui/Buttons/fold]]"
},
"$:/snippets/themeswitcher": {
"title": "$:/snippets/themeswitcher",
"text": "\\define lingo-base() $:/language/ControlPanel/Theme/\n<<lingo Prompt>> <$view tiddler={{$:/theme}} field=\"name\"/>\n\n<$linkcatcher to=\"$:/theme\">\n<$list filter=\"[plugin-type[theme]sort[title]]\"><div><$reveal state=\"$:/theme\" type=\"match\" text={{!!title}}>•</$reveal><$reveal state=\"$:/theme\" type=\"nomatch\" text={{!!title}}> </$reveal> <$link to={{!!title}}>''<$view field=\"name\" format=\"text\"/>'' <$view field=\"description\" format=\"text\"/></$link></div>\n</$list>\n</$linkcatcher>"
},
"$:/core/wiki/title": {
"title": "$:/core/wiki/title",
"type": "text/vnd.tiddlywiki",
"text": "{{$:/SiteTitle}} --- {{$:/SiteSubtitle}}"
},
"$:/view": {
"title": "$:/view",
"text": "classic"
},
"$:/snippets/viewswitcher": {
"title": "$:/snippets/viewswitcher",
"text": "\\define lingo-base() $:/language/ControlPanel/StoryView/\n<<lingo Prompt>> <$select tiddler=\"$:/view\">\n<$list filter=\"[storyviews[]]\">\n<option><$view field=\"title\"/></option>\n</$list>\n</$select>"
}
}
}
[[Organon: Personal Wiki]]
The following tiddlers were imported:
# [[On Sophistical Refutations: 1]]
# [[On Sophistical Refutations: 2]]
# [[On Sophistical Refutations: 3]]
# [[On Sophistical Refutations: 4]]
# [[On Sophistical Refutations: 5]]
# [[On Sophistical Refutations: 6]]
# [[On Sophistical Refutations: 7]]
# [[On Sophistical Refutations: 8]]
# [[On Sophistical Refutations: 9]]
# [[On Sophistical Refutations: 10]]
# [[On Sophistical Refutations: 11]]
# [[On Sophistical Refutations: 12]]
# [[On Sophistical Refutations: 13]]
# [[On Sophistical Refutations: 14]]
# [[On Sophistical Refutations: 15]]
# [[On Sophistical Refutations: 16]]
# [[On Sophistical Refutations: 17]]
# [[On Sophistical Refutations: 18]]
# [[On Sophistical Refutations: 19]]
# [[On Sophistical Refutations: 20]]
# [[On Sophistical Refutations: 21]]
# [[On Sophistical Refutations: 22]]
# [[On Sophistical Refutations: 23]]
# [[On Sophistical Refutations: 24]]
# [[On Sophistical Refutations: 25]]
# [[On Sophistical Refutations: 26]]
# [[On Sophistical Refutations: 27]]
# [[On Sophistical Refutations: 28]]
# [[On Sophistical Refutations: 29]]
# [[On Sophistical Refutations: 30]]
# [[On Sophistical Refutations: 31]]
# [[On Sophistical Refutations: 32]]
# [[On Sophistical Refutations: 33]]
# [[On Sophistical Refutations: 34]]
Personal Wiki of Aristotle's Organon
$:/core/ui/ControlPanel/Basics
$:/core/ui/ControlPanel/Info
{
"tiddlers": {
"$:/info/browser": {
"title": "$:/info/browser",
"text": "yes"
},
"$:/info/node": {
"title": "$:/info/node",
"text": "no"
}
}
}
{
"tiddlers": {
"$:/themes/tiddlywiki/snowwhite/base": {
"title": "$:/themes/tiddlywiki/snowwhite/base",
"tags": "[[$:/tags/Stylesheet]]",
"text": "\\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline\n\n.tc-sidebar-header {\n\ttext-shadow: 0 1px 0 <<colour sidebar-foreground-shadow>>;\n}\n\n.tc-tiddler-info {\n\t<<box-shadow \"inset 1px 2px 3px rgba(0,0,0,0.1)\">>\n}\n\n@media screen {\n\t.tc-tiddler-frame {\n\t\t<<box-shadow \"1px 1px 5px rgba(0, 0, 0, 0.3)\">>\n\t}\n}\n\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\t.tc-tiddler-frame {\n\t\t<<box-shadow none>>\n\t}\n}\n\n.tc-page-controls button svg, .tc-tiddler-controls button svg, .tc-topbar button svg {\n\t<<transition \"fill 150ms ease-in-out\">>\n}\n\n.tc-tiddler-controls button.tc-selected,\n.tc-page-controls button.tc-selected {\n\t<<filter \"drop-shadow(0px -1px 2px rgba(0,0,0,0.25))\">>\n}\n\n.tc-tiddler-frame input.tc-edit-texteditor {\n\t<<box-shadow \"inset 0 1px 8px rgba(0, 0, 0, 0.15)\">>\n}\n\n.tc-edit-tags {\n\t<<box-shadow \"inset 0 1px 8px rgba(0, 0, 0, 0.15)\">>\n}\n\n.tc-tiddler-frame .tc-edit-tags input.tc-edit-texteditor {\n\t<<box-shadow \"none\">>\n\tborder: none;\n\toutline: none;\n}\n\ncanvas.tc-edit-bitmapeditor {\n\t<<box-shadow \"2px 2px 5px rgba(0, 0, 0, 0.5)\">>\n}\n\n.tc-drop-down {\n\tborder-radius: 4px;\n\t<<box-shadow \"2px 2px 10px rgba(0, 0, 0, 0.5)\">>\n}\n\n.tc-block-dropdown {\n\tborder-radius: 4px;\n\t<<box-shadow \"2px 2px 10px rgba(0, 0, 0, 0.5)\">>\n}\n\n.tc-modal {\n\tborder-radius: 6px;\n\t<<box-shadow \"0 3px 7px rgba(0,0,0,0.3)\">>\n}\n\n.tc-modal-footer {\n\tborder-radius: 0 0 6px 6px;\n\t<<box-shadow \"inset 0 1px 0 #fff\">>;\n}\n\n\n.tc-alert {\n\tborder-radius: 6px;\n\t<<box-shadow \"0 3px 7px rgba(0,0,0,0.6)\">>\n}\n\n.tc-notification {\n\tborder-radius: 6px;\n\t<<box-shadow \"0 3px 7px rgba(0,0,0,0.3)\">>\n\ttext-shadow: 0 1px 0 rgba(255,255,255, 0.8);\n}\n\n.tc-sidebar-lists .tc-tab-set .tc-tab-divider {\n\tborder-top: none;\n\theight: 1px;\n\t<<background-linear-gradient \"left, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.0) 100%\">>\n}\n\n.tc-more-sidebar .tc-tab-buttons button {\n\t<<background-linear-gradient \"left, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.1) 100%\">>\n}\n\n.tc-more-sidebar .tc-tab-buttons button.tc-tab-selected {\n\t<<background-linear-gradient \"left, rgba(0,0,0,0.05) 0%, rgba(255,255,255,0.05) 100%\">>\n}\n\n.tc-message-box img {\n\t<<box-shadow \"1px 1px 3px rgba(0,0,0,0.5)\">>\n}\n\n.tc-plugin-info {\n\t<<box-shadow \"1px 1px 3px rgba(0,0,0,0.5)\">>\n}\n"
}
}
}
{
"tiddlers": {
"$:/themes/tiddlywiki/vanilla/themetweaks": {
"title": "$:/themes/tiddlywiki/vanilla/themetweaks",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "Theme Tweaks",
"text": "\\define backgroundimage-dropdown()\n<div class=\"tc-drop-down-wrapper\">\n<$button popup=<<qualify \"$:/state/popup/themetweaks/backgroundimage\">> class=\"tc-btn-invisible tc-btn-dropdown\">{{$:/core/images/down-arrow}}</$button>\n<$reveal state=<<qualify \"$:/state/popup/themetweaks/backgroundimage\">> type=\"popup\" position=\"belowleft\" text=\"\" default=\"\">\n<div class=\"tc-drop-down\">\n<$linkcatcher to=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimage\">\n<$link to=\"\">\n(none)\n</$link>\n<hr>\n<$list filter=\"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[sort[title]]\">\n<$link to={{!!title}}>\n<$transclude/> <$view field=\"title\"/>\n</$link>\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>\n</div>\n\\end\n\n\\define backgroundimageattachment-dropdown()\n<$select tiddler=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment\" default=\"scroll\">\n<option value=\"scroll\">Scroll with tiddlers</option>\n<option value=\"fixed\">Fixed to window</option>\n</$select>\n\\end\n\n\\define backgroundimagesize-dropdown()\n<$select tiddler=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize\" default=\"scroll\">\n<option value=\"auto\">Auto</option>\n<option value=\"cover\">Cover</option>\n<option value=\"contain\">Contain</option>\n</$select>\n\\end\n\nYou can tweak certain aspects of the ''Vanilla'' theme.\n\n! Options\n\n|[[Sidebar layout|$:/themes/tiddlywiki/vanilla/options/sidebarlayout]] |<$select tiddler=\"$:/themes/tiddlywiki/vanilla/options/sidebarlayout\"><option value=\"fixed-fluid\">Fixed story, fluid sidebar</option><option value=\"fluid-fixed\">Fluid story, fixed sidebar</option></$select> |\n|[[Sticky titles|$:/themes/tiddlywiki/vanilla/options/stickytitles]]<br>//Causes tiddler titles to \"stick\" to the top of the browser window. Caution: Does not work at all with Chrome, and causes some layout issues in Firefox// |<$select tiddler=\"$:/themes/tiddlywiki/vanilla/options/stickytitles\"><option value=\"no\">No</option><option value=\"yes\">Yes</option></$select> |\n\n! Settings\n\n|[[Font family|$:/themes/tiddlywiki/vanilla/settings/fontfamily]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/settings/fontfamily\" default=\"\" tag=\"input\"/> | |\n|[[Code font family|$:/themes/tiddlywiki/vanilla/settings/codefontfamily]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/settings/codefontfamily\" default=\"\" tag=\"input\"/> | |\n|[[Page background image|$:/themes/tiddlywiki/vanilla/settings/backgroundimage]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimage\" default=\"\" tag=\"input\"/> |<<backgroundimage-dropdown>> |\n|[[Page background image attachment |$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment]] |<<backgroundimageattachment-dropdown>> | |\n|[[Page background image size |$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize]] |<<backgroundimagesize-dropdown>> | |\n\n! Sizes\n\n|[[Font size|$:/themes/tiddlywiki/vanilla/metrics/fontsize]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/fontsize\" default=\"\" tag=\"input\"/> |\n|[[Line height|$:/themes/tiddlywiki/vanilla/metrics/lineheight]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/lineheight\" default=\"\" tag=\"input\"/> |\n|[[Font size for tiddler body|$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize\" default=\"\" tag=\"input\"/> |\n|[[Line height for tiddler body|$:/themes/tiddlywiki/vanilla/metrics/bodylineheight]] |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/bodylineheight\" default=\"\" tag=\"input\"/> |\n|[[Story left position|$:/themes/tiddlywiki/vanilla/metrics/storyleft]]<br>//how far the left margin of the story river<br>(tiddler area) is from the left of the page// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/storyleft\" default=\"\" tag=\"input\"/> |\n|[[Story top position|$:/themes/tiddlywiki/vanilla/metrics/storytop]]<br>//how far the top margin of the story river<br>is from the top of the page// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/storytop\" default=\"\" tag=\"input\"/> |\n|[[Story right|$:/themes/tiddlywiki/vanilla/metrics/storyright]]<br>//how far the left margin of the sidebar <br>is from the left of the page// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/storyright\" default=\"\" tag=\"input\"/> |\n|[[Story width|$:/themes/tiddlywiki/vanilla/metrics/storywidth]]<br>//the overall width of the story river// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/storywidth\" default=\"\" tag=\"input\"/> |\n|[[Tiddler width|$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth]]<br>//within the story river//<br> |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth\" default=\"\" tag=\"input\"/> |\n|[[Sidebar breakpoint|$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint]]<br>//the minimum page width at which the story<br>river and sidebar will appear side by side// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint\" default=\"\" tag=\"input\"/> |\n|[[Sidebar width|$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth]]<br>//the width of the sidebar in fluid-fixed layout// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth\" default=\"\" tag=\"input\"/> |\n"
},
"$:/themes/tiddlywiki/vanilla/base": {
"title": "$:/themes/tiddlywiki/vanilla/base",
"tags": "[[$:/tags/Stylesheet]]",
"text": "\\define custom-background-datauri()\n<$set name=\"background\" value={{$:/themes/tiddlywiki/vanilla/settings/backgroundimage}}>\n<$list filter=\"[<background>is[image]]\">\n`background: url(`\n<$list filter=\"[<background>!has[_canonical_uri]]\">\n<$macrocall $name=\"datauri\" title={{$:/themes/tiddlywiki/vanilla/settings/backgroundimage}}/>\n</$list>\n<$list filter=\"[<background>has[_canonical_uri]]\">\n<$view tiddler={{$:/themes/tiddlywiki/vanilla/settings/backgroundimage}} field=\"_canonical_uri\"/>\n</$list>\n`) center center;`\n`background-attachment: `{{$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment}}`;\n-webkit-background-size:` {{$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize}}`;\n-moz-background-size:` {{$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize}}`;\n-o-background-size:` {{$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize}}`;\nbackground-size:` {{$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize}}`;`\n</$list>\n</$set>\n\\end\n\n\\define if-fluid-fixed(text,hiddenSidebarText)\n<$reveal state=\"$:/themes/tiddlywiki/vanilla/options/sidebarlayout\" type=\"match\" text=\"fluid-fixed\">\n$text$\n<$reveal state=\"$:/state/sidebar\" type=\"nomatch\" text=\"yes\" default=\"yes\">\n$hiddenSidebarText$\n</$reveal>\n</$reveal>\n\\end\n\n\\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock\n\n/*\n** Start with the normalize CSS reset, and then belay some of its effects\n*/\n\n{{$:/themes/tiddlywiki/vanilla/reset}}\n\n*, input[type=\"search\"] {\n\tbox-sizing: border-box;\n\t-moz-box-sizing: border-box;\n\t-webkit-box-sizing: border-box;\n}\n\nhtml button {\n\tline-height: 1.2;\n\tcolor: <<colour button-foreground>>;\n\tbackground: <<colour button-background>>;\n\tborder-color: <<colour button-border>>;\n}\n\n/*\n** Basic element styles\n*/\n\nhtml {\n\tfont-family: {{$:/themes/tiddlywiki/vanilla/settings/fontfamily}};\n\ttext-rendering: optimizeLegibility; /* Enables kerning and ligatures etc. */\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n}\n\nhtml:-webkit-full-screen {\n\tbackground-color: <<colour page-background>>;\n}\n\nbody.tc-body {\n\tfont-size: {{$:/themes/tiddlywiki/vanilla/metrics/fontsize}};\n\tline-height: {{$:/themes/tiddlywiki/vanilla/metrics/lineheight}};\n\tcolor: <<colour foreground>>;\n\tbackground-color: <<colour page-background>>;\n\tfill: <<colour foreground>>;\n\tword-wrap: break-word;\n\t<<custom-background-datauri>>\n}\n\nh1, h2, h3, h4, h5, h6 {\n\tline-height: 1.2;\n\tfont-weight: 300;\n}\n\npre {\n\tdisplay: block;\n\tpadding: 14px;\n\tmargin-top: 1em;\n\tmargin-bottom: 1em;\n\tword-break: normal;\n\tword-wrap: break-word;\n\twhite-space: pre;\n\twhite-space: pre-wrap;\n\tbackground-color: <<colour pre-background>>;\n\tborder: 1px solid <<colour pre-border>>;\n\tpadding: 0 3px 2px;\n\tborder-radius: 3px;\n\tfont-family: {{$:/themes/tiddlywiki/vanilla/settings/codefontfamily}};\n}\n\ncode {\n\tcolor: <<colour code-foreground>>;\n\tbackground-color: <<colour code-background>>;\n\tborder: 1px solid <<colour code-border>>;\n white-space: pre-wrap;\n\tpadding: 0 3px 2px;\n\tborder-radius: 3px;\n\tfont-family: {{$:/themes/tiddlywiki/vanilla/settings/codefontfamily}};\n}\n\nblockquote {\n\tborder-left: 5px solid <<colour blockquote-bar>>;\n\tmargin-left: 25px;\n\tpadding-left: 10px;\n}\n\ndl dt {\n\tfont-weight: bold;\n\tmargin-top: 6px;\n}\n\ntextarea,\ninput[type=text],\ninput[type=search],\ninput[type=\"\"],\ninput:not([type]) {\n\tcolor: <<colour foreground>>;\n\tbackground: <<colour background>>;\n}\n\n.tc-muted {\n\tcolor: <<colour muted-foreground>>;\n}\n\nsvg.tc-image-button {\n\tpadding: 0px 1px 1px 0px;\n}\n\nkbd {\n\tdisplay: inline-block;\n\tpadding: 3px 5px;\n\tfont-size: 0.8em;\n\tline-height: 1.2;\n\tcolor: <<colour foreground>>;\n\tvertical-align: middle;\n\tbackground-color: <<colour background>>;\n\tborder: solid 1px <<colour muted-foreground>>;\n\tborder-bottom-color: <<colour muted-foreground>>;\n\tborder-radius: 3px;\n\tbox-shadow: inset 0 -1px 0 <<colour muted-foreground>>;\n}\n\n/*\nMarkdown likes putting code elements inside pre elements\n*/\npre > code {\n\tpadding: 0;\n\tborder: none;\n\tbackground-color: inherit;\n\tcolor: inherit;\n}\n\ntable {\n\tborder: 1px solid <<colour table-border>>;\n\twidth: auto;\n\tmax-width: 100%;\n\tcaption-side: bottom;\n\tmargin-top: 1em;\n\tmargin-bottom: 1em;\n}\n\ntable th, table td {\n\tpadding: 0 7px 0 7px;\n\tborder-top: 1px solid <<colour table-border>>;\n\tborder-left: 1px solid <<colour table-border>>;\n}\n\ntable thead tr td, table th {\n\tbackground-color: <<colour table-header-background>>;\n\tfont-weight: bold;\n}\n\ntable tfoot tr td {\n\tbackground-color: <<colour table-footer-background>>;\n}\n\n.tc-csv-table {\n\twhite-space: nowrap;\n}\n\n.tc-tiddler-frame img,\n.tc-tiddler-frame svg,\n.tc-tiddler-frame canvas,\n.tc-tiddler-frame embed,\n.tc-tiddler-frame iframe {\n\tmax-width: 100%;\n}\n\n.tc-tiddler-body > embed,\n.tc-tiddler-body > iframe {\n\twidth: 100%;\n\theight: 600px;\n}\n\n/*\n** Links\n*/\n\nbutton.tc-tiddlylink,\na.tc-tiddlylink {\n\ttext-decoration: none;\n\tfont-weight: normal;\n\tcolor: <<colour tiddler-link-foreground>>;\n\t-webkit-user-select: inherit; /* Otherwise the draggable attribute makes links impossible to select */\n}\n\n.tc-sidebar-lists a.tc-tiddlylink {\n\tcolor: <<colour sidebar-tiddler-link-foreground>>;\n}\n\n.tc-sidebar-lists a.tc-tiddlylink:hover {\n\tcolor: <<colour sidebar-tiddler-link-foreground-hover>>;\n}\n\nbutton.tc-tiddlylink:hover,\na.tc-tiddlylink:hover {\n\ttext-decoration: underline;\n}\n\na.tc-tiddlylink-resolves {\n}\n\na.tc-tiddlylink-shadow {\n\tfont-weight: bold;\n}\n\na.tc-tiddlylink-shadow.tc-tiddlylink-resolves {\n\tfont-weight: normal;\n}\n\na.tc-tiddlylink-missing {\n\tfont-style: italic;\n}\n\na.tc-tiddlylink-external {\n\ttext-decoration: underline;\n\tcolor: <<colour external-link-foreground>>;\n\tbackground-color: <<colour external-link-background>>;\n}\n\na.tc-tiddlylink-external:visited {\n\tcolor: <<colour external-link-foreground-visited>>;\n\tbackground-color: <<colour external-link-background-visited>>;\n}\n\na.tc-tiddlylink-external:hover {\n\tcolor: <<colour external-link-foreground-hover>>;\n\tbackground-color: <<colour external-link-background-hover>>;\n}\n\n/*\n** Drag and drop styles\n*/\n\n.tc-tiddler-dragger {\n\tposition: relative;\n\tz-index: -10000;\n}\n\n.tc-tiddler-dragger-inner {\n\tposition: absolute;\n\tdisplay: inline-block;\n\tpadding: 8px 20px;\n\tfont-size: 16.9px;\n\tfont-weight: bold;\n\tline-height: 20px;\n\tcolor: <<colour dragger-foreground>>;\n\ttext-shadow: 0 1px 0 rgba(0, 0, 0, 1);\n\twhite-space: nowrap;\n\tvertical-align: baseline;\n\tbackground-color: <<colour dragger-background>>;\n\tborder-radius: 20px;\n}\n\n.tc-tiddler-dragger-cover {\n\tposition: absolute;\n\tbackground-color: <<colour page-background>>;\n}\n\n.tc-dropzone {\n\tposition: relative;\n}\n\n.tc-dropzone.tc-dragover:before {\n\tz-index: 10000;\n\tdisplay: block;\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbackground: <<colour dropzone-background>>;\n\ttext-align: center;\n\tcontent: \"<<lingo DropMessage>>\";\n}\n\n/*\n** Plugin reload warning\n*/\n\n.tc-plugin-reload-warning {\n\tz-index: 1000;\n\tdisplay: block;\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbackground: <<colour alert-background>>;\n\ttext-align: center;\n}\n\n/*\n** Buttons\n*/\n\nbutton svg, button img {\n\tvertical-align: middle;\n}\n\n.tc-btn-invisible {\n\tpadding: 0;\n\tmargin: 0;\n\tbackground: none;\n\tborder: none;\n}\n\n.tc-btn-boxed {\n\tfont-size: 0.6em;\n\tpadding: 0.2em;\n\tmargin: 1px;\n\tbackground: none;\n\tborder: 1px solid <<colour tiddler-controls-foreground>>;\n\tborder-radius: 0.25em;\n}\n\nhtml body.tc-body .tc-btn-boxed svg {\n\tfont-size: 1.6666em;\n}\n\n.tc-btn-boxed:hover {\n\tbackground: <<colour muted-foreground>>;\n\tcolor: <<colour background>>;\n}\n\nhtml body.tc-body .tc-btn-boxed:hover svg {\n\tfill: <<colour background>>;\n}\n\n.tc-btn-rounded {\n\tfont-size: 0.5em;\n\tline-height: 2;\n\tpadding: 0em 0.3em 0.2em 0.4em;\n\tmargin: 1px;\n\tborder: 1px solid <<colour muted-foreground>>;\n\tbackground: <<colour muted-foreground>>;\n\tcolor: <<colour background>>;\n\tborder-radius: 2em;\n}\n\nhtml body.tc-body .tc-btn-rounded svg {\n\tfont-size: 1.6666em;\n\tfill: <<colour background>>;\n}\n\n.tc-btn-rounded:hover {\n\tborder: 1px solid <<colour muted-foreground>>;\n\tbackground: <<colour background>>;\n\tcolor: <<colour muted-foreground>>;\n}\n\nhtml body.tc-body .tc-btn-rounded:hover svg {\n\tfill: <<colour muted-foreground>>;\n}\n\n.tc-btn-icon svg {\n\theight: 1em;\n\twidth: 1em;\n\tfill: <<colour muted-foreground>>;\n}\n\n.tc-btn-text {\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.tc-btn-big-green {\n\tdisplay: inline-block;\n\tpadding: 8px;\n\tmargin: 4px 8px 4px 8px;\n\tbackground: <<colour download-background>>;\n\tcolor: <<colour download-foreground>>;\n\tfill: <<colour download-foreground>>;\n\tborder: none;\n\tfont-size: 1.2em;\n\tline-height: 1.4em;\n\ttext-decoration: none;\n}\n\n.tc-btn-big-green svg,\n.tc-btn-big-green img {\n\theight: 2em;\n\twidth: 2em;\n\tvertical-align: middle;\n\tfill: <<colour download-foreground>>;\n}\n\n.tc-sidebar-lists input {\n\tcolor: <<colour foreground>>;\n}\n\n.tc-sidebar-lists button {\n\tcolor: <<colour sidebar-button-foreground>>;\n\tfill: <<colour sidebar-button-foreground>>;\n}\n\n.tc-sidebar-lists button.tc-btn-mini {\n\tcolor: <<colour sidebar-muted-foreground>>;\n}\n\n.tc-sidebar-lists button.tc-btn-mini:hover {\n\tcolor: <<colour sidebar-muted-foreground-hover>>;\n}\n\nbutton svg.tc-image-button, button .tc-image-button img {\n\theight: 1em;\n\twidth: 1em;\n}\n\n.tc-unfold-banner {\n\tposition: absolute;\n\tpadding: 0;\n\tmargin: 0;\n\tbackground: none;\n\tborder: none;\n\twidth: 100%;\n width: calc(100% + 2px);\n margin-left: -43px;\n\ttext-align: center;\n\tborder-top: 2px solid <<colour tiddler-info-background>>;\n\tmargin-top: 4px;\n}\n\n.tc-unfold-banner:hover {\n\tbackground: <<colour tiddler-info-background>>;\n\tborder-top: 2px solid <<colour tiddler-info-border>>;\n}\n\n.tc-unfold-banner svg, .tc-fold-banner svg {\n\theight: 0.75em;\n\tfill: <<colour tiddler-controls-foreground>>;\n}\n\n.tc-unfold-banner:hover svg, .tc-fold-banner:hover svg {\n\tfill: <<colour tiddler-controls-foreground-hover>>;\n}\n\n.tc-fold-banner {\n\tposition: absolute;\n\tpadding: 0;\n\tmargin: 0;\n\tbackground: none;\n\tborder: none;\n\twidth: 23px;\n\ttext-align: center;\n\tmargin-left: -35px;\n top: 6px;\n bottom: 6px;\n}\n\n.tc-fold-banner:hover {\n\tbackground: <<colour tiddler-info-background>>;\n}\n\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\t\n\t.tc-unfold-banner {\n\t\tposition: static;\n\t width: calc(100% + 59px);\n }\n\n\t.tc-fold-banner {\n\t\twidth: 16px;\n\t\tmargin-left: -16px;\n\t font-size: 0.75em;\n\t}\n\n}\n\n/*\n** Tags and missing tiddlers\n*/\n\n.tc-tag-list-item {\n\tposition: relative;\n\tdisplay: inline-block;\n\tmargin-right: 7px;\n}\n\n.tc-tags-wrapper {\n\tmargin: 4px 0 14px 0;\n}\n\n.tc-missing-tiddler-label {\n\tfont-style: italic;\n\tfont-weight: normal;\n\tdisplay: inline-block;\n\tfont-size: 11.844px;\n\tline-height: 14px;\n\twhite-space: nowrap;\n\tvertical-align: baseline;\n}\n\nbutton.tc-tag-label, span.tc-tag-label {\n\tdisplay: inline-block;\n\tpadding: 0.16em 0.7em;\n\tfont-size: 0.9em;\n\tfont-weight: 300;\n\tline-height: 1.2em;\n\tcolor: <<colour tag-foreground>>;\n\twhite-space: nowrap;\n\tvertical-align: baseline;\n\tbackground-color: <<colour tag-background>>;\n\tborder-radius: 1em;\n}\n\n.tc-untagged-separator {\n\twidth: 10em;\n\tleft: 0;\n\tmargin-left: 0;\n\tborder: 0;\n\theight: 1px;\n\tbackground: <<colour tab-divider>>;\n}\n\nbutton.tc-untagged-label {\n\tbackground-color: <<colour untagged-background>>;\n}\n\n.tc-tag-label svg, .tc-tag-label img {\n\theight: 1em;\n\twidth: 1em;\n\tfill: <<colour tag-foreground>>;\n}\n\n.tc-tag-manager-table .tc-tag-label {\n\twhite-space: normal;\n}\n\n.tc-tag-manager-tag {\n\twidth: 100%;\n}\n\n/*\n** Page layout\n*/\n\n.tc-topbar {\n\tposition: fixed;\n\tz-index: 1200;\n}\n\n.tc-topbar-left {\n\tleft: 29px;\n\ttop: 5px;\n}\n\n.tc-topbar-right {\n\ttop: 5px;\n\tright: 29px;\n}\n\n.tc-topbar button {\n\tpadding: 8px;\n}\n\n.tc-topbar svg {\n\tfill: <<colour muted-foreground>>;\n}\n\n.tc-topbar button:hover svg {\n\tfill: <<colour foreground>>;\n}\n\n.tc-sidebar-header {\n\tcolor: <<colour sidebar-foreground>>;\n\tfill: <<colour sidebar-foreground>>;\n}\n\n.tc-sidebar-header .tc-title a.tc-tiddlylink-resolves {\n\tfont-weight: 300;\n}\n\n.tc-sidebar-header .tc-sidebar-lists p {\n\tmargin-top: 3px;\n\tmargin-bottom: 3px;\n}\n\n.tc-sidebar-header .tc-missing-tiddler-label {\n\tcolor: <<colour sidebar-foreground>>;\n}\n\n.tc-advanced-search input {\n\twidth: 60%;\n}\n\n.tc-search a svg {\n\twidth: 1.2em;\n\theight: 1.2em;\n\tvertical-align: middle;\n}\n\n.tc-page-controls {\n\tmargin-top: 14px;\n\tfont-size: 1.5em;\n}\n\n.tc-page-controls button {\n\tmargin-right: 0.5em;\n}\n\n.tc-page-controls a.tc-tiddlylink:hover {\n\ttext-decoration: none;\n}\n\n.tc-page-controls img {\n\twidth: 1em;\n}\n\n.tc-page-controls svg {\n\tfill: <<colour sidebar-controls-foreground>>;\n}\n\n.tc-page-controls button:hover svg, .tc-page-controls a:hover svg {\n\tfill: <<colour sidebar-controls-foreground-hover>>;\n}\n\n.tc-menu-list-item {\n\twhite-space: nowrap;\n}\n\n.tc-menu-list-count {\n\tfont-weight: bold;\n}\n\n.tc-menu-list-subitem {\n\tpadding-left: 7px;\n}\n\n.tc-story-river {\n\tposition: relative;\n}\n\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\n\t.tc-sidebar-header {\n\t\tpadding: 14px;\n\t\tmin-height: 32px;\n\t\tmargin-top: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}};\n\t}\n\n\t.tc-story-river {\n\t\tposition: relative;\n\t\tpadding: 0;\n\t}\n}\n\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\n\t.tc-message-box {\n\t\tmargin: 21px -21px 21px -21px;\n\t}\n\n\t.tc-sidebar-scrollable {\n\t\tposition: fixed;\n\t\ttop: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}};\n\t\tleft: {{$:/themes/tiddlywiki/vanilla/metrics/storyright}};\n\t\tbottom: 0;\n\t\tright: 0;\n\t\toverflow-y: auto;\n\t\toverflow-x: auto;\n\t\t-webkit-overflow-scrolling: touch;\n\t\tmargin: 0 0 0 -42px;\n\t\tpadding: 71px 0 28px 42px;\n\t}\n\n\t.tc-story-river {\n\t\tposition: relative;\n\t\tleft: {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}};\n\t\ttop: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}};\n\t\twidth: {{$:/themes/tiddlywiki/vanilla/metrics/storywidth}};\n\t\tpadding: 42px 42px 42px 42px;\n\t}\n\n<<if-no-sidebar \"\n\n\t.tc-story-river {\n\t\twidth: auto;\n\t}\n\n\">>\n\n}\n\n@media print {\n\n\tbody.tc-body {\n\t\tbackground-color: transparent;\n\t}\n\n\t.tc-sidebar-header, .tc-topbar {\n\t\tdisplay: none;\n\t}\n\n\t.tc-story-river {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\t.tc-story-river .tc-tiddler-frame {\n\t\tmargin: 0;\n\t\tborder: none;\n\t\tpadding: 28px;\n\t}\n}\n\n/*\n** Tiddler styles\n*/\n\n.tc-tiddler-frame {\n\tposition: relative;\n\tmargin-bottom: 28px;\n\tbackground-color: <<colour tiddler-background>>;\n\tborder: 1px solid <<colour tiddler-border>>;\n}\n\n{{$:/themes/tiddlywiki/vanilla/sticky}}\n\n.tc-tiddler-info {\n\tpadding: 14px 42px 14px 42px;\n\tbackground-color: <<colour tiddler-info-background>>;\n\tborder-top: 1px solid <<colour tiddler-info-border>>;\n\tborder-bottom: 1px solid <<colour tiddler-info-border>>;\n}\n\n.tc-tiddler-info p {\n\tmargin-top: 3px;\n\tmargin-bottom: 3px;\n}\n\n.tc-tiddler-info .tc-tab-buttons button.tc-tab-selected {\n\tbackground-color: <<colour tiddler-info-tab-background>>;\n\tborder-bottom: 1px solid <<colour tiddler-info-tab-background>>;\n}\n\n.tc-view-field-table {\n\twidth: 100%;\n}\n\n.tc-view-field-name {\n\twidth: 1%; /* Makes this column be as narrow as possible */\n\ttext-align: right;\n\tfont-style: italic;\n\tfont-weight: 200;\n}\n\n.tc-view-field-value {\n}\n\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\t.tc-tiddler-frame {\n\t\tpadding: 14px 14px 14px 14px;\n\t}\n\n\t.tc-tiddler-info {\n\t\tmargin: 0 -14px 0 -14px;\n\t}\n}\n\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\t.tc-tiddler-frame {\n\t\tpadding: 28px 42px 42px 42px;\n\t\twidth: {{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}};\n\t\tborder-radius: 2px;\n\t}\n\n<<if-no-sidebar \"\n\n\t.tc-tiddler-frame {\n\t\twidth: 100%;\n\t}\n\n\">>\n\n\t.tc-tiddler-info {\n\t\tmargin: 0 -42px 0 -42px;\n\t}\n}\n\n.tc-site-title,\n.tc-titlebar {\n\tfont-weight: 300;\n\tfont-size: 2.35em;\n\tline-height: 1.2em;\n\tcolor: <<colour tiddler-title-foreground>>;\n\tmargin: 0;\n}\n\n.tc-site-title {\n\tcolor: <<colour site-title-foreground>>;\n}\n\n.tc-tiddler-title-icon {\n\tvertical-align: middle;\n}\n\n.tc-system-title-prefix {\n\tcolor: <<colour muted-foreground>>;\n}\n\n.tc-titlebar h2 {\n\tfont-size: 1em;\n\tdisplay: inline;\n}\n\n.tc-titlebar img {\n\theight: 1em;\n}\n\n.tc-subtitle {\n\tfont-size: 0.9em;\n\tcolor: <<colour tiddler-subtitle-foreground>>;\n\tfont-weight: 300;\n}\n\n.tc-tiddler-missing .tc-title {\n font-style: italic;\n font-weight: normal;\n}\n\n.tc-tiddler-frame .tc-tiddler-controls {\n\tfloat: right;\n}\n\n.tc-tiddler-controls .tc-drop-down {\n\tfont-size: 0.6em;\n}\n\n.tc-tiddler-controls .tc-drop-down .tc-drop-down {\n\tfont-size: 1em;\n}\n\n.tc-tiddler-controls > span > button {\n\tvertical-align: baseline;\n\tmargin-left:5px;\n}\n\n.tc-tiddler-controls button svg, .tc-tiddler-controls button img,\n.tc-search button svg, .tc-search a svg {\n\theight: 0.75em;\n\tfill: <<colour tiddler-controls-foreground>>;\n}\n\n.tc-tiddler-controls button.tc-selected svg,\n.tc-page-controls button.tc-selected svg {\n\tfill: <<colour tiddler-controls-foreground-selected>>;\n}\n\n.tc-tiddler-controls button.tc-btn-invisible:hover svg,\n.tc-search button:hover svg, .tc-search a:hover svg {\n\tfill: <<colour tiddler-controls-foreground-hover>>;\n}\n\n@media print {\n\t.tc-tiddler-controls {\n\t\tdisplay: none;\n\t}\n}\n\n.tc-tiddler-help { /* Help prompts within tiddler template */\n\tcolor: <<colour muted-foreground>>;\n\tmargin-top: 14px;\n}\n\n.tc-tiddler-help a.tc-tiddlylink {\n\tcolor: <<colour very-muted-foreground>>;\n}\n\n.tc-tiddler-frame input.tc-edit-texteditor, .tc-tiddler-frame textarea.tc-edit-texteditor {\n\twidth: 100%;\n\tpadding: 3px 3px 3px 3px;\n\tborder: 1px solid <<colour tiddler-editor-border>>;\n\tline-height: 1.3em;\n\t-webkit-appearance: none;\n\tmargin: 4px 0 4px 0;\n}\n\n.tc-tiddler-frame .tc-binary-warning {\n\twidth: 100%;\n\theight: 5em;\n\ttext-align: center;\n\tpadding: 3em 3em 6em 3em;\n\tbackground: <<colour alert-background>>;\n\tborder: 1px solid <<colour alert-border>>;\n}\n\n.tc-tiddler-frame input.tc-edit-texteditor {\n\tbackground-color: <<colour tiddler-editor-background>>;\n}\n\ncanvas.tc-edit-bitmapeditor {\n\tborder: 6px solid <<colour tiddler-editor-border-image>>;\n\tcursor: crosshair;\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tmargin-top: 6px;\n\tmargin-bottom: 6px;\n}\n\n.tc-edit-bitmapeditor-width {\n\tdisplay: block;\n}\n\n.tc-edit-bitmapeditor-height {\n\tdisplay: block;\n}\n\n.tc-tiddler-body {\n\tclear: both;\n}\n\n.tc-tiddler-frame .tc-tiddler-body {\n\tfont-size: {{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize}};\n\tline-height: {{$:/themes/tiddlywiki/vanilla/metrics/bodylineheight}};\n}\n\n.tc-titlebar, .tc-tiddler-edit-title {\n\toverflow: hidden; /* https://github.com/Jermolene/TiddlyWiki5/issues/282 */\n}\n\nhtml body.tc-body.tc-single-tiddler-window {\n\tmargin: 1em;\n\tbackground: <<colour tiddler-background>>;\n}\n\n.tc-single-tiddler-window img,\n.tc-single-tiddler-window svg,\n.tc-single-tiddler-window canvas,\n.tc-single-tiddler-window embed,\n.tc-single-tiddler-window iframe {\n\tmax-width: 100%;\n}\n\n/*\n** Adjustments for fluid-fixed mode\n*/\n\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\n<<if-fluid-fixed text:\"\"\"\n\n\t.tc-story-river {\n\t\tpadding-right: 0;\n\t\tposition: relative;\n\t\twidth: auto;\n\t\tleft: 0;\n\t\tmargin-left: {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}};\n\t\tmargin-right: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}};\n\t}\n\n\t.tc-tiddler-frame {\n\t\twidth: 100%;\n\t}\n\n\t.tc-sidebar-scrollable {\n\t\tleft: auto;\n\t\tbottom: 0;\n\t\tright: 0;\n\t\twidth: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}};\n\t}\n\n\tbody.tc-body .tc-storyview-zoomin-tiddler {\n\t\twidth: 100%;\n\t\twidth: calc(100% - 42px);\n\t}\n\n\"\"\" hiddenSidebarText:\"\"\"\n\n\t.tc-story-river {\n\t\tpadding-right: 3em;\n\t\tmargin-right: 0;\n\t}\n\n\tbody.tc-body .tc-storyview-zoomin-tiddler {\n\t\twidth: 100%;\n\t\twidth: calc(100% - 84px);\n\t}\n\n\"\"\">>\n\n}\n\n/*\n** Toolbar buttons\n*/\n\n.tc-page-controls svg.tc-image-new-button {\n fill: <<colour toolbar-new-button>>;\n}\n\n.tc-page-controls svg.tc-image-options-button {\n fill: <<colour toolbar-options-button>>;\n}\n\n.tc-page-controls svg.tc-image-save-button {\n fill: <<colour toolbar-save-button>>;\n}\n\n.tc-tiddler-controls button svg.tc-image-info-button {\n fill: <<colour toolbar-info-button>>;\n}\n\n.tc-tiddler-controls button svg.tc-image-edit-button {\n fill: <<colour toolbar-edit-button>>;\n}\n\n.tc-tiddler-controls button svg.tc-image-close-button {\n fill: <<colour toolbar-close-button>>;\n}\n\n.tc-tiddler-controls button svg.tc-image-delete-button {\n fill: <<colour toolbar-delete-button>>;\n}\n\n.tc-tiddler-controls button svg.tc-image-cancel-button {\n fill: <<colour toolbar-cancel-button>>;\n}\n\n.tc-tiddler-controls button svg.tc-image-done-button {\n fill: <<colour toolbar-done-button>>;\n}\n\n/*\n** Tiddler edit mode\n*/\n\n.tc-tiddler-edit-frame em.tc-edit {\n\tcolor: <<colour muted-foreground>>;\n\tfont-style: normal;\n}\n\n.tc-edit-type-dropdown a.tc-tiddlylink-missing {\n\tfont-style: normal;\n}\n\n.tc-edit-tags {\n\tborder: 1px solid <<colour tiddler-editor-border>>;\n\tpadding: 4px 8px 4px 8px;\n}\n\n.tc-edit-add-tag {\n\tdisplay: inline-block;\n}\n\n.tc-edit-add-tag .tc-add-tag-name input {\n\twidth: 50%;\n}\n\n.tc-edit-tags .tc-tag-label {\n\tdisplay: inline-block;\n}\n\n.tc-edit-tags-list {\n\tmargin: 14px 0 14px 0;\n}\n\n.tc-remove-tag-button {\n\tpadding-left: 4px;\n}\n\n.tc-tiddler-preview {\n\toverflow: auto;\n}\n\n.tc-tiddler-preview-preview {\n\tfloat: right;\n\twidth: 48%;\n\tborder: 1px solid <<colour tiddler-editor-border>>;\n\tmargin: 4px 3px 3px 3px;\n\tpadding: 3px 3px 3px 3px;\n}\n\n.tc-tiddler-preview-edit {\n\twidth: 48%;\n}\n\n.tc-edit-fields {\n\twidth: 100%;\n}\n\n\n.tc-edit-fields table, .tc-edit-fields tr, .tc-edit-fields td {\n\tborder: none;\n\tpadding: 4px;\n}\n\n.tc-edit-fields > tbody > .tc-edit-field:nth-child(odd) {\n\tbackground-color: <<colour tiddler-editor-fields-odd>>;\n}\n\n.tc-edit-fields > tbody > .tc-edit-field:nth-child(even) {\n\tbackground-color: <<colour tiddler-editor-fields-even>>;\n}\n\n.tc-edit-field-name {\n\ttext-align: right;\n}\n\n.tc-edit-field-value input {\n\twidth: 100%;\n}\n\n.tc-edit-field-remove {\n}\n\n.tc-edit-field-remove svg {\n\theight: 1em;\n\twidth: 1em;\n\tfill: <<colour muted-foreground>>;\n\tvertical-align: middle;\n}\n\n.tc-edit-field-add-name {\n\tdisplay: inline-block;\n\twidth: 15%;\n}\n\n.tc-edit-field-add-value {\n\tdisplay: inline-block;\n\twidth: 40%;\n}\n\n.tc-edit-field-add-button {\n\tdisplay: inline-block;\n\twidth: 10%;\n}\n\n/*\n** Storyview Classes\n*/\n\n.tc-storyview-zoomin-tiddler {\n\tposition: absolute;\n\tdisplay: block;\n\twidth: 100%;\n}\n\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\n\t.tc-storyview-zoomin-tiddler {\n\t\twidth: calc(100% - 84px);\n\t}\n\n}\n\n/*\n** Dropdowns\n*/\n\n.tc-btn-dropdown {\n\ttext-align: left;\n}\n\n.tc-btn-dropdown svg, .tc-btn-dropdown img {\n\theight: 1em;\n\twidth: 1em;\n\tfill: <<colour muted-foreground>>;\n}\n\n.tc-drop-down-wrapper {\n\tposition: relative;\n}\n\n.tc-drop-down {\n\tmin-width: 380px;\n\tborder: 1px solid <<colour dropdown-border>>;\n\tbackground-color: <<colour dropdown-background>>;\n\tpadding: 7px 0 7px 0;\n\tmargin: 4px 0 0 0;\n\twhite-space: nowrap;\n\ttext-shadow: none;\n\tline-height: 1.4;\n}\n\n.tc-drop-down .tc-drop-down {\n\tmargin-left: 14px;\n}\n\n.tc-drop-down button svg, .tc-drop-down a svg {\n\tfill: <<colour foreground>>;\n}\n\n.tc-drop-down button.tc-btn-invisible:hover svg {\n\tfill: <<colour foreground>>;\n}\n\n.tc-drop-down p {\n\tpadding: 0 14px 0 14px;\n}\n\n.tc-drop-down svg {\n\twidth: 1em;\n\theight: 1em;\n}\n\n.tc-drop-down img {\n\twidth: 1em;\n}\n\n.tc-drop-down-language-chooser img {\n\twidth: 2em;\n\tvertical-align: baseline;\n}\n\n.tc-drop-down a, .tc-drop-down button {\n\tdisplay: block;\n\tpadding: 0 14px 0 14px;\n\twidth: 100%;\n\ttext-align: left;\n\tcolor: <<colour foreground>>;\n\tline-height: 1.4;\n}\n\n.tc-drop-down .tc-prompt {\n\tpadding: 0 14px;\t\n}\n\n.tc-drop-down .tc-chooser {\n\tborder: none;\n}\n\n.tc-drop-down .tc-chooser .tc-swatches-horiz {\n\tfont-size: 0.4em;\n\tpadding-left: 1.2em;\n}\n\n.tc-drop-down .tc-file-input-wrapper {\n\twidth: 100%;\n}\n\n.tc-drop-down .tc-file-input-wrapper button {\n\tcolor: <<colour foreground>>;\n}\n\n.tc-drop-down a:hover, .tc-drop-down button:hover, .tc-drop-down .tc-file-input-wrapper:hover button {\n\tcolor: <<colour tiddler-link-background>>;\n\tbackground-color: <<colour tiddler-link-foreground>>;\n\ttext-decoration: none;\n}\n\n.tc-drop-down .tc-tab-buttons button {\n\tbackground-color: <<colour dropdown-tab-background>>;\n}\n\n.tc-drop-down .tc-tab-buttons button.tc-tab-selected {\n\tbackground-color: <<colour dropdown-tab-background-selected>>;\n\tborder-bottom: 1px solid <<colour dropdown-tab-background-selected>>;\n}\n\n.tc-drop-down-bullet {\n\tdisplay: inline-block;\n\twidth: 0.5em;\n}\n\n.tc-drop-down .tc-tab-contents a {\n\tpadding: 0 0.5em 0 0.5em;\n}\n\n.tc-block-dropdown-wrapper {\n\tposition: relative;\n}\n\n.tc-block-dropdown {\n\tposition: absolute;\n\tmin-width: 220px;\n\tborder: 1px solid <<colour dropdown-border>>;\n\tbackground-color: <<colour dropdown-background>>;\n\tpadding: 7px 0;\n\tmargin: 4px 0 0 0;\n\twhite-space: nowrap;\n\tz-index: 1000;\n\ttext-shadow: none;\n}\n\n.tc-block-dropdown.tc-search-drop-down {\n\tmargin-left: -12px;\n}\n\n.tc-block-dropdown a {\n\tdisplay: block;\n\tpadding: 4px 14px 4px 14px;\n}\n\n.tc-block-dropdown.tc-search-drop-down a {\n\tdisplay: block;\n\tpadding: 0px 10px 0px 10px;\n}\n\n.tc-drop-down .tc-dropdown-item,\n.tc-block-dropdown .tc-dropdown-item {\n\tpadding: 4px 14px 4px 7px;\n\tcolor: <<colour muted-foreground>>;\n}\n\n.tc-block-dropdown a:hover {\n\tcolor: <<colour tiddler-link-background>>;\n\tbackground-color: <<colour tiddler-link-foreground>>;\n\ttext-decoration: none;\n}\n\n.tc-search-results {\n padding: 0 7px 0 7px;\n}\n\n/*\n** Modals\n*/\n\n.tc-modal-wrapper {\n\tposition: fixed;\n\toverflow: auto;\n\toverflow-y: scroll;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n}\n\n.tc-modal-backdrop {\n\tposition: fixed;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\tz-index: 1000;\n\tbackground-color: <<colour modal-backdrop>>;\n}\n\n.tc-modal {\n\tz-index: 1100;\n\tbackground-color: <<colour modal-background>>;\n\tborder: 1px solid <<colour modal-border>>;\n}\n\n@media (max-width: 55em) {\n\t.tc-modal {\n\t\tposition: fixed;\n\t\ttop: 1em;\n\t\tleft: 1em;\n\t\tright: 1em;\n\t}\n\n\t.tc-modal-body {\n\t\toverflow-y: auto;\n\t\tmax-height: 400px;\n\t\tmax-height: 60vh;\n\t}\n}\n\n@media (min-width: 55em) {\n\t.tc-modal {\n\t\tposition: fixed;\n\t\ttop: 2em;\n\t\tleft: 25%;\n\t\twidth: 50%;\n\t}\n\n\t.tc-modal-body {\n\t\toverflow-y: auto;\n\t\tmax-height: 400px;\n\t\tmax-height: 60vh;\n\t}\n}\n\n.tc-modal-header {\n\tpadding: 9px 15px;\n\tborder-bottom: 1px solid <<colour modal-header-border>>;\n}\n\n.tc-modal-header h3 {\n\tmargin: 0;\n\tline-height: 30px;\n}\n\n.tc-modal-header img, .tc-modal-header svg {\n\twidth: 1em;\n\theight: 1em;\n}\n\n.tc-modal-body {\n\tpadding: 15px;\n}\n\n.tc-modal-footer {\n\tpadding: 14px 15px 15px;\n\tmargin-bottom: 0;\n\ttext-align: right;\n\tbackground-color: <<colour modal-footer-background>>;\n\tborder-top: 1px solid <<colour modal-footer-border>>;\n}\n\n/*\n** Notifications\n*/\n\n.tc-notification {\n\tposition: fixed;\n\ttop: 14px;\n\tright: 42px;\n\tz-index: 1300;\n\tmax-width: 280px;\n\tpadding: 0 14px 0 14px;\n\tbackground-color: <<colour notification-background>>;\n\tborder: 1px solid <<colour notification-border>>;\n}\n\n/*\n** Tabs\n*/\n\n.tc-tab-set.tc-vertical {\n\tdisplay: -webkit-flex;\n\tdisplay: flex;\n}\n\n.tc-tab-buttons {\n\tfont-size: 0.85em;\n\tpadding-top: 1em;\n\tmargin-bottom: -2px;\n}\n\n.tc-tab-buttons.tc-vertical {\n\tz-index: 100;\n\tdisplay: block;\n\tpadding-top: 14px;\n\tvertical-align: top;\n\ttext-align: right;\n\tmargin-bottom: inherit;\n\tmargin-right: -1px;\n\tmax-width: 33%;\n\t-webkit-flex: 0 0 auto;\n\tflex: 0 0 auto;\n}\n\n.tc-tab-buttons button.tc-tab-selected {\n\tcolor: <<colour tab-foreground-selected>>;\n\tbackground-color: <<colour tab-background-selected>>;\n\tborder-left: 1px solid <<colour tab-border-selected>>;\n\tborder-top: 1px solid <<colour tab-border-selected>>;\n\tborder-right: 1px solid <<colour tab-border-selected>>;\n}\n\n.tc-tab-buttons button {\n\tcolor: <<colour tab-foreground>>;\n\tpadding: 3px 5px 3px 5px;\n\tmargin-right: 0.3em;\n\tfont-weight: 300;\n\tborder: none;\n\tbackground: inherit;\n\tbackground-color: <<colour tab-background>>;\n\tborder-left: 1px solid <<colour tab-border>>;\n\tborder-top: 1px solid <<colour tab-border>>;\n\tborder-right: 1px solid <<colour tab-border>>;\n\tborder-top-left-radius: 2px;\n\tborder-top-right-radius: 2px;\n}\n\n.tc-tab-buttons.tc-vertical button {\n\tdisplay: block;\n\twidth: 100%;\n\tmargin-top: 3px;\n\tmargin-right: 0;\n\ttext-align: right;\n\tbackground-color: <<colour tab-background>>;\n\tborder-left: 1px solid <<colour tab-border>>;\n\tborder-bottom: 1px solid <<colour tab-border>>;\n\tborder-right: none;\n\tborder-top-left-radius: 2px;\n\tborder-bottom-left-radius: 2px;\n}\n\n.tc-tab-buttons.tc-vertical button.tc-tab-selected {\n\tbackground-color: <<colour tab-background-selected>>;\n\tborder-right: 1px solid <<colour tab-background-selected>>;\n}\n\n.tc-tab-divider {\n\tborder-top: 1px solid <<colour tab-divider>>;\n}\n\n.tc-tab-divider.tc-vertical {\n\tdisplay: none;\n}\n\n.tc-tab-content {\n\tmargin-top: 14px;\n}\n\n.tc-tab-content.tc-vertical {\n\tdisplay: inline-block;\n\tvertical-align: top;\n\tpadding-top: 0;\n\tpadding-left: 14px;\n\tborder-left: 1px solid <<colour tab-border>>;\n\t-webkit-flex: 1 0 70%;\n\tflex: 1 0 70%;\n}\n\n.tc-sidebar-lists .tc-tab-buttons {\n\tmargin-bottom: -1px;\n}\n\n.tc-sidebar-lists .tc-tab-buttons button.tc-tab-selected {\n\tbackground-color: <<colour sidebar-tab-background-selected>>;\n\tcolor: <<colour sidebar-tab-foreground-selected>>;\n\tborder-left: 1px solid <<colour sidebar-tab-border-selected>>;\n\tborder-top: 1px solid <<colour sidebar-tab-border-selected>>;\n\tborder-right: 1px solid <<colour sidebar-tab-border-selected>>;\n}\n\n.tc-sidebar-lists .tc-tab-buttons button {\n\tdisplay: inline;\n\twidth: auto;\n\tbackground-color: <<colour sidebar-tab-background>>;\n\tcolor: <<colour sidebar-tab-foreground>>;\n\tborder-left: 1px solid <<colour sidebar-tab-border>>;\n\tborder-top: 1px solid <<colour sidebar-tab-border>>;\n\tborder-right: 1px solid <<colour sidebar-tab-border>>;\n}\n\n.tc-sidebar-lists .tc-tab-divider {\n\tborder-top: 1px solid <<colour sidebar-tab-divider>>;\n}\n\n.tc-more-sidebar .tc-tab-buttons button {\n\tdisplay: block;\n\twidth: 100%;\n\tbackground-color: <<colour sidebar-tab-background>>;\n\tborder-top: none;\n\tborder-left: none;\n\tborder-bottom: none;\n\tborder-right: 1px solid #ccc;\n\tmargin-bottom: inherit;\n}\n\n.tc-more-sidebar .tc-tab-buttons button.tc-tab-selected {\n\tbackground-color: <<colour sidebar-tab-background-selected>>;\n\tborder: none;\n}\n\n/*\n** Alerts\n*/\n\n.tc-alerts {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\tmax-width: 500px;\n\tz-index: 20000;\n}\n\n.tc-alert {\n\tposition: relative;\n\tmargin: 28px;\n\tpadding: 14px 14px 14px 14px;\n\tborder: 2px solid <<colour alert-border>>;\n\tbackground-color: <<colour alert-background>>;\n}\n\n.tc-alert-toolbar {\n\tposition: absolute;\n\ttop: 14px;\n\tright: 14px;\n}\n\n.tc-alert-toolbar svg {\n\tfill: <<colour alert-muted-foreground>>;\n}\n\n.tc-alert-subtitle {\n\tcolor: <<colour alert-muted-foreground>>;\n\tfont-weight: bold;\n}\n\n.tc-alert-highlight {\n\tcolor: <<colour alert-highlight>>;\n}\n\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\n\t.tc-static-alert {\n\t\tposition: relative;\n\t}\n\n\t.tc-static-alert-inner {\n\t\tposition: absolute;\n\t\tz-index: 100;\n\t}\n\n}\n\n.tc-static-alert-inner {\n\tpadding: 0 2px 2px 42px;\n\tcolor: <<colour static-alert-foreground>>;\n}\n\n/*\n** Control panel\n*/\n\n.tc-control-panel td {\n\tpadding: 4px;\n}\n\n.tc-control-panel table, .tc-control-panel table input, .tc-control-panel table textarea {\n\twidth: 100%;\n}\n\n.tc-plugin-info {\n\tdisplay: block;\n\tborder: 1px solid <<colour muted-foreground>>;\n\tbackground-colour: <<colour background>>;\n\tmargin: 0.5em 0 0.5em 0;\n\tpadding: 4px;\n}\n\n.tc-plugin-info-disabled {\n\tbackground: -webkit-repeating-linear-gradient(45deg, #ff0, #ff0 10px, #eee 10px, #eee 20px);\n\tbackground: repeating-linear-gradient(45deg, #ff0, #ff0 10px, #eee 10px, #eee 20px);\n}\n\n.tc-plugin-info-disabled:hover {\n\tbackground: -webkit-repeating-linear-gradient(45deg, #aa0, #aa0 10px, #888 10px, #888 20px);\n\tbackground: repeating-linear-gradient(45deg, #aa0, #aa0 10px, #888 10px, #888 20px);\n}\n\na.tc-tiddlylink.tc-plugin-info:hover {\n\ttext-decoration: none;\n\tbackground-color: <<colour primary>>;\n\tcolor: <<colour background>>;\n\tfill: <<colour foreground>>;\n}\n\na.tc-tiddlylink.tc-plugin-info:hover .tc-plugin-info > .tc-plugin-info-chunk > svg {\n\tfill: <<colour foreground>>;\n}\n\n.tc-plugin-info-chunk {\n\tdisplay: inline-block;\n\tvertical-align: middle;\n}\n\n.tc-plugin-info-chunk h1 {\n\tfont-size: 1em;\n\tmargin: 2px 0 2px 0;\n}\n\n.tc-plugin-info-chunk h2 {\n\tfont-size: 0.8em;\n\tmargin: 2px 0 2px 0;\n}\n\n.tc-plugin-info-chunk div {\n\tfont-size: 0.7em;\n\tmargin: 2px 0 2px 0;\n}\n\n.tc-plugin-info:hover > .tc-plugin-info-chunk > img, .tc-plugin-info:hover > .tc-plugin-info-chunk > svg {\n\twidth: 2em;\n\theight: 2em;\n\tfill: <<colour foreground>>;\n}\n\n.tc-plugin-info > .tc-plugin-info-chunk > img, .tc-plugin-info > .tc-plugin-info-chunk > svg {\n\twidth: 2em;\n\theight: 2em;\n\tfill: <<colour muted-foreground>>;\n}\n\n.tc-plugin-info.tc-small-icon > .tc-plugin-info-chunk > img, .tc-plugin-info.tc-small-icon > .tc-plugin-info-chunk > svg {\n\twidth: 1em;\n\theight: 1em;\n}\n\n.tc-plugin-info-dropdown {\n\tborder: 1px solid <<colour muted-foreground>>;\n\tmargin-top: -8px;\n}\n\n.tc-plugin-info-dropdown-message {\n\tbackground: <<colour message-background>>;\n\tpadding: 0.5em 1em 0.5em 1em;\n\tfont-weight: bold;\n\tfont-size: 0.8em;\n}\n\n.tc-plugin-info-dropdown-body {\n\tpadding: 1em 1em 1em 1em;\n}\n\n/*\n** Message boxes\n*/\n\n.tc-message-box {\n\tborder: 1px solid <<colour message-border>>;\n\tbackground: <<colour message-background>>;\n\tpadding: 0px 21px 0px 21px;\n\tfont-size: 12px;\n\tline-height: 18px;\n\tcolor: <<colour message-foreground>>;\n}\n\n/*\n** Pictures\n*/\n\n.tc-bordered-image {\n\tborder: 1px solid <<colour muted-foreground>>;\n\tpadding: 5px;\n\tmargin: 5px;\n}\n\n/*\n** Floats\n*/\n\n.tc-float-right {\n\tfloat: right;\n}\n\n/*\n** Chooser\n*/\n\n.tc-chooser {\n\tborder: 1px solid <<colour table-border>>;\n}\n\n.tc-chooser-item {\n\tborder: 8px;\n\tpadding: 2px 4px;\n}\n\n.tc-chooser-item a.tc-tiddlylink {\n\tdisplay: block;\n\ttext-decoration: none;\n\tcolor: <<colour tiddler-link-foreground>>;\n\tbackground-color: <<colour tiddler-link-background>>;\n}\n\n.tc-chooser-item a.tc-tiddlylink:hover {\n\ttext-decoration: none;\n\tcolor: <<colour tiddler-link-background>>;\n\tbackground-color: <<colour tiddler-link-foreground>>;\n}\n\n/*\n** Palette swatches\n*/\n\n.tc-swatches-horiz {\n}\n\n.tc-swatches-horiz .tc-swatch {\n\tdisplay: inline-block;\n}\n\n.tc-swatch {\n\twidth: 2em;\n\theight: 2em;\n\tmargin: 0.4em;\n\tborder: 1px solid #888;\n}\n\n/*\n** Table of contents\n*/\n\n.tc-sidebar-lists .tc-table-of-contents {\n\twhite-space: nowrap;\n}\n\n.tc-table-of-contents button {\n\tcolor: <<colour sidebar-foreground>>;\n}\n\n.tc-table-of-contents svg {\n\twidth: 0.7em;\n\theight: 0.7em;\n\tvertical-align: middle;\n\tfill: <<colour sidebar-foreground>>;\n}\n\n.tc-table-of-contents ol {\n\tlist-style-type: none;\n\tpadding-left: 0;\n}\n\n.tc-table-of-contents ol ol {\n\tpadding-left: 1em;\n}\n\n.tc-table-of-contents li {\n\tfont-size: 1.0em;\n\tfont-weight: bold;\n}\n\n.tc-table-of-contents li a {\n\tfont-weight: bold;\n}\n\n.tc-table-of-contents li li {\n\tfont-size: 0.95em;\n\tfont-weight: normal;\n\tline-height: 1.4;\n}\n\n.tc-table-of-contents li li a {\n\tfont-weight: normal;\n}\n\n.tc-table-of-contents li li li {\n\tfont-size: 0.95em;\n\tfont-weight: 200;\n\tline-height: 1.5;\n}\n\n.tc-table-of-contents li li li a {\n\tfont-weight: bold;\n}\n\n.tc-table-of-contents li li li li {\n\tfont-size: 0.95em;\n\tfont-weight: 200;\n}\n\n.tc-tabbed-table-of-contents {\n\tdisplay: -webkit-flex;\n\tdisplay: flex;\n}\n\n.tc-tabbed-table-of-contents .tc-table-of-contents {\n\tz-index: 100;\n\tdisplay: inline-block;\n\tpadding-left: 1em;\n\tmax-width: 50%;\n\t-webkit-flex: 0 0 auto;\n\tflex: 0 0 auto;\n\tbackground: <<colour tab-background>>;\n\tborder-left: 1px solid <<colour tab-border>>;\n\tborder-top: 1px solid <<colour tab-border>>;\n\tborder-bottom: 1px solid <<colour tab-border>>;\n}\n\n.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > a,\n.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > a {\n\tdisplay: block;\n\tpadding: 0.12em 1em 0.12em 0.25em;\n}\n\n.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > a {\n\tborder-top: 1px solid <<colour tab-background>>;\n\tborder-left: 1px solid <<colour tab-background>>;\n\tborder-bottom: 1px solid <<colour tab-background>>;\n}\n\n.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > a:hover {\n\ttext-decoration: none;\n\tborder-top: 1px solid <<colour tab-border>>;\n\tborder-left: 1px solid <<colour tab-border>>;\n\tborder-bottom: 1px solid <<colour tab-border>>;\n\tbackground: <<colour tab-border>>;\n}\n\n.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > a {\n\tborder-top: 1px solid <<colour tab-border>>;\n\tborder-left: 1px solid <<colour tab-border>>;\n\tborder-bottom: 1px solid <<colour tab-border>>;\n\tbackground: <<colour background>>;\n\tmargin-right: -1px;\n}\n\n.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > a:hover {\n\ttext-decoration: none;\n}\n\n.tc-tabbed-table-of-contents .tc-tabbed-table-of-contents-content {\n\tdisplay: inline-block;\n\tvertical-align: top;\n\tpadding-left: 1.5em;\n\tpadding-right: 1.5em;\n\tborder: 1px solid <<colour tab-border>>;\n\t-webkit-flex: 1 0 50%;\n\tflex: 1 0 50%;\n}\n\n/*\n** Dirty indicator\n*/\n\nbody.tc-dirty span.tc-dirty-indicator, body.tc-dirty span.tc-dirty-indicator svg {\n\tfill: <<colour dirty-indicator>>;\n\tcolor: <<colour dirty-indicator>>;\n}\n\n/*\n** File inputs\n*/\n\n.tc-file-input-wrapper {\n\tposition: relative;\n\toverflow: hidden;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n}\n\n.tc-file-input-wrapper input[type=file] {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tfont-size: 999px;\n\tmax-width: 100%;\n\tmax-height: 100%;\n\tfilter: alpha(opacity=0);\n\topacity: 0;\n\toutline: none;\n\tbackground: white;\n\tcursor: pointer;\n\tdisplay: inline-block;\n}\n\n/*\n** Thumbnail macros\n*/\n\n.tc-thumbnail-wrapper {\n\tposition: relative;\n\tdisplay: inline-block;\n\tmargin: 6px;\n\tvertical-align: top;\n}\n\n.tc-thumbnail-right-wrapper {\n\tfloat:right;\n\tmargin: 0.5em 0 0.5em 0.5em;\n}\n\n.tc-thumbnail-image {\n text-align: center;\n\toverflow: hidden;\n\tborder-radius: 3px;\n}\n\n.tc-thumbnail-image svg,\n.tc-thumbnail-image img {\n\tfilter: alpha(opacity=1);\n\topacity: 1;\n min-width: 100%;\n min-height: 100%;\n max-width: 100%;\n}\n\n.tc-thumbnail-wrapper:hover .tc-thumbnail-image svg,\n.tc-thumbnail-wrapper:hover .tc-thumbnail-image img {\n\tfilter: alpha(opacity=0.8);\n\topacity: 0.8;\n}\n\n.tc-thumbnail-background {\n\tposition: absolute;\n\tborder-radius: 3px;\n}\n\n.tc-thumbnail-icon svg,\n.tc-thumbnail-icon img {\n\twidth: 3em;\n\theight: 3em;\n\t<<filter \"drop-shadow(2px 2px 4px rgba(0,0,0,0.3))\">>\n}\n\n.tc-thumbnail-wrapper:hover .tc-thumbnail-icon svg,\n.tc-thumbnail-wrapper:hover .tc-thumbnail-icon img {\n\tfill: #fff;\n\t<<filter \"drop-shadow(3px 3px 4px rgba(0,0,0,0.6))\">>\n}\n\n.tc-thumbnail-icon {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tdisplay: -webkit-flex;\n\t-webkit-align-items: center;\n\t-webkit-justify-content: center;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.tc-thumbnail-caption {\n\tposition: absolute;\n\tbackground-color: #777;\n\tcolor: #fff;\n\ttext-align: center;\n\tbottom: 0;\n\twidth: 100%;\n\tfilter: alpha(opacity=0.9);\n\topacity: 0.9;\n\tline-height: 1.4;\n\tborder-bottom-left-radius: 3px;\n\tborder-bottom-right-radius: 3px;\n}\n\n.tc-thumbnail-wrapper:hover .tc-thumbnail-caption {\n\tfilter: alpha(opacity=1);\n\topacity: 1;\n}\n\n/*\n** Errors\n*/\n\n.tc-error {\n\tbackground: #f00;\n\tcolor: #fff;\n}\n"
},
"$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize",
"text": "15px"
},
"$:/themes/tiddlywiki/vanilla/metrics/bodylineheight": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/bodylineheight",
"text": "22px"
},
"$:/themes/tiddlywiki/vanilla/metrics/fontsize": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/fontsize",
"text": "14px"
},
"$:/themes/tiddlywiki/vanilla/metrics/lineheight": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/lineheight",
"text": "20px"
},
"$:/themes/tiddlywiki/vanilla/metrics/storyleft": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/storyleft",
"text": "0px"
},
"$:/themes/tiddlywiki/vanilla/metrics/storytop": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/storytop",
"text": "0px"
},
"$:/themes/tiddlywiki/vanilla/metrics/storyright": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/storyright",
"text": "770px"
},
"$:/themes/tiddlywiki/vanilla/metrics/storywidth": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/storywidth",
"text": "770px"
},
"$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth",
"text": "686px"
},
"$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint",
"text": "960px"
},
"$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth",
"text": "350px"
},
"$:/themes/tiddlywiki/vanilla/options/stickytitles": {
"title": "$:/themes/tiddlywiki/vanilla/options/stickytitles",
"text": "no"
},
"$:/themes/tiddlywiki/vanilla/options/sidebarlayout": {
"title": "$:/themes/tiddlywiki/vanilla/options/sidebarlayout",
"text": "fixed-fluid"
},
"$:/themes/tiddlywiki/vanilla/reset": {
"title": "$:/themes/tiddlywiki/vanilla/reset",
"type": "text/plain",
"text": "/*! normalize.css v3.0.0 | MIT License | git.io/normalize */\n\n/**\n * 1. Set default font family to sans-serif.\n * 2. Prevent iOS text size adjust after orientation change, without disabling\n * user zoom.\n */\n\nhtml {\n font-family: sans-serif; /* 1 */\n -ms-text-size-adjust: 100%; /* 2 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/**\n * Remove default margin.\n */\n\nbody {\n margin: 0;\n}\n\n/* HTML5 display definitions\n ========================================================================== */\n\n/**\n * Correct `block` display not defined in IE 8/9.\n */\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n/**\n * 1. Correct `inline-block` display not defined in IE 8/9.\n * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n */\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; /* 1 */\n vertical-align: baseline; /* 2 */\n}\n\n/**\n * Prevent modern browsers from displaying `audio` without controls.\n * Remove excess height in iOS 5 devices.\n */\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n/**\n * Address `[hidden]` styling not present in IE 8/9.\n * Hide the `template` element in IE, Safari, and Firefox < 22.\n */\n\n[hidden],\ntemplate {\n display: none;\n}\n\n/* Links\n ========================================================================== */\n\n/**\n * Remove the gray background color from active links in IE 10.\n */\n\na {\n background: transparent;\n}\n\n/**\n * Improve readability when focused and also mouse hovered in all browsers.\n */\n\na:active,\na:hover {\n outline: 0;\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Address styling not present in IE 8/9, Safari 5, and Chrome.\n */\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n/**\n * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.\n */\n\nb,\nstrong {\n font-weight: bold;\n}\n\n/**\n * Address styling not present in Safari 5 and Chrome.\n */\n\ndfn {\n font-style: italic;\n}\n\n/**\n * Address variable `h1` font-size and margin within `section` and `article`\n * contexts in Firefox 4+, Safari 5, and Chrome.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/**\n * Address styling not present in IE 8/9.\n */\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n/**\n * Address inconsistent and variable font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove border when inside `a` element in IE 8/9.\n */\n\nimg {\n border: 0;\n}\n\n/**\n * Correct overflow displayed oddly in IE 9.\n */\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * Address margin not present in IE 8/9 and Safari 5.\n */\n\nfigure {\n margin: 1em 40px;\n}\n\n/**\n * Address differences between Firefox and other browsers.\n */\n\nhr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n}\n\n/**\n * Contain overflow in all browsers.\n */\n\npre {\n overflow: auto;\n}\n\n/**\n * Address odd `em`-unit font size rendering in all browsers.\n */\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * Known limitation: by default, Chrome and Safari on OS X allow very limited\n * styling of `select`, unless a `border` property is set.\n */\n\n/**\n * 1. Correct color not being inherited.\n * Known issue: affects color of disabled elements.\n * 2. Correct font properties not being inherited.\n * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; /* 1 */\n font: inherit; /* 2 */\n margin: 0; /* 3 */\n}\n\n/**\n * Address `overflow` set to `hidden` in IE 8/9/10.\n */\n\nbutton {\n overflow: visible;\n}\n\n/**\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\n * All other form control elements do not inherit `text-transform` values.\n * Correct `button` style inheritance in Firefox, IE 8+, and Opera\n * Correct `select` style inheritance in Firefox.\n */\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/**\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n * and `video` controls.\n * 2. Correct inability to style clickable `input` types in iOS.\n * 3. Improve usability and consistency of cursor style between image-type\n * `input` and others.\n */\n\nbutton,\nhtml input[type=\"button\"], /* 1 */\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; /* 2 */\n cursor: pointer; /* 3 */\n}\n\n/**\n * Re-set default cursor for disabled elements.\n */\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n/**\n * Remove inner padding and border in Firefox 4+.\n */\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n/**\n * Address Firefox 4+ setting `line-height` on `input` using `!important` in\n * the UA stylesheet.\n */\n\ninput {\n line-height: normal;\n}\n\n/**\n * It's recommended that you don't attempt to style these elements.\n * Firefox's implementation doesn't respect box-sizing, padding, or width.\n *\n * 1. Address box sizing set to `content-box` in IE 8/9/10.\n * 2. Remove excess padding in IE 8/9/10.\n */\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Fix the cursor style for Chrome's increment/decrement buttons. For certain\n * `font-size` values of the `input`, it causes the cursor style of the\n * decrement button to change from `default` to `text`.\n */\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.\n * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome\n * (include `-moz` to future-proof).\n */\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n -moz-box-sizing: content-box;\n -webkit-box-sizing: content-box; /* 2 */\n box-sizing: content-box;\n}\n\n/**\n * Remove inner padding and search cancel button in Safari and Chrome on OS X.\n * Safari (but not Chrome) clips the cancel button when the search input has\n * padding (and `textfield` appearance).\n */\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * Define consistent border, margin, and padding.\n */\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n/**\n * 1. Correct `color` not being inherited in IE 8/9.\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\n */\n\nlegend {\n border: 0; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Remove default vertical scrollbar in IE 8/9.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * Don't inherit the `font-weight` (applied by a rule above).\n * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n */\n\noptgroup {\n font-weight: bold;\n}\n\n/* Tables\n ========================================================================== */\n\n/**\n * Remove most spacing between table cells.\n */\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}\n"
},
"$:/themes/tiddlywiki/vanilla/settings/fontfamily": {
"title": "$:/themes/tiddlywiki/vanilla/settings/fontfamily",
"text": "\"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", \"DejaVu Sans\", sans-serif"
},
"$:/themes/tiddlywiki/vanilla/settings/codefontfamily": {
"title": "$:/themes/tiddlywiki/vanilla/settings/codefontfamily",
"text": "Monaco, Consolas, \"Lucida Console\", \"DejaVu Sans Mono\", monospace"
},
"$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment": {
"title": "$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment",
"text": "fixed"
},
"$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize": {
"title": "$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize",
"text": "auto"
},
"$:/themes/tiddlywiki/vanilla/sticky": {
"title": "$:/themes/tiddlywiki/vanilla/sticky",
"text": "<$reveal state=\"$:/themes/tiddlywiki/vanilla/options/stickytitles\" type=\"match\" text=\"yes\">\n``\n.tc-tiddler-title {\n\tposition: -webkit-sticky;\n\tposition: -moz-sticky;\n\tposition: -o-sticky;\n\tposition: -ms-sticky;\n\tposition: sticky;\n\ttop: 0px;\n\tbackground: ``<<colour tiddler-background>>``;\n\tz-index: 500;\n}\n``\n</$reveal>\n"
}
}
}
---
!!![[Categories: 1]]
{{Categories: 1}}
---
!!![[Categories: 2]]
{{Categories: 2}}
---
!!![[Categories: 3]]
{{Categories: 3}}
---
!!![[Categories: 4]]
{{Categories: 4}}
---
!!![[Categories: 5]]
{{Categories: 5}}
---
!!![[Categories: 6]]
{{Categories: 6}}
---
!!![[Categories: 7]]
{{Categories: 7}}
---
!!![[Categories: 8]]
{{Categories: 8}}
---
!!![[Categories: 9]]
{{Categories: 9}}
---
!!![[Categories: 10]]
{{Categories: 10}}
---
!!![[Categories: 11]]
{{Categories: 11}}
---
!!![[Categories: 12]]
{{Categories: 12}}
---
!!![[Categories: 13]]
{{Categories: 13}}
---
!!![[Categories: 14]]
{{Categories: 14}}
---
!!![[Categories: 15]]
{{Categories: 15}}
Things are said to be named ‘equivocally’ when, though they have a common name, the definition corresponding with the name differs for each. Thus, a real man and a figure in a picture can both lay claim to the name ‘animal’; yet these are equivocally so named, for, though they have a common name, the definition corresponding with the name differs for each. For should any one define in what sense each is an animal, his definition in the one case will be appropriate to that case only.
On the other hand, things are said to be named ‘univocally’ which have both the name and the definition answering to the name in common. A man and an ox are both ‘animal’, and these are univocally so named, inasmuch as not only the name, but also the definition, is the same in both cases: for if a man should state in what sense each is an animal, the statement in the one case would be identical with that in the other.
Things are said to be named ‘derivatively’, which derive their name from some other name, but differ from it in termination. Thus the grammarian derives his name from the word ‘grammar’, and the courageous man from the word ‘courage’.
The proposed categories have, then, been adequately dealt with.
We must next explain the various senses in which the term ‘opposite’ is used. Things are said to be opposed in four senses: (i) as correlatives to one another, (ii) as contraries to one another, (iii) as privatives to positives, (iv) as affirmatives to negatives.
Let me sketch my meaning in outline. An instance of the use of the word ‘opposite’ with reference to correlatives is afforded by the expressions ‘double’ and ‘half’; with reference to contraries by ‘bad’ and ‘good’. Opposites in the sense of ‘privatives’ and ‘positives’ are’ blindness’ and ‘sight’; in the sense of affirmatives and negatives, the propositions ‘he sits’, ‘he does not sit’.
(i) Pairs of opposites which fall under the category of relation are explained by a reference of the one to the other, the reference being indicated by the preposition ‘of’ or by some other preposition. Thus, double is a relative term, for that which is double is explained as the double of something. Knowledge, again, is the opposite of the thing known, in the same sense; and the thing known also is explained by its relation to its opposite, knowledge. For the thing known is explained as that which is known by something, that is, by knowledge. Such things, then, as are opposite the one to the other in the sense of being correlatives are explained by a reference of the one to the other.
(ii) Pairs of opposites which are contraries are not in any way interdependent, but are contrary the one to the other. The good is not spoken of as the good of the had, but as the contrary of the bad, nor is white spoken of as the white of the black, but as the contrary of the black. These two types of opposition are therefore distinct. Those contraries which are such that the subjects in which they are naturally present, or of which they are predicated, must necessarily contain either the one or the other of them, have no intermediate, but those in the case of which no such necessity obtains, always have an intermediate. Thus disease and health are naturally present in the body of an animal, and it is necessary that either the one or the other should be present in the body of an animal. Odd and even, again, are predicated of number, and it is necessary that the one or the other should be present in numbers. Now there is no intermediate between the terms of either of these two pairs. On the other hand, in those contraries with regard to which no such necessity obtains, we find an intermediate. Blackness and whiteness are naturally present in the body, but it is not necessary that either the one or the other should be present in the body, inasmuch as it is not true to say that everybody must be white or black. Badness and goodness, again, are predicated of man, and of many other things, but it is not necessary that either the one quality or the other should be present in that of which they are predicated: it is not true to say that everything that may be good or bad must be either good or bad. These pairs of contraries have intermediates: the intermediates between white and black are grey, sallow, and all the other colours that come between; the intermediate between good and bad is that which is neither the one nor the other.
Some intermediate qualities have names, such as grey and sallow and all the other colours that come between white and black; in other cases, however, it is not easy to name the intermediate, but we must define it as that which is not either extreme, as in the case of that which is neither good nor bad, neither just nor unjust.
(iii) ‘privatives’ and ‘Positives’ have reference to the same subject. Thus, sight and blindness have reference to the eye. It is a universal rule that each of a pair of opposites of this type has reference to that to which the particular ‘positive’ is natural. We say that that is capable of some particular faculty or possession has suffered privation when the faculty or possession in question is in no way present in that in which, and at the time at which, it should naturally be present. We do not call that toothless which has not teeth, or that blind which has not sight, but rather that which has not teeth or sight at the time when by nature it should. For there are some creatures which from birth are without sight, or without teeth, but these are not called toothless or blind.
To be without some faculty or to possess it is not the same as the corresponding ‘privative’ or ‘positive’. ‘Sight’ is a ‘positive’, ‘blindness’ a ‘privative’, but ‘to possess sight’ is not equivalent to ‘sight’, ‘to be blind’ is not equivalent to ‘blindness’. Blindness is a ‘privative’, to be blind is to be in a state of privation, but is not a ‘privative’. Moreover, if ‘blindness’ were equivalent to ‘being blind’, both would be predicated of the same subject; but though a man is said to be blind, he is by no means said to be blindness.
To be in a state of ‘possession’ is, it appears, the opposite of being in a state of ‘privation’, just as ‘positives’ and ‘privatives’ themselves are opposite. There is the same type of antithesis in both cases; for just as blindness is opposed to sight, so is being blind opposed to having sight.
That which is affirmed or denied is not itself affirmation or denial. By ‘affirmation’ we mean an affirmative proposition, by ‘denial’ a negative. Now, those facts which form the matter of the affirmation or denial are not propositions; yet these two are said to be opposed in the same sense as the affirmation and denial, for in this case also the type of antithesis is the same. For as the affirmation is opposed to the denial, as in the two propositions ‘he sits’, ‘he does not sit’, so also the fact which constitutes the matter of the proposition in one case is opposed to that in the other, his sitting, that is to say, to his not sitting.
It is evident that ‘positives’ and ‘privatives’ are not opposed each to each in the same sense as relatives. The one is not explained by reference to the other; sight is not sight of blindness, nor is any other preposition used to indicate the relation. Similarly blindness is not said to be blindness of sight, but rather, privation of sight. Relatives, moreover, reciprocate; if blindness, therefore, were a relative, there would be a reciprocity of relation between it and that with which it was correlative. But this is not the case. Sight is not called the sight of blindness.
That those terms which fall under the heads of ‘positives’ and ‘privatives’ are not opposed each to each as contraries, either, is plain from the following facts: Of a pair of contraries such that they have no intermediate, one or the other must needs be present in the subject in which they naturally subsist, or of which they are predicated; for it is those, as we proved,’ in the case of which this necessity obtains, that have no intermediate. Moreover, we cited health and disease, odd and even, as instances. But those contraries which have an intermediate are not subject to any such necessity. It is not necessary that every substance, receptive of such qualities, should be either black or white, cold or hot, for something intermediate between these contraries may very well be present in the subject. We proved, moreover, that those contraries have an intermediate in the case of which the said necessity does not obtain. Yet when one of the two contraries is a constitutive property of the subject, as it is a constitutive property of fire to be hot, of snow to be white, it is necessary determinately that one of the two contraries, not one or the other, should be present in the subject; for fire cannot be cold, or snow black. Thus, it is not the case here that one of the two must needs be present in every subject receptive of these qualities, but only in that subject of which the one forms a constitutive property. Moreover, in such cases it is one member of the pair determinately, and not either the one or the other, which must be present.
In the case of ‘positives’ and ‘privatives’, on the other hand, neither of the aforesaid statements holds good. For it is not necessary that a subject receptive of the qualities should always have either the one or the other; that which has not yet advanced to the state when sight is natural is not said either to be blind or to see. Thus ‘positives’ and ‘privatives’ do not belong to that class of contraries which consists of those which have no intermediate. On the other hand, they do not belong either to that class which consists of contraries which have an intermediate. For under certain conditions it is necessary that either the one or the other should form part of the constitution of every appropriate subject. For when a thing has reached the stage when it is by nature capable of sight, it will be said either to see or to be blind, and that in an indeterminate sense, signifying that the capacity may be either present or absent; for it is not necessary either that it should see or that it should be blind, but that it should be either in the one state or in the other. Yet in the case of those contraries which have an intermediate we found that it was never necessary that either the one or the other should be present in every appropriate subject, but only that in certain subjects one of the pair should be present, and that in a determinate sense. It is, therefore, plain that ‘positives’ and ‘privatives’ are not opposed each to each in either of the senses in which contraries are opposed.
Again, in the case of contraries, it is possible that there should be changes from either into the other, while the subject retains its identity, unless indeed one of the contraries is a constitutive property of that subject, as heat is of fire. For it is possible that that that which is healthy should become diseased, that which is white, black, that which is cold, hot, that which is good, bad, that which is bad, good. The bad man, if he is being brought into a better way of life and thought, may make some advance, however slight, and if he should once improve, even ever so little, it is plain that he might change completely, or at any rate make very great progress; for a man becomes more and more easily moved to virtue, however small the improvement was at first. It is, therefore, natural to suppose that he will make yet greater progress than he has made in the past; and as this process goes on, it will change him completely and establish him in the contrary state, provided he is not hindered by lack of time. In the case of ‘positives’ and ‘privatives’, however, change in both directions is impossible. There may be a change from possession to privation, but not from privation to possession. The man who has become blind does not regain his sight; the man who has become bald does not regain his hair; the man who has lost his teeth does not grow his grow a new set. (iv) Statements opposed as affirmation and negation belong manifestly to a class which is distinct, for in this case, and in this case only, it is necessary for the one opposite to be true and the other false.
Neither in the case of contraries, nor in the case of correlatives, nor in the case of ‘positives’ and ‘privatives’, is it necessary for one to be true and the other false. Health and disease are contraries: neither of them is true or false. ‘Double’ and ‘half’ are opposed to each other as correlatives: neither of them is true or false. The case is the same, of course, with regard to ‘positives’ and ‘privatives’ such as ‘sight’ and ‘blindness’. In short, where there is no sort of combination of words, truth and falsity have no place, and all the opposites we have mentioned so far consist of simple words.
At the same time, when the words which enter into opposed statements are contraries, these, more than any other set of opposites, would seem to claim this characteristic. ‘Socrates is ill’ is the contrary of ‘Socrates is well’, but not even of such composite expressions is it true to say that one of the pair must always be true and the other false. For if Socrates exists, one will be true and the other false, but if he does not exist, both will be false; for neither ‘Socrates is ill’ nor ‘Socrates is well’ is true, if Socrates does not exist at all.
In the case of ‘positives’ and ‘privatives’, if the subject does not exist at all, neither proposition is true, but even if the subject exists, it is not always the fact that one is true and the other false. For ‘Socrates has sight’ is the opposite of ‘Socrates is blind’ in the sense of the word ‘opposite’ which applies to possession and privation. Now if Socrates exists, it is not necessary that one should be true and the other false, for when he is not yet able to acquire the power of vision, both are false, as also if Socrates is altogether non-existent.
But in the case of affirmation and negation, whether the subject exists or not, one is always false and the other true. For manifestly, if Socrates exists, one of the two propositions ‘Socrates is ill’, ‘Socrates is not ill’, is true, and the other false. This is likewise the case if he does not exist; for if he does not exist, to say that he is ill is false, to say that he is not ill is true. Thus it is in the case of those opposites only, which are opposite in the sense in which the term is used with reference to affirmation and negation, that the rule holds good, that one of the pair must be true and the other false.
That the contrary of a good is an evil is shown by induction: the contrary of health is disease, of courage, cowardice, and so on. But the contrary of an evil is sometimes a good, sometimes an evil. For defect, which is an evil, has excess for its contrary, this also being an evil, and the mean, which is a good, is equally the contrary of the one and of the other. It is only in a few cases, however, that we see instances of this: in most, the contrary of an evil is a good.
In the case of contraries, it is not always necessary that if one exists the other should also exist: for if all become healthy there will be health and no disease, and again, if everything turns white, there will be white, but no black. Again, since the fact that Socrates is ill is the contrary of the fact that Socrates is well, and two contrary conditions cannot both obtain in one and the same individual at the same time, both these contraries could not exist at once: for if that Socrates was well was a fact, then that Socrates was ill could not possibly be one.
It is plain that contrary attributes must needs be present in subjects which belong to the same species or genus. Disease and health require as their subject the body of an animal; white and black require a body, without further qualification; justice and injustice require as their subject the human soul.
Moreover, it is necessary that pairs of contraries should in all cases either belong to the same genus or belong to contrary genera or be themselves genera. White and black belong to the same genus, colour; justice and injustice, to contrary genera, virtue and vice; while good and evil do not belong to genera, but are themselves actual genera, with terms under them.
There are four senses in which one thing can be said to be ‘prior’ to another. Primarily and most properly the term has reference to time: in this sense the word is used to indicate that one thing is older or more ancient than another, for the expressions ‘older’ and ‘more ancient’ imply greater length of time.
Secondly, one thing is said to be ‘prior’ to another when the sequence of their being cannot be reversed. In this sense ‘one’ is ‘prior’ to ‘two’. For if ‘two’ exists, it follows directly that ‘one’ must exist, but if ‘one’ exists, it does not follow necessarily that ‘two’ exists: thus the sequence subsisting cannot be reversed. It is agreed, then, that when the sequence of two things cannot be reversed, then that one on which the other depends is called ‘prior’ to that other.
In the third place, the term ‘prior’ is used with reference to any order, as in the case of science and of oratory. For in sciences which use demonstration there is that which is prior and that which is posterior in order; in geometry, the elements are prior to the propositions; in reading and writing, the letters of the alphabet are prior to the syllables. Similarly, in the case of speeches, the exordium is prior in order to the narrative.
Besides these senses of the word, there is a fourth. That which is better and more honourable is said to have a natural priority. In common parlance men speak of those whom they honour and love as ‘coming first’ with them. This sense of the word is perhaps the most far-fetched.
Such, then, are the different senses in which the term ‘prior’ is used.
Yet it would seem that besides those mentioned there is yet another. For in those things, the being of each of which implies that of the other, that which is in any way the cause may reasonably be said to be by nature ‘prior’ to the effect. It is plain that there are instances of this. The fact of the being of a man carries with it the truth of the proposition that he is, and the implication is reciprocal: for if a man is, the proposition wherein we allege that he is true, and conversely, if the proposition wherein we allege that he is true, then he is. The true proposition, however, is in no way the cause of the being of the man, but the fact of the man’s being does seem somehow to be the cause of the truth of the proposition, for the truth or falsity of the proposition depends on the fact of the man’s being or not being.
Thus the word ‘prior’ may be used in five senses.
The term ‘simultaneous’ is primarily and most appropriately applied to those things the genesis of the one of which is simultaneous with that of the other; for in such cases neither is prior or posterior to the other. Such things are said to be simultaneous in point of time. Those things, again, are ‘simultaneous’ in point of nature, the being of each of which involves that of the other, while at the same time neither is the cause of the other’s being. This is the case with regard to the double and the half, for these are reciprocally dependent, since, if there is a double, there is also a half, and if there is a half, there is also a double, while at the same time neither is the cause of the being of the other.
Again, those species which are distinguished one from another and opposed one to another within the same genus are said to be ‘simultaneous’ in nature. I mean those species which are distinguished each from each by one and the same method of division. Thus the ‘winged’ species is simultaneous with the ‘terrestrial’ and the ‘water’ species. These are distinguished within the same genus, and are opposed each to each, for the genus ‘animal’ has the ‘winged’, the ‘terrestrial’, and the ‘water’ species, and no one of these is prior or posterior to another; on the contrary, all such things appear to be ‘simultaneous’ in nature. Each of these also, the terrestrial, the winged, and the water species, can be divided again into subspecies. Those species, then, also will be ‘simultaneous’ point of nature, which, belonging to the same genus, are distinguished each from each by one and the same method of differentiation.
But genera are prior to species, for the sequence of their being cannot be reversed. If there is the species ‘water-animal’, there will be the genus ‘animal’, but granted the being of the genus ‘animal’, it does not follow necessarily that there will be the species ‘water-animal’.
Those things, therefore, are said to be ‘simultaneous’ in nature, the being of each of which involves that of the other, while at the same time neither is in any way the cause of the other’s being; those species, also, which are distinguished each from each and opposed within the same genus. Those things, moreover, are ‘simultaneous’ in the unqualified sense of the word which come into being at the same time.
There are six sorts of movement: generation, destruction, increase, diminution, alteration, and change of place.
It is evident in all but one case that all these sorts of movement are distinct each from each. Generation is distinct from destruction, increase and change of place from diminution, and so on. But in the case of alteration it may be argued that the process necessarily implies one or other of the other five sorts of motion. This is not true, for we may say that all affections, or nearly all, produce in us an alteration which is distinct from all other sorts of motion, for that which is affected need not suffer either increase or diminution or any of the other sorts of motion. Thus alteration is a distinct sort of motion; for, if it were not, the thing altered would not only be altered, but would forthwith necessarily suffer increase or diminution or some one of the other sorts of motion in addition; which as a matter of fact is not the case. Similarly that which was undergoing the process of increase or was subject to some other sort of motion would, if alteration were not a distinct form of motion, necessarily be subject to alteration also. But there are some things which undergo increase but yet not alteration. The square, for instance, if a gnomon is applied to it, undergoes increase but not alteration, and so it is with all other figures of this sort. Alteration and increase, therefore, are distinct.
Speaking generally, rest is the contrary of motion. But the different forms of motion have their own contraries in other forms; thus destruction is the contrary of generation, diminution of increase, rest in a place, of change of place. As for this last, change in the reverse direction would seem to be most truly its contrary; thus motion upwards is the contrary of motion downwards and vice versa.
In the case of that sort of motion which yet remains, of those that have been enumerated, it is not easy to state what is its contrary. It appears to have no contrary, unless one should define the contrary here also either as ‘rest in its quality’ or as ‘change in the direction of the contrary quality’, just as we defined the contrary of change of place either as rest in a place or as change in the reverse direction. For a thing is altered when change of quality takes place; therefore either rest in its quality or change in the direction of the contrary may be called the contrary of this qualitative form of motion. In this way becoming white is the contrary of becoming black; there is alteration in the contrary direction, since a change of a qualitative nature takes place.
The term ‘to have’ is used in various senses. In the first place it is used with reference to habit or disposition or any other quality, for we are said to ‘have’ a piece of knowledge or a virtue. Then, again, it has reference to quantity, as, for instance, in the case of a man’s height; for he is said to ‘have’ a height of three or four cubits. It is used, moreover, with regard to apparel, a man being said to ‘have’ a coat or tunic; or in respect of something which we have on a part of ourselves, as a ring on the hand: or in respect of something which is a part of us, as hand or foot. The term refers also to content, as in the case of a vessel and wheat, or of a jar and wine; a jar is said to ‘have’ wine, and a corn-measure wheat. The expression in such cases has reference to content. Or it refers to that which has been acquired; we are said to ‘have’ a house or a field. A man is also said to ‘have’ a wife, and a wife a husband, and this appears to be the most remote meaning of the term, for by the use of it we mean simply that the husband lives with the wife.
Other senses of the word might perhaps be found, but the most ordinary ones have all been enumerated.
Forms of speech are either simple or composite. Examples of the latter are such expressions as ‘the man runs’, ‘the man wins’; of the former ‘man’, ‘ox’, ‘runs’, ‘wins’.
Of things themselves some are predicable of a subject, and are never present in a subject. Thus ‘man’ is predicable of the individual man, and is never present in a subject.
By being ‘present in a subject’ I do not mean present as parts are present in a whole, but being incapable of existence apart from the said subject.
Some things, again, are present in a subject, but are never predicable of a subject. For instance, a certain point of grammatical knowledge is present in the mind, but is not predicable of any subject; or again, a certain whiteness may be present in the body (for colour requires a material basis), yet it is never predicable of anything.
Other things, again, are both predicable of a subject and present in a subject. Thus while knowledge is present in the human mind, it is predicable of grammar.
There is, lastly, a class of things which are neither present in a subject nor predicable of a subject, such as the individual man or the individual horse. But, to speak more generally, that which is individual and has the character of a unit is never predicable of a subject. Yet in some cases there is nothing to prevent such being present in a subject. Thus a certain point of grammatical knowledge is present in a subject.
When one thing is predicated of another, all that which is predicable of the predicate will be predicable also of the subject. Thus, ‘man’ is predicated of the individual man; but ‘animal’ is predicated of ‘man’; it will, therefore, be predicable of the individual man also: for the individual man is both ‘man’ and ‘animal’.
If genera are different and co-ordinate, their differentiae are themselves different in kind. Take as an instance the genus ‘animal’ and the genus ‘knowledge’. ‘With feet’, ‘two-footed’, ‘winged’, ‘aquatic’, are differentiae of ‘animal’; the species of knowledge are not distinguished by the same differentiae. One species of knowledge does not differ from another in being ‘two-footed’.
But where one genus is subordinate to another, there is nothing to prevent their having the same differentiae: for the greater class is predicated of the lesser, so that all the differentiae of the predicate will be differentiae also of the subject.
Expressions which are in no way composite signify substance, quantity, quality, relation, place, time, position, state, action, or affection. To sketch my meaning roughly, examples of substance are ‘man’ or ‘the horse’, of quantity, such terms as ‘two cubits long’ or ‘three cubits long’, of quality, such attributes as ‘white’, ‘grammatical’. ‘Double’, ‘half’, ‘greater’, fall under the category of relation; ‘in a the market place’, ‘in the Lyceum’, under that of place; ‘yesterday’, ‘last year’, under that of time. ‘Lying’, ‘sitting’, are terms indicating position, ‘shod’, ‘armed’, state; ‘to lance’, ‘to cauterize’, action; ‘to be lanced’, ‘to be cauterized’, affection.
No one of these terms, in and by itself, involves an affirmation; it is by the combination of such terms that positive or negative statements arise. For every assertion must, as is admitted, be either true or false, whereas expressions which are not in any way composite such as ‘man’, ‘white’, ‘runs’, ‘wins’, cannot be either true or false.
Substance, in the truest and primary and most definite sense of the word, is that which is neither predicable of a subject nor present in a subject; for instance, the individual man or horse. But in a secondary sense those things are called substances within which, as species, the primary substances are included; also those which, as genera, include the species. For instance, the individual man is included in the species ‘man’, and the genus to which the species belongs is ‘animal’; these, therefore-that is to say, the species ‘man’ and the genus ‘animal,-are termed secondary substances.
It is plain from what has been said that both the name and the definition of the predicate must be predicable of the subject. For instance, ‘man’ is predicted of the individual man. Now in this case the name of the species man’ is applied to the individual, for we use the term ‘man’ in describing the individual; and the definition of ‘man’ will also be predicated of the individual man, for the individual man is both man and animal. Thus, both the name and the definition of the species are predicable of the individual.
With regard, on the other hand, to those things which are present in a subject, it is generally the case that neither their name nor their definition is predicable of that in which they are present. Though, however, the definition is never predicable, there is nothing in certain cases to prevent the name being used. For instance, ‘white’ being present in a body is predicated of that in which it is present, for a body is called white: the definition, however, of the colour white’ is never predicable of the body.
Everything except primary substances is either predicable of a primary substance or present in a primary substance. This becomes evident by reference to particular instances which occur. ‘Animal’ is predicated of the species ‘man’, therefore of the individual man, for if there were no individual man of whom it could be predicated, it could not be predicated of the species ‘man’ at all. Again, colour is present in body, therefore in individual bodies, for if there were no individual body in which it was present, it could not be present in body at all. Thus everything except primary substances is either predicated of primary substances, or is present in them, and if these last did not exist, it would be impossible for anything else to exist.
Of secondary substances, the species is more truly substance than the genus, being more nearly related to primary substance. For if any one should render an account of what a primary substance is, he would render a more instructive account, and one more proper to the subject, by stating the species than by stating the genus. Thus, he would give a more instructive account of an individual man by stating that he was man than by stating that he was animal, for the former description is peculiar to the individual in a greater degree, while the latter is too general. Again, the man who gives an account of the nature of an individual tree will give a more instructive account by mentioning the species ‘tree’ than by mentioning the genus ‘plant’.
Moreover, primary substances are most properly called substances in virtue of the fact that they are the entities which underlie everything else, and that everything else is either predicated of them or present in them. Now the same relation which subsists between primary substance and everything else subsists also between the species and the genus: for the species is to the genus as subject is to predicate, since the genus is predicated of the species, whereas the species cannot be predicated of the genus. Thus we have a second ground for asserting that the species is more truly substance than the genus.
Of species themselves, except in the case of such as are genera, no one is more truly substance than another. We should not give a more appropriate account of the individual man by stating the species to which he belonged, than we should of an individual horse by adopting the same method of definition. In the same way, of primary substances, no one is more truly substance than another; an individual man is not more truly substance than an individual ox.
It is, then, with good reason that of all that remains, when we exclude primary substances, we concede to species and genera alone the name ‘secondary substance’, for these alone of all the predicates convey a knowledge of primary substance. For it is by stating the species or the genus that we appropriately define any individual man; and we shall make our definition more exact by stating the former than by stating the latter. All other things that we state, such as that he is white, that he runs, and so on, are irrelevant to the definition. Thus it is just that these alone, apart from primary substances, should be called substances.
Further, primary substances are most properly so called, because they underlie and are the subjects of everything else. Now the same relation that subsists between primary substance and everything else subsists also between the species and the genus to which the primary substance belongs, on the one hand, and every attribute which is not included within these, on the other. For these are the subjects of all such. If we call an individual man ‘skilled in grammar’, the predicate is applicable also to the species and to the genus to which he belongs. This law holds good in all cases.
It is a common characteristic of all substance that it is never present in a subject. For primary substance is neither present in a subject nor predicated of a subject; while, with regard to secondary substances, it is clear from the following arguments (apart from others) that they are not present in a subject. For ‘man’ is predicated of the individual man, but is not present in any subject: for manhood is not present in the individual man. In the same way, ‘animal’ is also predicated of the individual man, but is not present in him. Again, when a thing is present in a subject, though the name may quite well be applied to that in which it is present, the definition cannot be applied. Yet of secondary substances, not only the name, but also the definition, applies to the subject: we should use both the definition of the species and that of the genus with reference to the individual man. Thus substance cannot be present in a subject.
Yet this is not peculiar to substance, for it is also the case that differentiae cannot be present in subjects. The characteristics ‘terrestrial’ and ‘two-footed’ are predicated of the species ‘man’, but not present in it. For they are not in man. Moreover, the definition of the differentia may be predicated of that of which the differentia itself is predicated. For instance, if the characteristic ‘terrestrial’ is predicated of the species ‘man’, the definition also of that characteristic may be used to form the predicate of the species ‘man’: for ‘man’ is terrestrial.
The fact that the parts of substances appear to be present in the whole, as in a subject, should not make us apprehensive lest we should have to admit that such parts are not substances: for in explaining the phrase ‘being present in a subject’, we stated’ that we meant ‘otherwise than as parts in a whole’.
It is the mark of substances and of differentiae that, in all propositions of which they form the predicate, they are predicated univocally. For all such propositions have for their subject either the individual or the species. It is true that, inasmuch as primary substance is not predicable of anything, it can never form the predicate of any proposition. But of secondary substances, the species is predicated of the individual, the genus both of the species and of the individual. Similarly the differentiae are predicated of the species and of the individuals. Moreover, the definition of the species and that of the genus are applicable to the primary substance, and that of the genus to the species. For all that is predicated of the predicate will be predicated also of the subject. Similarly, the definition of the differentiae will be applicable to the species and to the individuals. But it was stated above that the word ‘univocal’ was applied to those things which had both name and definition in common. It is, therefore, established that in every proposition, of which either substance or a differentia forms the predicate, these are predicated univocally.
All substance appears to signify that which is individual. In the case of primary substance this is indisputably true, for the thing is a unit. In the case of secondary substances, when we speak, for instance, of ‘man’ or ‘animal’, our form of speech gives the impression that we are here also indicating that which is individual, but the impression is not strictly true; for a secondary substance is not an individual, but a class with a certain qualification; for it is not one and single as a primary substance is; the words ‘man’, ‘animal’, are predicable of more than one subject.
Yet species and genus do not merely indicate quality, like the term ‘white’; ‘white’ indicates quality and nothing further, but species and genus determine the quality with reference to a substance: they signify substance qualitatively differentiated. The determinate qualification covers a larger field in the case of the genus that in that of the species: he who uses the word ‘animal’ is herein using a word of wider extension than he who uses the word ‘man’.
Another mark of substance is that it has no contrary. What could be the contrary of any primary substance, such as the individual man or animal? It has none. Nor can the species or the genus have a contrary. Yet this characteristic is not peculiar to substance, but is true of many other things, such as quantity. There is nothing that forms the contrary of ‘two cubits long’ or of ‘three cubits long’, or of ‘ten’, or of any such term. A man may contend that ‘much’ is the contrary of ‘little’, or ‘great’ of ‘small’, but of definite quantitative terms no contrary exists.
Substance, again, does not appear to admit of variation of degree. I do not mean by this that one substance cannot be more or less truly substance than another, for it has already been stated’ that this is the case; but that no single substance admits of varying degrees within itself. For instance, one particular substance, ‘man’, cannot be more or less man either than himself at some other time or than some other man. One man cannot be more man than another, as that which is white may be more or less white than some other white object, or as that which is beautiful may be more or less beautiful than some other beautiful object. The same quality, moreover, is said to subsist in a thing in varying degrees at different times. A body, being white, is said to be whiter at one time than it was before, or, being warm, is said to be warmer or less warm than at some other time. But substance is not said to be more or less that which it is: a man is not more truly a man at one time than he was before, nor is anything, if it is substance, more or less what it is. Substance, then, does not admit of variation of degree.
The most distinctive mark of substance appears to be that, while remaining numerically one and the same, it is capable of admitting contrary qualities. From among things other than substance, we should find ourselves unable to bring forward any which possessed this mark. Thus, one and the same colour cannot be white and black. Nor can the same one action be good and bad: this law holds good with everything that is not substance. But one and the selfsame substance, while retaining its identity, is yet capable of admitting contrary qualities. The same individual person is at one time white, at another black, at one time warm, at another cold, at one time good, at another bad. This capacity is found nowhere else, though it might be maintained that a statement or opinion was an exception to the rule. The same statement, it is agreed, can be both true and false. For if the statement ‘he is sitting’ is true, yet, when the person in question has risen, the same statement will be false. The same applies to opinions. For if any one thinks truly that a person is sitting, yet, when that person has risen, this same opinion, if still held, will be false. Yet although this exception may be allowed, there is, nevertheless, a difference in the manner in which the thing takes place. It is by themselves changing that substances admit contrary qualities. It is thus that that which was hot becomes cold, for it has entered into a different state. Similarly that which was white becomes black, and that which was bad good, by a process of change; and in the same way in all other cases it is by changing that substances are capable of admitting contrary qualities. But statements and opinions themselves remain unaltered in all respects: it is by the alteration in the facts of the case that the contrary quality comes to be theirs. The statement ‘he is sitting’ remains unaltered, but it is at one time true, at another false, according to circumstances. What has been said of statements applies also to opinions. Thus, in respect of the manner in which the thing takes place, it is the peculiar mark of substance that it should be capable of admitting contrary qualities; for it is by itself changing that it does so.
If, then, a man should make this exception and contend that statements and opinions are capable of admitting contrary qualities, his contention is unsound. For statements and opinions are said to have this capacity, not because they themselves undergo modification, but because this modification occurs in the case of something else. The truth or falsity of a statement depends on facts, and not on any power on the part of the statement itself of admitting contrary qualities. In short, there is nothing which can alter the nature of statements and opinions. As, then, no change takes place in themselves, these cannot be said to be capable of admitting contrary qualities.
But it is by reason of the modification which takes place within the substance itself that a substance is said to be capable of admitting contrary qualities; for a substance admits within itself either disease or health, whiteness or blackness. It is in this sense that it is said to be capable of admitting contrary qualities.
To sum up, it is a distinctive mark of substance, that, while remaining numerically one and the same, it is capable of admitting contrary qualities, the modification taking place through a change in the substance itself.
Let these remarks suffice on the subject of substance.
Quantity is either discrete or continuous. Moreover, some quantities are such that each part of the whole has a relative position to the other parts: others have within them no such relation of part to part.
Instances of discrete quantities are number and speech; of continuous, lines, surfaces, solids, and, besides these, time and place.
In the case of the parts of a number, there is no common boundary at which they join. For example: two fives make ten, but the two fives have no common boundary, but are separate; the parts three and seven also do not join at any boundary. Nor, to generalize, would it ever be possible in the case of number that there should be a common boundary among the parts; they are always separate. Number, therefore, is a discrete quantity.
The same is true of speech. That speech is a quantity is evident: for it is measured in long and short syllables. I mean here that speech which is vocal. Moreover, it is a discrete quantity for its parts have no common boundary. There is no common boundary at which the syllables join, but each is separate and distinct from the rest.
A line, on the other hand, is a continuous quantity, for it is possible to find a common boundary at which its parts join. In the case of the line, this common boundary is the point; in the case of the plane, it is the line: for the parts of the plane have also a common boundary. Similarly you can find a common boundary in the case of the parts of a solid, namely either a line or a plane.
Space and time also belong to this class of quantities. Time, past, present, and future, forms a continuous whole. Space, likewise, is a continuous quantity; for the parts of a solid occupy a certain space, and these have a common boundary; it follows that the parts of space also, which are occupied by the parts of the solid, have the same common boundary as the parts of the solid. Thus, not only time, but space also, is a continuous quantity, for its parts have a common boundary.
Quantities consist either of parts which bear a relative position each to each, or of parts which do not. The parts of a line bear a relative position to each other, for each lies somewhere, and it would be possible to distinguish each, and to state the position of each on the plane and to explain to what sort of part among the rest each was contiguous. Similarly the parts of a plane have position, for it could similarly be stated what was the position of each and what sort of parts were contiguous. The same is true with regard to the solid and to space. But it would be impossible to show that the arts of a number had a relative position each to each, or a particular position, or to state what parts were contiguous. Nor could this be done in the case of time, for none of the parts of time has an abiding existence, and that which does not abide can hardly have position. It would be better to say that such parts had a relative order, in virtue of one being prior to another. Similarly with number: in counting, ‘one’ is prior to ‘two’, and ‘two’ to ‘three’, and thus the parts of number may be said to possess a relative order, though it would be impossible to discover any distinct position for each. This holds good also in the case of speech. None of its parts has an abiding existence: when once a syllable is pronounced, it is not possible to retain it, so that, naturally, as the parts do not abide, they cannot have position. Thus, some quantities consist of parts which have position, and some of those which have not.
Strictly speaking, only the things which I have mentioned belong to the category of quantity: everything else that is called quantitative is a quantity in a secondary sense. It is because we have in mind some one of these quantities, properly so called, that we apply quantitative terms to other things. We speak of what is white as large, because the surface over which the white extends is large; we speak of an action or a process as lengthy, because the time covered is long; these things cannot in their own right claim the quantitative epithet. For instance, should any one explain how long an action was, his statement would be made in terms of the time taken, to the effect that it lasted a year, or something of that sort. In the same way, he would explain the size of a white object in terms of surface, for he would state the area which it covered. Thus the things already mentioned, and these alone, are in their intrinsic nature quantities; nothing else can claim the name in its own right, but, if at all, only in a secondary sense.
Quantities have no contraries. In the case of definite quantities this is obvious; thus, there is nothing that is the contrary of ‘two cubits long’ or of ‘three cubits long’, or of a surface, or of any such quantities. A man might, indeed, argue that ‘much’ was the contrary of ‘little’, and ‘great’ of ‘small’. But these are not quantitative, but relative; things are not great or small absolutely, they are so called rather as the result of an act of comparison. For instance, a mountain is called small, a grain large, in virtue of the fact that the latter is greater than others of its kind, the former less. Thus there is a reference here to an external standard, for if the terms ‘great’ and ‘small’ were used absolutely, a mountain would never be called small or a grain large. Again, we say that there are many people in a village, and few in Athens, although those in the city are many times as numerous as those in the village: or we say that a house has many in it, and a theatre few, though those in the theatre far outnumber those in the house. The terms ‘two cubits long, “three cubits long,’ and so on indicate quantity, the terms ‘great’ and ‘small’ indicate relation, for they have reference to an external standard. It is, therefore, plain that these are to be classed as relative.
Again, whether we define them as quantitative or not, they have no contraries: for how can there be a contrary of an attribute which is not to be apprehended in or by itself, but only by reference to something external? Again, if ‘great’ and ‘small’ are contraries, it will come about that the same subject can admit contrary qualities at one and the same time, and that things will themselves be contrary to themselves. For it happens at times that the same thing is both small and great. For the same thing may be small in comparison with one thing, and great in comparison with another, so that the same thing comes to be both small and great at one and the same time, and is of such a nature as to admit contrary qualities at one and the same moment. Yet it was agreed, when substance was being discussed, that nothing admits contrary qualities at one and the same moment. For though substance is capable of admitting contrary qualities, yet no one is at the same time both sick and healthy, nothing is at the same time both white and black. Nor is there anything which is qualified in contrary ways at one and the same time.
Moreover, if these were contraries, they would themselves be contrary to themselves. For if ‘great’ is the contrary of ‘small’, and the same thing is both great and small at the same time, then ‘small’ or ‘great’ is the contrary of itself. But this is impossible. The term ‘great’, therefore, is not the contrary of the term ‘small’, nor ‘much’ of ‘little’. And even though a man should call these terms not relative but quantitative, they would not have contraries.
It is in the case of space that quantity most plausibly appears to admit of a contrary. For men define the term ‘above’ as the contrary of ‘below’, when it is the region at the centre they mean by ‘below’; and this is so, because nothing is farther from the extremities of the universe than the region at the centre. Indeed, it seems that in defining contraries of every kind men have recourse to a spatial metaphor, for they say that those things are contraries which, within the same class, are separated by the greatest possible distance.
Quantity does not, it appears, admit of variation of degree. One thing cannot be two cubits long in a greater degree than another. Similarly with regard to number: what is ‘three’ is not more truly three than what is ‘five’ is five; nor is one set of three more truly three than another set. Again, one period of time is not said to be more truly time than another. Nor is there any other kind of quantity, of all that have been mentioned, with regard to which variation of degree can be predicated. The category of quantity, therefore, does not admit of variation of degree.
The most distinctive mark of quantity is that equality and inequality are predicated of it. Each of the aforesaid quantities is said to be equal or unequal. For instance, one solid is said to be equal or unequal to another; number, too, and time can have these terms applied to them, indeed can all those kinds of quantity that have been mentioned.
That which is not a quantity can by no means, it would seem, be termed equal or unequal to anything else. One particular disposition or one particular quality, such as whiteness, is by no means compared with another in terms of equality and inequality but rather in terms of similarity. Thus it is the distinctive mark of quantity that it can be called equal and unequal.
Those things are called relative, which, being either said to be of something else or related to something else, are explained by reference to that other thing. For instance, the word ‘superior’ is explained by reference to something else, for it is superiority over something else that is meant. Similarly, the expression ‘double’ has this external reference, for it is the double of something else that is meant. So it is with everything else of this kind. There are, moreover, other relatives, e.g. habit, disposition, perception, knowledge, and attitude. The significance of all these is explained by a reference to something else and in no other way. Thus, a habit is a habit of something, knowledge is knowledge of something, attitude is the attitude of something. So it is with all other relatives that have been mentioned. Those terms, then, are called relative, the nature of which is explained by reference to something else, the preposition ‘of’ or some other preposition being used to indicate the relation. Thus, one mountain is called great in comparison with son with another; for the mountain claims this attribute by comparison with something. Again, that which is called similar must be similar to something else, and all other such attributes have this external reference. It is to be noted that lying and standing and sitting are particular attitudes, but attitude is itself a relative term. To lie, to stand, to be seated, are not themselves attitudes, but take their name from the aforesaid attitudes.
It is possible for relatives to have contraries. Thus virtue has a contrary, vice, these both being relatives; knowledge, too, has a contrary, ignorance. But this is not the mark of all relatives; ‘double’ and ‘triple’ have no contrary, nor indeed has any such term.
It also appears that relatives can admit of variation of degree. For ‘like’ and ‘unlike’, ‘equal’ and ‘unequal’, have the modifications ‘more’ and ‘less’ applied to them, and each of these is relative in character: for the terms ‘like’ and ‘unequal’ bear ‘unequal’ bear a reference to something external. Yet, again, it is not every relative term that admits of variation of degree. No term such as ‘double’ admits of this modification. All relatives have correlatives: by the term ‘slave’ we mean the slave of a master, by the term ‘master’, the master of a slave; by ‘double’, the double of its hall; by ‘half’, the half of its double; by ‘greater’, greater than that which is less; by ‘less,’ less than that which is greater.
So it is with every other relative term; but the case we use to express the correlation differs in some instances. Thus, by knowledge we mean knowledge the knowable; by the knowable, that which is to be apprehended by knowledge; by perception, perception of the perceptible; by the perceptible, that which is apprehended by perception.
Sometimes, however, reciprocity of correlation does not appear to exist. This comes about when a blunder is made, and that to which the relative is related is not accurately stated. If a man states that a wing is necessarily relative to a bird, the connexion between these two will not be reciprocal, for it will not be possible to say that a bird is a bird by reason of its wings. The reason is that the original statement was inaccurate, for the wing is not said to be relative to the bird qua bird, since many creatures besides birds have wings, but qua winged creature. If, then, the statement is made accurate, the connexion will be reciprocal, for we can speak of a wing, having reference necessarily to a winged creature, and of a winged creature as being such because of its wings.
Occasionally, perhaps, it is necessary to coin words, if no word exists by which a correlation can adequately be explained. If we define a rudder as necessarily having reference to a boat, our definition will not be appropriate, for the rudder does not have this reference to a boat qua boat, as there are boats which have no rudders. Thus we cannot use the terms reciprocally, for the word ‘boat’ cannot be said to find its explanation in the word ‘rudder’. As there is no existing word, our definition would perhaps be more accurate if we coined some word like ‘ruddered’ as the correlative of ‘rudder’. If we express ourselves thus accurately, at any rate the terms are reciprocally connected, for the ‘ruddered’ thing is ‘ruddered’ in virtue of its rudder. So it is in all other cases. A head will be more accurately defined as the correlative of that which is ‘headed’, than as that of an animal, for the animal does not have a head qua animal, since many animals have no head.
Thus we may perhaps most easily comprehend that to which a thing is related, when a name does not exist, if, from that which has a name, we derive a new name, and apply it to that with which the first is reciprocally connected, as in the aforesaid instances, when we derived the word ‘winged’ from ‘wing’ and from ‘rudder’.
All relatives, then, if properly defined, have a correlative. I add this condition because, if that to which they are related is stated as haphazard and not accurately, the two are not found to be interdependent. Let me state what I mean more clearly. Even in the case of acknowledged correlatives, and where names exist for each, there will be no interdependence if one of the two is denoted, not by that name which expresses the correlative notion, but by one of irrelevant significance. The term ‘slave,’ if defined as related, not to a master, but to a man, or a biped, or anything of that sort, is not reciprocally connected with that in relation to which it is defined, for the statement is not exact. Further, if one thing is said to be correlative with another, and the terminology used is correct, then, though all irrelevant attributes should be removed, and only that one attribute left in virtue of which it was correctly stated to be correlative with that other, the stated correlation will still exist. If the correlative of ‘the slave’ is said to be ‘the master’, then, though all irrelevant attributes of the said ‘master’, such as ‘biped’, ‘receptive of knowledge’, ‘human’, should be removed, and the attribute ‘master’ alone left, the stated correlation existing between him and the slave will remain the same, for it is of a master that a slave is said to be the slave. On the other hand, if, of two correlatives, one is not correctly termed, then, when all other attributes are removed and that alone is left in virtue of which it was stated to be correlative, the stated correlation will be found to have disappeared.
For suppose the correlative of ‘the slave’ should be said to be ‘the man’, or the correlative of ‘the wing”the bird’; if the attribute ‘master’ be withdrawn from’ the man’, the correlation between ‘the man’ and ‘the slave’ will cease to exist, for if the man is not a master, the slave is not a slave. Similarly, if the attribute ‘winged’ be withdrawn from ‘the bird’, ‘the wing’ will no longer be relative; for if the so-called correlative is not winged, it follows that ‘the wing’ has no correlative.
Thus it is essential that the correlated terms should be exactly designated; if there is a name existing, the statement will be easy; if not, it is doubtless our duty to construct names. When the terminology is thus correct, it is evident that all correlatives are interdependent.
Correlatives are thought to come into existence simultaneously. This is for the most part true, as in the case of the double and the half. The existence of the half necessitates the existence of that of which it is a half. Similarly the existence of a master necessitates the existence of a slave, and that of a slave implies that of a master; these are merely instances of a general rule. Moreover, they cancel one another; for if there is no double it follows that there is no half, and vice versa; this rule also applies to all such correlatives. Yet it does not appear to be true in all cases that correlatives come into existence simultaneously. The object of knowledge would appear to exist before knowledge itself, for it is usually the case that we acquire knowledge of objects already existing; it would be difficult, if not impossible, to find a branch of knowledge the beginning of the existence of which was contemporaneous with that of its object.
Again, while the object of knowledge, if it ceases to exist, cancels at the same time the knowledge which was its correlative, the converse of this is not true. It is true that if the object of knowledge does not exist there can be no knowledge: for there will no longer be anything to know. Yet it is equally true that, if knowledge of a certain object does not exist, the object may nevertheless quite well exist. Thus, in the case of the squaring of the circle, if indeed that process is an object of knowledge, though it itself exists as an object of knowledge, yet the knowledge of it has not yet come into existence. Again, if all animals ceased to exist, there would be no knowledge, but there might yet be many objects of knowledge.
This is likewise the case with regard to perception: for the object of perception is, it appears, prior to the act of perception. If the perceptible is annihilated, perception also will cease to exist; but the annihilation of perception does not cancel the existence of the perceptible. For perception implies a body perceived and a body in which perception takes place. Now if that which is perceptible is annihilated, it follows that the body is annihilated, for the body is a perceptible thing; and if the body does not exist, it follows that perception also ceases to exist. Thus the annihilation of the perceptible involves that of perception.
But the annihilation of perception does not involve that of the perceptible. For if the animal is annihilated, it follows that perception also is annihilated, but perceptibles such as body, heat, sweetness, bitterness, and so on, will remain.
Again, perception is generated at the same time as the perceiving subject, for it comes into existence at the same time as the animal. But the perceptible surely exists before perception; for fire and water and such elements, out of which the animal is itself composed, exist before the animal is an animal at all, and before perception. Thus it would seem that the perceptible exists before perception.
It may be questioned whether it is true that no substance is relative, as seems to be the case, or whether exception is to be made in the case of certain secondary substances. With regard to primary substances, it is quite true that there is no such possibility, for neither wholes nor parts of primary substances are relative. The individual man or ox is not defined with reference to something external. Similarly with the parts: a particular hand or head is not defined as a particular hand or head of a particular person, but as the hand or head of a particular person. It is true also, for the most part at least, in the case of secondary substances; the species ‘man’ and the species ‘ox’ are not defined with reference to anything outside themselves. Wood, again, is only relative in so far as it is some one’s property, not in so far as it is wood. It is plain, then, that in the cases mentioned substance is not relative. But with regard to some secondary substances there is a difference of opinion; thus, such terms as ‘head’ and ‘hand’ are defined with reference to that of which the things indicated are a part, and so it comes about that these appear to have a relative character. Indeed, if our definition of that which is relative was complete, it is very difficult, if not impossible, to prove that no substance is relative. If, however, our definition was not complete, if those things only are properly called relative in the case of which relation to an external object is a necessary condition of existence, perhaps some explanation of the dilemma may be found.
The former definition does indeed apply to all relatives, but the fact that a thing is explained with reference to something else does not make it essentially relative.
From this it is plain that, if a man definitely apprehends a relative thing, he will also definitely apprehend that to which it is relative. Indeed this is self-evident: for if a man knows that some particular thing is relative, assuming that we call that a relative in the case of which relation to something is a necessary condition of existence, he knows that also to which it is related. For if he does not know at all that to which it is related, he will not know whether or not it is relative. This is clear, moreover, in particular instances. If a man knows definitely that such and such a thing is ‘double’, he will also forthwith know definitely that of which it is the double. For if there is nothing definite of which he knows it to be the double, he does not know at all that it is double. Again, if he knows that a thing is more beautiful, it follows necessarily that he will forthwith definitely know that also than which it is more beautiful. He will not merely know indefinitely that it is more beautiful than something which is less beautiful, for this would be supposition, not knowledge. For if he does not know definitely that than which it is more beautiful, he can no longer claim to know definitely that it is more beautiful than something else which is less beautiful: for it might be that nothing was less beautiful. It is, therefore, evident that if a man apprehends some relative thing definitely, he necessarily knows that also definitely to which it is related.
Now the head, the hand, and such things are substances, and it is possible to know their essential character definitely, but it does not necessarily follow that we should know that to which they are related. It is not possible to know forthwith whose head or hand is meant. Thus these are not relatives, and, this being the case, it would be true to say that no substance is relative in character. It is perhaps a difficult matter, in such cases, to make a positive statement without more exhaustive examination, but to have raised questions with regard to details is not without advantage.
By ‘quality’ I mean that in virtue of which people are said to be such and such.
Quality is a term that is used in many senses. One sort of quality let us call ‘habit’ or ‘disposition’. Habit differs from disposition in being more lasting and more firmly established. The various kinds of knowledge and of virtue are habits, for knowledge, even when acquired only in a moderate degree, is, it is agreed, abiding in its character and difficult to displace, unless some great mental upheaval takes place, through disease or any such cause. The virtues, also, such as justice, self-restraint, and so on, are not easily dislodged or dismissed, so as to give place to vice.
By a disposition, on the other hand, we mean a condition that is easily changed and quickly gives place to its opposite. Thus, heat, cold, disease, health, and so on are dispositions. For a man is disposed in one way or another with reference to these, but quickly changes, becoming cold instead of warm, ill instead of well. So it is with all other dispositions also, unless through lapse of time a disposition has itself become inveterate and almost impossible to dislodge: in which case we should perhaps go so far as to call it a habit.
It is evident that men incline to call those conditions habits which are of a more or less permanent type and difficult to displace; for those who are not retentive of knowledge, but volatile, are not said to have such and such a ‘habit’ as regards knowledge, yet they are disposed, we may say, either better or worse, towards knowledge. Thus habit differs from disposition in this, that while the latter in ephemeral, the former is permanent and difficult to alter.
Habits are at the same time dispositions, but dispositions are not necessarily habits. For those who have some specific habit may be said also, in virtue of that habit, to be thus or thus disposed; but those who are disposed in some specific way have not in all cases the corresponding habit.
Another sort of quality is that in virtue of which, for example, we call men good boxers or runners, or healthy or sickly: in fact it includes all those terms which refer to inborn capacity or incapacity. Such things are not predicated of a person in virtue of his disposition, but in virtue of his inborn capacity or incapacity to do something with ease or to avoid defeat of any kind. Persons are called good boxers or good runners, not in virtue of such and such a disposition, but in virtue of an inborn capacity to accomplish something with ease. Men are called healthy in virtue of the inborn capacity of easy resistance to those unhealthy influences that may ordinarily arise; unhealthy, in virtue of the lack of this capacity. Similarly with regard to softness and hardness. Hardness is predicated of a thing because it has that capacity of resistance which enables it to withstand disintegration; softness, again, is predicated of a thing by reason of the lack of that capacity.
A third class within this category is that of affective qualities and affections. Sweetness, bitterness, sourness, are examples of this sort of quality, together with all that is akin to these; heat, moreover, and cold, whiteness, and blackness are affective qualities. It is evident that these are qualities, for those things that possess them are themselves said to be such and such by reason of their presence. Honey is called sweet because it contains sweetness; the body is called white because it contains whiteness; and so in all other cases.
The term ‘affective quality’ is not used as indicating that those things which admit these qualities are affected in any way. Honey is not called sweet because it is affected in a specific way, nor is this what is meant in any other instance. Similarly heat and cold are called affective qualities, not because those things which admit them are affected. What is meant is that these said qualities are capable of producing an ‘affection’ in the way of perception. For sweetness has the power of affecting the sense of taste; heat, that of touch; and so it is with the rest of these qualities.
Whiteness and blackness, however, and the other colours, are not said to be affective qualities in this sense, but — because they themselves are the results of an affection. It is plain that many changes of colour take place because of affections. When a man is ashamed, he blushes; when he is afraid, he becomes pale, and so on. So true is this, that when a man is by nature liable to such affections, arising from some concomitance of elements in his constitution, it is a probable inference that he has the corresponding complexion of skin. For the same disposition of bodily elements, which in the former instance was momentarily present in the case of an access of shame, might be a result of a man’s natural temperament, so as to produce the corresponding colouring also as a natural characteristic. All conditions, therefore, of this kind, if caused by certain permanent and lasting affections, are called affective qualities. For pallor and duskiness of complexion are called qualities, inasmuch as we are said to be such and such in virtue of them, not only if they originate in natural constitution, but also if they come about through long disease or sunburn, and are difficult to remove, or indeed remain throughout life. For in the same way we are said to be such and such because of these.
Those conditions, however, which arise from causes which may easily be rendered ineffective or speedily removed, are called, not qualities, but affections: for we are not said to be such virtue of them. The man who blushes through shame is not said to be a constitutional blusher, nor is the man who becomes pale through fear said to be constitutionally pale. He is said rather to have been affected.
Thus such conditions are called affections, not qualities.
In like manner there are affective qualities and affections of the soul. That temper with which a man is born and which has its origin in certain deep-seated affections is called a quality. I mean such conditions as insanity, irascibility, and so on: for people are said to be mad or irascible in virtue of these. Similarly those abnormal psychic states which are not inborn, but arise from the concomitance of certain other elements, and are difficult to remove, or altogether permanent, are called qualities, for in virtue of them men are said to be such and such.
Those, however, which arise from causes easily rendered ineffective are called affections, not qualities. Suppose that a man is irritable when vexed: he is not even spoken of as a bad-tempered man, when in such circumstances he loses his temper somewhat, but rather is said to be affected. Such conditions are therefore termed, not qualities, but affections.
The fourth sort of quality is figure and the shape that belongs to a thing; and besides this, straightness and curvedness and any other qualities of this type; each of these defines a thing as being such and such. Because it is triangular or quadrangular a thing is said to have a specific character, or again because it is straight or curved; in fact a thing’s shape in every case gives rise to a qualification of it.
Rarity and density, roughness and smoothness, seem to be terms indicating quality: yet these, it would appear, really belong to a class different from that of quality. For it is rather a certain relative position of the parts composing the thing thus qualified which, it appears, is indicated by each of these terms. A thing is dense, owing to the fact that its parts are closely combined with one another; rare, because there are interstices between the parts; smooth, because its parts lie, so to speak, evenly; rough, because some parts project beyond others.
There may be other sorts of quality, but those that are most properly so called have, we may safely say, been enumerated.
These, then, are qualities, and the things that take their name from them as derivatives, or are in some other way dependent on them, are said to be qualified in some specific way. In most, indeed in almost all cases, the name of that which is qualified is derived from that of the quality. Thus the terms ‘whiteness’, ‘grammar’, ‘justice’, give us the adjectives ‘white’, ‘grammatical’, ‘just’, and so on.
There are some cases, however, in which, as the quality under consideration has no name, it is impossible that those possessed of it should have a name that is derivative. For instance, the name given to the runner or boxer, who is so called in virtue of an inborn capacity, is not derived from that of any quality; for lob those capacities have no name assigned to them. In this, the inborn capacity is distinct from the science, with reference to which men are called, e.g. boxers or wrestlers. Such a science is classed as a disposition; it has a name, and is called ‘boxing’ or ‘wrestling’ as the case may be, and the name given to those disposed in this way is derived from that of the science. Sometimes, even though a name exists for the quality, that which takes its character from the quality has a name that is not a derivative. For instance, the upright man takes his character from the possession of the quality of integrity, but the name given him is not derived from the word ‘integrity’. Yet this does not occur often.
We may therefore state that those things are said to be possessed of some specific quality which have a name derived from that of the aforesaid quality, or which are in some other way dependent on it.
One quality may be the contrary of another; thus justice is the contrary of injustice, whiteness of blackness, and so on. The things, also, which are said to be such and such in virtue of these qualities, may be contrary the one to the other; for that which is unjust is contrary to that which is just, that which is white to that which is black. This, however, is not always the case. Red, yellow, and such colours, though qualities, have no contraries.
If one of two contraries is a quality, the other will also be a quality. This will be evident from particular instances, if we apply the names used to denote the other categories; for instance, granted that justice is the contrary of injustice and justice is a quality, injustice will also be a quality: neither quantity, nor relation, nor place, nor indeed any other category but that of quality, will be applicable properly to injustice. So it is with all other contraries falling under the category of quality.
Qualities admit of variation of degree. Whiteness is predicated of one thing in a greater or less degree than of another. This is also the case with reference to justice. Moreover, one and the same thing may exhibit a quality in a greater degree than it did before: if a thing is white, it may become whiter.
Though this is generally the case, there are exceptions. For if we should say that justice admitted of variation of degree, difficulties might ensue, and this is true with regard to all those qualities which are dispositions. There are some, indeed, who dispute the possibility of variation here. They maintain that justice and health cannot very well admit of variation of degree themselves, but that people vary in the degree in which they possess these qualities, and that this is the case with grammatical learning and all those qualities which are classed as dispositions. However that may be, it is an incontrovertible fact that the things which in virtue of these qualities are said to be what they are vary in the degree in which they possess them; for one man is said to be better versed in grammar, or more healthy or just, than another, and so on.
The qualities expressed by the terms ‘triangular’ and ‘quadrangular’ do not appear to admit of variation of degree, nor indeed do any that have to do with figure. For those things to which the definition of the triangle or circle is applicable are all equally triangular or circular. Those, on the other hand, to which the same definition is not applicable, cannot be said to differ from one another in degree; the square is no more a circle than the rectangle, for to neither is the definition of the circle appropriate. In short, if the definition of the term proposed is not applicable to both objects, they cannot be compared. Thus it is not all qualities which admit of variation of degree.
Whereas none of the characteristics I have mentioned are peculiar to quality, the fact that likeness and unlikeness can be predicated with reference to quality only, gives to that category its distinctive feature. One thing is like another only with reference to that in virtue of which it is such and such; thus this forms the peculiar mark of quality.
We must not be disturbed because it may be argued that, though proposing to discuss the category of quality, we have included in it many relative terms. We did say that habits and dispositions were relative. In practically all such cases the genus is relative, the individual not. Thus knowledge, as a genus, is explained by reference to something else, for we mean a knowledge of something. But particular branches of knowledge are not thus explained. The knowledge of grammar is not relative to anything external, nor is the knowledge of music, but these, if relative at all, are relative only in virtue of their genera; thus grammar is said be the knowledge of something, not the grammar of something; similarly music is the knowledge of something, not the music of something.
Thus individual branches of knowledge are not relative. And it is because we possess these individual branches of knowledge that we are said to be such and such. It is these that we actually possess: we are called experts because we possess knowledge in some particular branch. Those particular branches, therefore, of knowledge, in virtue of which we are sometimes said to be such and such, are themselves qualities, and are not relative. Further, if anything should happen to fall within both the category of quality and that of relation, there would be nothing extraordinary in classing it under both these heads.
Action and affection both admit of contraries and also of variation of degree. Heating is the contrary of cooling, being heated of being cooled, being glad of being vexed. Thus they admit of contraries. They also admit of variation of degree: for it is possible to heat in a greater or less degree; also to be heated in a greater or less degree. Thus action and affection also admit of variation of degree. So much, then, is stated with regard to these categories.
We spoke, moreover, of the category of position when we were dealing with that of relation, and stated that such terms derived their names from those of the corresponding attitudes.
As for the rest, time, place, state, since they are easily intelligible, I say no more about them than was said at the beginning, that in the category of state are included such states as ‘shod’, ‘armed’, in that of place ‘in the Lyceum’ and so on, as was explained before.
[[Categories]] (Translated by E. M. Edghill)
@@margin-left:2em;
[[1|Categories: 1]] - [[2|Categories: 2]] - [[3|Categories: 3]] - [[4|Categories: 4]] - [[5|Categories: 5]] - [[6|Categories: 6]] - [[7|Categories: 7]] - [[8|Categories: 8]] - [[9|Categories: 9]] - [[10|Categories: 10]] - [[11|Categories: 11]] - [[12|Categories: 12]] - [[13|Categories: 13]] - [[14|Categories: 14]] - [[15|Categories: 15]]
@@
[[On Interpretation]] (Translated by E. M. Edghill)
@@margin-left:2em;
[[1|On Interpretation: 1]] - [[2|On Interpretation: 2]] - [[3|On Interpretation: 3]] - [[4|On Interpretation: 4]] - [[5|On Interpretation: 5]] - [[6|On Interpretation: 6]] - [[7|On Interpretation: 7]] - [[8|On Interpretation: 8]] - [[9|On Interpretation: 9]] - [[10|On Interpretation: 10]] - [[11|On Interpretation: 11]] - [[12|On Interpretation: 12]] - [[13|On Interpretation: 13]] - [[14|On Interpretation: 14]]
@@
[[Prior Analytics]]
@@margin-left:2em;
[[Book I|Prior Analytics: Book I]]
@@margin-left:2em;
[[1|Prior Analytics: Book I: 1]] - [[2|Prior Analytics: Book I: 2]] - [[3|Prior Analytics: Book I: 3]] - [[4|Prior Analytics: Book I: 4]] - [[5|Prior Analytics: Book I: 5]] - [[6|Prior Analytics: Book I: 6]] - [[7|Prior Analytics: Book I: 7]] - [[8|Prior Analytics: Book I: 8]] - [[9|Prior Analytics: Book I: 9]] - [[10|Prior Analytics: Book I: 10]] - [[11|Prior Analytics: Book I: 11]] - [[12|Prior Analytics: Book I: 12]] - [[13|Prior Analytics: Book I: 13]] - [[14|Prior Analytics: Book I: 14]] - [[15|Prior Analytics: Book I: 15]] - [[16|Prior Analytics: Book I: 16]] - [[17|Prior Analytics: Book I: 17]] - [[18|Prior Analytics: Book I: 18]] - [[19|Prior Analytics: Book I: 19]] - [[20|Prior Analytics: Book I: 20]] - [[21|Prior Analytics: Book I: 21]] - [[22|Prior Analytics: Book I: 22]] - [[23|Prior Analytics: Book I: 23]] - [[24|Prior Analytics: Book I: 24]] - [[25|Prior Analytics: Book I: 25]] - [[26|Prior Analytics: Book I: 26]] - [[27|Prior Analytics: Book I: 27]] - [[28|Prior Analytics: Book I: 28]] - [[29|Prior Analytics: Book I: 29]] - [[30|Prior Analytics: Book I: 30]] - [[31|Prior Analytics: Book I: 31]] - [[32|Prior Analytics: Book I: 32]] - [[33|Prior Analytics: Book I: 33]] - [[34|Prior Analytics: Book I: 34]] - [[35|Prior Analytics: Book I: 35]] - [[36|Prior Analytics: Book I: 36]] - [[37|Prior Analytics: Book I: 37]] - [[38|Prior Analytics: Book I: 38]] - [[39|Prior Analytics: Book I: 39]] - [[40|Prior Analytics: Book I: 40]] - [[41|Prior Analytics: Book I: 41]] - [[42|Prior Analytics: Book I: 42]] - [[43|Prior Analytics: Book I: 43]] - [[44|Prior Analytics: Book I: 44]] - [[45|Prior Analytics: Book I: 45]] - [[46|Prior Analytics: Book I: 46]]
@@
@@
@@margin-left:2em;
[[Book II|Prior Analytics: Book II]]
@@
Organon: Personal Wiki by [[David Fisco|http://www.davidfisco.com]]
* [[ Organon Personal Wiki Homepage|http://personal-wikis.davidfisco.com/organon]]
* [[Note on Tiddler Titles]]
* Feedback: [[Email David Fisco|mailto:[email protected]?subject= Organon+Personal+Wiki+Feedback]]
* [[TiddlyWiki Homepage|http://tiddlywiki.com/]]
* [[TiddlyWiki Markdown|http://tiddlywiki.com/#WikiText]]
Do not change the titles of the tiddlers provided with this ~TiddyWiki. If you do, you will experience problems with navigation.
---
!!![[On Interpretation: 1]]
{{On Interpretation: 1}}
---
!!![[On Interpretation: 2]]
{{On Interpretation: 2}}
---
!!![[On Interpretation: 3]]
{{On Interpretation: 3}}
---
!!![[On Interpretation: 4]]
{{On Interpretation: 4}}
---
!!![[On Interpretation: 5]]
{{On Interpretation: 5}}
---
!!![[On Interpretation: 6]]
{{On Interpretation: 6}}
---
!!![[On Interpretation: 7]]
{{On Interpretation: 7}}
---
!!![[On Interpretation: 8]]
{{On Interpretation: 8}}
---
!!![[On Interpretation: 9]]
{{On Interpretation: 9}}
---
!!![[On Interpretation: 10]]
{{On Interpretation: 10}}
---
!!![[On Interpretation: 11]]
{{On Interpretation: 11}}
---
!!![[On Interpretation: 12]]
{{On Interpretation: 12}}
---
!!![[On Interpretation: 13]]
{{On Interpretation: 13}}
---
!!![[On Interpretation: 14]]
{{On Interpretation: 14}}
First we must define the terms ‘noun’ and ‘verb’, then the terms ‘denial’ and ‘affirmation’, then ‘proposition’ and ‘sentence.’
Spoken words are the symbols of mental experience and written words are the symbols of spoken words. Just as all men have not the same writing, so all men have not the same speech sounds, but the mental experiences, which these directly symbolize, are the same for all, as also are those things of which our experiences are the images. This matter has, however, been discussed in my treatise about the soul, for it belongs to an investigation distinct from that which lies before us.
As there are in the mind thoughts which do not involve truth or falsity, and also those which must be either true or false, so it is in speech. For truth and falsity imply combination and separation. Nouns and verbs, provided nothing is added, are like thoughts without combination or separation; ‘man’ and ‘white’, as isolated terms, are not yet either true or false. In proof of this, consider the word ‘goat-stag.’ It has significance, but there is no truth or falsity about it, unless ‘is’ or ‘is not’ is added, either in the present or in some other tense.
An affirmation is the statement of a fact with regard to a subject, and this subject is either a noun or that which has no name; the subject and predicate in an affirmation must each denote a single thing. I have already explained’ what is meant by a noun and by that which has no name; for I stated that the expression ‘not-man’ was not a noun, in the proper sense of the word, but an indefinite noun, denoting as it does in a certain sense a single thing. Similarly the expression ‘does not enjoy health’ is not a verb proper, but an indefinite verb. Every affirmation, then, and every denial, will consist of a noun and a verb, either definite or indefinite.
There can be no affirmation or denial without a verb; for the expressions ‘is’, ‘will be’, ‘was’, ‘is coming to be’, and the like are verbs according to our definition, since besides their specific meaning they convey the notion of time. Thus the primary affirmation and denial are ‘as follows: ‘man is’, ‘man is not’. Next to these, there are the propositions: ‘not-man is’, ‘not-man is not’. Again we have the propositions: ‘every man is, ‘every man is not’, ‘all that is not-man is’, ‘all that is not-man is not’. The same classification holds good with regard to such periods of time as lie outside the present.
When the verb ‘is’ is used as a third element in the sentence, there can be positive and negative propositions of two sorts. Thus in the sentence ‘man is just’ the verb ‘is’ is used as a third element, call it verb or noun, which you will. Four propositions, therefore, instead of two can be formed with these materials. Two of the four, as regards their affirmation and denial, correspond in their logical sequence with the propositions which deal with a condition of privation; the other two do not correspond with these.
I mean that the verb ‘is’ is added either to the term ‘just’ or to the term ‘not-just’, and two negative propositions are formed in the same way. Thus we have the four propositions. Reference to the subjoined table will make matters clear:
<table width="100%" style="border: none; border-collapse: collapse;">
<tr>
<td style="border: none; border-collapse: collapse;">A. Affirmation. Man is just</td>
<td align="right" style="border: none; border-collapse: collapse;">B. Denial. Man is not just</td>
</tr>
<tr>
<td align="right" style="border: none; border-collapse: collapse;">\</td>
<td style="border: none; border-collapse: collapse;">/</td>
</tr>
<tr>
<td align="right" style="border: none; border-collapse: collapse;">/</td>
<td style="border: none; border-collapse: collapse;">\</td>
</tr>
<tr>
<td style="border: none; border-collapse: collapse;">D. Denial. Man is not not-just</td>
<td align="right" style="border: none; border-collapse: collapse;">C. Affirmation. Man is not-just</td>
</tr>
</table>
Here ‘is’ and ‘is not’ are added either to ‘just’ or to ‘not-just’. This then is the proper scheme for these propositions, as has been said in the Analytics. The same rule holds good, if the subject is distributed. Thus we have the table:
<table width="100%" style="border: none; border-collapse: collapse;">
<tr>
<td style="border: none; border-collapse: collapse;">A'. Affirmation. Every man is just</td>
<td align="right" style="border: none; border-collapse: collapse;">B'. Denial. Not every man is just<br /></td>
</tr>
<tr>
<td align="right" style="border: none; border-collapse: collapse;">\</td>
<td style="border: none; border-collapse: collapse;">/</td>
</tr>
<tr>
<td align="right" style="border: none; border-collapse: collapse;">/</td>
<td style="border: none; border-collapse: collapse;">\</td>
</tr>
<tr>
<td style="border: none; border-collapse: collapse;">D'. Denial. Not every man is not-just</td>
<td align="right" style="border: none; border-collapse: collapse;">C'. Affirmation. Every man is not-just.</td>
</tr>
</table>
Yet here it is not possible, in the same way as in the former case, that the propositions joined in the table by a diagonal line should both be true; though under certain circumstances this is the case.
We have thus set out two pairs of opposite propositions; there are moreover two other pairs, if a term be conjoined with ‘not-man’, the latter forming a kind of subject. Thus:
<table width="100%" style="border: none; border-collapse: collapse;">
<tr>
<td style="border: none; border-collapse: collapse;">A". Not-man is just.</td>
<td align="right" style="border: none; border-collapse: collapse;">B". Not-man is not just<br /></td>
</tr>
<tr>
<td align="right" style="border: none; border-collapse: collapse;">\</td>
<td style="border: none; border-collapse: collapse;">/</td>
</tr>
<tr>
<td align="right" style="border: none; border-collapse: collapse;">/</td>
<td style="border: none; border-collapse: collapse;">\</td>
</tr>
<tr>
<td style="border: none; border-collapse: collapse;">D". Not-man is not not-just.</td>
<td align="right" style="border: none; border-collapse: collapse;">C". Not-man is not-just.</td>
</tr>
</table>
This is an exhaustive enumeration of all the pairs of opposite propositions that can possibly be framed. This last group should remain distinct from those which preceded it, since it employs as its subject the expression ‘not-man’.
When the verb ‘is’ does not fit the structure of the sentence (for instance, when the verbs ‘walks’, ‘enjoys health’ are used), that scheme applies, which applied when the word ‘is’ was added.
Thus we have the propositions: ‘every man enjoys health’, ‘every man does-not-enjoy-health’, ‘all that is not-man enjoys health’, ‘all that is not-man does-not-enjoy-health’. We must not in these propositions use the expression ‘not every man’. The negative must be attached to the word ‘man’, for the word ‘every’ does not give to the subject a universal significance, but implies that, as a subject, it is distributed. This is plain from the following pairs: ‘man enjoys health’, ‘man does not enjoy health’; ‘not-man enjoys health’, ‘not man does not enjoy health’. These propositions differ from the former in being indefinite and not universal in character. Thus the adjectives ‘every’ and no additional significance except that the subject, whether in a positive or in a negative sentence, is distributed. The rest of the sentence, therefore, will in each case be the same.
Since the contrary of the proposition ‘every animal is just’ is ‘no animal is just’, it is plain that these two propositions will never both be true at the same time or with reference to the same subject. Sometimes, however, the contradictories of these contraries will both be true, as in the instance before us: the propositions ‘not every animal is just’ and ‘some animals are just’ are both true.
Further, the proposition ‘no man is just’ follows from the proposition ‘every man is not just’ and the proposition ‘not every man is not just’, which is the opposite of ‘every man is not-just’, follows from the proposition ‘some men are just’; for if this be true, there must be some just men.
It is evident, also, that when the subject is individual, if a question is asked and the negative answer is the true one, a certain positive proposition is also true. Thus, if the question were asked Socrates wise?’ and the negative answer were the true one, the positive inference ‘Then Socrates is unwise’ is correct. But no such inference is correct in the case of universals, but rather a negative proposition. For instance, if to the question ‘Is every man wise?’ the answer is ‘no’, the inference ‘Then every man is unwise’ is false. But under these circumstances the inference ‘Not every man is wise’ is correct. This last is the contradictory, the former the contrary. Negative expressions, which consist of an indefinite noun or predicate, such as ‘not-man’ or ‘not-just’, may seem to be denials containing neither noun nor verb in the proper sense of the words. But they are not. For a denial must always be either true or false, and he that uses the expression ‘not man’, if nothing more be added, is not nearer but rather further from making a true or a false statement than he who uses the expression ‘man’.
The propositions ‘everything that is not man is just’, and the contradictory of this, are not equivalent to any of the other propositions; on the other hand, the proposition ‘everything that is not man is not just’ is equivalent to the proposition ‘nothing that is not man is just’.
The conversion of the position of subject and predicate in a sentence involves no difference in its meaning. Thus we say ‘man is white’ and ‘white is man’. If these were not equivalent, there would be more than one contradictory to the same proposition, whereas it has been demonstrated’ that each proposition has one proper contradictory and one only. For of the proposition ‘man is white’ the appropriate contradictory is ‘man is not white’, and of the proposition ‘white is man’, if its meaning be different, the contradictory will either be ‘white is not not-man’ or ‘white is not man’. Now the former of these is the contradictory of the proposition ‘white is not-man’, and the latter of these is the contradictory of the proposition ‘man is white’; thus there will be two contradictories to one proposition.
It is evident, therefore, that the inversion of the relative position of subject and predicate does not affect the sense of affirmations and denials.
There is no unity about an affirmation or denial which, either positively or negatively, predicates one thing of many subjects, or many things of the same subject, unless that which is indicated by the many is really some one thing. do not apply this word ‘one’ to those things which, though they have a single recognized name, yet do not combine to form a unity. Thus, man may be an animal, and biped, and domesticated, but these three predicates combine to form a unity. On the other hand, the predicates ‘white’, ‘man’, and ‘walking’ do not thus combine. Neither, therefore, if these three form the subject of an affirmation, nor if they form its predicate, is there any unity about that affirmation. In both cases the unity is linguistic, but not real.
If therefore the dialectical question is a request for an answer, i.e. either for the admission of a premiss or for the admission of one of two contradictories-and the premiss is itself always one of two contradictories-the answer to such a question as contains the above predicates cannot be a single proposition. For as I have explained in the Topics, question is not a single one, even if the answer asked for is true.
At the same time it is plain that a question of the form ‘what is it?’ is not a dialectical question, for a dialectical questioner must by the form of his question give his opponent the chance of announcing one of two alternatives, whichever he wishes. He must therefore put the question into a more definite form, and inquire, e.g.. whether man has such and such a characteristic or not.
Some combinations of predicates are such that the separate predicates unite to form a single predicate. Let us consider under what conditions this is and is not possible. We may either state in two separate propositions that man is an animal and that man is a biped, or we may combine the two, and state that man is an animal with two feet. Similarly we may use ‘man’ and ‘white’ as separate predicates, or unite them into one. Yet if a man is a shoemaker and is also good, we cannot construct a composite proposition and say that he is a good shoemaker. For if, whenever two separate predicates truly belong to a subject, it follows that the predicate resulting from their combination also truly belongs to the subject, many absurd results ensue. For instance, a man is man and white. Therefore, if predicates may always be combined, he is a white man. Again, if the predicate ‘white’ belongs to him, then the combination of that predicate with the former composite predicate will be permissible. Thus it will be right to say that he is a white man so on indefinitely. Or, again, we may combine the predicates ‘musical’, ‘white’, and ‘walking’, and these may be combined many times. Similarly we may say that Socrates is Socrates and a man, and that therefore he is the man Socrates, or that Socrates is a man and a biped, and that therefore he is a two-footed man. Thus it is manifest that if man states unconditionally that predicates can always be combined, many absurd consequences ensue.
We will now explain what ought to be laid down.
Those predicates, and terms forming the subject of predication, which are accidental either to the same subject or to one another, do not combine to form a unity. Take the proposition ‘man is white of complexion and musical’. Whiteness and being musical do not coalesce to form a unity, for they belong only accidentally to the same subject. Nor yet, if it were true to say that that which is white is musical, would the terms ‘musical’ and ‘white’ form a unity, for it is only incidentally that that which is musical is white; the combination of the two will, therefore, not form a unity.
Thus, again, whereas, if a man is both good and a shoemaker, we cannot combine the two propositions and say simply that he is a good shoemaker, we are, at the same time, able to combine the predicates ‘animal’ and ‘biped’ and say that a man is an animal with two feet, for these predicates are not accidental.
Those predicates, again, cannot form a unity, of which the one is implicit in the other: thus we cannot combine the predicate ‘white’ again and again with that which already contains the notion ‘white’, nor is it right to call a man an animal-man or a two-footed man; for the notions ‘animal’ and ‘biped’ are implicit in the word ‘man’. On the other hand, it is possible to predicate a term simply of any one instance, and to say that some one particular man is a man or that some one white man is a white man.
Yet this is not always possible: indeed, when in the adjunct there is some opposite which involves a contradiction, the predication of the simple term is impossible. Thus it is not right to call a dead man a man. When, however, this is not the case, it is not impossible.
Yet the facts of the case might rather be stated thus: when some such opposite elements are present, resolution is never possible, but when they are not present, resolution is nevertheless not always possible. Take the proposition ‘Homer is so-and-so’, say ‘a poet’; does it follow that Homer is, or does it not? The verb ‘is’ is here used of Homer only incidentally, the proposition being that Homer is a poet, not that he is, in the independent sense of the word.
Thus, in the case of those predications which have within them no contradiction when the nouns are expanded into definitions, and wherein the predicates belong to the subject in their own proper sense and not in any indirect way, the individual may be the subject of the simple propositions as well as of the composite. But in the case of that which is not, it is not true to say that because it is the object of opinion, it is; for the opinion held about it is that it is not, not that it is.
As these distinctions have been made, we must consider the mutual relation of those affirmations and denials which assert or deny possibility or contingency, impossibility or necessity: for the subject is not without difficulty.
We admit that of composite expressions those are contradictory each to each which have the verb ‘to be’ its positive and negative form respectively. Thus the contradictory of the proposition ‘man is’ is ‘man is not’, not ‘not-man is’, and the contradictory of ‘man is white’ is ‘man is not white’, not ‘man is not-white’. For otherwise, since either the positive or the negative proposition is true of any subject, it will turn out true to say that a piece of wood is a man that is not white.
Now if this is the case, in those propositions which do not contain the verb ‘to be’ the verb which takes its place will exercise the same function. Thus the contradictory of ‘man walks’ is ‘man does not walk’, not ‘not-man walks’; for to say ‘man walks’ merely equivalent to saying ‘man is walking’.
If then this rule is universal, the contradictory of ‘it may be’ is may not be’, not ‘it cannot be’.
Now it appears that the same thing both may and may not be; for instance, everything that may be cut or may walk may also escape cutting and refrain from walking; and the reason is that those things that have potentiality in this sense are not always actual. In such cases, both the positive and the negative propositions will be true; for that which is capable of walking or of being seen has also a potentiality in the opposite direction.
But since it is impossible that contradictory propositions should both be true of the same subject, it follows that’ it may not be’ is not the contradictory of ‘it may be’. For it is a logical consequence of what we have said, either that the same predicate can be both applicable and inapplicable to one and the same subject at the same time, or that it is not by the addition of the verbs ‘be’ and ‘not be’, respectively, that positive and negative propositions are formed. If the former of these alternatives must be rejected, we must choose the latter.
The contradictory, then, of ‘it may be’ is ‘it cannot be’. The same rule applies to the proposition ‘it is contingent that it should be’; the contradictory of this is ‘it is not contingent that it should be’. The similar propositions, such as ‘it is necessary’ and ‘it is impossible’, may be dealt with in the same manner. For it comes about that just as in the former instances the verbs ‘is’ and ‘is not’ were added to the subject-matter of the sentence ‘white’ and ‘man’, so here ‘that it should be’ and ‘that it should not be’ are the subject-matter and ‘is possible’, ‘is contingent’, are added. These indicate that a certain thing is or is not possible, just as in the former instances ‘is’ and ‘is not’ indicated that certain things were or were not the case.
The contradictory, then, of ‘it may not be’ is not ‘it cannot be’, but ‘it cannot not be’, and the contradictory of ‘it may be’ is not ‘it may not be’, but cannot be’. Thus the propositions ‘it may be’ and ‘it may not be’ appear each to imply the other: for, since these two propositions are not contradictory, the same thing both may and may not be. But the propositions ‘it may be’ and ‘it cannot be’ can never be true of the same subject at the same time, for they are contradictory. Nor can the propositions ‘it may not be’ and ‘it cannot not be’ be at once true of the same subject.
The propositions which have to do with necessity are governed by the same principle. The contradictory of ‘it is necessary that it should be’, is not ‘it is necessary that it should not be,’ but ‘it is not necessary that it should be’, and the contradictory of ‘it is necessary that it should not be’ is ‘it is not necessary that it should not be’.
Again, the contradictory of ‘it is impossible that it should be’ is not ‘it is impossible that it should not be’ but ‘it is not impossible that it should be’, and the contradictory of ‘it is impossible that it should not be’ is ‘it is not impossible that it should not be’.
To generalize, we must, as has been stated, define the clauses ‘that it should be’ and ‘that it should not be’ as the subject-matter of the propositions, and in making these terms into affirmations and denials we must combine them with ‘that it should be’ and ‘that it should not be’ respectively.
We must consider the following pairs as contradictory propositions:
<table align="center">
<tr>
<td>It may be.</td>
<td>It cannot be.</td>
</tr>
<tr>
<td>It is contingent.</td>
<td>It is not contingent.</td>
</tr>
<tr>
<td>It is impossible.</td>
<td>It is not impossible.</td>
</tr>
<tr>
<td>It is necessary.</td>
<td>It is not necessary.</td>
</tr>
<tr>
<td>It is true.</td>
<td>It is not true.</td>
</tr>
</table>
Logical sequences follow in due course when we have arranged the propositions thus. From the proposition ‘it may be’ it follows that it is contingent, and the relation is reciprocal. It follows also that it is not impossible and not necessary.
From the proposition ‘it may not be’ or ‘it is contingent that it should not be’ it follows that it is not necessary that it should not be and that it is not impossible that it should not be. From the proposition ‘it cannot be’ or ‘it is not contingent’ it follows that it is necessary that it should not be and that it is impossible that it should be. From the proposition ‘it cannot not be’ or ‘it is not contingent that it should not be’ it follows that it is necessary that it should be and that it is impossible that it should not be.
Let us consider these statements by the help of a table:
<table>
<tr>
<th>A.</th>
<th>B.</th>
</tr>
<tr>
<td>It may be.</td>
<td>It cannot be.</td>
</tr>
<tr>
<td>It is contingent.</td>
<td>It is not contingent.</td>
</tr>
<tr>
<td>It is not impossible that it should be.</td>
<td>It is impossible that it should be.</td>
</tr>
<tr>
<td>It is not necessary that it should be.</td>
<td>It is necessary that it should not be.</td>
</tr>
<tr>
<th>C.</th>
<th>D.</th>
</tr>
<tr>
<td>It may not be.</td>
<td>It cannot not be.</td>
</tr>
<tr>
<td>It is contingent that it should not be.</td>
<td>It is not contingent that it should not be.</td>
</tr>
<tr>
<td>It is not impossible that it should not be.</td>
<td>It is impossible that it should not be.</td>
</tr>
<tr>
<td>It is not necessary that it should not be.</td>
<td>It is necessary that it should be.</td>
</tr>
</table>
Now the propositions ‘it is impossible that it should be’ and ‘it is not impossible that it should be’ are consequent upon the propositions ‘it may be’, ‘it is contingent’, and ‘it cannot be’, ‘it is not contingent’, the contradictories upon the contradictories. But there is inversion. The negative of the proposition ‘it is impossible’ is consequent upon the proposition ‘it may be’ and the corresponding positive in the first case upon the negative in the second. For ‘it is impossible’ is a positive proposition and ‘it is not impossible’ is negative.
We must investigate the relation subsisting between these propositions and those which predicate necessity. That there is a distinction is clear. In this case, contrary propositions follow respectively from contradictory propositions, and the contradictory propositions belong to separate sequences. For the proposition ‘it is not necessary that it should be’ is not the negative of ‘it is necessary that it should not be’, for both these propositions may be true of the same subject; for when it is necessary that a thing should not be, it is not necessary that it should be. The reason why the propositions predicating necessity do not follow in the same kind of sequence as the rest, lies in the fact that the proposition ‘it is impossible’ is equivalent, when used with a contrary subject, to the proposition ‘it is necessary’. For when it is impossible that a thing should be, it is necessary, not that it should be, but that it should not be, and when it is impossible that a thing should not be, it is necessary that it should be. Thus, if the propositions predicating impossibility or non-impossibility follow without change of subject from those predicating possibility or non-possibility, those predicating necessity must follow with the contrary subject; for the propositions ‘it is impossible’ and ‘it is necessary’ are not equivalent, but, as has been said, inversely connected.
Yet perhaps it is impossible that the contradictory propositions predicating necessity should be thus arranged. For when it is necessary that a thing should be, it is possible that it should be. (For if not, the opposite follows, since one or the other must follow; so, if it is not possible, it is impossible, and it is thus impossible that a thing should be, which must necessarily be; which is absurd.)
Yet from the proposition ‘it may be’ it follows that it is not impossible, and from that it follows that it is not necessary; it comes about therefore that the thing which must necessarily be need not be; which is absurd. But again, the proposition ‘it is necessary that it should be’ does not follow from the proposition ‘it may be’, nor does the proposition ‘it is necessary that it should not be’. For the proposition ‘it may be’ implies a twofold possibility, while, if either of the two former propositions is true, the twofold possibility vanishes. For if a thing may be, it may also not be, but if it is necessary that it should be or that it should not be, one of the two alternatives will be excluded. It remains, therefore, that the proposition ‘it is not necessary that it should not be’ follows from the proposition ‘it may be’. For this is true also of that which must necessarily be.
Moreover the proposition ‘it is not necessary that it should not be’ is the contradictory of that which follows from the proposition ‘it cannot be’; for ‘it cannot be’ is followed by ‘it is impossible that it should be’ and by ‘it is necessary that it should not be’, and the contradictory of this is the proposition ‘it is not necessary that it should not be’. Thus in this case also contradictory propositions follow contradictory in the way indicated, and no logical impossibilities occur when they are thus arranged.
It may be questioned whether the proposition ‘it may be’ follows from the proposition ‘it is necessary that it should be’. If not, the contradictory must follow, namely that it cannot be, or, if a man should maintain that this is not the contradictory, then the proposition ‘it may not be’.
Now both of these are false of that which necessarily is. At the same time, it is thought that if a thing may be cut it may also not be cut, if a thing may be it may also not be, and thus it would follow that a thing which must necessarily be may possibly not be; which is false. It is evident, then, that it is not always the case that that which may be or may walk possesses also a potentiality in the other direction. There are exceptions. In the first place we must except those things which possess a potentiality not in accordance with a rational principle, as fire possesses the potentiality of giving out heat, that is, an irrational capacity. Those potentialities which involve a rational principle are potentialities of more than one result, that is, of contrary results; those that are irrational are not always thus constituted. As I have said, fire cannot both heat and not heat, neither has anything that is always actual any twofold potentiality. Yet some even of those potentialities which are irrational admit of opposite results. However, thus much has been said to emphasize the truth that it is not every potentiality which admits of opposite results, even where the word is used always in the same sense.
But in some cases the word is used equivocally. For the term ‘possible’ is ambiguous, being used in the one case with reference to facts, to that which is actualized, as when a man is said to find walking possible because he is actually walking, and generally when a capacity is predicated because it is actually realized; in the other case, with reference to a state in which realization is conditionally practicable, as when a man is said to find walking possible because under certain conditions he would walk. This last sort of potentiality belongs only to that which can be in motion, the former can exist also in the case of that which has not this power. Both of that which is walking and is actual, and of that which has the capacity though not necessarily realized, it is true to say that it is not impossible that it should walk (or, in the other case, that it should be), but while we cannot predicate this latter kind of potentiality of that which is necessary in the unqualified sense of the word, we can predicate the former.
Our conclusion, then, is this: that since the universal is consequent upon the particular, that which is necessary is also possible, though not in every sense in which the word may be used.
We may perhaps state that necessity and its absence are the initial principles of existence and non-existence, and that all else must be regarded as posterior to these.
It is plain from what has been said that that which is of necessity is actual. Thus, if that which is eternal is prior, actuality also is prior to potentiality. Some things are actualities without potentiality, namely, the primary substances; a second class consists of those things which are actual but also potential, whose actuality is in nature prior to their potentiality, though posterior in time; a third class comprises those things which are never actualized, but are pure potentialities.
The question arises whether an affirmation finds its contrary in a denial or in another affirmation; whether the proposition ‘every man is just’ finds its contrary in the proposition ‘no man is just’, or in the proposition ‘every man is unjust’. Take the propositions ‘Callias is just’, ‘Callias is not just’, ‘Callias is unjust’; we have to discover which of these form contraries.
Now if the spoken word corresponds with the judgement of the mind, and if, in thought, that judgement is the contrary of another, which pronounces a contrary fact, in the way, for instance, in which the judgement ‘every man is just’ pronounces a contrary to that pronounced by the judgement ‘every man is unjust’, the same must needs hold good with regard to spoken affirmations.
But if, in thought, it is not the judgement which pronounces a contrary fact that is the contrary of another, then one affirmation will not find its contrary in another, but rather in the corresponding denial. We must therefore consider which true judgement is the contrary of the false, that which forms the denial of the false judgement or that which affirms the contrary fact.
Let me illustrate. There is a true judgement concerning that which is good, that it is good; another, a false judgement, that it is not good; and a third, which is distinct, that it is bad. Which of these two is contrary to the true? And if they are one and the same, which mode of expression forms the contrary?
It is an error to suppose that judgements are to be defined as contrary in virtue of the fact that they have contrary subjects; for the judgement concerning a good thing, that it is good, and that concerning a bad thing, that it is bad, may be one and the same, and whether they are so or not, they both represent the truth. Yet the subjects here are contrary. But judgements are not contrary because they have contrary subjects, but because they are to the contrary effect.
Now if we take the judgement that that which is good is good, and another that it is not good, and if there are at the same time other attributes, which do not and cannot belong to the good, we must nevertheless refuse to treat as the contraries of the true judgement those which opine that some other attribute subsists which does not subsist, as also those that opine that some other attribute does not subsist which does subsist, for both these classes of judgement are of unlimited content.
Those judgements must rather be termed contrary to the true judgements, in which error is present. Now these judgements are those which are concerned with the starting points of generation, and generation is the passing from one extreme to its opposite; therefore error is a like transition.
Now that which is good is both good and not bad. The first quality is part of its essence, the second accidental; for it is by accident that it is not bad. But if that true judgement is most really true, which concerns the subject’s intrinsic nature, then that false judgement likewise is most really false, which concerns its intrinsic nature. Now the judgement that that is good is not good is a false judgement concerning its intrinsic nature, the judgement that it is bad is one concerning that which is accidental. Thus the judgement which denies the true judgement is more really false than that which positively asserts the presence of the contrary quality. But it is the man who forms that judgement which is contrary to the true who is most thoroughly deceived, for contraries are among the things which differ most widely within the same class. If then of the two judgements one is contrary to the true judgement, but that which is contradictory is the more truly contrary, then the latter, it seems, is the real contrary. The judgement that that which is good is bad is composite. For presumably the man who forms that judgement must at the same time understand that that which is good is not good.
Further, the contradictory is either always the contrary or never; therefore, if it must necessarily be so in all other cases, our conclusion in the case just dealt with would seem to be correct. Now where terms have no contrary, that judgement is false, which forms the negative of the true; for instance, he who thinks a man is not a man forms a false judgement. If then in these cases the negative is the contrary, then the principle is universal in its application.
Again, the judgement that that which is not good is not good is parallel with the judgement that that which is good is good. Besides these there is the judgement that that which is good is not good, parallel with the judgement that that that is not good is good. Let us consider, therefore, what would form the contrary of the true judgement that that which is not good is not good. The judgement that it is bad would, of course, fail to meet the case, since two true judgements are never contrary and this judgement might be true at the same time as that with which it is connected. For since some things which are not good are bad, both judgements may be true. Nor is the judgement that it is not bad the contrary, for this too might be true, since both qualities might be predicated of the same subject. It remains, therefore, that of the judgement concerning that which is not good, that it is not good, the contrary judgement is that it is good; for this is false. In the same way, moreover, the judgement concerning that which is good, that it is not good, is the contrary of the judgement that it is good.
It is evident that it will make no difference if we universalize the positive judgement, for the universal negative judgement will form the contrary. For instance, the contrary of the judgement that everything that is good is good is that nothing that is good is good. For the judgement that that which is good is good, if the subject be understood in a universal sense, is equivalent to the judgement that whatever is good is good, and this is identical with the judgement that everything that is good is good. We may deal similarly with judgements concerning that which is not good.
If therefore this is the rule with judgements, and if spoken affirmations and denials are judgements expressed in words, it is plain that the universal denial is the contrary of the affirmation about the same subject. Thus the propositions ‘everything good is good’, ‘every man is good’, have for their contraries the propositions ‘nothing good is good’, ‘no man is good’. The contradictory propositions, on the other hand, are ‘not everything good is good’, ‘not every man is good’.
It is evident, also, that neither true judgements nor true propositions can be contrary the one to the other. For whereas, when two propositions are true, a man may state both at the same time without inconsistency, contrary propositions are those which state contrary conditions, and contrary conditions cannot subsist at one and the same time in the same subject.
By a noun we mean a sound significant by convention, which has no reference to time, and of which no part is significant apart from the rest. In the noun ‘Fairsteed,’ the part ‘steed’ has no significance in and by itself, as in the phrase ‘fair steed.’ Yet there is a difference between simple and composite nouns; for in the former the part is in no way significant, in the latter it contributes to the meaning of the whole, although it has not an independent meaning. Thus in the word ‘pirate-boat’ the word ‘boat’ has no meaning except as part of the whole word.
The limitation ‘by convention’ was introduced because nothing is by nature a noun or name-it is only so when it becomes a symbol; inarticulate sounds, such as those which brutes produce, are significant, yet none of these constitutes a noun.
The expression ‘not-man’ is not a noun. There is indeed no recognized term by which we may denote such an expression, for it is not a sentence or a denial. Let it then be called an indefinite noun.
The expressions ‘of Philo’, ‘to Philo’, and so on, constitute not nouns, but cases of a noun. The definition of these cases of a noun is in other respects the same as that of the noun proper, but, when coupled with ‘is’, ‘was’, or will be’, they do not, as they are, form a proposition either true or false, and this the noun proper always does, under these conditions. Take the words ‘of Philo is’ or ‘of or ‘of Philo is not’; these words do not, as they stand, form either a true or a false proposition.
A verb is that which, in addition to its proper meaning, carries with it the notion of time. No part of it has any independent meaning, and it is a sign of something said of something else.
I will explain what I mean by saying that it carries with it the notion of time. ‘Health’ is a noun, but ‘is healthy’ is a verb; for besides its proper meaning it indicates the present existence of the state in question.
Moreover, a verb is always a sign of something said of something else, i.e. of something either predicable of or present in some other thing.
Such expressions as ‘is not-healthy’, ‘is not, ill’, I do not describe as verbs; for though they carry the additional note of time, and always form a predicate, there is no specified name for this variety; but let them be called indefinite verbs, since they apply equally well to that which exists and to that which does not.
Similarly ‘he was healthy’, ‘he will be healthy’, are not verbs, but tenses of a verb; the difference lies in the fact that the verb indicates present time, while the tenses of the verb indicate those times which lie outside the present.
Verbs in and by themselves are substantival and have significance, for he who uses such expressions arrests the hearer’s mind, and fixes his attention; but they do not, as they stand, express any judgement, either positive or negative. For neither are ‘to be’ and ‘not to be’ the participle ‘being’ significant of any fact, unless something is added; for they do not themselves indicate anything, but imply a copulation, of which we cannot form a conception apart from the things coupled.
A sentence is a significant portion of speech, some parts of which have an independent meaning, that is to say, as an utterance, though not as the expression of any positive judgement. Let me explain. The word ‘human’ has meaning, but does not constitute a proposition, either positive or negative. It is only when other words are added that the whole will form an affirmation or denial. But if we separate one syllable of the word ‘human’ from the other, it has no meaning; similarly in the word ‘mouse’, the part ‘ouse’ has no meaning in itself, but is merely a sound. In composite words, indeed, the parts contribute to the meaning of the whole; yet, as has been pointed out, they have not an independent meaning.
Every sentence has meaning, not as being the natural means by which a physical faculty is realized, but, as we have said, by convention. Yet every sentence is not a proposition; only such are propositions as have in them either truth or falsity. Thus a prayer is a sentence, but is neither true nor false.
Let us therefore dismiss all other types of sentence but the proposition, for this last concerns our present inquiry, whereas the investigation of the others belongs rather to the study of rhetoric or of poetry.
The first class of simple propositions is the simple affirmation, the next, the simple denial; all others are only one by conjunction.
Every proposition must contain a verb or the tense of a verb. The phrase which defines the species ‘man’, if no verb in present, past, or future time be added, is not a proposition. It may be asked how the expression ‘a footed animal with two feet’ can be called single; for it is not the circumstance that the words follow in unbroken succession that effects the unity. This inquiry, however, finds its place in an investigation foreign to that before us.
We call those propositions single which indicate a single fact, or the conjunction of the parts of which results in unity: those propositions, on the other hand, are separate and many in number, which indicate many facts, or whose parts have no conjunction.
Let us, moreover, consent to call a noun or a verb an expression only, and not a proposition, since it is not possible for a man to speak in this way when he is expressing something, in such a way as to make a statement, whether his utterance is an answer to a question or an act of his own initiation.
To return: of propositions one kind is simple, i.e. that which asserts or denies something of something, the other composite, i.e. that which is compounded of simple propositions. A simple proposition is a statement, with meaning, as to the presence of something in a subject or its absence, in the present, past, or future, according to the divisions of time.
An affirmation is a positive assertion of something about something, a denial a negative assertion.
Now it is possible both to affirm and to deny the presence of something which is present or of something which is not, and since these same affirmations and denials are possible with reference to those times which lie outside the present, it would be possible to contradict any affirmation or denial. Thus it is plain that every affirmation has an opposite denial, and similarly every denial an opposite affirmation.
We will call such a pair of propositions a pair of contradictories. Those positive and negative propositions are said to be contradictory which have the same subject and predicate. The identity of subject and of predicate must not be ‘equivocal’. Indeed there are definitive qualifications besides this, which we make to meet the casuistries of sophists.
Some things are universal, others individual. By the term ‘universal’ I mean that which is of such a nature as to be predicated of many subjects, by ‘individual’ that which is not thus predicated. Thus ‘man’ is a universal, ‘Callias’ an individual.
Our propositions necessarily sometimes concern a universal subject, sometimes an individual.
If, then, a man states a positive and a negative proposition of universal character with regard to a universal, these two propositions are ‘contrary’. By the expression ‘a proposition of universal character with regard to a universal’, such propositions as ‘every man is white’, ‘no man is white’ are meant. When, on the other hand, the positive and negative propositions, though they have regard to a universal, are yet not of universal character, they will not be contrary, albeit the meaning intended is sometimes contrary. As instances of propositions made with regard to a universal, but not of universal character, we may take the ‘propositions ‘man is white’, ‘man is not white’. ‘Man’ is a universal, but the proposition is not made as of universal character; for the word ‘every’ does not make the subject a universal, but rather gives the proposition a universal character. If, however, both predicate and subject are distributed, the proposition thus constituted is contrary to truth; no affirmation will, under such circumstances, be true. The proposition ‘every man is every animal’ is an example of this type.
An affirmation is opposed to a denial in the sense which I denote by the term ‘contradictory’, when, while the subject remains the same, the affirmation is of universal character and the denial is not. The affirmation ‘every man is white’ is the contradictory of the denial ‘not every man is white’, or again, the proposition ‘no man is white’ is the contradictory of the proposition ‘some men are white’. But propositions are opposed as contraries when both the affirmation and the denial are universal, as in the sentences ‘every man is white’, ‘no man is white’, ‘every man is just’, ‘no man is just’.
We see that in a pair of this sort both propositions cannot be true, but the contradictories of a pair of contraries can sometimes both be true with reference to the same subject; for instance ‘not every man is white’ and some men are white’ are both true. Of such corresponding positive and negative propositions as refer to universals and have a universal character, one must be true and the other false. This is the case also when the reference is to individuals, as in the propositions ‘Socrates is white’, ‘Socrates is not white’.
When, on the other hand, the reference is to universals, but the propositions are not universal, it is not always the case that one is true and the other false, for it is possible to state truly that man is white and that man is not white and that man is beautiful and that man is not beautiful; for if a man is deformed he is the reverse of beautiful, also if he is progressing towards beauty he is not yet beautiful.
This statement might seem at first sight to carry with it a contradiction, owing to the fact that the proposition ‘man is not white’ appears to be equivalent to the proposition ‘no man is white’. This, however, is not the case, nor are they necessarily at the same time true or false.
It is evident also that the denial corresponding to a single affirmation is itself single; for the denial must deny just that which the affirmation affirms concerning the same subject, and must correspond with the affirmation both in the universal or particular character of the subject and in the distributed or undistributed sense in which it is understood.
For instance, the affirmation ‘Socrates is white’ has its proper denial in the proposition ‘Socrates is not white’. If anything else be negatively predicated of the subject or if anything else be the subject though the predicate remain the same, the denial will not be the denial proper to that affirmation, but on that is distinct.
The denial proper to the affirmation ‘every man is white’ is ‘not every man is white’; that proper to the affirmation ‘some men are white’ is ‘no man is white’, while that proper to the affirmation ‘man is white’ is ‘man is not white’.
We have shown further that a single denial is contradictorily opposite to a single affirmation and we have explained which these are; we have also stated that contrary are distinct from contradictory propositions and which the contrary are; also that with regard to a pair of opposite propositions it is not always the case that one is true and the other false. We have pointed out, moreover, what the reason of this is and under what circumstances the truth of the one involves the falsity of the other.
An affirmation or denial is single, if it indicates some one fact about some one subject; it matters not whether the subject is universal and whether the statement has a universal character, or whether this is not so. Such single propositions are: ‘every man is white’, ‘not every man is white’;’man is white’,’man is not white’; ‘no man is white’, ‘some men are white’; provided the word ‘white’ has one meaning. If, on the other hand, one word has two meanings which do not combine to form one, the affirmation is not single. For instance, if a man should establish the symbol ‘garment’ as significant both of a horse and of a man, the proposition ‘garment is white’ would not be a single affirmation, nor its opposite a single denial. For it is equivalent to the proposition ‘horse and man are white’, which, again, is equivalent to the two propositions ‘horse is white’, ‘man is white’. If, then, these two propositions have more than a single significance, and do not form a single proposition, it is plain that the first proposition either has more than one significance or else has none; for a particular man is not a horse.
This, then, is another instance of those propositions of which both the positive and the negative forms may be true or false simultaneously.
In the case of that which is or which has taken place, propositions, whether positive or negative, must be true or false. Again, in the case of a pair of contradictories, either when the subject is universal and the propositions are of a universal character, or when it is individual, as has been said,’ one of the two must be true and the other false; whereas when the subject is universal, but the propositions are not of a universal character, there is no such necessity. We have discussed this type also in a previous chapter.
When the subject, however, is individual, and that which is predicated of it relates to the future, the case is altered. For if all propositions whether positive or negative are either true or false, then any given predicate must either belong to the subject or not, so that if one man affirms that an event of a given character will take place and another denies it, it is plain that the statement of the one will correspond with reality and that of the other will not. For the predicate cannot both belong and not belong to the subject at one and the same time with regard to the future.
Thus, if it is true to say that a thing is white, it must necessarily be white; if the reverse proposition is true, it will of necessity not be white. Again, if it is white, the proposition stating that it is white was true; if it is not white, the proposition to the opposite effect was true. And if it is not white, the man who states that it is making a false statement; and if the man who states that it is white is making a false statement, it follows that it is not white. It may therefore be argued that it is necessary that affirmations or denials must be either true or false.
Now if this be so, nothing is or takes place fortuitously, either in the present or in the future, and there are no real alternatives; everything takes place of necessity and is fixed. For either he that affirms that it will take place or he that denies this is in correspondence with fact, whereas if things did not take place of necessity, an event might just as easily not happen as happen; for the meaning of the word ‘fortuitous’ with regard to present or future events is that reality is so constituted that it may issue in either of two opposite directions. Again, if a thing is white now, it was true before to say that it would be white, so that of anything that has taken place it was always true to say ‘it is’ or ‘it will be’. But if it was always true to say that a thing is or will be, it is not possible that it should not be or not be about to be, and when a thing cannot not come to be, it is impossible that it should not come to be, and when it is impossible that it should not come to be, it must come to be. All, then, that is about to be must of necessity take place. It results from this that nothing is uncertain or fortuitous, for if it were fortuitous it would not be necessary.
Again, to say that neither the affirmation nor the denial is true, maintaining, let us say, that an event neither will take place nor will not take place, is to take up a position impossible to defend. In the first place, though facts should prove the one proposition false, the opposite would still be untrue. Secondly, if it was true to say that a thing was both white and large, both these qualities must necessarily belong to it; and if they will belong to it the next day, they must necessarily belong to it the next day. But if an event is neither to take place nor not to take place the next day, the element of chance will be eliminated. For example, it would be necessary that a sea-fight should neither take place nor fail to take place on the next day.
These awkward results and others of the same kind follow, if it is an irrefragable law that of every pair of contradictory propositions, whether they have regard to universals and are stated as universally applicable, or whether they have regard to individuals, one must be true and the other false, and that there are no real alternatives, but that all that is or takes place is the outcome of necessity. There would be no need to deliberate or to take trouble, on the supposition that if we should adopt a certain course, a certain result would follow, while, if we did not, the result would not follow. For a man may predict an event ten thousand years beforehand, and another may predict the reverse; that which was truly predicted at the moment in the past will of necessity take place in the fullness of time.
Further, it makes no difference whether people have or have not actually made the contradictory statements. For it is manifest that the circumstances are not influenced by the fact of an affirmation or denial on the part of anyone. For events will not take place or fail to take place because it was stated that they would or would not take place, nor is this any more the case if the prediction dates back ten thousand years or any other space of time. Wherefore, if through all time the nature of things was so constituted that a prediction about an event was true, then through all time it was necessary that that should find fulfillment; and with regard to all events, circumstances have always been such that their occurrence is a matter of necessity. For that of which someone has said truly that it will be, cannot fail to take place; and of that which takes place, it was always true to say that it would be.
Yet this view leads to an impossible conclusion; for we see that both deliberation and action are causative with regard to the future, and that, to speak more generally, in those things which are not continuously actual there is potentiality in either direction. Such things may either be or not be; events also therefore may either take place or not take place. There are many obvious instances of this. It is possible that this coat may be cut in half, and yet it may not be cut in half, but wear out first. In the same way, it is possible that it should not be cut in half; unless this were so, it would not be possible that it should wear out first. So it is therefore with all other events which possess this kind of potentiality. It is therefore plain that it is not of necessity that everything is or takes place; but in some instances there are real alternatives, in which case the affirmation is no more true and no more false than the denial; while some exhibit a predisposition and general tendency in one direction or the other, and yet can issue in the opposite direction by exception.
Now that which is must needs be when it is, and that which is not must needs not be when it is not. Yet it cannot be said without qualification that all existence and non-existence is the outcome of necessity. For there is a difference between saying that that which is, when it is, must needs be, and simply saying that all that is must needs be, and similarly in the case of that which is not. In the case, also, of two contradictory propositions this holds good. Everything must either be or not be, whether in the present or in the future, but it is not always possible to distinguish and state determinately which of these alternatives must necessarily come about.
Let me illustrate. A sea-fight must either take place to-morrow or not, but it is not necessary that it should take place to-morrow, neither is it necessary that it should not take place, yet it is necessary that it either should or should not take place to-morrow. Since propositions correspond with facts, it is evident that when in future events there is a real alternative, and a potentiality in contrary directions, the corresponding affirmation and denial have the same character.
This is the case with regard to that which is not always existent or not always nonexistent. One of the two propositions in such instances must be true and the other false, but we cannot say determinately that this or that is false, but must leave the alternative undecided. One may indeed be more likely to be true than the other, but it cannot be either actually true or actually false. It is therefore plain that it is not necessary that of an affirmation and a denial one should be true and the other false. For in the case of that which exists potentially, but not actually, the rule which applies to that which exists actually does not hold good. The case is rather as we have indicated.
---
!!![[On Sophistical Refutations: 1]]
{{On Sophistical Refutations: 1}}
---
!!![[On Sophistical Refutations: 2]]
{{On Sophistical Refutations: 2}}
---
!!![[On Sophistical Refutations: 3]]
{{On Sophistical Refutations: 3}}
---
!!![[On Sophistical Refutations: 4]]
{{On Sophistical Refutations: 4}}
---
!!![[On Sophistical Refutations: 5]]
{{On Sophistical Refutations: 5}}
---
!!![[On Sophistical Refutations: 6]]
{{On Sophistical Refutations: 6}}
---
!!![[On Sophistical Refutations: 7]]
{{On Sophistical Refutations: 7}}
---
!!![[On Sophistical Refutations: 8]]
{{On Sophistical Refutations: 8}}
---
!!![[On Sophistical Refutations: 9]]
{{On Sophistical Refutations: 9}}
---
!!![[On Sophistical Refutations: 10]]
{{On Sophistical Refutations: 10}}
---
!!![[On Sophistical Refutations: 11]]
{{On Sophistical Refutations: 11}}
---
!!![[On Sophistical Refutations: 12]]
{{On Sophistical Refutations: 12}}
---
!!![[On Sophistical Refutations: 13]]
{{On Sophistical Refutations: 13}}
---
!!![[On Sophistical Refutations: 14]]
{{On Sophistical Refutations: 14}}
---
!!![[On Sophistical Refutations: 15]]
{{On Sophistical Refutations: 15}}
---
!!![[On Sophistical Refutations: 16]]
{{On Sophistical Refutations: 16}}
---
!!![[On Sophistical Refutations: 17]]
{{On Sophistical Refutations: 17}}
---
!!![[On Sophistical Refutations: 18]]
{{On Sophistical Refutations: 18}}
---
!!![[On Sophistical Refutations: 19]]
{{On Sophistical Refutations: 19}}
---
!!![[On Sophistical Refutations: 20]]
{{On Sophistical Refutations: 20}}
---
!!![[On Sophistical Refutations: 21]]
{{On Sophistical Refutations: 21}}
---
!!![[On Sophistical Refutations: 22]]
{{On Sophistical Refutations: 22}}
---
!!![[On Sophistical Refutations: 23]]
{{On Sophistical Refutations: 23}}
---
!!![[On Sophistical Refutations: 24]]
{{On Sophistical Refutations: 24}}
---
!!![[On Sophistical Refutations: 25]]
{{On Sophistical Refutations: 25}}
---
!!![[On Sophistical Refutations: 26]]
{{On Sophistical Refutations: 26}}
---
!!![[On Sophistical Refutations: 27]]
{{On Sophistical Refutations: 27}}
---
!!![[On Sophistical Refutations: 28]]
{{On Sophistical Refutations: 28}}
---
!!![[On Sophistical Refutations: 29]]
{{On Sophistical Refutations: 29}}
---
!!![[On Sophistical Refutations: 30]]
{{On Sophistical Refutations: 30}}
---
!!![[On Sophistical Refutations: 31]]
{{On Sophistical Refutations: 31}}
---
!!![[On Sophistical Refutations: 32]]
{{On Sophistical Refutations: 32}}
---
!!![[On Sophistical Refutations: 33]]
{{On Sophistical Refutations: 33}}
---
!!![[On Sophistical Refutations: 34]]
{{On Sophistical Refutations: 34}}
Let us now discuss sophistic refutations, i.e. what appear to be refutations but are really fallacies instead. We will begin in the natural order with the first.
That some reasonings are genuine, while others seem to be so but are not, is evident. This happens with arguments, as also elsewhere, through a certain likeness between the genuine and the sham. For physically some people are in a vigorous condition, while others merely seem to be so by blowing and rigging themselves out as the tribesmen do their victims for sacrifice; and some people are beautiful thanks to their beauty, while others seem to be so, by dint of embellishing themselves. So it is, too, with inanimate things; for of these, too, some are really silver and others gold, while others are not and merely seem to be such to our sense; e.g. things made of litharge and tin seem to be of silver, while those made of yellow metal look golden. In the same way both reasoning and refutation are sometimes genuine, sometimes not, though inexperience may make them appear so: for inexperienced people obtain only, as it were, a distant view of these things. For reasoning rests on certain statements such that they involve necessarily the assertion of something other than what has been stated, through what has been stated: refutation is reasoning involving the contradictory of the given conclusion. Now some of them do not really achieve this, though they seem to do so for a number of reasons; and of these the most prolific and usual domain is the argument that turns upon names only. It is impossible in a discussion to bring in the actual things discussed: we use their names as symbols instead of them; and therefore we suppose that what follows in the names, follows in the things as well, just as people who calculate suppose in regard to their counters. But the two cases (names and things) are not alike. For names are finite and so is the sum-total of formulae, while things are infinite in number. Inevitably, then, the same formulae, and a single name, have a number of meanings. Accordingly just as, in counting, those who are not clever in manipulating their counters are taken in by the experts, in the same way in arguments too those who are not well acquainted with the force of names misreason both in their own discussions and when they listen to others. For this reason, then, and for others to be mentioned later, there exists both reasoning and refutation that is apparent but not real. Now for some people it is better worth while to seem to be wise, than to be wise without seeming to be (for the art of the sophist is the semblance of wisdom without the reality, and the sophist is one who makes money from an apparent but unreal wisdom); for them, then, it is clearly essential also to seem to accomplish the task of a wise man rather than to accomplish it without seeming to do so. To reduce it to a single point of contrast it is the business of one who knows a thing, himself to avoid fallacies in the subjects which he knows and to be able to show up the man who makes them; and of these accomplishments the one depends on the faculty to render an answer, and the other upon the securing of one. Those, then, who would be sophists are bound to study the class of arguments aforesaid: for it is worth their while: for a faculty of this kind will make a man seem to be wise, and this is the purpose they happen to have in view.
Clearly, then, there exists a class of arguments of this kind, and it is at this kind of ability that those aim whom we call sophists. Let us now go on to discuss how many kinds there are of sophistical arguments, and how many in number are the elements of which this faculty is composed, and how many branches there happen to be of this inquiry, and the other factors that contribute to this art.
It is no true distinction between arguments which some people draw when they say that some arguments are directed against the expression, and others against the thought expressed: for it is absurd to suppose that some arguments are directed against the expression and others against the thought, and that they are not the same. For what is failure to direct an argument against the thought except what occurs whenever a man does not in using the expression think it to be used in his question in the same sense in which the person questioned granted it? And this is the same thing as to direct the argument against the expression. On the other hand, it is directed against the thought whenever a man uses the expression in the same sense which the answerer had in mind when he granted it. If now any (i.e. both the questioner and the person questioned), in dealing with an expression with more than one meaning, were to suppose it to have one meaning-as e.g. it may be that ‘Being’ and ‘One’ have many meanings, and yet both the answerer answers and the questioner puts his question supposing it to be one, and the argument is to the effect that ‘All things are one’-will this discussion be directed any more against the expression than against the thought of the person questioned? If, on the other hand, one of them supposes the expression to have many meanings, it is clear that such a discussion will not be directed against the thought. Such being the meanings of the phrases in question, they clearly cannot describe two separate classes of argument. For, in the first place, it is possible for any such argument as bears more than one meaning to be directed against the expression and against the thought, and next it is possible for any argument whatsoever; for the fact of being directed against the thought consists not in the nature of the argument, but in the special attitude of the answerer towards the points he concedes. Next, all of them may be directed to the expression. For ‘to be directed against the expression’ means in this doctrine ‘not to be directed against the thought’. For if not all are directed against either expression or thought, there will be certain other arguments directed neither against the expression nor against the thought, whereas they say that all must be one or the other, and divide them all as directed either against the expression or against the thought, while others (they say) there are none. But in point of fact those that depend on mere expression are only a branch of those syllogisms that depend on a multiplicity of meanings. For the absurd statement has actually been made that the description ‘dependent on mere expression’ describes all the arguments that depend on language: whereas some of these are fallacies not because the answerer adopts a particular attitude towards them, but because the argument itself involves the asking of a question such as bears more than one meaning.
It is, too, altogether absurd to discuss Refutation without first discussing Proof: for a refutation is a proof, so that one ought to discuss proof as well before describing false refutation: for a refutation of that kind is a merely apparent proof of the contradictory of a thesis. Accordingly, the reason of the falsity will be either in the proof or in the contradiction (for mention of the ‘contradiction’ must be added), while sometimes it is in both, if the refutation be merely apparent. In the argument that speaking of the silent is possible it lies in the contradiction, not in the proof; in the argument that one can give what one does not possess, it lies in both; in the proof that Homer’s poem is a figure through its being a cycle it lies in the proof. An argument that does not fail in either respect is a true proof.
But, to return to the point whence our argument digressed, are mathematical reasonings directed against the thought, or not? And if any one thinks ‘triangle’ to be a word with many meanings, and granted it in some different sense from the figure which was proved to contain two right angles, has the questioner here directed his argument against the thought of the former or not?
Moreover, if the expression bears many senses, while the answerer does not understand or suppose it to have them, surely the questioner here has directed his argument against his thought! Or how else ought he to put his question except by suggesting a distinction-suppose one’s question to be speaking of the silent possible or not?’-as follows, ‘Is the answer “No” in one sense, but “Yes” in another?’ If, then, any one were to answer that it was not possible in any sense and the other were to argue that it was, has not his argument been directed against the thought of the answerer? Yet his argument is supposed to be one of those that depend on the expression. There is not, then, any definite kind of arguments that is directed against the thought. Some arguments are, indeed, directed against the expression: but these are not all even apparent refutations, let alone all refutations. For there are also apparent refutations which do not depend upon language, e.g. those that depend upon accident, and others.
If, however, any one claims that one should actually draw the distinction, and say, ‘By “speaking of the silent” I mean, in one sense this and in the other sense that’, surely to claim this is in the first place absurd (for sometimes the questioner does not see the ambiguity of his question, and he cannot possibly draw a distinction which he does not think to be there): in the second place, what else but this will didactic argument be? For it will make manifest the state of the case to one who has never considered, and does not know or suppose that there is any other meaning but one. For what is there to prevent the same thing also happening to us in cases where there is no double meaning? ‘Are the units in four equal to the twos? Observe that the twos are contained in four in one sense in this way, in another sense in that’. Also, ‘Is the knowledge of contraries one or not? Observe that some contraries are known, while others are unknown’. Thus the man who makes this claim seems to be unaware of the difference between didactic and dialectical argument, and of the fact that while he who argues didactically should not ask questions but make things clear himself, the other should merely ask questions.
Moreover, to claim a ‘Yes’ or ‘No’ answer is the business not of a man who is showing something, but of one who is holding an examination. For the art of examining is a branch of dialectic and has in view not the man who has knowledge, but the ignorant pretender. He, then, is a dialectician who regards the common principles with their application to the particular matter in hand, while he who only appears to do this is a sophist. Now for contentious and sophistical reasoning: (1) one such is a merely apparent reasoning, on subjects on which dialectical reasoning is the proper method of examination, even though its conclusion be true: for it misleads us in regard to the cause: also (2) there are those misreasonings which do not conform to the line of inquiry proper to the particular subject, but are generally thought to conform to the art in question. For false diagrams of geometrical figures are not contentious (for the resulting fallacies conform to the subject of the art)-any more than is any false diagram that may be offered in proof of a truth-e.g. Hippocrates’ figure or the squaring of the circle by means of the lunules. But Bryson’s method of squaring the circle, even if the circle is thereby squared, is still sophistical because it does not conform to the subject in hand. So, then, any merely apparent reasoning about these things is a contentious argument, and any reasoning that merely appears to conform to the subject in hand, even though it be genuine reasoning, is a contentious argument: for it is merely apparent in its conformity to the subject-matter, so that it is deceptive and plays foul. For just as a foul in a race is a definite type of fault, and is a kind of foul fighting, so the art of contentious reasoning is foul fighting in disputation: for in the former case those who are resolved to win at all costs snatch at everything, and so in the latter case do contentious reasoners. Those, then, who do this in order to win the mere victory are generally considered to be contentious and quarrelsome persons, while those who do it to win a reputation with a view to making money are sophistical. For the art of sophistry is, as we said,’ a kind of art of money-making from a merely apparent wisdom, and this is why they aim at a merely apparent demonstration: and quarrelsome persons and sophists both employ the same arguments, but not with the same motives: and the same argument will be sophistical and contentious, but not in the same respect; rather, it will be contentious in so far as its aim is an apparent victory, while in so far as its aim is an apparent wisdom, it will be sophistical: for the art of sophistry is a certain appearance of wisdom without the reality. The contentious argument stands in somewhat the same relation to the dialectical as the drawer of false diagrams to the geometrician; for it beguiles by misreasoning from the same principles as dialectic uses, just as the drawer of a false diagram beguiles the geometrician. But whereas the latter is not a contentious reasoner, because he bases his false diagram on the principles and conclusions that fall under the art of geometry, the argument which is subordinate to the principles of dialectic will yet clearly be contentious as regards other subjects. Thus, e.g. though the squaring of the circle by means of the lunules is not contentious, Bryson’s solution is contentious: and the former argument cannot be adapted to any subject except geometry, because it proceeds from principles that are peculiar to geometry, whereas the latter can be adapted as an argument against all the number of people who do not know what is or is not possible in each particular context: for it will apply to them all. Or there is the method whereby Antiphon squared the circle. Or again, an argument which denied that it was better to take a walk after dinner, because of Zeno’s argument, would not be a proper argument for a doctor, because Zeno’s argument is of general application. If, then, the relation of the contentious argument to the dialectical were exactly like that of the drawer of false diagrams to the geometrician, a contentious argument upon the aforesaid subjects could not have existed. But, as it is, the dialectical argument is not concerned with any definite kind of being, nor does it show anything, nor is it even an argument such as we find in the general philosophy of being. For all beings are not contained in any one kind, nor, if they were, could they possibly fall under the same principles. Accordingly, no art that is a method of showing the nature of anything proceeds by asking questions: for it does not permit a man to grant whichever he likes of the two alternatives in the question: for they will not both of them yield a proof. Dialectic, on the other hand, does proceed by questioning, whereas if it were concerned to show things, it would have refrained from putting questions, even if not about everything, at least about the first principles and the special principles that apply to the particular subject in hand. For suppose the answerer not to grant these, it would then no longer have had any grounds from which to argue any longer against the objection. Dialectic is at the same time a mode of examination as well. For neither is the art of examination an accomplishment of the same kind as geometry, but one which a man may possess, even though he has not knowledge. For it is possible even for one without knowledge to hold an examination of one who is without knowledge, if also the latter grants him points taken not from thing that he knows or from the special principles of the subject under discussion but from all that range of consequences attaching to the subject which a man may indeed know without knowing the theory of the subject, but which if he do not know, he is bound to be ignorant of the theory. So then clearly the art of examining does not consist in knowledge of any definite subject. For this reason, too, it deals with everything: for every ‘theory’ of anything employs also certain common principles. Hence everybody, including even amateurs, makes use in a way of dialectic and the practice of examining: for all undertake to some extent a rough trial of those who profess to know things. What serves them here is the general principles: for they know these of themselves just as well as the scientist, even if in what they say they seem to the latter to go wildly astray from them. All, then, are engaged in refutation; for they take a hand as amateurs in the same task with which dialectic is concerned professionally; and he is a dialectician who examines by the help of a theory of reasoning. Now there are many identical principles which are true of everything, though they are not such as to constitute a particular nature, i.e. a particular kind of being, but are like negative terms, while other principles are not of this kind but are special to particular subjects; accordingly it is possible from these general principles to hold an examination on everything, and that there should be a definite art of so doing, and, moreover, an art which is not of the same kind as those which demonstrate. This is why the contentious reasoner does not stand in the same condition in all respects as the drawer of a false diagram: for the contentious reasoner will not be given to misreasoning from any definite class of principles, but will deal with every class.
These, then, are the types of sophistical refutations: and that it belongs to the dialectician to study these, and to be able to effect them, is not difficult to see: for the investigation of premisses comprises the whole of this study.
So much, then, for apparent refutations. As for showing that the answerer is committing some fallacy, and drawing his argument into paradox-for this was the second item of the sophist’s programme-in the first place, then, this is best brought about by a certain manner of questioning and through the question. For to put the question without framing it with reference to any definite subject is a good bait for these purposes: for people are more inclined to make mistakes when they talk at large, and they talk at large when they have no definite subject before them. Also the putting of several questions, even though the position against which one is arguing be quite definite, and the claim that he shall say only what he thinks, create abundant opportunity for drawing him into paradox or fallacy, and also, whether to any of these questions he replies ‘Yes’ or replies ‘No’, of leading him on to statements against which one is well off for a line of attack. Nowadays, however, men are less able to play foul by these means than they were formerly: for people rejoin with the question, ‘What has that to do with the original subject?’ It is, too, an elementary rule for eliciting some fallacy or paradox that one should never put a controversial question straight away, but say that one puts it from the wish for information: for the process of inquiry thus invited gives room for an attack.
A rule specially appropriate for showing up a fallacy is the sophistic rule, that one should draw the answerer on to the kind of statements against which one is well supplied with arguments: this can be done both properly and improperly, as was said before.’ Again, to draw a paradoxical statement, look and see to what school of philosophers the person arguing with you belongs, and then question him as to some point wherein their doctrine is paradoxical to most people: for with every school there is some point of that kind. It is an elementary rule in these matters to have a collection of the special ‘theses’ of the various schools among your propositions. The solution recommended as appropriate here, too, is to point out that the paradox does not come about because of the argument: whereas this is what his opponent always really wants.
Moreover, argue from men’s wishes and their professed opinions. For people do not wish the same things as they say they wish: they say what will look best, whereas they wish what appears to be to their interest: e.g. they say that a man ought to die nobly rather than to live in pleasure, and to live in honest poverty rather than in dishonourable riches; but they wish the opposite. Accordingly, a man who speaks according to his wishes must be led into stating the professed opinions of people, while he who speaks according to these must be led into admitting those that people keep hidden away: for in either case they are bound to introduce a paradox; for they will speak contrary either to men’s professed or to their hidden opinions.
The widest range of common-place argument for leading men into paradoxical statement is that which depends on the standards of Nature and of the Law: it is so that both Callicles is drawn as arguing in the Gorgias, and that all the men of old supposed the result to come about: for nature (they said) and law are opposites, and justice is a fine thing by a legal standard, but not by that of nature. Accordingly, they said, the man whose statement agrees with the standard of nature you should meet by the standard of the law, but the man who agrees with the law by leading him to the facts of nature: for in both ways paradoxical statements may be committed. In their view the standard of nature was the truth, while that of the law was the opinion held by the majority. So that it is clear that they, too, used to try either to refute the answerer or to make him make paradoxical statements, just as the men of to-day do as well.
Some questions are such that in both forms the answer is paradoxical; e.g. ‘Ought one to obey the wise or one’s father?’ and ‘Ought one to do what is expedient or what is just?’ and ‘Is it preferable to suffer injustice or to do an injury?’ You should lead people, then, into views opposite to the majority and to the philosophers; if any one speaks as do the expert reasoners, lead him into opposition to the majority, while if he speaks as do the majority, then into opposition to the reasoners. For some say that of necessity the happy man is just, whereas it is paradoxical to the many that a king should be happy. To lead a man into paradoxes of this sort is the same as to lead him into the opposition of the standards of nature and law: for the law represents the opinion of the majority, whereas philosophers speak according to the standard of nature and the truth.
Paradoxes, then, you should seek to elicit by means of these common-place rules. Now as for making any one babble, we have already said what we mean by ‘to babble’. This is the object in view in all arguments of the following kind: If it is all the same to state a term and to state its definition, the ‘double’ and ‘double of half’ are the same: if then ‘double’ be the ‘double of half’, it will be the ‘double of half of half’. And if, instead of ‘double’, ‘double of half’ be again put, then the same expression will be repeated three times, ‘double of half of half of half’. Also ‘desire is of the pleasant, isn’t it?’ desire is conation for the pleasant: accordingly, ‘desire’ is ‘conation for the pleasant for the pleasant’.
All arguments of this kind occur in dealing (1) with any relative terms which not only have relative genera, but are also themselves relative, and are rendered in relation to one and the same thing, as e.g. conation is conation for something, and desire is desire of something, and double is double of something, i.e. double of half: also in dealing (2) with any terms which, though they be not relative terms at all, yet have their substance, viz. the things of which they are the states or affections or what not, indicated as well in their definition, they being predicated of these things. Thus e.g. ‘odd’ is a ‘number containing a middle’: but there is an ‘odd number’: therefore there is a ‘number-containing-a-middle number’. Also, if snubness be a concavity of the nose, and there be a snub nose, there is therefore a ‘concave-nose nose’.
People sometimes appear to produce this result, without really producing it, because they do not add the question whether the expression ‘double’, just by itself, has any meaning or no, and if so, whether it has the same meaning, or a different one; but they draw their conclusion straight away. Still it seems, inasmuch as the word is the same, to have the same meaning as well.
We have said before what kind of thing ‘solecism’ is.’ It is possible both to commit it, and to seem to do so without doing so, and to do so without seeming to do so. Suppose, as Protagoras used to say that menis (’wrath’) and pelex (’helmet’) are masculine: according to him a man who calls wrath a ‘destructress’ (oulomenen) commits a solecism, though he does not seem to do so to other people, where he who calls it a ‘destructor’ (oulomenon) commits no solecism though he seems to do so. It is clear, then, that any one could produce this effect by art as well: and for this reason many arguments seem to lead to solecism which do not really do so, as happens in the case of refutations.
Almost all apparent solecisms depend upon the word ‘this’ (tode), and upon occasions when the inflection denotes neither a masculine nor a feminine object but a neuter. For ‘he’ (outos) signifies a masculine, and ‘she’ (aute) feminine; but ‘this’ (touto), though meant to signify a neuter, often also signifies one or other of the former: e.g. ‘What is this?’ ‘It is Calliope’; ‘it is a log’; ‘it is Coriscus’. Now in the masculine and feminine the inflections are all different, whereas in the neuter some are and some are not. Often, then, when ‘this’ (touto) has been granted, people reason as if ‘him’ (touton) had been said: and likewise also they substitute one inflection for another. The fallacy comes about because ‘this’ (touto) is a common form of several inflections: for ‘this’ signifies sometimes ‘he’ (outos) and sometimes ‘him’ (touton). It should signify them alternately; when combined with ‘is’ (esti) it should be ‘he’, while with ‘being’ it should be ‘him’: e.g. ‘Coriscus (Kopiskos) is’, but ‘being Coriscus’ (Kopiskon). It happens in the same way in the case of feminine nouns as well, and in the case of the so-called ‘chattels’ that have feminine or masculine designations. For only those names which end in o and n, have the designation proper to a chattel, e.g. xulon (’log’), schoinion (’rope’); those which do not end so have that of a masculine or feminine object, though some of them we apply to chattels: e.g. askos (’wineskin’) is a masculine noun, and kline (’bed’) a feminine. For this reason in cases of this kind as well there will be a difference of the same sort between a construction with ‘is’ (esti) or with ‘being’ (to einai). Also, Solecism resembles in a certain way those refutations which are said to depend on the like expression of unlike things. For, just as there we come upon a material solecism, so here we come upon a verbal: for ‘man’ is both a ‘matter’ for expression and also a ‘word’: and so is white’.
It is clear, then, that for solecisms we must try to construct our argument out of the aforesaid inflections.
These, then, are the types of contentious arguments, and the subdivisions of those types, and the methods for conducting them aforesaid. But it makes no little difference if the materials for putting the question be arranged in a certain manner with a view to concealment, as in the case of dialectics. Following then upon what we have said, this must be discussed first.
With a view then to refutation, one resource is length-for it is difficult to keep several things in view at once; and to secure length the elementary rules that have been stated before’ should be employed. One resource, on the other hand, is speed; for when people are left behind they look ahead less. Moreover, there is anger and contentiousness, for when agitated everybody is less able to take care of himself. Elementary rules for producing anger are to make a show of the wish to play foul, and to be altogether shameless. Moreover, there is the putting of one’s questions alternately, whether one has more than one argument leading to the same conclusion, or whether one has arguments to show both that something is so, and that it is not so: for the result is that he has to be on his guard at the same time either against more than one line, or against contrary lines, of argument. In general, all the methods described before of producing concealment are useful also for purposes of contentious argument: for the object of concealment is to avoid detection, and the object of this is to deceive.
To counter those who refuse to grant whatever they suppose to help one’s argument, one should put the question negatively, as though desirous of the opposite answer, or at any rate as though one put the question without prejudice; for when it is obscure what answer one wants to secure, people are less refractory. Also when, in dealing with particulars, a man grants the individual case, when the induction is done you should often not put the universal as a question, but take it for granted and use it: for sometimes people themselves suppose that they have granted it, and also appear to the audience to have done so, for they remember the induction and assume that the questions could not have been put for nothing. In cases where there is no term to indicate the universal, still you should avail yourself of the resemblance of the particulars to suit your purpose; for resemblance often escapes detection. Also, with a view to obtaining your premiss, you ought to put it in your question side by side with its contrary. E.g. if it were necessary to secure the admission that ‘A man should obey his father in everything’, ask ‘Should a man obey his parents in everything, or disobey them in everything?’; and to secure that ‘A number multiplied by a large number is a large number’, ask ‘Should one agree that it is a large number or a small one?’ For then, if compelled to choose, one will be more inclined to think it a large one: for the placing of their contraries close beside them makes things look big to men, both relatively and absolutely, and worse and better.
A strong appearance of having been refuted is often produced by the most highly sophistical of all the unfair tricks of questioners, when without proving anything, instead of putting their final proposition as a question, they state it as a conclusion, as though they had proved that ‘Therefore so-and-so is not true’
It is also a sophistical trick, when a paradox has been laid down, first to propose at the start some view that is generally accepted, and then claim that the answerer shall answer what he thinks about it, and to put one’s question on matters of that kind in the form ‘Do you think that . . .?’ For then, if the question be taken as one of the premisses of one’s argument, either a refutation or a paradox is bound to result; if he grants the view, a refutation; if he refuses to grant it or even to admit it as the received opinion, a paradox; if he refuses to grant it, but admits that it is the received opinion, something very like a refutation, results.
Moreover, just as in rhetorical discourses, so also in those aimed at refutation, you should examine the discrepancies of the answerer’s position either with his own statements, or with those of persons whom he admits to say and do aright, moreover with those of people who are generally supposed to bear that kind of character, or who are like them, or with those of the majority or of all men. Also just as answerers, too, often, when they are in process of being confuted, draw a distinction, if their confutation is just about to take place, so questioners also should resort to this from time to time to counter objectors, pointing out, supposing that against one sense of the words the objection holds, but not against the other, that they have taken it in the latter sense, as e.g. Cleophon does in the Mandrobulus. They should also break off their argument and cut down their other lines of attack, while in answering, if a man perceives this being done beforehand, he should put in his objection and have his say first. One should also lead attacks sometimes against positions other than the one stated, on the understood condition that one cannot find lines of attack against the view laid down, as Lycophron did when ordered to deliver a eulogy upon the lyre. To counter those who demand ‘Against what are you directing your effort?’, since one is generally thought bound to state the charge made, while, on the other hand, some ways of stating it make the defence too easy, you should state as your aim only the general result that always happens in refutations, namely the contradiction of his thesis — viz. that your effort is to deny what he has affirmed, or to affirm what he denied: don’t say that you are trying to show that the knowledge of contraries is, or is not, the same. One must not ask one’s conclusion in the form of a premiss, while some conclusions should not even be put as questions at all; one should take and use it as granted.
We have now therefore dealt with the sources of questions, and the methods of questioning in contentious disputations: next we have to speak of answering, and of how solutions should be made, and of what requires them, and of what use is served by arguments of this kind.
The use of them, then, is, for philosophy, twofold. For in the first place, since for the most part they depend upon the expression, they put us in a better condition for seeing in how many senses any term is used, and what kind of resemblances and what kind of differences occur between things and between their names. In the second place they are useful for one’s own personal researches; for the man who is easily committed to a fallacy by some one else, and does not perceive it, is likely to incur this fate of himself also on many occasions. Thirdly and lastly, they further contribute to one’s reputation, viz. the reputation of being well trained in everything, and not inexperienced in anything: for that a party to arguments should find fault with them, if he cannot definitely point out their weakness, creates a suspicion, making it seem as though it were not the truth of the matter but merely inexperience that put him out of temper.
Answerers may clearly see how to meet arguments of this kind, if our previous account was right of the sources whence fallacies came, and also our distinctions adequate of the forms of dishonesty in putting questions. But it is not the same thing take an argument in one’s hand and then to see and solve its faults, as it is to be able to meet it quickly while being subjected to questions: for what we know, we often do not know in a different context. Moreover, just as in other things speed is enhanced by training, so it is with arguments too, so that supposing we are unpractised, even though a point be clear to us, we are often too late for the right moment. Sometimes too it happens as with diagrams; for there we can sometimes analyse the figure, but not construct it again: so too in refutations, though we know the thing on which the connexion of the argument depends, we still are at a loss to split the argument apart.
First then, just as we say that we ought sometimes to choose to prove something in the general estimation rather than in truth, so also we have sometimes to solve arguments rather in the general estimation than according to the truth. For it is a general rule in fighting contentious persons, to treat them not as refuting, but as merely appearing to refute: for we say that they don’t really prove their case, so that our object in correcting them must be to dispel the appearance of it. For if refutation be an unambiguous contradiction arrived at from certain views, there could be no need to draw distinctions against amphiboly and ambiguity: they do not effect a proof. The only motive for drawing further distinctions is that the conclusion reached looks like a refutation. What, then, we have to beware of, is not being refuted, but seeming to be, because of course the asking of amphibolies and of questions that turn upon ambiguity, and all the other tricks of that kind, conceal even a genuine refutation, and make it uncertain who is refuted and who is not. For since one has the right at the end, when the conclusion is drawn, to say that the only denial made of One’s statement is ambiguous, no matter how precisely he may have addressed his argument to the very same point as oneself, it is not clear whether one has been refuted: for it is not clear whether at the moment one is speaking the truth. If, on the other hand, one had drawn a distinction, and questioned him on the ambiguous term or the amphiboly, the refutation would not have been a matter of uncertainty. Also what is incidentally the object of contentious arguers, though less so nowadays than formerly, would have been fulfilled, namely that the person questioned should answer either ‘Yes’ or ‘No’: whereas nowadays the improper forms in which questioners put their questions compel the party questioned to add something to his answer in correction of the faultiness of the proposition as put: for certainly, if the questioner distinguishes his meaning adequately, the answerer is bound to reply either ‘Yes’ or ‘No’.
If any one is going to suppose that an argument which turns upon ambiguity is a refutation, it will be impossible for an answerer to escape being refuted in a sense: for in the case of visible objects one is bound of necessity to deny the term one has asserted, and to assert what one has denied. For the remedy which some people have for this is quite unavailing. They say, not that Coriscus is both musical and unmusical, but that this Coriscus is musical and this Coriscus unmusical. But this will not do, for to say ‘this Coriscus is unmusical’, or ‘musical’, and to say ‘this Coriscus’ is so, is to use the same expression: and this he is both affirming and denying at once. ‘But perhaps they do not mean the same.’ Well, nor did the simple name in the former case: so where is the difference? If, however, he is to ascribe to the one person the simple title ‘Coriscus’, while to the other he is to add the prefix ‘one’ or ‘this’, he commits an absurdity: for the latter is no more applicable to the one than to the other: for to whichever he adds it, it makes no difference.
All the same, since if a man does not distinguish the senses of an amphiboly, it is not clear whether he has been confuted or has not been confuted, and since in arguments the right to distinguish them is granted, it is evident that to grant the question simply without drawing any distinction is a mistake, so that, even if not the man himself, at any rate his argument looks as though it had been refuted. It often happens, however, that, though they see the amphiboly, people hesitate to draw such distinctions, because of the dense crowd of persons who propose questions of the kind, in order that they may not be thought to be obstructionists at every turn: then, though they would never have supposed that that was the point on which the argument turned, they often find themselves faced by a paradox. Accordingly, since the right of drawing the distinction is granted, one should not hesitate, as has been said before.
If people never made two questions into one question, the fallacy that turns upon ambiguity and amphiboly would not have existed either, but either genuine refutation or none. For what is the difference between asking ‘Are Callias and Themistocles musical?’ and what one might have asked if they, being different, had had one name? For if the term applied means more than one thing, he has asked more than one question. If then it be not right to demand simply to be given a single answer to two questions, it is evident that it is not proper to give a simple answer to any ambiguous question, not even if the predicate be true of all the subjects, as some claim that one should. For this is exactly as though he had asked ‘Are Coriscus and Callias at home or not at home?’, supposing them to be both in or both out: for in both cases there is a number of propositions: for though the simple answer be true, that does not make the question one. For it is possible for it to be true to answer even countless different questions when put to one, all together with either a ‘Yes’ or a ‘No’: but still one should not answer them with a single answer: for that is the death of discussion. Rather, the case is like as though different things has actually had the same name applied to them. If then, one should not give a single answer to two questions, it is evident that we should not say simply ‘Yes’ or ‘No’ in the case of ambiguous terms either: for the remark is simply a remark, not an answer at all, although among disputants such remarks are loosely deemed to be answers, because they do not see what the consequence is.
As we said, then, inasmuch as certain refutations are generally taken for such, though not such really, in the same way also certain solutions will be generally taken for solutions, though not really such. Now these, we say, must sometimes be advanced rather than the true solutions in contentious reasonings and in the encounter with ambiguity. The proper answer in saying what one thinks is to say ‘Granted’; for in that way the likelihood of being refuted on a side issue is minimized. If, on the other hand, one is compelled to say something paradoxical, one should then be most careful to add that ‘it seems’ so: for in that way one avoids the impression of being either refuted or paradoxical. Since it is clear what is meant by ‘begging the original question’, and people think that they must at all costs overthrow the premisses that lie near the conclusion, and plead in excuse for refusing to grant him some of them that he is begging the original question, so whenever any one claims from us a point such as is bound to follow as a consequence from our thesis, but is false or paradoxical, we must plead the same: for the necessary consequences are generally held to be a part of the thesis itself. Moreover, whenever the universal has been secured not under a definite name, but by a comparison of instances, one should say that the questioner assumes it not in the sense in which it was granted nor in which he proposed it in the premiss: for this too is a point upon which a refutation often depends.
If one is debarred from these defences one must pass to the argument that the conclusion has not been properly shown, approaching it in the light of the aforesaid distinction between the different kinds of fallacy.
In the case, then, of names that are used literally one is bound to answer either simply or by drawing a distinction: the tacit understandings implied in our statements, e.g. in answer to questions that are not put clearly but elliptically-it is upon this that the consequent refutation depends. For example, ‘Is what belongs to Athenians the property of Athenians?’ Yes. ‘And so it is likewise in other cases. But observe; man belongs to the animal kingdom, doesn’t he?’ Yes. ‘Then man is the property of the animal kingdom.’ But this is a fallacy: for we say that man ‘belongs to’ the animal kingdom because he is an animal, just as we say that Lysander ‘belongs to’ the Spartans, because he is a Spartan. It is evident, then, that where the premiss put forward is not clear, one must not grant it simply.
Whenever of two things it is generally thought that if the one is true the other is true of necessity, whereas, if the other is true, the first is not true of necessity, one should, if asked which of them is true, grant the smaller one: for the larger the number of premisses, the harder it is to draw a conclusion from them. If, again, the sophist tries to secure that has a contrary while B has not, suppose what he says is true, you should say that each has a contrary, only for the one there is no established name.
Since, again, in regard to some of the views they express, most people would say that any one who did not admit them was telling a falsehood, while they would not say this in regard to some, e.g. to any matters whereon opinion is divided (for most people have no distinct view whether the soul of animals is destructible or immortal), accordingly (1) it is uncertain in which of two senses the premiss proposed is usually meant-whether as maxims are (for people call by the name of ‘maxims’ both true opinions and general assertions) or like the doctrine ‘the diagonal of a square is incommensurate with its side’: and moreover (2) whenever opinions are divided as to the truth, we then have subjects of which it is very easy to change the terminology undetected. For because of the uncertainty in which of the two senses the premiss contains the truth, one will not be thought to be playing any trick, while because of the division of opinion, one will not be thought to be telling a falsehood. Change the terminology therefore, for the change will make the position irrefutable.
Moreover, whenever one foresees any question coming, one should put in one’s objection and have one’s say beforehand: for by doing so one is likely to embarrass the questioner most effectually.
Inasmuch as a proper solution is an exposure of false reasoning, showing on what kind of question the falsity depends, and whereas ‘false reasoning’ has a double meaning-for it is used either if a false conclusion has been proved, or if there is only an apparent proof and no real one-there must be both the kind of solution just described,’ and also the correction of a merely apparent proof, so as to show upon which of the questions the appearance depends. Thus it comes about that one solves arguments that are properly reasoned by demolishing them, whereas one solves merely apparent arguments by drawing distinctions. Again, inasmuch as of arguments that are properly reasoned some have a true and others a false conclusion, those that are false in respect of their conclusion it is possible to solve in two ways; for it is possible both by demolishing one of the premisses asked, and by showing that the conclusion is not the real state of the case: those, on the other hand, that are false in respect of the premisses can be solved only by a demolition of one of them; for the conclusion is true. So that those who wish to solve an argument should in the first place look and see if it is properly reasoned, or is unreasoned; and next, whether the conclusion be true or false, in order that we may effect the solution either by drawing some distinction or by demolishing something, and demolishing it either in this way or in that, as was laid down before. There is a very great deal of difference between solving an argument when being subjected to questions and when not: for to foresee traps is difficult, whereas to see them at one’s leisure is easier.
Of the refutations, then, that depend upon ambiguity and amphiboly some contain some question with more than one meaning, while others contain a conclusion bearing a number of senses: e.g. in the proof that ‘speaking of the silent’ is possible, the conclusion has a double meaning, while in the proof that ‘he who knows does not understand what he knows’ one of the questions contains an amphiboly. Also the double-edged saying is true in one context but not in another: it means something that is and something that is not.
Whenever, then, the many senses lie in the conclusion no refutation takes place unless the sophist secures as well the contradiction of the conclusion he means to prove; e.g. in the proof that ‘seeing of the blind’ is possible: for without the contradiction there was no refutation. Whenever, on the other hand, the many senses lie in the questions, there is no necessity to begin by denying the double-edged premiss: for this was not the goal of the argument but only its support. At the start, then, one should reply with regard to an ambiguity, whether of a term or of a phrase, in this manner, that ‘in one sense it is so, and in another not so’, as e.g. that ‘speaking of the silent’ is in one sense possible but in another not possible: also that in one sense ‘one should do what must needs be done’, but not in another: for ‘what must needs be’ bears a number of senses. If, however, the ambiguity escapes one, one should correct it at the end by making an addition to the question: ‘Is speaking of the silent possible?’ ‘No, but to speak of while he is silent is possible.’ Also, in cases which contain the ambiguity in their premisses, one should reply in like manner: ‘Do people-then not understand what they know? “Yes, but not those who know it in the manner described’: for it is not the same thing to say that ‘those who know cannot understand what they know’, and to say that ‘those who know something in this particular manner cannot do so’. In general, too, even though he draws his conclusion in a quite unambiguous manner, one should contend that what he has negated is not the fact which one has asserted but only its name; and that therefore there is no refutation.
Of arguments in dialogue form there are four classes:
Didactic, Dialectical, Examination-arguments, and Contentious arguments. Didactic arguments are those that reason from the principles appropriate to each subject and not from the opinions held by the answerer (for the learner should take things on trust): dialectical arguments are those that reason from premisses generally accepted, to the contradictory of a given thesis: examination-arguments are those that reason from premisses which are accepted by the answerer and which any one who pretends to possess knowledge of the subject is bound to know-in what manner, has been defined in another treatise: contentious arguments are those that reason or appear to reason to a conclusion from premisses that appear to be generally accepted but are not so. The subject, then, of demonstrative arguments has been discussed in the Analytics, while that of dialectic arguments and examination-arguments has been discussed elsewhere: let us now proceed to speak of the arguments used in competitions and contests.
It is evident also how one should solve those refutations that depend upon the division and combination of words: for if the expression means something different when divided and when combined, as soon as one’s opponent draws his conclusion one should take the expression in the contrary way. All such expressions as the following depend upon the combination or division of the words: ‘Was X being beaten with that with which you saw him being beaten?’ and ‘Did you see him being beaten with that with which he was being beaten?’ This fallacy has also in it an element of amphiboly in the questions, but it really depends upon combination. For the meaning that depends upon the division of the words is not really a double meaning (for the expression when divided is not the same), unless also the word that is pronounced, according to its breathing, as eros and eros is a case of double meaning. (In writing, indeed, a word is the same whenever it is written of the same letters and in the same manner — and even there people nowadays put marks at the side to show the pronunciation — but the spoken words are not the same.) Accordingly an expression that depends upon division is not an ambiguous one. It is evident also that not all refutations depend upon ambiguity as some people say they do.
The answerer, then, must divide the expression: for ‘I-saw-a-man-being-beaten with my eyes’ is not the same as to say ‘I saw a man being-beaten-with-my-eyes’. Also there is the argument of Euthydemus proving ‘Then you know now in Sicily that there are triremes in Piraeus’: and again, ‘Can a good man who is a cobbler be bad?’ ‘No.’ ‘But a good man may be a bad cobbler: therefore a good cobbler will be bad.’ Again, ‘Things the knowledge of which is good, are good things to learn, aren’t they?’ ‘Yes.’ ‘The knowledge, however, of evil is good: therefore evil is a good thing to know.’ ‘Yes. But, you see, evil is both evil and a thing-to-learn, so that evil is an evil-thing-to-learn, although the knowledge of evils is good.’ Again, ‘Is it true to say in the present moment that you are born?’ ‘Yes.’ ‘Then you are born in the present moment.’ ‘No; the expression as divided has a different meaning: for it is true to say-in-the-present-moment that “you are born”, but not “You are born-in-the-present-moment”.’ Again, ‘Could you do what you can, and as you can?’ ‘Yes.’ ‘But when not harping, you have the power to harp: and therefore you could harp when not harping.’ ‘No: he has not the power to harp-while-not-harping; merely, when he is not doing it, he has the power to do it.’ Some people solve this last refutation in another way as well. For, they say, if he has granted that he can do anything in the way he can, still it does not follow that he can harp when not harping: for it has not been granted that he will do anything in every way in which he can; and it is not the same thing’ to do a thing in the way he can’ and ‘to do it in every way in which he can’. But evidently they do not solve it properly: for of arguments that depend upon the same point the solution is the same, whereas this will not fit all cases of the kind nor yet all ways of putting the questions: it is valid against the questioner, but not against his argument.
Accentuation gives rise to no fallacious arguments, either as written or as spoken, except perhaps some few that might be made up; e.g. the following argument. ‘Is ou katalueis a house?’ ‘Yes.’ ‘Is then ou katalueis the negation of katalueis?’ ‘Yes.’ ‘But you said that ou katalueis is a house: therefore the house is a negation.’ How one should solve this, is clear: for the word does not mean the same when spoken with an acuter and when spoken with a graver accent.
It is clear also how one must meet those fallacies that depend on the identical expressions of things that are not identical, seeing that we are in possession of the kinds of predications. For the one man, say, has granted, when asked, that a term denoting a substance does not belong as an attribute, while the other has shown that some attribute belongs which is in the Category of Relation or of Quantity, but is usually thought to denote a substance because of its expression; e.g. in the following argument: ‘Is it possible to be doing and to have done the same thing at the same time?’ ‘No.’ ‘But, you see, it is surely possible to be seeing and to have seen the same thing at the same time, and in the same aspect.’ Again, ‘Is any mode of passivity a mode of activity?’ ‘No.’ ‘Then “he is cut”, “he is burnt”, “he is struck by some sensible object” are alike in expression and all denote some form of passivity, while again “to say”, “to run”, “to see” are like one like one another in expression: but, you see, “to see” is surely a form of being struck by a sensible object; therefore it is at the same time a form of passivity and of activity.’ Suppose, however, that in that case any one, after granting that it is not possible to do and to have done the same thing in the same time, were to say that it is possible to see and to have seen it, still he has not yet been refuted, suppose him to say that ‘to see’ is not a form of ‘doing’ (activity) but of ‘passivity’: for this question is required as well, though he is supposed by the listener to have already granted it, when he granted that ‘to cut’ is a form of present, and ‘to have cut’ a form of past, activity, and so on with the other things that have a like expression. For the listener adds the rest by himself, thinking the meaning to be alike: whereas really the meaning is not alike, though it appears to be so because of the expression. The same thing happens here as happens in cases of ambiguity: for in dealing with ambiguous expressions the tyro in argument supposes the sophist to have negated the fact which he (the tyro) affirmed, and not merely the name: whereas there still wants the question whether in using the ambiguous term he had a single meaning in view: for if he grants that that was so, the refutation will be effected.
Like the above are also the following arguments. It is asked if a man has lost what he once had and afterwards has not: for a man will no longer have ten dice even though he has only lost one die. No: rather it is that he has lost what he had before and has not now; but there is no necessity for him to have lost as much or as many things as he has not now. So then, he asks the questions as to what he has, and draws the conclusion as to the whole number that he has: for ten is a number. If then he had asked to begin with, whether a man no longer having the number of things he once had has lost the whole number, no one would have granted it, but would have said ‘Either the whole number or one of them’. Also there is the argument that ‘a man may give what he has not got’: for he has not got only one die. No: rather it is that he has given not what he had not got, but in a manner in which he had not got it, viz. just the one. For the word ‘only’ does not signify a particular substance or quality or number, but a manner relation, e.g. that it is not coupled with any other. It is therefore just as if he had asked ‘Could a man give what he has not got?’ and, on being given the answer ‘No’, were to ask if a man could give a thing quickly when he had not got it quickly, and, on this being granted, were to conclude that ‘a man could give what he had not got’. It is quite evident that he has not proved his point: for to ‘give quickly’ is not to give a thing, but to give in a certain manner; and a man could certainly give a thing in a manner in which he has not got it, e.g. he might have got it with pleasure and give it with pain.
Like these are also all arguments of the following kind: ‘Could a man strike a blow with a hand which he has not got, or see with an eye which he has not got?’ For he has not got only one eye. Some people solve this case, where a man has more than one eye, or more than one of anything else, by saying also that he has only one. Others also solve it as they solve the refutation of the view that ‘what a man has, he has received’: for A gave only one vote; and certainly B, they say, has only one vote from A. Others, again, proceed by demolishing straight away the proposition asked, and admitting that it is quite possible to have what one has not received; e.g. to have received sweet wine, but then, owing to its going bad in the course of receipt, to have it sour. But, as was said also above,’ all these persons direct their solutions against the man, not against his argument. For if this were a genuine solution, then, suppose any one to grant the opposite, he could find no solution, just as happens in other cases; e.g. suppose the true solution to be ‘So-and-so is partly true and partly not’, then, if the answerer grants the expression without any qualification, the sophist’s conclusion follows. If, on the other hand, the conclusion does not follow, then that could not be the true solution: and what we say in regard to the foregoing examples is that, even if all the sophist’s premisses be granted, still no proof is effected.
Moreover, the following too belong to this group of arguments. ‘If something be in writing did some one write it?’ ‘Yes.’ ‘But it is now in writing that you are seated-a false statement, though it was true at the time when it was written: therefore the statement that was written is at the same time false and true.’ But this is fallacious, for the falsity or truth of a statement or opinion indicates not a substance but a quality: for the same account applies to the case of an opinion as well. Again, ‘Is what a learner learns what he learns?’ ‘Yes.’ ‘But suppose some one learns “slow” quick’. Then his (the sophist’s) words denote not what the learner learns but how he learns it. Also, ‘Does a man tread upon what he walks through? ‘Yes.’ ‘But X walks through a whole day.’ No, rather the words denote not what he walks through, but when he walks; just as when any one uses the words ‘to drink the cup’ he denotes not what he drinks, but the vessel out of which he drinks. Also, ‘Is it either by learning or by discovery that a man knows what he knows?’ ‘Yes.’ ‘But suppose that of a pair of things he has discovered one and learned the other, the pair is not known to him by either method.’ No: ‘what’ he knows, means’ every single thing’ he knows, individually; but this does not mean ‘all the things’ he knows, collectively. Again, there is the proof that there is a ‘third man’ distinct from Man and from individual men. But that is a fallacy, for ‘Man’, and indeed every general predicate, denotes not an individual substance, but a particular quality, or the being related to something in a particular manner, or something of that sort. Likewise also in the case of ‘Coriscus’ and ‘Coriscus the musician’ there is the problem, Are they the same or different?’ For the one denotes an individual substance and the other a quality, so that it cannot be isolated; though it is not the isolation which creates the ‘third man’, but the admission that it is an individual substance. For ‘Man’ cannot be an individual substance, as Callias is. Nor is the case improved one whit even if one were to call the clement he has isolated not an individual substance but a quality: for there will still be the one beside the many, just as ‘Man’ was. It is evident then that one must not grant that what is a common predicate applying to a class universally is an individual substance, but must say that denotes either a quality, or a relation, or a quantity, or something of that kind.
It is a general rule in dealing with arguments that depend on language that the solution always follows the opposite of the point on which the argument turns: e.g. if the argument depends upon combination, then the solution consists in division; if upon division, then in combination. Again, if it depends on an acute accent, the solution is a grave accent; if on a grave accent, it is an acute. If it depends on ambiguity, one can solve it by using the opposite term; e.g. if you find yourself calling something inanimate, despite your previous denial that it was so, show in what sense it is alive: if, on the other hand, one has declared it to be inanimate and the sophist has proved it to be animate, say how it is inanimate. Likewise also in a case of amphiboly. If the argument depends on likeness of expression, the opposite will be the solution. ‘Could a man give what he has not got? ‘No, not what he has not got; but he could give it in a way in which he has not got it, e.g. one die by itself.’ Does a man know either by learning or by discovery each thing that he knows, singly? but not the things that he knows, collectively.’ Also a man treads, perhaps, on any thing he walks through, but not on the time he walks through. Likewise also in the case of the other examples.
In dealing with arguments that depend on Accident, one and the same solution meets all cases. For since it is indeterminate when an attribute should be ascribed to a thing, in cases where it belongs to the accident of the thing, and since in some cases it is generally agreed and people admit that it belongs, while in others they deny that it need belong, we should therefore, as soon as the conclusion has been drawn, say in answer to them all alike, that there is no need for such an attribute to belong. One must, however, be prepared to adduce an example of the kind of attribute meant. All arguments such as the following depend upon Accident. ‘Do you know what I am going to ask you? you know the man who is approaching’, or ‘the man in the mask’? ‘Is the statue your work of art?’ or ‘Is the dog your father?’ ‘Is the product of a small number with a small number a small number?’ For it is evident in all these cases that there is no necessity for the attribute which is true of the thing’s accident to be true of the thing as well. For only to things that are indistinguishable and one in essence is it generally agreed that all the same attributes belong; whereas in the case of a good thing, to be good is not the same as to be going to be the subject of a question; nor in the case of a man approaching, or wearing a mask, is ‘to be approaching’ the same thing as ‘to be Coriscus’, so that suppose I know Coriscus, but do not know the man who is approaching, it still isn’t the case that I both know and do not know the same man; nor, again, if this is mine and is also a work of art, is it therefore my work of art, but my property or thing or something else. (The solution is after the same manner in the other cases as well.)
Some solve these refutations by demolishing the original proposition asked: for they say that it is possible to know and not to know the same thing, only not in the same respect: accordingly, when they don’t know the man who is coming towards them, but do know Corsicus, they assert that they do know and don’t know the same object, but not in the same respect. Yet, as we have already remarked, the correction of arguments that depend upon the same point ought to be the same, whereas this one will not stand if one adopts the same principle in regard not to knowing something, but to being, or to being is a in a certain state, e.g. suppose that X is father, and is also yours: for if in some cases this is true and it is possible to know and not to know the same thing, yet with that case the solution stated has nothing to do. Certainly there is nothing to prevent the same argument from having a number of flaws; but it is not the exposition of any and every fault that constitutes a solution: for it is possible for a man to show that a false conclusion has been proved, but not to show on what it depends, e.g. in the case of Zeno’s argument to prove that motion is impossible. So that even if any one were to try to establish that this doctrine is an impossible one, he still is mistaken, and even if he proved his case ten thousand times over, still this is no solution of Zeno’s argument: for the solution was all along an exposition of false reasoning, showing on what its falsity depends. If then he has not proved his case, or is trying to establish even a true proposition, or a false one, in a false manner, to point this out is a true solution. Possibly, indeed, the present suggestion may very well apply in some cases: but in these cases, at any rate, not even this would be generally agreed: for he knows both that Coriscus is Coriscus and that the approaching figure is approaching. To know and not to know the same thing is generally thought to be possible, when e.g. one knows that X is white, but does not realize that he is musical: for in that way he does know and not know the same thing, though not in the same respect. But as to the approaching figure and Coriscus he knows both that it is approaching and that he is Coriscus.
A like mistake to that of those whom we have mentioned is that of those who solve the proof that every number is a small number: for if, when the conclusion is not proved, they pass this over and say that a conclusion has been proved and is true, on the ground that every number is both great and small, they make a mistake.
Some people also use the principle of ambiguity to solve the aforesaid reasonings, e.g. the proof that ‘X is your father’, or ‘son’, or ‘slave’. Yet it is evident that if the appearance a proof depends upon a plurality of meanings, the term, or the expression in question, ought to bear a number of literal senses, whereas no one speaks of A as being ‘B’s child’ in the literal sense, if B is the child’s master, but the combination depends upon Accident. ‘Is A yours?’ ‘Yes.’ ‘And is A a child?’ ‘Yes.’ ‘Then the child A is yours,’ because he happens to be both yours and a child; but he is not ‘your child’.
There is also the proof that ‘something “of evils” is good’; for wisdom is a ‘knowledge “of evils”’. But the expression that this is ‘of so and-so’ (=’so-and-so’s’) has not a number of meanings: it means that it is ‘so-and-so’s property’. We may suppose of course, on the other hand, that it has a number of meanings-for we also say that man is ‘of the animals’, though not their property; and also that any term related to ‘evils’ in a way expressed by a genitive case is on that account a so-and-so ‘of evils’, though it is not one of the evils-but in that case the apparently different meanings seem to depend on whether the term is used relatively or absolutely. ‘Yet it is conceivably possible to find a real ambiguity in the phrase “Something of evils is good”.’ Perhaps, but not with regard to the phrase in question. It would occur more nearly, suppose that ‘A servant is good of the wicked’; though perhaps it is not quite found even there: for a thing may be ‘good’ and be ‘X’s’ without being at the same time ‘X’s good’. Nor is the saying that ‘Man is of the animals’ a phrase with a number of meanings: for a phrase does not become possessed of a number of meanings merely suppose we express it elliptically: for we express ‘Give me the Iliad’ by quoting half a line of it, e.g. ‘Give me “Sing, goddess, of the wrath . . . ”’
Those arguments which depend upon an expression that is valid of a particular thing, or in a particular respect, or place, or manner, or relation, and not valid absolutely, should be solved by considering the conclusion in relation to its contradictory, to see if any of these things can possibly have happened to it. For it is impossible for contraries and opposites and an affirmative and a negative to belong to the same thing absolutely; there is, however, nothing to prevent each from belonging in a particular respect or relation or manner, or to prevent one of them from belonging in a particular respect and the other absolutely. So that if this one belongs absolutely and that one in a particular respect, there is as yet no refutation. This is a feature one has to find in the conclusion by examining it in comparison with its contradictory.
All arguments of the following kind have this feature: ‘Is it possible for what is-not to be? “No.” But, you see, it is something, despite its not being.’ Likewise also, Being will not be; for it will not he some particular form of being. Is it possible for the same man at the same time to be a keeper and a breaker of his oath?’ ‘Can the same man at the same time both obey and disobey the same man?’ Or isn’t it the case that being something in particular and Being are not the same? On the other hand, Not-being, even if it be something, need not also have absolute ‘being’ as well. Nor if a man keeps his oath in this particular instance or in this particular respect, is he bound also to be a keeper of oaths absolutely, but he who swears that he will break his oath, and then breaks it, keeps this particular oath only; he is not a keeper of his oath: nor is the disobedient man ‘obedient’, though he obeys one particular command. The argument is similar, also, as regards the problem whether the same man can at the same time say what is both false and true: but it appears to be a troublesome question because it is not easy to see in which of the two connexions the word ‘absolutely’ is to be rendered-with ‘true’ or with ‘false’. There is, however, nothing to prevent it from being false absolutely, though true in some particular respect or relation, i.e. being true in some things, though not ‘true’ absolutely. Likewise also in cases of some particular relation and place and time. For all arguments of the following kind depend upon this.’ Is health, or wealth, a good thing?’ ‘Yes.’ ‘But to the fool who does not use it aright it is not a good thing: therefore it is both good and not good.’ ‘Is health, or political power, a good thing?’ ‘Yes. “But sometimes it is not particularly good: therefore the same thing is both good and not good to the same man.’ Or rather there is nothing to prevent a thing, though good absolutely, being not good to a particular man, or being good to a particular man, and yet not good or here. ‘Is that which the prudent man would not wish, an evil?’ ‘Yes.’ ‘But to get rid of, he would not wish the good: therefore the good is an evil.’ But that is a mistake; for it is not the same thing to say ‘The good is an evil’ and ‘to get rid of the good is an evil’. Likewise also the argument of the thief is mistaken. For it is not the case that if the thief is an evil thing, acquiring things is also evil: what he wishes, therefore, is not what is evil but what is good; for to acquire something good is good. Also, disease is an evil thing, but not to get rid of disease. ‘Is the just preferable to the unjust, and what takes place justly to what takes place unjustly? ‘Yes.’ ‘But to to be put to death unjustly is preferable.’ ‘Is it just that each should have his own?’ ‘Yes.’ ‘But whatever decisions a man comes to on the strength of his personal opinion, even if it be a false opinion, are valid in law: therefore the same result is both just and unjust.’ Also, should one decide in favour of him who says what is unjust?’ ‘The former.’ ‘But you see, it is just for the injured party to say fully the things he has suffered; and these are fallacies. For because to suffer a thing unjustly is preferable, unjust ways are not therefore preferable, though in this particular case the unjust may very well be better than the just. Also, to have one’s own is just, while to have what is another’s is not just: all the same, the decision in question may very well be a just decision, whatever it be that the opinion of the man who gave the decision supports: for because it is just in this particular case or in this particular manner, it is not also just absolutely. Likewise also, though things are unjust, there is nothing to prevent the speaking of them being just: for because to speak of things is just, there is no necessity that the things should be just, any more than because to speak of things be of use, the things need be of use. Likewise also in the case of what is just. So that it is not the case that because the things spoken of are unjust, the victory goes to him who speaks unjust things: for he speaks of things that are just to speak of, though absolutely, i.e. to suffer, they are unjust.
Refutations that depend on the definition of a refutation must, according to the plan sketched above, be met by comparing together the conclusion with its contradictory, and seeing that it shall involve the same attribute in the same respect and relation and manner and time. If this additional question be put at the start, you should not admit that it is impossible for the same thing to be both double and not double, but grant that it is possible, only not in such a way as was agreed to constitute a refutation of your case. All the following arguments depend upon a point of that kind. ‘Does a man who knows A to be A, know the thing called A?’ and in the same way, ‘is one who is ignorant that A is A ignorant of the thing called A?’ ‘Yes.’ ‘But one who knows that Coriscus is Coriscus might be ignorant of the fact that he is musical, so that he both knows and is ignorant of the same thing.’ Is a thing four cubits long greater than a thing three cubits long?’ ‘Yes.’ ‘But a thing might grow from three to four cubits in length; ‘now what is ‘greater’ is greater than a ‘less’: accordingly the thing in question will be both greater and less than itself in the same respect.
As to refutations that depend on begging and assuming the original point to be proved, suppose the nature of the question to be obvious, one should not grant it, even though it be a view generally held, but should tell him the truth. Suppose, however, that it escapes one, then, thanks to the badness of arguments of that kind, one should make one’s error recoil upon the questioner, and say that he has brought no argument: for a refutation must be proved independently of the original point. Secondly, one should say that the point was granted under the impression that he intended not to use it as a premiss, but to reason against it, in the opposite way from that adopted in refutations on side issues.
Also, those refutations that bring one to their conclusion through the consequent you should show up in the course of the argument itself. The mode in which consequences follow is twofold. For the argument either is that as the universal follows on its particular-as (e.g.) ‘animal’ follows from ‘man’-so does the particular on its universal: for the claim is made that if A is always found with B, then B also is always found with A. Or else it proceeds by way of the opposites of the terms involved: for if A follows B, it is claimed that A’s opposite will follow B’s opposite. On this latter claim the argument of Melissus also depends: for he claims that because that which has come to be has a beginning, that which has not come to be has none, so that if the heaven has not come to be, it is also eternal. But that is not so; for the sequence is vice versa.
In the case of any refutations whose reasoning depends on some addition, look and see if upon its subtraction the absurdity follows none the less: and then if so, the answerer should point this out, and say that he granted the addition not because he really thought it, but for the sake of the argument, whereas the questioner has not used it for the purpose of his argument at all.
First we must grasp the number of aims entertained by those who argue as competitors and rivals to the death. These are five in number, refutation, fallacy, paradox, solecism, and fifthly to reduce the opponent in the discussion to babbling-i.e. to constrain him to repeat himself a number of times: or it is to produce the appearance of each of these things without the reality. For they choose if possible plainly to refute the other party, or as the second best to show that he is committing some fallacy, or as a third best to lead him into paradox, or fourthly to reduce him to solecism, i.e. to make the answerer, in consequence of the argument, to use an ungrammatical expression; or, as a last resort, to make him repeat himself.
To meet those refutations which make several questions into one, one should draw a distinction between them straight away at the start. For a question must be single to which there is a single answer, so that one must not affirm or deny several things of one thing, nor one thing of many, but one of one. But just as in the case of ambiguous terms, an attribute belongs to a term sometimes in both its senses, and sometimes in neither, so that a simple answer does one, as it happens, no harm despite the fact that the question is not simple, so it is in these cases of double questions too. Whenever, then, the several attributes belong to the one subject, or the one to the many, the man who gives a simple answer encounters no obstacle even though he has committed this mistake: but whenever an attribute belongs to one subject but not to the other, or there is a question of a number of attributes belonging to a number of subjects and in one sense both belong to both, while in another sense, again, they do not, then there is trouble, so that one must beware of this. Thus (e.g.) in the following arguments: Supposing to be good and B evil, you will, if you give a single answer about both, be compelled to say that it is true to call these good, and that it is true to call them evil and likewise to call them neither good nor evil (for each of them has not each character), so that the same thing will be both good and evil and neither good nor evil. Also, since everything is the same as itself and different from anything else, inasmuch as the man who answers double questions simply can be made to say that several things are ‘the same’ not as other things but ‘as themselves’, and also that they are different from themselves, it follows that the same things must be both the same as and different from themselves. Moreover, if what is good becomes evil while what is evil is good, then they must both become two. So of two unequal things each being equal to itself, it will follow that they are both equal and unequal to themselves.
Now these refutations fall into the province of other solutions as well: for ‘both’ and ‘all’ have more than one meaning, so that the resulting affirmation and denial of the same thing does not occur, except verbally: and this is not what we meant by a refutation. But it is clear that if there be not put a single question on a number of points, but the answerer has affirmed or denied one attribute only of one subject only, the absurdity will not come to pass.
With regard to those who draw one into repeating the same thing a number of times, it is clear that one must not grant that predications of relative terms have any meaning in abstraction by themselves, e.g. that ‘double’ is a significant term apart from the whole phrase ‘double of half’ merely on the ground that it figures in it. For ten figures in ‘ten minus one’ and in ‘not do’, and generally the affirmation in the negation; but for all that, suppose any one were to say, ‘This is not white’, he does not say that it is white. The bare word ‘double’, one may perhaps say, has not even any meaning at all, any more than has ‘the’ in ‘the half’: and even if it has a meaning, yet it has not the same meaning as in the combination. Nor is ‘knowledge’ the same thing in a specific branch of it (suppose it, e.g. to be ‘medical knowledge’) as it is in general: for in general it was the ‘knowledge of the knowable’. In the case of terms that are predicated of the terms through which they are defined, you should say the same thing, that the term defined is not the same in abstraction as it is in the whole phrase. For ‘concave’ has a general meaning which is the same in the case of a snub nose, and of a bandy leg, but when added to either substantive nothing prevents it from differentiating its meaning; in fact it bears one sense as applied to the nose, and another as applied to the leg: for in the former connexion it means ‘snub’ and in the latter ‘bandyshaped’; i.e. it makes no difference whether you say ‘a snub nose’ or ‘a concave nose’. Moreover, the expression must not be granted in the nominative case: for it is a falsehood. For snubness is not a concave nose but something (e.g. an affection) belonging to a nose: hence, there is no absurdity in supposing that the snub nose is a nose possessing the concavity that belongs to a nose.
With regard to solecisms, we have previously said what it is that appears to bring them about; the method of their solution will be clear in the course of the arguments themselves. Solecism is the result aimed at in all arguments of the following kind: ‘Is a thing truly that which you truly call it?’ ‘Yes’. ‘But, speaking of a stone, you call him real: therefore of a stone it follows that “him is real”.’ No: rather, talking of a stone means not saying which’ but ‘whom’, and not ‘that’ but ‘him’. If, then, any one were to ask, ‘Is a stone him whom you truly call him?’ he would be generally thought not to be speaking good Greek, any more than if he were to ask, ‘Is he what you call her?’ Speak in this way of a ‘stick’ or any neuter word, and the difference does not break out. For this reason, also, no solecism is incurred, suppose any one asks, ‘Is a thing what you say it to be?’ ‘Yes’. ‘But, speaking of a stick, you call it real: therefore, of a stick it follows that it is real.’ ‘Stone’, however, and ‘he’ have masculine designations. Now suppose some one were to ask, ‘Can “he” be a she” (a female)?’, and then again, ‘Well, but is not he Coriscus?’ and then were to say, ‘Then he is a “she”,’ he has not proved the solecism, even if the name ‘Coriscus’ does signify a ‘she’, if, on the other hand, the answerer does not grant this: this point must be put as an additional question: while if neither is it the fact nor does he grant it, then the sophist has not proved his case either in fact or as against the person he has been questioning. In like manner, then, in the above instance as well it must be definitely put that ‘he’ means the stone. If, however, this neither is so nor is granted, the conclusion must not be stated: though it follows apparently, because the case (the accusative), that is really unlike, appears to be like the nominative. ‘Is it true to say that this object is what you call it by name?’ ‘Yes’. ‘But you call it by the name of a shield: this object therefore is “of a shield”.’ No: not necessarily, because the meaning of ‘this object’ is not ‘of a shield’ but ‘a shield’: ‘of a shield’ would be the meaning of ‘this object’s’. Nor again if ‘He is what you call him by name’, while ‘the name you call him by is Cleon’s’, is he therefore ‘Cleon’s’: for he is not ‘Cleon’s’, for what was said was that ‘He, not his, is what I call him by name’. For the question, if put in the latter way, would not even be Greek. ‘Do you know this?’ ‘Yes.’ ‘But this is he: therefore you know he’. No: rather ‘this’ has not the same meaning in ‘Do you know this?’ as in ‘This is a stone’; in the first it stands for an accusative, in the second for a nominative case. ‘When you have understanding of anything, do you understand it?’ ‘Yes.’ ‘But you have understanding of a stone: therefore you understand of a stone.’ No: the one phrase is in the genitive, ‘of a stone’, while the other is in the accusative, ‘a stone’: and what was granted was that ‘you understand that, not of that, of which you have understanding’, so that you understand not ‘of a stone’, but ‘the stone’.
Thus that arguments of this kind do not prove solecism but merely appear to do so, and both why they so appear and how you should meet them, is clear from what has been said.
We must also observe that of all the arguments aforesaid it is easier with some to see why and where the reasoning leads the hearer astray, while with others it is more difficult, though often they are the same arguments as the former. For we must call an argument the same if it depends upon the same point; but the same argument is apt to be thought by some to depend on diction, by others on accident, and by others on something else, because each of them, when worked with different terms, is not so clear as it was. Accordingly, just as in fallacies that depend on ambiguity, which are generally thought to be the silliest form of fallacy, some are clear even to the man in the street (for humorous phrases nearly all depend on diction; e.g. ‘The man got the cart down from the stand’; and ‘Where are you bound?’ ‘To the yard arm’; and ‘Which cow will calve afore?’ ‘Neither, but both behind;’ and ‘Is the North wind clear?’ ‘No, indeed; for it has murdered the beggar and the merchant.” Is he a Good enough-King?’ ‘No, indeed; a Rob-son’: and so with the great majority of the rest as well), while others appear to elude the most expert (and it is a symptom of this that they often fight about their terms, e.g. whether the meaning of ‘Being’ and ‘One’ is the same in all their applications or different; for some think that ‘Being’ and ‘One’ mean the same; while others solve the argument of Zeno and Parmenides by asserting that ‘One’ and ‘Being’ are used in a number of senses), likewise also as regards fallacies of Accident and each of the other types, some of the arguments will be easier to see while others are more difficult; also to grasp to which class a fallacy belongs, and whether it is a refutation or not a refutation, is not equally easy in all cases.
An incisive argument is one which produces the greatest perplexity: for this is the one with the sharpest fang. Now perplexity is twofold, one which occurs in reasoned arguments, respecting which of the propositions asked one is to demolish, and the other in contentious arguments, respecting the manner in which one is to assent to what is propounded. Therefore it is in syllogistic arguments that the more incisive ones produce the keenest heart-searching. Now a syllogistic argument is most incisive if from premisses that are as generally accepted as possible it demolishes a conclusion that is accepted as generally as possible. For the one argument, if the contradictory is changed about, makes all the resulting syllogisms alike in character: for always from premisses that are generally accepted it will prove a conclusion, negative or positive as the case may be, that is just as generally accepted; and therefore one is bound to feel perplexed. An argument, then, of this kind is the most incisive, viz. the one that puts its conclusion on all fours with the propositions asked; and second comes the one that argues from premisses, all of which are equally convincing: for this will produce an equal perplexity as to what kind of premiss, of those asked, one should demolish. Herein is a difficulty: for one must demolish something, but what one must demolish is uncertain. Of contentious arguments, on the other hand, the most incisive is the one which, in the first place, is characterized by an initial uncertainty whether it has been properly reasoned or not; and also whether the solution depends on a false premiss or on the drawing of a distinction; while, of the rest, the second place is held by that whose solution clearly depends upon a distinction or a demolition, and yet it does not reveal clearly which it is of the premisses asked, whose demolition, or the drawing of a distinction within it, will bring the solution about, but even leaves it vague whether it is on the conclusion or on one of the premisses that the deception depends.
Now sometimes an argument which has not been properly reasoned is silly, supposing the assumptions required to be extremely contrary to the general view or false; but sometimes it ought not to be held in contempt. For whenever some question is left out, of the kind that concerns both the subject and the nerve of the argument, the reasoning that has both failed to secure this as well, and also failed to reason properly, is silly; but when what is omitted is some extraneous question, then it is by no means to be lightly despised, but the argument is quite respectable, though the questioner has not put his questions well.
Just as it is possible to bring a solution sometimes against the argument, at others against the questioner and his mode of questioning, and at others against neither of these, likewise also it is possible to marshal one’s questions and reasoning both against the thesis, and against the answerer and against the time, whenever the solution requires a longer time to examine than the period available.
As to the number, then, and kind of sources whence fallacies arise in discussion, and how we are to show that our opponent is committing a fallacy and make him utter paradoxes; moreover, by the use of what materials solescism is brought about, and how to question and what is the way to arrange the questions; moreover, as to the question what use is served by all arguments of this kind, and concerning the answerer’s part, both as a whole in general, and in particular how to solve arguments and solecisms-on all these things let the foregoing discussion suffice. It remains to recall our original proposal and to bring our discussion to a close with a few words upon it.
Our programme was, then, to discover some faculty of reasoning about any theme put before us from the most generally accepted premisses that there are. For that is the essential task of the art of discussion (dialectic) and of examination (peirastic). Inasmuch, however, as it is annexed to it, on account of the near presence of the art of sophistry (sophistic), not only to be able to conduct an examination dialectically but also with a show of knowledge, we therefore proposed for our treatise not only the aforesaid aim of being able to exact an account of any view, but also the aim of ensuring that in standing up to an argument we shall defend our thesis in the same manner by means of views as generally held as possible. The reason of this we have explained; for this, too, was why Socrates used to ask questions and not to answer them; for he used to confess that he did not know. We have made clear, in the course of what precedes, the number both of the points with reference to which, and of the materials from which, this will be accomplished, and also from what sources we can become well supplied with these: we have shown, moreover, how to question or arrange the questioning as a whole, and the problems concerning the answers and solutions to be used against the reasonings of the questioner. We have also cleared up the problems concerning all other matters that belong to the same inquiry into arguments. In addition to this we have been through the subject of Fallacies, as we have already stated above.
That our programme, then, has been adequately completed is clear. But we must not omit to notice what has happened in regard to this inquiry. For in the case of all discoveries the results of previous labours that have been handed down from others have been advanced bit by bit by those who have taken them on, whereas the original discoveries generally make advance that is small at first though much more useful than the development which later springs out of them. For it may be that in everything, as the saying is, ‘the first start is the main part’: and for this reason also it is the most difficult; for in proportion as it is most potent in its influence, so it is smallest in its compass and therefore most difficult to see: whereas when this is once discovered, it is easier to add and develop the remainder in connexion with it. This is in fact what has happened in regard to rhetorical speeches and to practically all the other arts: for those who discovered the beginnings of them advanced them in all only a little way, whereas the celebrities of to-day are the heirs (so to speak) of a long succession of men who have advanced them bit by bit, and so have developed them to their present form, Tisias coming next after the first founders, then Thrasymachus after Tisias, and Theodorus next to him, while several people have made their several contributions to it: and therefore it is not to be wondered at that the art has attained considerable dimensions. Of this inquiry, on the other hand, it was not the case that part of the work had been thoroughly done before, while part had not. Nothing existed at all. For the training given by the paid professors of contentious arguments was like the treatment of the matter by Gorgias. For they used to hand out speeches to be learned by heart, some rhetorical, others in the form of question and answer, each side supposing that their arguments on either side generally fall among them. And therefore the teaching they gave their pupils was ready but rough. For they used to suppose that they trained people by imparting to them not the art but its products, as though any one professing that he would impart a form of knowledge to obviate any pain in the feet, were then not to teach a man the art of shoe-making or the sources whence he can acquire anything of the kind, but were to present him with several kinds of shoes of all sorts: for he has helped him to meet his need, but has not imparted an art to him. Moreover, on the subject of Rhetoric there exists much that has been said long ago, whereas on the subject of reasoning we had nothing else of an earlier date to speak of at all, but were kept at work for a long time in experimental researches. If, then, it seems to you after inspection that, such being the situation as it existed at the start, our investigation is in a satisfactory condition compared with the other inquiries that have been developed by tradition, there must remain for all of you, or for our students, the task of extending us your pardon for the shortcomings of the inquiry, and for the discoveries thereof your warm thanks.
There are two styles of refutation: for some depend on the language used, while some are independent of language. Those ways of producing the false appearance of an argument which depend on language are six in number: they are ambiguity, amphiboly, combination, division of words, accent, form of expression. Of this we may assure ourselves both by induction, and by syllogistic proof based on this-and it may be on other assumptions as well-that this is the number of ways in which we might fall to mean the same thing by the same names or expressions. Arguments such as the following depend upon ambiguity. ‘Those learn who know: for it is those who know their letters who learn the letters dictated to them’. For to ‘learn’ is ambiguous; it signifies both ‘to understand’ by the use of knowledge, and also ‘to acquire knowledge’. Again, ‘Evils are good: for what needs to be is good, and evils must needs be’. For ‘what needs to be’ has a double meaning: it means what is inevitable, as often is the case with evils, too (for evil of some kind is inevitable), while on the other hand we say of good things as well that they ‘need to be’. Moreover, ‘The same man is both seated and standing and he is both sick and in health: for it is he who stood up who is standing, and he who is recovering who is in health: but it is the seated man who stood up, and the sick man who was recovering’. For ‘The sick man does so and so’, or ‘has so and so done to him’ is not single in meaning: sometimes it means ‘the man who is sick or is seated now’, sometimes ‘the man who was sick formerly’. Of course, the man who was recovering was the sick man, who really was sick at the time: but the man who is in health is not sick at the same time: he is ‘the sick man’ in the sense not that he is sick now, but that he was sick formerly. Examples such as the following depend upon amphiboly: ‘I wish that you the enemy may capture’. Also the thesis, ‘There must be knowledge of what one knows’: for it is possible by this phrase to mean that knowledge belongs to both the knower and the known. Also, ‘There must be sight of what one sees: one sees the pillar: ergo the pillar has sight’. Also, ‘What you profess to-be, that you profess to-be: you profess a stone to-be: ergo you profess-to-be a stone’. Also, ‘Speaking of the silent is possible’: for ‘speaking of the silent’ also has a double meaning: it may mean that the speaker is silent or that the things of which he speaks are so. There are three varieties of these ambiguities and amphibolies: (1) When either the expression or the name has strictly more than one meaning, e.g. aetos and the ‘dog’; (2) when by custom we use them so; (3) when words that have a simple sense taken alone have more than one meaning in combination; e.g. ‘knowing letters’. For each word, both ‘knowing’ and ‘letters’, possibly has a single meaning: but both together have more than one-either that the letters themselves have knowledge or that someone else has it of them.
Amphiboly and ambiguity, then, depend on these modes of speech. Upon the combination of words there depend instances such as the following: ‘A man can walk while sitting, and can write while not writing’. For the meaning is not the same if one divides the words and if one combines them in saying that ‘it is possible to walk-while-sitting’ and write while not writing]. The same applies to the latter phrase, too, if one combines the words ‘to write-while-not-writing’: for then it means that he has the power to write and not to write at once; whereas if one does not combine them, it means that when he is not writing he has the power to write. Also, ‘He now if he has learnt his letters’. Moreover, there is the saying that ‘One single thing if you can carry a crowd you can carry too’.
Upon division depend the propositions that 5 is 2 and 3, and odd, and that the greater is equal: for it is that amount and more besides. For the same phrase would not be thought always to have the same meaning when divided and when combined, e.g. ‘I made thee a slave once a free man’, and ‘God-like Achilles left fifty a hundred men’.
An argument depending upon accent it is not easy to construct in unwritten discussion; in written discussions and in poetry it is easier. Thus (e.g.) some people emend Homer against those who criticize as unnatural his expression to men ou kataputhetai ombro. For they solve the difficulty by a change of accent, pronouncing the ou with an acuter accent. Also, in the passage about Agamemnon’s dream, they say that Zeus did not himself say ‘We grant him the fulfilment of his prayer’, but that he bade the dream grant it. Instances such as these, then, turn upon the accentuation.
Others come about owing to the form of expression used, when what is really different is expressed in the same form, e.g. a masculine thing by a feminine termination, or a feminine thing by a masculine, or a neuter by either a masculine or a feminine; or, again, when a quality is expressed by a termination proper to quantity or vice versa, or what is active by a passive word, or a state by an active word, and so forth with the other divisions previously’ laid down. For it is possible to use an expression to denote what does not belong to the class of actions at all as though it did so belong. Thus (e.g.) ‘flourishing’ is a word which in the form of its expression is like ‘cutting’ or ‘building’: yet the one denotes a certain quality-i.e. a certain condition-while the other denotes a certain action. In the same manner also in the other instances.
Refutations, then, that depend upon language are drawn from these common-place rules. Of fallacies, on the other hand, that are independent of language there are seven kinds:
(1) that which depends upon Accident:
(2) the use of an expression absolutely or not absolutely but with some qualification of respect or place, or time, or relation:
(3) that which depends upon ignorance of what ‘refutation’ is:
(4) that which depends upon the consequent:
(5) that which depends upon assuming the original conclusion:
(6) stating as cause what is not the cause:
(7) the making of more than one question into one.
Fallacies, then, that depend on Accident occur whenever any attribute is claimed to belong in like manner to a thing and to its accident. For since the same thing has many accidents there is no necessity that all the same attributes should belong to all of a thing’s predicates and to their subject as well. Thus (e.g.), ‘If Coriscus be different from “man”, he is different from himself: for he is a man’: or ‘If he be different from Socrates, and Socrates be a man, then’, they say, ‘he has admitted that Coriscus is different from a man, because it so happens (accidit) that the person from whom he said that he (Coriscus) is different is a man’.
Those that depend on whether an expression is used absolutely or in a certain respect and not strictly, occur whenever an expression used in a particular sense is taken as though it were used absolutely, e.g. in the argument ‘If what is not is the object of an opinion, then what is not is’: for it is not the same thing ‘to be x’ and ‘to be’ absolutely. Or again, ‘What is, is not, if it is not a particular kind of being, e.g. if it is not a man.’ For it is not the same thing ‘not to be x’ and ‘not to be’ at all: it looks as if it were, because of the closeness of the expression, i.e. because ‘to be x’ is but little different from ‘to be’, and ‘not to be x’ from ‘not to be’. Likewise also with any argument that turns upon the point whether an expression is used in a certain respect or used absolutely. Thus e.g. ‘Suppose an Indian to be black all over, but white in respect of his teeth; then he is both white and not white.’ Or if both characters belong in a particular respect, then, they say, ‘contrary attributes belong at the same time’. This kind of thing is in some cases easily seen by any one, e.g. suppose a man were to secure the statement that the Ethiopian is black, and were then to ask whether he is white in respect of his teeth; and then, if he be white in that respect, were to suppose at the conclusion of his questions that therefore he had proved dialectically that he was both white and not white. But in some cases it often passes undetected, viz. in all cases where, whenever a statement is made of something in a certain respect, it would be generally thought that the absolute statement follows as well; and also in all cases where it is not easy to see which of the attributes ought to be rendered strictly. A situation of this kind arises, where both the opposite attributes belong alike: for then there is general support for the view that one must agree absolutely to the assertion of both, or of neither: e.g. if a thing is half white and half black, is it white or black?
Other fallacies occur because the terms ‘proof’ or ‘refutation’ have not been defined, and because something is left out in their definition. For to refute is to contradict one and the same attribute-not merely the name, but the reality-and a name that is not merely synonymous but the same name-and to confute it from the propositions granted, necessarily, without including in the reckoning the original point to be proved, in the same respect and relation and manner and time in which it was asserted. A ‘false assertion’ about anything has to be defined in the same way. Some people, however, omit some one of the said conditions and give a merely apparent refutation, showing (e.g.) that the same thing is both double and not double: for two is double of one, but not double of three. Or, it may be, they show that it is both double and not double of the same thing, but not that it is so in the same respect: for it is double in length but not double in breadth. Or, it may be, they show it to be both double and not double of the same thing and in the same respect and manner, but not that it is so at the same time: and therefore their refutation is merely apparent. One might, with some violence, bring this fallacy into the group of fallacies dependent on language as well.
Those that depend on the assumption of the original point to be proved, occur in the same way, and in as many ways, as it is possible to beg the original point; they appear to refute because men lack the power to keep their eyes at once upon what is the same and what is different.
The refutation which depends upon the consequent arises because people suppose that the relation of consequence is convertible. For whenever, suppose A is, B necessarily is, they then suppose also that if B is, A necessarily is. This is also the source of the deceptions that attend opinions based on sense-perception. For people often suppose bile to be honey because honey is attended by a yellow colour: also, since after rain the ground is wet in consequence, we suppose that if the ground is wet, it has been raining; whereas that does not necessarily follow. In rhetoric proofs from signs are based on consequences. For when rhetoricians wish to show that a man is an adulterer, they take hold of some consequence of an adulterous life, viz. that the man is smartly dressed, or that he is observed to wander about at night. There are, however, many people of whom these things are true, while the charge in question is untrue. It happens like this also in real reasoning; e.g. Melissus’ argument, that the universe is eternal, assumes that the universe has not come to be (for from what is not nothing could possibly come to be) and that what has come to be has done so from a first beginning. If, therefore, the universe has not come to be, it has no first beginning, and is therefore eternal. But this does not necessarily follow: for even if what has come to be always has a first beginning, it does not also follow that what has a first beginning has come to be; any more than it follows that if a man in a fever be hot, a man who is hot must be in a fever.
The refutation which depends upon treating as cause what is not a cause, occurs whenever what is not a cause is inserted in the argument, as though the refutation depended upon it. This kind of thing happens in arguments that reason ad impossible: for in these we are bound to demolish one of the premisses. If, then, the false cause be reckoned in among the questions that are necessary to establish the resulting impossibility, it will often be thought that the refutation depends upon it, e.g. in the proof that the ‘soul’ and ‘life’ are not the same: for if coming-to-be be contrary to perishing, then a particular form of perishing will have a particular form of coming-to-be as its contrary: now death is a particular form of perishing and is contrary to life: life, therefore, is a coming to-be, and to live is to come-to-be. But this is impossible: accordingly, the ‘soul’ and ‘life’ are not the same. Now this is not proved: for the impossibility results all the same, even if one does not say that life is the same as the soul, but merely says that life is contrary to death, which is a form of perishing, and that perishing has ‘coming-to-be’ as its contrary. Arguments of that kind, then, though not inconclusive absolutely, are inconclusive in relation to the proposed conclusion. Also even the questioners themselves often fail quite as much to see a point of that kind.
Such, then, are the arguments that depend upon the consequent and upon false cause. Those that depend upon the making of two questions into one occur whenever the plurality is undetected and a single answer is returned as if to a single question. Now, in some cases, it is easy to see that there is more than one, and that an answer is not to be given, e.g. ‘Does the earth consist of sea, or the sky?’ But in some cases it is less easy, and then people treat the question as one, and either confess their defeat by failing to answer the question, or are exposed to an apparent refutation. Thus ‘Is A and is B a man?’ ‘Yes.’ ‘Then if any one hits A and B, he will strike a man’ (singular),’not men’ (plural). Or again, where part is good and part bad, ‘is the whole good or bad?’ For whichever he says, it is possible that he might be thought to expose himself to an apparent refutation or to make an apparently false statement: for to say that something is good which is not good, or not good which is good, is to make a false statement. Sometimes, however, additional premisses may actually give rise to a genuine refutation; e.g. suppose a man were to grant that the descriptions ‘white’ and ‘naked’ and ‘blind’ apply to one thing and to a number of things in a like sense. For if ‘blind’ describes a thing that cannot see though nature designed it to see, it will also describe things that cannot see though nature designed them to do so. Whenever, then, one thing can see while another cannot, they will either both be able to see or else both be blind; which is impossible.
The right way, then, is either to divide apparent proofs and refutations as above, or else to refer them all to ignorance of what ‘refutation’ is, and make that our starting-point: for it is possible to analyse all the aforesaid modes of fallacy into breaches of the definition of a refutation. In the first place, we may see if they are inconclusive: for the conclusion ought to result from the premisses laid down, so as to compel us necessarily to state it and not merely to seem to compel us. Next we should also take the definition bit by bit, and try the fallacy thereby. For of the fallacies that consist in language, some depend upon a double meaning, e.g. ambiguity of words and of phrases, and the fallacy of like verbal forms (for we habitually speak of everything as though it were a particular substance)-while fallacies of combination and division and accent arise because the phrase in question or the term as altered is not the same as was intended. Even this, however, should be the same, just as the thing signified should be as well, if a refutation or proof is to be effected; e.g. if the point concerns a doublet, then you should draw the conclusion of a ‘doublet’, not of a ‘cloak’. For the former conclusion also would be true, but it has not been proved; we need a further question to show that ‘doublet’ means the same thing, in order to satisfy any one who asks why you think your point proved.
Fallacies that depend on Accident are clear cases of ignoratio elenchi when once ‘proof’ has been defined. For the same definition ought to hold good of ‘refutation’ too, except that a mention of ‘the contradictory’ is here added: for a refutation is a proof of the contradictory. If, then, there is no proof as regards an accident of anything, there is no refutation. For supposing, when A and B are, C must necessarily be, and C is white, there is no necessity for it to be white on account of the syllogism. So, if the triangle has its angles equal to two right-angles, and it happens to be a figure, or the simplest element or starting point, it is not because it is a figure or a starting point or simplest element that it has this character. For the demonstration proves the point about it not qua figure or qua simplest element, but qua triangle. Likewise also in other cases. If, then, refutation is a proof, an argument which argued per accidens could not be a refutation. It is, however, just in this that the experts and men of science generally suffer refutation at the hand of the unscientific: for the latter meet the scientists with reasonings constituted per accidens; and the scientists for lack of the power to draw distinctions either say ‘Yes’ to their questions, or else people suppose them to have said ‘Yes’, although they have not.
Those that depend upon whether something is said in a certain respect only or said absolutely, are clear cases of ignoratio elenchi because the affirmation and the denial are not concerned with the same point. For of ‘white in a certain respect’ the negation is ‘not white in a certain respect’, while of ‘white absolutely’ it is ‘not white, absolutely’. If, then, a man treats the admission that a thing is ‘white in a certain respect’ as though it were said to be white absolutely, he does not effect a refutation, but merely appears to do so owing to ignorance of what refutation is.
The clearest cases of all, however, are those that were previously described’ as depending upon the definition of a ‘refutation’: and this is also why they were called by that name. For the appearance of a refutation is produced because of the omission in the definition, and if we divide fallacies in the above manner, we ought to set ‘Defective definition’ as a common mark upon them all.
Those that depend upon the assumption of the original point and upon stating as the cause what is not the cause, are clearly shown to be cases of ignoratio elenchi through the definition thereof. For the conclusion ought to come about ‘because these things are so’, and this does not happen where the premisses are not causes of it: and again it should come about without taking into account the original point, and this is not the case with those arguments which depend upon begging the original point.
Those that depend upon the assumption of the original point and upon stating as the cause what is not the cause, are clearly shown to be cases of ignoratio elenchi through the definition thereof. For the conclusion ought to come about ‘because these things are so’, and this does not happen where the premisses are not causes of it: and again it should come about without taking into account the original point, and this is not the case with those arguments which depend upon begging the original point.
Those that depend upon the consequent are a branch of Accident: for the consequent is an accident, only it differs from the accident in this, that you may secure an admission of the accident in the case of one thing only (e.g. the identity of a yellow thing and honey and of a white thing and swan), whereas the consequent always involves more than one thing: for we claim that things that are the same as one and the same thing are also the same as one another, and this is the ground of a refutation dependent on the consequent. It is, however, not always true, e.g. suppose that and B are the same as C per accidens; for both ‘snow’ and the ‘swan’ are the same as something white’. Or again, as in Melissus’ argument, a man assumes that to ‘have been generated’ and to ‘have a beginning’ are the same thing, or to ‘become equal’ and to ‘assume the same magnitude’. For because what has been generated has a beginning, he claims also that what has a beginning has been generated, and argues as though both what has been generated and what is finite were the same because each has a beginning. Likewise also in the case of things that are made equal he assumes that if things that assume one and the same magnitude become equal, then also things that become equal assume one magnitude: i.e. he assumes the consequent. Inasmuch, then, as a refutation depending on accident consists in ignorance of what a refutation is, clearly so also does a refutation depending on the consequent. We shall have further to examine this in another way as well.
Those fallacies that depend upon the making of several questions into one consist in our failure to dissect the definition of ‘proposition’. For a proposition is a single statement about a single thing. For the same definition applies to ‘one single thing only’ and to the ‘thing’, simply, e.g. to ‘man’ and to ‘one single man only’ and likewise also in other cases. If, then, a ‘single proposition’ be one which claims a single thing of a single thing, a ‘proposition’, simply, will also be the putting of a question of that kind. Now since a proof starts from propositions and refutation is a proof, refutation, too, will start from propositions. If, then, a proposition is a single statement about a single thing, it is obvious that this fallacy too consists in ignorance of what a refutation is: for in it what is not a proposition appears to be one. If, then, the answerer has returned an answer as though to a single question, there will be a refutation; while if he has returned one not really but apparently, there will be an apparent refutation of his thesis. All the types of fallacy, then, fall under ignorance of what a refutation is, some of them because the contradiction, which is the distinctive mark of a refutation, is merely apparent, and the rest failing to conform to the definition of a proof.
The deception comes about in the case of arguments that depend on ambiguity of words and of phrases because we are unable to divide the ambiguous term (for some terms it is not easy to divide, e.g. ‘unity’, ‘being’, and ‘sameness’), while in those that depend on combination and division, it is because we suppose that it makes no difference whether the phrase be combined or divided, as is indeed the case with most phrases. Likewise also with those that depend on accent: for the lowering or raising of the voice upon a phrase is thought not to alter its meaning-with any phrase, or not with many. With those that depend on the of expression it is because of the likeness of expression. For it is hard to distinguish what kind of things are signified by the same and what by different kinds of expression: for a man who can do this is practically next door to the understanding of the truth. A special reason why a man is liable to be hurried into assent to the fallacy is that we suppose every predicate of everything to be an individual thing, and we understand it as being one with the thing: and we therefore treat it as a substance: for it is to that which is one with a thing or substance, as also to substance itself, that ‘individually’ and ‘being’ are deemed to belong in the fullest sense. For this reason, too, this type of fallacy is to be ranked among those that depend on language; in the first place, because the deception is effected the more readily when we are inquiring into a problem in company with others than when we do so by ourselves (for an inquiry with another person is carried on by means of speech, whereas an inquiry by oneself is carried on quite as much by means of the object itself); secondly a man is liable to be deceived, even when inquiring by himself, when he takes speech as the basis of his inquiry: moreover the deception arises out of the likeness (of two different things), and the likeness arises out of the language. With those fallacies that depend upon Accident, deception comes about because we cannot distinguish the sameness and otherness of terms, i.e. their unity and multiplicity, or what kinds of predicate have all the same accidents as their subject. Likewise also with those that depend on the Consequent: for the consequent is a branch of Accident. Moreover, in many cases appearances point to this-and the claim is made that if is inseparable from B, so also is B from With those that depend upon an imperfection in the definition of a refutation, and with those that depend upon the difference between a qualified and an absolute statement, the deception consists in the smallness of the difference involved; for we treat the limitation to the particular thing or respect or manner or time as adding nothing to the meaning, and so grant the statement universally. Likewise also in the case of those that assume the original point, and those of false cause, and all that treat a number of questions as one: for in all of them the deception lies in the smallness of the difference: for our failure to be quite exact in our definition of ‘premiss’ and of ‘proof’ is due to the aforesaid reason.
Since we know on how many points apparent syllogisms depend, we know also on how many sophistical syllogisms and refutations may depend. By a sophistical refutation and syllogism I mean not only a syllogism or refutation which appears to be valid but is not, but also one which, though it is valid, only appears to be appropriate to the thing in question. These are those which fail to refute and prove people to be ignorant according to the nature of the thing in question, which was the function of the art of examination. Now the art of examining is a branch of dialectic: and this may prove a false conclusion because of the ignorance of the answerer. Sophistic refutations on the other hand, even though they prove the contradictory of his thesis, do not make clear whether he is ignorant: for sophists entangle the scientist as well with these arguments.
That we know them by the same line of inquiry is clear: for the same considerations which make it appear to an audience that the points required for the proof were asked in the questions and that the conclusion was proved, would make the answerer think so as well, so that false proof will occur through all or some of these means: for what a man has not been asked but thinks he has granted, he would also grant if he were asked. Of course, in some cases the moment we add the missing question, we also show up its falsity, e.g. in fallacies that depend on language and on solecism. If then, fallacious proofs of the contradictory of a thesis depend on their appearing to refute, it is clear that the considerations on which both proofs of false conclusions and an apparent refutation depend must be the same in number. Now an apparent refutation depends upon the elements involved in a genuine one: for the failure of one or other of these must make the refutation merely apparent, e.g. that which depends on the failure of the conclusion to follow from the argument (the argument ad impossible) and that which treats two questions as one and so depends upon a flaw in the premiss, and that which depends on the substitution of an accident for an essential attribute, and-a branch of the last-that which depends upon the consequent: more over, the conclusion may follow not in fact but only verbally: then, instead of proving the contradictory universally and in the same respect and relation and manner, the fallacy may be dependent on some limit of extent or on one or other of these qualifications: moreover, there is the assumption of the original point to be proved, in violation of the clause ‘without reckoning in the original point’. Thus we should have the number of considerations on which the fallacious proofs depend: for they could not depend on more, but all will depend on the points aforesaid.
A sophistical refutation is a refutation not absolutely but relatively to some one: and so is a proof, in the same way. For unless that which depends upon ambiguity assumes that the ambiguous term has a single meaning, and that which depends on like verbal forms assumes that substance is the only category, and the rest in the same way, there will be neither refutations nor proofs, either absolutely or relatively to the answerer: whereas if they do assume these things, they will stand, relatively to the answerer; but absolutely they will not stand: for they have not secured a statement that does have a single meaning, but only one that appears to have, and that only from this particular man.
The number of considerations on which depend the refutations of those who are refuted, we ought not to try to grasp without a knowledge of everything that is. This, however, is not the province of any special study: for possibly the sciences are infinite in number, so that obviously demonstrations may be infinite too. Now refutations may be true as well as false: for whenever it is possible to demonstrate something, it is also possible to refute the man who maintains the contradictory of the truth; e.g. if a man has stated that the diagonal is commensurate with the side of the square, one might refute him by demonstrating that it is incommensurate. Accordingly, to exhaust all possible refutations we shall have to have scientific knowledge of everything: for some refutations depend upon the principles that rule in geometry and the conclusions that follow from these, others upon those that rule in medicine, and others upon those of the other sciences. For the matter of that, the false refutations likewise belong to the number of the infinite: for according to every art there is false proof, e.g. according to geometry there is false geometrical proof, and according to medicine there is false medical proof. By ‘according to the art’, I mean ‘according to the principles of it’. Clearly, then, it is not of all refutations, but only of those that depend upon dialectic that we need to grasp the common-place rules: for these stand in a common relation to every art and faculty. And as regards the refutation that is according to one or other of the particular sciences it is the task of that particular scientist to examine whether it is merely apparent without being real, and, if it be real, what is the reason for it: whereas it is the business of dialecticians so to examine the refutation that proceeds from the common first principles that fall under no particular special study. For if we grasp the startingpoints of the accepted proofs on any subject whatever we grasp those of the refutations current on that subject. For a refutation is the proof of the contradictory of a given thesis, so that either one or two proofs of the contradictory constitute a refutation. We grasp, then, the number of considerations on which all such depend: if, however, we grasp this, we also grasp their solutions as well; for the objections to these are the solutions of them. We also grasp the number of considerations on which those refutations depend, that are merely apparent-apparent, I mean, not to everybody, but to people of a certain stamp; for it is an indefinite task if one is to inquire how many are the considerations that make them apparent to the man in the street. Accordingly it is clear that the dialectician’s business is to be able to grasp on how many considerations depends the formation, through the common first principles, of a refutation that is either real or apparent, i.e. either dialectical or apparently dialectical, or suitable for an examination.
[[Categories]] (Translated by E. M. Edghill)
@@margin-left:2em;
[[1|Categories: 1]] - [[2|Categories: 2]] - [[3|Categories: 3]] - [[4|Categories: 4]] - [[5|Categories: 5]] - [[6|Categories: 6]] - [[7|Categories: 7]] - [[8|Categories: 8]] - [[9|Categories: 9]] - [[10|Categories: 10]] - [[11|Categories: 11]] - [[12|Categories: 12]] - [[13|Categories: 13]] - [[14|Categories: 14]] - [[15|Categories: 15]]
@@
---
[[On Interpretation]] (Translated by E. M. Edghill)
@@margin-left:2em;
[[1|On Interpretation: 1]] - [[2|On Interpretation: 2]] - [[3|On Interpretation: 3]] - [[4|On Interpretation: 4]] - [[5|On Interpretation: 5]] - [[6|On Interpretation: 6]] - [[7|On Interpretation: 7]] - [[8|On Interpretation: 8]] - [[9|On Interpretation: 9]] - [[10|On Interpretation: 10]] - [[11|On Interpretation: 11]] - [[12|On Interpretation: 12]] - [[13|On Interpretation: 13]] - [[14|On Interpretation: 14]]
@@
---
[[Prior Analytics]] (Translated by A. J. Jenkinson)
@@margin-left:2em;
[[Book I|Prior Analytics: Book I]]
@@
@@margin-left:4em;
[[1|Prior Analytics: Book I: 1]] - [[2|Prior Analytics: Book I: 2]] - [[3|Prior Analytics: Book I: 3]] - [[4|Prior Analytics: Book I: 4]] - [[5|Prior Analytics: Book I: 5]] - [[6|Prior Analytics: Book I: 6]] - [[7|Prior Analytics: Book I: 7]] - [[8|Prior Analytics: Book I: 8]] - [[9|Prior Analytics: Book I: 9]] - [[10|Prior Analytics: Book I: 10]] - [[11|Prior Analytics: Book I: 11]] - [[12|Prior Analytics: Book I: 12]] - [[13|Prior Analytics: Book I: 13]] - [[14|Prior Analytics: Book I: 14]] - [[15|Prior Analytics: Book I: 15]] - [[16|Prior Analytics: Book I: 16]] - [[17|Prior Analytics: Book I: 17]] - [[18|Prior Analytics: Book I: 18]] - [[19|Prior Analytics: Book I: 19]] - [[20|Prior Analytics: Book I: 20]] - [[21|Prior Analytics: Book I: 21]] - [[22|Prior Analytics: Book I: 22]] - [[23|Prior Analytics: Book I: 23]] - [[24|Prior Analytics: Book I: 24]] - [[25|Prior Analytics: Book I: 25]] - [[26|Prior Analytics: Book I: 26]] - [[27|Prior Analytics: Book I: 27]] - [[28|Prior Analytics: Book I: 28]] - [[29|Prior Analytics: Book I: 29]] - [[30|Prior Analytics: Book I: 30]] - [[31|Prior Analytics: Book I: 31]] - [[32|Prior Analytics: Book I: 32]] - [[33|Prior Analytics: Book I: 33]] - [[34|Prior Analytics: Book I: 34]] - [[35|Prior Analytics: Book I: 35]] - [[36|Prior Analytics: Book I: 36]] - [[37|Prior Analytics: Book I: 37]] - [[38|Prior Analytics: Book I: 38]] - [[39|Prior Analytics: Book I: 39]] - [[40|Prior Analytics: Book I: 40]] - [[41|Prior Analytics: Book I: 41]] - [[42|Prior Analytics: Book I: 42]] - [[43|Prior Analytics: Book I: 43]] - [[44|Prior Analytics: Book I: 44]] - [[45|Prior Analytics: Book I: 45]] - [[46|Prior Analytics: Book I: 46]]
@@
@@margin-left:2em;
[[Book II|Prior Analytics: Book II]]
@@
@@margin-left:4em;
[[1|Prior Analytics: Book II: 1]] - [[2|Prior Analytics: Book II: 2]] - [[3|Prior Analytics: Book II: 3]] - [[4|Prior Analytics: Book II: 4]] - [[5|Prior Analytics: Book II: 5]] - [[6|Prior Analytics: Book II: 6]] - [[7|Prior Analytics: Book II: 7]] - [[8|Prior Analytics: Book II: 8]] - [[9|Prior Analytics: Book II: 9]] - [[10|Prior Analytics: Book II: 10]] - [[11|Prior Analytics: Book II: 11]] - [[12|Prior Analytics: Book II: 12]] - [[13|Prior Analytics: Book II: 13]] - [[14|Prior Analytics: Book II: 14]] - [[15|Prior Analytics: Book II: 15]] - [[16|Prior Analytics: Book II: 16]] - [[17|Prior Analytics: Book II: 17]] - [[18|Prior Analytics: Book II: 18]] - [[19|Prior Analytics: Book II: 19]] - [[20|Prior Analytics: Book II: 20]] - [[21|Prior Analytics: Book II: 21]] - [[22|Prior Analytics: Book II: 22]] - [[23|Prior Analytics: Book II: 23]] - [[24|Prior Analytics: Book II: 24]] - [[25|Prior Analytics: Book II: 25]] - [[26|Prior Analytics: Book II: 26]] - [[27|Prior Analytics: Book II: 27]]
@@
---
[[Posterior Analytics]] (Translated by G. R. G. Mure)
@@margin-left:2em;
[[Book I|Posterior Analytics: Book I]]
@@
@@margin-left:4em;
[[1|Posterior Analytics: Book I: 1]] - [[2|Posterior Analytics: Book I: 2]] - [[3|Posterior Analytics: Book I: 3]] - [[4|Posterior Analytics: Book I: 4]] - [[5|Posterior Analytics: Book I: 5]] - [[6|Posterior Analytics: Book I: 6]] - [[7|Posterior Analytics: Book I: 7]] - [[8|Posterior Analytics: Book I: 8]] - [[9|Posterior Analytics: Book I: 9]] - [[10|Posterior Analytics: Book I: 10]] - [[11|Posterior Analytics: Book I: 11]] - [[12|Posterior Analytics: Book I: 12]] - [[13|Posterior Analytics: Book I: 13]] - [[14|Posterior Analytics: Book I: 14]] - [[15|Posterior Analytics: Book I: 15]] - [[16|Posterior Analytics: Book I: 16]] - [[17|Posterior Analytics: Book I: 17]] - [[18|Posterior Analytics: Book I: 18]] - [[19|Posterior Analytics: Book I: 19]] - [[20|Posterior Analytics: Book I: 20]] - [[21|Posterior Analytics: Book I: 21]] - [[22|Posterior Analytics: Book I: 22]] - [[23|Posterior Analytics: Book I: 23]] - [[24|Posterior Analytics: Book I: 24]] - [[25|Posterior Analytics: Book I: 25]] - [[26|Posterior Analytics: Book I: 26]] - [[27|Posterior Analytics: Book I: 27]] - [[28|Posterior Analytics: Book I: 28]] - [[29|Posterior Analytics: Book I: 29]] - [[30|Posterior Analytics: Book I: 30]] - [[31|Posterior Analytics: Book I: 31]] - [[32|Posterior Analytics: Book I: 32]] - [[33|Posterior Analytics: Book I: 33]] - [[34|Posterior Analytics: Book I: 34]]
@@
@@margin-left:2em;
[[Book II|Posterior Analytics: Book II]]
@@
@@margin-left:4em;
[[1|Posterior Analytics: Book II: 1]] - [[2|Posterior Analytics: Book II: 2]] - [[3|Posterior Analytics: Book II: 3]] - [[4|Posterior Analytics: Book II: 4]] - [[5|Posterior Analytics: Book II: 5]] - [[6|Posterior Analytics: Book II: 6]] - [[7|Posterior Analytics: Book II: 7]] - [[8|Posterior Analytics: Book II: 8]] - [[9|Posterior Analytics: Book II: 9]] - [[10|Posterior Analytics: Book II: 10]] - [[11|Posterior Analytics: Book II: 11]] - [[12|Posterior Analytics: Book II: 12]] - [[13|Posterior Analytics: Book II: 13]] - [[14|Posterior Analytics: Book II: 14]] - [[15|Posterior Analytics: Book II: 15]] - [[16|Posterior Analytics: Book II: 16]] - [[17|Posterior Analytics: Book II: 17]] - [[18|Posterior Analytics: Book II: 18]] - [[19|Posterior Analytics: Book II: 19]]
@@
---
[[Topics]] (Translated by W. A. Pickard-Cambridge)
@@margin-left:2em;
[[Book I|Topics: Book I]]
@@
@@margin-left:4em;
[[1|Topics: Book I: 1]] - [[2|Topics: Book I: 2]] - [[3|Topics: Book I: 3]] - [[4|Topics: Book I: 4]] - [[5|Topics: Book I: 5]] - [[6|Topics: Book I: 6]] - [[7|Topics: Book I: 7]] - [[8|Topics: Book I: 8]] - [[9|Topics: Book I: 9]] - [[10|Topics: Book I: 10]] - [[11|Topics: Book I: 11]] - [[12|Topics: Book I: 12]] - [[13|Topics: Book I: 13]] - [[14|Topics: Book I: 14]] - [[15|Topics: Book I: 15]] - [[16|Topics: Book I: 16]] - [[17|Topics: Book I: 17]] - [[18|Topics: Book I: 18]]
@@
@@margin-left:2em;
[[Book II|Topics: Book II]]
@@
@@margin-left:4em;
[[1|Topics: Book II: 1]] - [[2|Topics: Book II: 2]] - [[3|Topics: Book II: 3]] - [[4|Topics: Book II: 4]] - [[5|Topics: Book II: 5]] - [[6|Topics: Book II: 6]] - [[7|Topics: Book II: 7]] - [[8|Topics: Book II: 8]] - [[9|Topics: Book II: 9]] - [[10|Topics: Book II: 10]] - [[11|Topics: Book II: 11]]
@@
@@margin-left:2em;
[[Book III|Topics: Book III]]
@@
@@margin-left:4em;
[[1|Topics: Book III: 1]] - [[2|Topics: Book III: 2]] - [[3|Topics: Book III: 3]] - [[4|Topics: Book III: 4]] - [[5|Topics: Book III: 5]] - [[6|Topics: Book III: 6]]
@@
@@margin-left:2em;
[[Book IV|Topics: Book IV]]
@@
@@margin-left:4em;
[[1|Topics: Book IV: 1]] - [[2|Topics: Book IV: 2]] - [[3|Topics: Book IV: 3]] - [[4|Topics: Book IV: 4]] - [[5|Topics: Book IV: 5]] - [[6|Topics: Book IV: 6]]
@@
@@margin-left:2em;
[[Book V|Topics: Book V]]
@@
@@margin-left:4em;
[[1|Topics: Book V: 1]] - [[2|Topics: Book V: 2]] - [[3|Topics: Book V: 3]] - [[4|Topics: Book V: 4]] - [[5|Topics: Book V: 5]] - [[6|Topics: Book V: 6]] - [[7|Topics: Book V: 7]] - [[8|Topics: Book V: 8]]
@@
@@margin-left:2em;
[[Book VI|Topics: Book VI]]
@@
@@margin-left:4em;
[[1|Topics: Book VI: 1]] - [[2|Topics: Book VI: 2]] - [[3|Topics: Book VI: 3]] - [[4|Topics: Book VI: 4]] - [[5|Topics: Book VI: 5]] - [[6|Topics: Book VI: 6]] - [[7|Topics: Book VI: 7]] - [[8|Topics: Book VI: 8]] - [[9|Topics: Book VI: 9]] - [[10|Topics: Book VI: 10]] - [[11|Topics: Book VI: 11]] - [[12|Topics: Book VI: 12]] - [[13|Topics: Book VI: 13]] - [[14|Topics: Book VI: 14]]
@@
@@margin-left:2em;
[[Book VII|Topics: Book VII]]
@@
@@margin-left:4em;
[[1|Topics: Book VII: 1]] - [[2|Topics: Book VII: 2]] - [[3|Topics: Book VII: 3]] - [[4|Topics: Book VII: 4]] - [[5|Topics: Book VII: 5]]
@@
@@margin-left:2em;
[[Book VIII|Topics: Book VIII]]
@@
@@margin-left:4em;
[[1|Topics: Book VIII: 1]] - [[2|Topics: Book VIII: 2]] - [[3|Topics: Book VIII: 3]] - [[4|Topics: Book VIII: 4]] - [[5|Topics: Book VIII: 5]] - [[6|Topics: Book VIII: 6]] - [[7|Topics: Book VIII: 7]] - [[8|Topics: Book VIII: 8]] - [[9|Topics: Book VIII: 9]] - [[10|Topics: Book VIII: 10]] - [[11|Topics: Book VIII: 11]] - [[12|Topics: Book VIII: 12]] - [[13|Topics: Book VIII: 13]] - [[14|Topics: Book VIII: 14]]
@@
---
[[On Sophistical Refutations]] (Translated by W. A. Pickard-Cambridge)
@@margin-left:2em;
[[1|On Sophistical Refutations: 1]] - [[2|On Sophistical Refutations: 2]] - [[3|On Sophistical Refutations: 3]] - [[4|On Sophistical Refutations: 4]] - [[5|On Sophistical Refutations: 5]] - [[6|On Sophistical Refutations: 6]] - [[7|On Sophistical Refutations: 7]] - [[8|On Sophistical Refutations: 8]] - [[9|On Sophistical Refutations: 9]] - [[10|On Sophistical Refutations: 10]] - [[11|On Sophistical Refutations: 11]] - [[12|On Sophistical Refutations: 12]] - [[13|On Sophistical Refutations: 13]] - [[14|On Sophistical Refutations: 14]] - [[15|On Sophistical Refutations: 15]] - [[16|On Sophistical Refutations: 16]] - [[17|On Sophistical Refutations: 17]] - [[18|On Sophistical Refutations: 18]] - [[19|On Sophistical Refutations: 19]] - [[20|On Sophistical Refutations: 20]] - [[21|On Sophistical Refutations: 21]] - [[22|On Sophistical Refutations: 22]] - [[23|On Sophistical Refutations: 23]] - [[24|On Sophistical Refutations: 24]] - [[25|On Sophistical Refutations: 25]] - [[26|On Sophistical Refutations: 26]] - [[27|On Sophistical Refutations: 27]] - [[28|On Sophistical Refutations: 28]] - [[29|On Sophistical Refutations: 29]] - [[30|On Sophistical Refutations: 30]] - [[31|On Sophistical Refutations: 31]] - [[32|On Sophistical Refutations: 32]] - [[33|On Sophistical Refutations: 33]] - [[34|On Sophistical Refutations: 34]]
@@
!![[Posterior Analytics: Book I]]
{{Posterior Analytics: Book I}}
!![[Posterior Analytics: Book II]]
{{Posterior Analytics: Book II}}
---
!!![[Posterior Analytics: Book I: 1]]
{{Posterior Analytics: Book I: 1}}
---
!!![[Posterior Analytics: Book I: 2]]
{{Posterior Analytics: Book I: 2}}
---
!!![[Posterior Analytics: Book I: 3]]
{{Posterior Analytics: Book I: 3}}
---
!!![[Posterior Analytics: Book I: 4]]
{{Posterior Analytics: Book I: 4}}
---
!!![[Posterior Analytics: Book I: 5]]
{{Posterior Analytics: Book I: 5}}
---
!!![[Posterior Analytics: Book I: 6]]
{{Posterior Analytics: Book I: 6}}
---
!!![[Posterior Analytics: Book I: 7]]
{{Posterior Analytics: Book I: 7}}
---
!!![[Posterior Analytics: Book I: 8]]
{{Posterior Analytics: Book I: 8}}
---
!!![[Posterior Analytics: Book I: 9]]
{{Posterior Analytics: Book I: 9}}
---
!!![[Posterior Analytics: Book I: 10]]
{{Posterior Analytics: Book I: 10}}
---
!!![[Posterior Analytics: Book I: 11]]
{{Posterior Analytics: Book I: 11}}
---
!!![[Posterior Analytics: Book I: 12]]
{{Posterior Analytics: Book I: 12}}
---
!!![[Posterior Analytics: Book I: 13]]
{{Posterior Analytics: Book I: 13}}
---
!!![[Posterior Analytics: Book I: 14]]
{{Posterior Analytics: Book I: 14}}
---
!!![[Posterior Analytics: Book I: 15]]
{{Posterior Analytics: Book I: 15}}
---
!!![[Posterior Analytics: Book I: 16]]
{{Posterior Analytics: Book I: 16}}
---
!!![[Posterior Analytics: Book I: 17]]
{{Posterior Analytics: Book I: 17}}
---
!!![[Posterior Analytics: Book I: 18]]
{{Posterior Analytics: Book I: 18}}
---
!!![[Posterior Analytics: Book I: 19]]
{{Posterior Analytics: Book I: 19}}
---
!!![[Posterior Analytics: Book I: 20]]
{{Posterior Analytics: Book I: 20}}
---
!!![[Posterior Analytics: Book I: 21]]
{{Posterior Analytics: Book I: 21}}
---
!!![[Posterior Analytics: Book I: 22]]
{{Posterior Analytics: Book I: 22}}
---
!!![[Posterior Analytics: Book I: 23]]
{{Posterior Analytics: Book I: 23}}
---
!!![[Posterior Analytics: Book I: 24]]
{{Posterior Analytics: Book I: 24}}
---
!!![[Posterior Analytics: Book I: 25]]
{{Posterior Analytics: Book I: 25}}
---
!!![[Posterior Analytics: Book I: 26]]
{{Posterior Analytics: Book I: 26}}
---
!!![[Posterior Analytics: Book I: 27]]
{{Posterior Analytics: Book I: 27}}
---
!!![[Posterior Analytics: Book I: 28]]
{{Posterior Analytics: Book I: 28}}
---
!!![[Posterior Analytics: Book I: 29]]
{{Posterior Analytics: Book I: 29}}
---
!!![[Posterior Analytics: Book I: 30]]
{{Posterior Analytics: Book I: 30}}
---
!!![[Posterior Analytics: Book I: 31]]
{{Posterior Analytics: Book I: 31}}
---
!!![[Posterior Analytics: Book I: 32]]
{{Posterior Analytics: Book I: 32}}
---
!!![[Posterior Analytics: Book I: 33]]
{{Posterior Analytics: Book I: 33}}
---
!!![[Posterior Analytics: Book I: 34]]
{{Posterior Analytics: Book I: 34}}
All instruction given or received by way of argument proceeds from pre-existent knowledge. This becomes evident upon a survey of all the species of such instruction. The mathematical sciences and all other speculative disciplines are acquired in this way, and so are the two forms of dialectical reasoning, syllogistic and inductive; for each of these latter make use of old knowledge to impart new, the syllogism assuming an audience that accepts its premisses, induction exhibiting the universal as implicit in the clearly known particular. Again, the persuasion exerted by rhetorical arguments is in principle the same, since they use either example, a kind of induction, or enthymeme, a form of syllogism.
The pre-existent knowledge required is of two kinds. In some cases admission of the fact must be assumed, in others comprehension of the meaning of the term used, and sometimes both assumptions are essential. Thus, we assume that every predicate can be either truly affirmed or truly denied of any subject, and that ‘triangle’ means so and so; as regards ‘unit’ we have to make the double assumption of the meaning of the word and the existence of the thing. The reason is that these several objects are not equally obvious to us. Recognition of a truth may in some cases contain as factors both previous knowledge and also knowledge acquired simultaneously with that recognition-knowledge, this latter, of the particulars actually falling under the universal and therein already virtually known. For example, the student knew beforehand that the angles of every triangle are equal to two right angles; but it was only at the actual moment at which he was being led on to recognize this as true in the instance before him that he came to know ‘this figure inscribed in the semicircle’ to be a triangle. For some things (viz. the singulars finally reached which are not predicable of anything else as subject) are only learnt in this way, i.e. there is here no recognition through a middle of a minor term as subject to a major. Before he was led on to recognition or before he actually drew a conclusion, we should perhaps say that in a manner he knew, in a manner not.
If he did not in an unqualified sense of the term know the existence of this triangle, how could he know without qualification that its angles were equal to two right angles? No: clearly he knows not without qualification but only in the sense that he knows universally. If this distinction is not drawn, we are faced with the dilemma in the Meno: either a man will learn nothing or what he already knows; for we cannot accept the solution which some people offer. A man is asked, ‘Do you, or do you not, know that every pair is even?’ He says he does know it. The questioner then produces a particular pair, of the existence, and so a fortiori of the evenness, of which he was unaware. The solution which some people offer is to assert that they do not know that every pair is even, but only that everything which they know to be a pair is even: yet what they know to be even is that of which they have demonstrated evenness, i.e. what they made the subject of their premiss, viz. not merely every triangle or number which they know to be such, but any and every number or triangle without reservation. For no premiss is ever couched in the form ‘every number which you know to be such’, or ‘every rectilinear figure which you know to be such’: the predicate is always construed as applicable to any and every instance of the thing. On the other hand, I imagine there is nothing to prevent a man in one sense knowing what he is learning, in another not knowing it. The strange thing would be, not if in some sense he knew what he was learning, but if he were to know it in that precise sense and manner in which he was learning it.
I call the basic truths of every genus those clements in it the existence of which cannot be proved. As regards both these primary truths and the attributes dependent on them the meaning of the name is assumed. The fact of their existence as regards the primary truths must be assumed; but it has to be proved of the remainder, the attributes. Thus we assume the meaning alike of unity, straight, and triangular; but while as regards unity and magnitude we assume also the fact of their existence, in the case of the remainder proof is required.
Of the basic truths used in the demonstrative sciences some are peculiar to each science, and some are common, but common only in the sense of analogous, being of use only in so far as they fall within the genus constituting the province of the science in question.
Peculiar truths are, e.g. the definitions of line and straight; common truths are such as ‘take equals from equals and equals remain’. Only so much of these common truths is required as falls within the genus in question: for a truth of this kind will have the same force even if not used generally but applied by the geometer only to magnitudes, or by the arithmetician only to numbers. Also peculiar to a science are the subjects the existence as well as the meaning of which it assumes, and the essential attributes of which it investigates, e.g. in arithmetic units, in geometry points and lines. Both the existence and the meaning of the subjects are assumed by these sciences; but of their essential attributes only the meaning is assumed. For example arithmetic assumes the meaning of odd and even, square and cube, geometry that of incommensurable, or of deflection or verging of lines, whereas the existence of these attributes is demonstrated by means of the axioms and from previous conclusions as premisses. Astronomy too proceeds in the same way. For indeed every demonstrative science has three elements: (1) that which it posits, the subject genus whose essential attributes it examines; (2) the so-called axioms, which are primary premisses of its demonstration; (3) the attributes, the meaning of which it assumes. Yet some sciences may very well pass over some of these elements; e.g. we might not expressly posit the existence of the genus if its existence were obvious (for instance, the existence of hot and cold is more evident than that of number); or we might omit to assume expressly the meaning of the attributes if it were well understood. In the way the meaning of axioms, such as ‘Take equals from equals and equals remain’, is well known and so not expressly assumed. Nevertheless in the nature of the case the essential elements of demonstration are three: the subject, the attributes, and the basic premisses.
That which expresses necessary self-grounded fact, and which we must necessarily believe, is distinct both from the hypotheses of a science and from illegitimate postulate-I say ‘must believe’, because all syllogism, and therefore a fortiori demonstration, is addressed not to the spoken word, but to the discourse within the soul, and though we can always raise objections to the spoken word, to the inward discourse we cannot always object. That which is capable of proof but assumed by the teacher without proof is, if the pupil believes and accepts it, hypothesis, though only in a limited sense hypothesis-that is, relatively to the pupil; if the pupil has no opinion or a contrary opinion on the matter, the same assumption is an illegitimate postulate. Therein lies the distinction between hypothesis and illegitimate postulate: the latter is the contrary of the pupil’s opinion, demonstrable, but assumed and used without demonstration.
The definition-viz. those which are not expressed as statements that anything is or is not-are not hypotheses: but it is in the premisses of a science that its hypotheses are contained. Definitions require only to be understood, and this is not hypothesis-unless it be contended that the pupil’s hearing is also an hypothesis required by the teacher. Hypotheses, on the contrary, postulate facts on the being of which depends the being of the fact inferred. Nor are the geometer’s hypotheses false, as some have held, urging that one must not employ falsehood and that the geometer is uttering falsehood in stating that the line which he draws is a foot long or straight, when it is actually neither. The truth is that the geometer does not draw any conclusion from the being of the particular line of which he speaks, but from what his diagrams symbolize. A further distinction is that all hypotheses and illegitimate postulates are either universal or particular, whereas a definition is neither.
So demonstration does not necessarily imply the being of Forms nor a One beside a Many, but it does necessarily imply the possibility of truly predicating one of many; since without this possibility we cannot save the universal, and if the universal goes, the middle term goes witb. it, and so demonstration becomes impossible. We conclude, then, that there must be a single identical term unequivocally predicable of a number of individuals.
The law that it is impossible to affirm and deny simultaneously the same predicate of the same subject is not expressly posited by any demonstration except when the conclusion also has to be expressed in that form; in which case the proof lays down as its major premiss that the major is truly affirmed of the middle but falsely denied. It makes no difference, however, if we add to the middle, or again to the minor term, the corresponding negative. For grant a minor term of which it is true to predicate man-even if it be also true to predicate not-man of it — still grant simply that man is animal and not not-animal, and the conclusion follows: for it will still be true to say that Callias — even if it be also true to say that not-Callias — is animal and not not-animal. The reason is that the major term is predicable not only of the middle, but of something other than the middle as well, being of wider application; so that the conclusion is not affected even if the middle is extended to cover the original middle term and also what is not the original middle term.
The law that every predicate can be either truly affirmed or truly denied of every subject is posited by such demonstration as uses reductio ad impossibile, and then not always universally, but so far as it is requisite; within the limits, that is, of the genus-the genus, I mean (as I have already explained), to which the man of science applies his demonstrations. In virtue of the common elements of demonstration-I mean the common axioms which are used as premisses of demonstration, not the subjects nor the attributes demonstrated as belonging to them-all the sciences have communion with one another, and in communion with them all is dialectic and any science which might attempt a universal proof of axioms such as the law of excluded middle, the law that the subtraction of equals from equals leaves equal remainders, or other axioms of the same kind. Dialectic has no definite sphere of this kind, not being confined to a single genus. Otherwise its method would not be interrogative; for the interrogative method is barred to the demonstrator, who cannot use the opposite facts to prove the same nexus. This was shown in my work on the syllogism.
If a syllogistic question is equivalent to a proposition embodying one of the two sides of a contradiction, and if each science has its peculiar propositions from which its peculiar conclusion is developed, then there is such a thing as a distinctively scientific question, and it is the interrogative form of the premisses from which the ‘appropriate’ conclusion of each science is developed. Hence it is clear that not every question will be relevant to geometry, nor to medicine, nor to any other science: only those questions will be geometrical which form premisses for the proof of the theorems of geometry or of any other science, such as optics, which uses the same basic truths as geometry. Of the other sciences the like is true. Of these questions the geometer is bound to give his account, using the basic truths of geometry in conjunction with his previous conclusions; of the basic truths the geometer, as such, is not bound to give any account. The like is true of the other sciences. There is a limit, then, to the questions which we may put to each man of science; nor is each man of science bound to answer all inquiries on each several subject, but only such as fall within the defined field of his own science. If, then, in controversy with a geometer qua geometer the disputant confines himself to geometry and proves anything from geometrical premisses, he is clearly to be applauded; if he goes outside these he will be at fault, and obviously cannot even refute the geometer except accidentally. One should therefore not discuss geometry among those who are not geometers, for in such a company an unsound argument will pass unnoticed. This is correspondingly true in the other sciences.
Since there are ‘geometrical’ questions, does it follow that there are also distinctively ‘ungeometrical’ questions? Further, in each special science-geometry for instance-what kind of error is it that may vitiate questions, and yet not exclude them from that science? Again, is the erroneous conclusion one constructed from premisses opposite to the true premisses, or is it formal fallacy though drawn from geometrical premisses? Or, perhaps, the erroneous conclusion is due to the drawing of premisses from another science; e.g. in a geometrical controversy a musical question is distinctively ungeometrical, whereas the notion that parallels meet is in one sense geometrical, being ungeometrical in a different fashion: the reason being that ‘ungeometrical’, like ‘unrhythmical’, is equivocal, meaning in the one case not geometry at all, in the other bad geometry? It is this error, i.e. error based on premisses of this kind-’of’ the science but false-that is the contrary of science. In mathematics the formal fallacy is not so common, because it is the middle term in which the ambiguity lies, since the major is predicated of the whole of the middle and the middle of the whole of the minor (the predicate of course never has the prefix ‘all’); and in mathematics one can, so to speak, see these middle terms with an intellectual vision, while in dialectic the ambiguity may escape detection. E.g. ‘Is every circle a figure?’ A diagram shows that this is so, but the minor premiss ‘Are epics circles?’ is shown by the diagram to be false.
If a proof has an inductive minor premiss, one should not bring an ‘objection’ against it. For since every premiss must be applicable to a number of cases (otherwise it will not be true in every instance, which, since the syllogism proceeds from universals, it must be), then assuredly the same is true of an ‘objection’; since premisses and ‘objections’ are so far the same that anything which can be validly advanced as an ‘objection’ must be such that it could take the form of a premiss, either demonstrative or dialectical. On the other hand, arguments formally illogical do sometimes occur through taking as middles mere attributes of the major and minor terms. An instance of this is Caeneus’ proof that fire increases in geometrical proportion: ‘Fire’, he argues, ‘increases rapidly, and so does geometrical proportion’. There is no syllogism so, but there is a syllogism if the most rapidly increasing proportion is geometrical and the most rapidly increasing proportion is attributable to fire in its motion. Sometimes, no doubt, it is impossible to reason from premisses predicating mere attributes: but sometimes it is possible, though the possibility is overlooked. If false premisses could never give true conclusions ‘resolution’ would be easy, for premisses and conclusion would in that case inevitably reciprocate. I might then argue thus: let A be an existing fact; let the existence of A imply such and such facts actually known to me to exist, which we may call B. I can now, since they reciprocate, infer A from B.
Reciprocation of premisses and conclusion is more frequent in mathematics, because mathematics takes definitions, but never an accident, for its premisses-a second characteristic distinguishing mathematical reasoning from dialectical disputations.
A science expands not by the interposition of fresh middle terms, but by the apposition of fresh extreme terms. E.g. A is predicated of B, B of C, C of D, and so indefinitely. Or the expansion may be lateral: e.g. one major A, may be proved of two minors, C and E. Thus let A represent number-a number or number taken indeterminately; B determinate odd number; C any particular odd number. We can then predicate A of C. Next let D represent determinate even number, and E even number. Then A is predicable of E.
Knowledge of the fact differs from knowledge of the reasoned fact. To begin with, they differ within the same science and in two ways: (1) when the premisses of the syllogism are not immediate (for then the proximate cause is not contained in them-a necessary condition of knowledge of the reasoned fact): (2) when the premisses are immediate, but instead of the cause the better known of the two reciprocals is taken as the middle; for of two reciprocally predicable terms the one which is not the cause may quite easily be the better known and so become the middle term of the demonstration. Thus (2) (a) you might prove as follows that the planets are near because they do not twinkle: let C be the planets, B not twinkling, A proximity. Then B is predicable of C; for the planets do not twinkle. But A is also predicable of B, since that which does not twinkle is near — we must take this truth as having been reached by induction or sense-perception. Therefore A is a necessary predicate of C; so that we have demonstrated that the planets are near. This syllogism, then, proves not the reasoned fact but only the fact; since they are not near because they do not twinkle, but, because they are near, do not twinkle. The major and middle of the proof, however, may be reversed, and then the demonstration will be of the reasoned fact. Thus: let C be the planets, B proximity, A not twinkling. Then B is an attribute of C, and A-not twinkling-of B. Consequently A is predicable of C, and the syllogism proves the reasoned fact, since its middle term is the proximate cause. Another example is the inference that the moon is spherical from its manner of waxing. Thus: since that which so waxes is spherical, and since the moon so waxes, clearly the moon is spherical. Put in this form, the syllogism turns out to be proof of the fact, but if the middle and major be reversed it is proof of the reasoned fact; since the moon is not spherical because it waxes in a certain manner, but waxes in such a manner because it is spherical. (Let C be the moon, B spherical, and A waxing.) Again (b), in cases where the cause and the effect are not reciprocal and the effect is the better known, the fact is demonstrated but not the reasoned fact. This also occurs (1) when the middle falls outside the major and minor, for here too the strict cause is not given, and so the demonstration is of the fact, not of the reasoned fact. For example, the question ‘Why does not a wall breathe?’ might be answered, ‘Because it is not an animal’; but that answer would not give the strict cause, because if not being an animal causes the absence of respiration, then being an animal should be the cause of respiration, according to the rule that if the negation of causes the non-inherence of y, the affirmation of x causes the inherence of y; e.g. if the disproportion of the hot and cold elements is the cause of ill health, their proportion is the cause of health; and conversely, if the assertion of x causes the inherence of y, the negation of x must cause y’s non-inherence. But in the case given this consequence does not result; for not every animal breathes. A syllogism with this kind of cause takes place in the second figure. Thus: let A be animal, B respiration, C wall. Then A is predicable of all B (for all that breathes is animal), but of no C; and consequently B is predicable of no C; that is, the wall does not breathe. Such causes are like far-fetched explanations, which precisely consist in making the cause too remote, as in Anacharsis’ account of why the Scythians have no flute-players; namely because they have no vines.
Thus, then, do the syllogism of the fact and the syllogism of the reasoned fact differ within one science and according to the position of the middle terms. But there is another way too in which the fact and the reasoned fact differ, and that is when they are investigated respectively by different sciences. This occurs in the case of problems related to one another as subordinate and superior, as when optical problems are subordinated to geometry, mechanical problems to stereometry, harmonic problems to arithmetic, the data of observation to astronomy. (Some of these sciences bear almost the same name; e.g. mathematical and nautical astronomy, mathematical and acoustical harmonics.) Here it is the business of the empirical observers to know the fact, of the mathematicians to know the reasoned fact; for the latter are in possession of the demonstrations giving the causes, and are often ignorant of the fact: just as we have often a clear insight into a universal, but through lack of observation are ignorant of some of its particular instances. These connexions have a perceptible existence though they are manifestations of forms. For the mathematical sciences concern forms: they do not demonstrate properties of a substratum, since, even though the geometrical subjects are predicable as properties of a perceptible substratum, it is not as thus predicable that the mathematician demonstrates properties of them. As optics is related to geometry, so another science is related to optics, namely the theory of the rainbow. Here knowledge of the fact is within the province of the natural philosopher, knowledge of the reasoned fact within that of the optician, either qua optician or qua mathematical optician. Many sciences not standing in this mutual relation enter into it at points; e.g. medicine and geometry: it is the physician’s business to know that circular wounds heal more slowly, the geometer’s to know the reason why.
Of all the figures the most scientific is the first. Thus, it is the vehicle of the demonstrations of all the mathematical sciences, such as arithmetic, geometry, and optics, and practically all of all sciences that investigate causes: for the syllogism of the reasoned fact is either exclusively or generally speaking and in most cases in this figure-a second proof that this figure is the most scientific; for grasp of a reasoned conclusion is the primary condition of knowledge. Thirdly, the first is the only figure which enables us to pursue knowledge of the essence of a thing. In the second figure no affirmative conclusion is possible, and knowledge of a thing’s essence must be affirmative; while in the third figure the conclusion can be affirmative, but cannot be universal, and essence must have a universal character: e.g. man is not two-footed animal in any qualified sense, but universally. Finally, the first figure has no need of the others, while it is by means of the first that the other two figures are developed, and have their intervals closepacked until immediate premisses are reached.
Clearly, therefore, the first figure is the primary condition of knowledge.
Just as an attribute A may (as we saw) be atomically connected with a subject B, so its disconnexion may be atomic. I call ‘atomic’ connexions or disconnexions which involve no intermediate term; since in that case the connexion or disconnexion will not be mediated by something other than the terms themselves. It follows that if either A or B, or both A and B, have a genus, their disconnexion cannot be primary. Thus: let C be the genus of A. Then, if C is not the genus of B-for A may well have a genus which is not the genus of B-there will be a syllogism proving A’s disconnexion from B thus:
<<<
all A is C,<br />
no B is C,<br />
therefore no B is A.
<<<
Or if it is B which has a genus D, we have
<<<
all B is D,<br />
no D is A,<br />
therefore no B is A, by syllogism;
<<<
and the proof will be similar if both A and B have a genus. That the genus of A need not be the genus of B and vice versa, is shown by the existence of mutually exclusive coordinate series of predication. If no term in the series ACD . . . is predicable of any term in the series BEF . . .,and if G-a term in the former series-is the genus of A, clearly G will not be the genus of B; since, if it were, the series would not be mutually exclusive. So also if B has a genus, it will not be the genus of A. If, on the other hand, neither A nor B has a genus and A does not inhere in B, this disconnexion must be atomic. If there be a middle term, one or other of them is bound to have a genus, for the syllogism will be either in the first or the second figure. If it is in the first, B will have a genus-for the premiss containing it must be affirmative: if in the second, either A or B indifferently, since syllogism is possible if either is contained in a negative premiss, but not if both premisses are negative.
Hence it is clear that one thing may be atomically disconnected from another, and we have stated when and how this is possible.
Ignorance-defined not as the negation of knowledge but as a positive state of mind-is error produced by inference.
(1) Let us first consider propositions asserting a predicate’s immediate connexion with or disconnexion from a subject. Here, it is true, positive error may befall one in alternative ways; for it may arise where one directly believes a connexion or disconnexion as well as where one’s belief is acquired by inference. The error, however, that consists in a direct belief is without complication; but the error resulting from inference-which here concerns us-takes many forms. Thus, let A be atomically disconnected from all B: then the conclusion inferred through a middle term C, that all B is A, will be a case of error produced by syllogism. Now, two cases are possible. Either (a) both premisses, or (b) one premiss only, may be false. (a) If neither A is an attribute of any C nor C of any B, whereas the contrary was posited in both cases, both premisses will be false. (C may quite well be so related to A and B that C is neither subordinate to A nor a universal attribute of B: for B, since A was said to be primarily disconnected from B, cannot have a genus, and A need not necessarily be a universal attribute of all things. Consequently both premisses may be false.) On the other hand, (b) one of the premisses may be true, though not either indifferently but only the major A-C since, B having no genus, the premiss C-B will always be false, while A-C may be true. This is the case if, for example, A is related atomically to both C and B; because when the same term is related atomically to more terms than one, neither of those terms will belong to the other. It is, of course, equally the case if A-C is not atomic.
Error of attribution, then, occurs through these causes and in this form only-for we found that no syllogism of universal attribution was possible in any figure but the first. On the other hand, an error of non-attribution may occur either in the first or in the second figure. Let us therefore first explain the various forms it takes in the first figure and the character of the premisses in each case.
(c) It may occur when both premisses are false; e.g. supposing A atomically connected with both C and B, if it be then assumed that no C is and all B is C, both premisses are false.
(d) It is also possible when one is false. This may be either premiss indifferently. A-C may be true, C-B false-A-C true because A is not an attribute of all things, C-B false because C, which never has the attribute A, cannot be an attribute of B; for if C-B were true, the premiss A-C would no longer be true, and besides if both premisses were true, the conclusion would be true. Or again, C-B may be true and A-C false; e.g. if both C and A contain B as genera, one of them must be subordinate to the other, so that if the premiss takes the form No C is A, it will be false. This makes it clear that whether either or both premisses are false, the conclusion will equally be false.
In the second figure the premisses cannot both be wholly false; for if all B is A, no middle term can be with truth universally affirmed of one extreme and universally denied of the other: but premisses in which the middle is affirmed of one extreme and denied of the other are the necessary condition if one is to get a valid inference at all. Therefore if, taken in this way, they are wholly false, their contraries conversely should be wholly true. But this is impossible. On the other hand, there is nothing to prevent both premisses being partially false; e.g. if actually some A is C and some B is C, then if it is premised that all A is C and no B is C, both premisses are false, yet partially, not wholly, false. The same is true if the major is made negative instead of the minor. Or one premiss may be wholly false, and it may be either of them. Thus, supposing that actually an attribute of all A must also be an attribute of all B, then if C is yet taken to be a universal attribute of all but universally non-attributable to B, C-A will be true but C-B false. Again, actually that which is an attribute of no B will not be an attribute of all A either; for if it be an attribute of all A, it will also be an attribute of all B, which is contrary to supposition; but if C be nevertheless assumed to be a universal attribute of A, but an attribute of no B, then the premiss C-B is true but the major is false. The case is similar if the major is made the negative premiss. For in fact what is an attribute of no A will not be an attribute of any B either; and if it be yet assumed that C is universally non-attributable to A, but a universal attribute of B, the premiss C-A is true but the minor wholly false. Again, in fact it is false to assume that that which is an attribute of all B is an attribute of no A, for if it be an attribute of all B, it must be an attribute of some A. If then C is nevertheless assumed to be an attribute of all B but of no A, C-B will be true but C-A false.
It is thus clear that in the case of atomic propositions erroneous inference will be possible not only when both premisses are false but also when only one is false.
In the case of attributes not atomically connected with or disconnected from their subjects, (a) (i) as long as the false conclusion is inferred through the ‘appropriate’ middle, only the major and not both premisses can be false. By ‘appropriate middle’ I mean the middle term through which the contradictory-i.e. the true-conclusion is inferrible. Thus, let A be attributable to B through a middle term C: then, since to produce a conclusion the premiss C-B must be taken affirmatively, it is clear that this premiss must always be true, for its quality is not changed. But the major A-C is false, for it is by a change in the quality of A-C that the conclusion becomes its contradictory-i.e. true. Similarly (ii) if the middle is taken from another series of predication; e.g. suppose D to be not only contained within A as a part within its whole but also predicable of all B. Then the premiss D-B must remain unchanged, but the quality of A-D must be changed; so that D-B is always true, A-D always false. Such error is practically identical with that which is inferred through the ‘appropriate’ middle. On the other hand, (b) if the conclusion is not inferred through the ‘appropriate’ middle-(i) when the middle is subordinate to A but is predicable of no B, both premisses must be false, because if there is to be a conclusion both must be posited as asserting the contrary of what is actually the fact, and so posited both become false: e.g. suppose that actually all D is A but no B is D; then if these premisses are changed in quality, a conclusion will follow and both of the new premisses will be false. When, however, (ii) the middle D is not subordinate to A, A-D will be true, D-B false-A-D true because A was not subordinate to D, D-B false because if it had been true, the conclusion too would have been true; but it is ex hypothesi false.
When the erroneous inference is in the second figure, both premisses cannot be entirely false; since if B is subordinate to A, there can be no middle predicable of all of one extreme and of none of the other, as was stated before. One premiss, however, may be false, and it may be either of them. Thus, if C is actually an attribute of both A and B, but is assumed to be an attribute of A only and not of B, C-A will be true, C-B false: or again if C be assumed to be attributable to B but to no A, C-B will be true, C-A false.
We have stated when and through what kinds of premisses error will result in cases where the erroneous conclusion is negative. If the conclusion is affirmative, (a) (i) it may be inferred through the ‘appropriate’ middle term. In this case both premisses cannot be false since, as we said before, C-B must remain unchanged if there is to be a conclusion, and consequently A-C, the quality of which is changed, will always be false. This is equally true if (ii) the middle is taken from another series of predication, as was stated to be the case also with regard to negative error; for D-B must remain unchanged, while the quality of A-D must be converted, and the type of error is the same as before.
(b) The middle may be inappropriate. Then (i) if D is subordinate to A, A-D will be true, but D-B false; since A may quite well be predicable of several terms no one of which can be subordinated to another. If, however, (ii) D is not subordinate to A, obviously A-D, since it is affirmed, will always be false, while D-B may be either true or false; for A may very well be an attribute of no D, whereas all B is D, e.g. no science is animal, all music is science. Equally well A may be an attribute of no D, and D of no B. It emerges, then, that if the middle term is not subordinate to the major, not only both premisses but either singly may be false.
Thus we have made it clear how many varieties of erroneous inference are liable to happen and through what kinds of premisses they occur, in the case both of immediate and of demonstrable truths.
It is also clear that the loss of any one of the senses entails the loss of a corresponding portion of knowledge, and that, since we learn either by induction or by demonstration, this knowledge cannot be acquired. Thus demonstration develops from universals, induction from particulars; but since it is possible to familiarize the pupil with even the so-called mathematical abstractions only through induction-i.e. only because each subject genus possesses, in virtue of a determinate mathematical character, certain properties which can be treated as separate even though they do not exist in isolation-it is consequently impossible to come to grasp universals except through induction. But induction is impossible for those who have not sense-perception. For it is sense-perception alone which is adequate for grasping the particulars: they cannot be objects of scientific knowledge, because neither can universals give us knowledge of them without induction, nor can we get it through induction without sense-perception.
Every syllogism is effected by means of three terms. One kind of syllogism serves to prove that A inheres in C by showing that A inheres in B and B in C; the other is negative and one of its premisses asserts one term of another, while the other denies one term of another. It is clear, then, that these are the fundamentals and so-called hypotheses of syllogism. Assume them as they have been stated, and proof is bound to follow-proof that A inheres in C through B, and again that A inheres in B through some other middle term, and similarly that B inheres in C. If our reasoning aims at gaining credence and so is merely dialectical, it is obvious that we have only to see that our inference is based on premisses as credible as possible: so that if a middle term between A and B is credible though not real, one can reason through it and complete a dialectical syllogism. If, however, one is aiming at truth, one must be guided by the real connexions of subjects and attributes. Thus: since there are attributes which are predicated of a subject essentially or naturally and not coincidentally-not, that is, in the sense in which we say ‘That white (thing) is a man’, which is not the same mode of predication as when we say ‘The man is white’: the man is white not because he is something else but because he is man, but the white is man because ‘being white’ coincides with ‘humanity’ within one substratum-therefore there are terms such as are naturally subjects of predicates. Suppose, then, C such a term not itself attributable to anything else as to a subject, but the proximate subject of the attribute B— i.e. so that B-C is immediate; suppose further E related immediately to F, and F to B. The first question is, must this series terminate, or can it proceed to infinity? The second question is as follows: Suppose nothing is essentially predicated of A, but A is predicated primarily of H and of no intermediate prior term, and suppose H similarly related to G and G to B; then must this series also terminate, or can it too proceed to infinity? There is this much difference between the questions: the first is, is it possible to start from that which is not itself attributable to anything else but is the subject of attributes, and ascend to infinity? The second is the problem whether one can start from that which is a predicate but not itself a subject of predicates, and descend to infinity? A third question is, if the extreme terms are fixed, can there be an infinity of middles? I mean this: suppose for example that A inheres in C and B is intermediate between them, but between B and A there are other middles, and between these again fresh middles; can these proceed to infinity or can they not? This is the equivalent of inquiring, do demonstrations proceed to infinity, i.e. is everything demonstrable? Or do ultimate subject and primary attribute limit one another?
I hold that the same questions arise with regard to negative conclusions and premisses: viz. if A is attributable to no B, then either this predication will be primary, or there will be an intermediate term prior to B to which a is not attributable-G, let us say, which is attributable to all B-and there may still be another term H prior to G, which is attributable to all G. The same questions arise, I say, because in these cases too either the series of prior terms to which a is not attributable is infinite or it terminates.
One cannot ask the same questions in the case of reciprocating terms, since when subject and predicate are convertible there is neither primary nor ultimate subject, seeing that all the reciprocals qua subjects stand in the same relation to one another, whether we say that the subject has an infinity of attributes or that both subjects and attributes-and we raised the question in both cases-are infinite in number. These questions then cannot be asked-unless, indeed, the terms can reciprocate by two different modes, by accidental predication in one relation and natural predication in the other.
We suppose ourselves to possess unqualified scientific knowledge of a thing, as opposed to knowing it in the accidental way in which the sophist knows, when we think that we know the cause on which the fact depends, as the cause of that fact and of no other, and, further, that the fact could not be other than it is. Now that scientific knowing is something of this sort is evident-witness both those who falsely claim it and those who actually possess it, since the former merely imagine themselves to be, while the latter are also actually, in the condition described. Consequently the proper object of unqualified scientific knowledge is something which cannot be other than it is.
There may be another manner of knowing as well-that will be discussed later. What I now assert is that at all events we do know by demonstration. By demonstration I mean a syllogism productive of scientific knowledge, a syllogism, that is, the grasp of which is eo ipso such knowledge. Assuming then that my thesis as to the nature of scientific knowing is correct, the premisses of demonstrated knowledge must be true, primary, immediate, better known than and prior to the conclusion, which is further related to them as effect to cause. Unless these conditions are satisfied, the basic truths will not be ‘appropriate’ to the conclusion. Syllogism there may indeed be without these conditions, but such syllogism, not being productive of scientific knowledge, will not be demonstration. The premisses must be true: for that which is non-existent cannot be known-we cannot know, e.g. that the diagonal of a square is commensurate with its side. The premisses must be primary and indemonstrable; otherwise they will require demonstration in order to be known, since to have knowledge, if it be not accidental knowledge, of things which are demonstrable, means precisely to have a demonstration of them. The premisses must be the causes of the conclusion, better known than it, and prior to it; its causes, since we possess scientific knowledge of a thing only when we know its cause; prior, in order to be causes; antecedently known, this antecedent knowledge being not our mere understanding of the meaning, but knowledge of the fact as well. Now ‘prior’ and ‘better known’ are ambiguous terms, for there is a difference between what is prior and better known in the order of being and what is prior and better known to man. I mean that objects nearer to sense are prior and better known to man; objects without qualification prior and better known are those further from sense. Now the most universal causes are furthest from sense and particular causes are nearest to sense, and they are thus exactly opposed to one another. In saying that the premisses of demonstrated knowledge must be primary, I mean that they must be the ‘appropriate’ basic truths, for I identify primary premiss and basic truth. A ‘basic truth’ in a demonstration is an immediate proposition. An immediate proposition is one which has no other proposition prior to it. A proposition is either part of an enunciation, i.e. it predicates a single attribute of a single subject. If a proposition is dialectical, it assumes either part indifferently; if it is demonstrative, it lays down one part to the definite exclusion of the other because that part is true. The term ‘enunciation’ denotes either part of a contradiction indifferently. A contradiction is an opposition which of its own nature excludes a middle. The part of a contradiction which conjoins a predicate with a subject is an affirmation; the part disjoining them is a negation. I call an immediate basic truth of syllogism a ‘thesis’ when, though it is not susceptible of proof by the teacher, yet ignorance of it does not constitute a total bar to progress on the part of the pupil: one which the pupil must know if he is to learn anything whatever is an axiom. I call it an axiom because there are such truths and we give them the name of axioms par excellence. If a thesis assumes one part or the other of an enunciation, i.e. asserts either the existence or the non-existence of a subject, it is a hypothesis; if it does not so assert, it is a definition. Definition is a ‘thesis’ or a ‘laying something down’, since the arithmetician lays it down that to be a unit is to be quantitatively indivisible; but it is not a hypothesis, for to define what a unit is is not the same as to affirm its existence.
Now since the required ground of our knowledge-i.e. of our conviction-of a fact is the possession of such a syllogism as we call demonstration, and the ground of the syllogism is the facts constituting its premisses, we must not only know the primary premisses-some if not all of them-beforehand, but know them better than the conclusion: for the cause of an attribute’s inherence in a subject always itself inheres in the subject more firmly than that attribute; e.g. the cause of our loving anything is dearer to us than the object of our love. So since the primary premisses are the cause of our knowledge-i.e. of our conviction-it follows that we know them better-that is, are more convinced of them-than their consequences, precisely because of our knowledge of the latter is the effect of our knowledge of the premisses. Now a man cannot believe in anything more than in the things he knows, unless he has either actual knowledge of it or something better than actual knowledge. But we are faced with this paradox if a student whose belief rests on demonstration has not prior knowledge; a man must believe in some, if not in all, of the basic truths more than in the conclusion. Moreover, if a man sets out to acquire the scientific knowledge that comes through demonstration, he must not only have a better knowledge of the basic truths and a firmer conviction of them than of the connexion which is being demonstrated: more than this, nothing must be more certain or better known to him than these basic truths in their character as contradicting the fundamental premisses which lead to the opposed and erroneous conclusion. For indeed the conviction of pure science must be unshakable.
Now, it is clear that if the predications terminate in both the upward and the downward direction (by ‘upward’ I mean the ascent to the more universal, by ‘downward’ the descent to the more particular), the middle terms cannot be infinite in number. For suppose that A is predicated of F, and that the intermediates-call them BB’B” . . . -are infinite, then clearly you might descend from and find one term predicated of another ad infinitum, since you have an infinity of terms between you and F; and equally, if you ascend from F, there are infinite terms between you and A. It follows that if these processes are impossible there cannot be an infinity of intermediates between A and F. Nor is it of any effect to urge that some terms of the series AB . . . F are contiguous so as to exclude intermediates, while others cannot be taken into the argument at all: whichever terms of the series B . . . I take, the number of intermediates in the direction either of A or of F must be finite or infinite: where the infinite series starts, whether from the first term or from a later one, is of no moment, for the succeeding terms in any case are infinite in number.
Further, if in affirmative demonstration the series terminates in both directions, clearly it will terminate too in negative demonstration. Let us assume that we cannot proceed to infinity either by ascending from the ultimate term (by ‘ultimate term’ I mean a term such as was, not itself attributable to a subject but itself the subject of attributes), or by descending towards an ultimate from the primary term (by ‘primary term’ I mean a term predicable of a subject but not itself a subject). If this assumption is justified, the series will also terminate in the case of negation. For a negative conclusion can be proved in all three figures. In the first figure it is proved thus: no B is A, all C is B. In packing the interval B-C we must reach immediate propositions — as is always the case with the minor premiss — since B-C is affirmative. As regards the other premiss it is plain that if the major term is denied of a term D prior to B, D will have to be predicable of all B, and if the major is denied of yet another term prior to D, this term must be predicable of all D. Consequently, since the ascending series is finite, the descent will also terminate and there will be a subject of which A is primarily non-predicable. In the second figure the syllogism is, all A is B, no C is B,..no C is A. If proof of this is required, plainly it may be shown either in the first figure as above, in the second as here, or in the third. The first figure has been discussed, and we will proceed to display the second, proof by which will be as follows: all B is D, no C is D . . ., since it is required that B should be a subject of which a predicate is affirmed. Next, since D is to be proved not to belong to C, then D has a further predicate which is denied of C. Therefore, since the succession of predicates affirmed of an ever higher universal terminates, the succession of predicates denied terminates too.
The third figure shows it as follows: all B is A, some B is not C. Therefore some A is not C. This premiss, i.e. C-B, will be proved either in the same figure or in one of the two figures discussed above. In the first and second figures the series terminates. If we use the third figure, we shall take as premisses, all E is B, some E is not C, and this premiss again will be proved by a similar prosyllogism. But since it is assumed that the series of descending subjects also terminates, plainly the series of more universal non-predicables will terminate also. Even supposing that the proof is not confined to one method, but employs them all and is now in the first figure, now in the second or third-even so the regress will terminate, for the methods are finite in number, and if finite things are combined in a finite number of ways, the result must be finite.
Thus it is plain that the regress of middles terminates in the case of negative demonstration, if it does so also in the case of affirmative demonstration. That in fact the regress terminates in both these cases may be made clear by the following dialectical considerations.
In the case of predicates constituting the essential nature of a thing, it clearly terminates, seeing that if definition is possible, or in other words, if essential form is knowable, and an infinite series cannot be traversed, predicates constituting a thing’s essential nature must be finite in number. But as regards predicates generally we have the following prefatory remarks to make. (1) We can affirm without falsehood ‘the white (thing) is walking’, and that big (thing) is a log’; or again, ‘the log is big’, and ‘the man walks’. But the affirmation differs in the two cases. When I affirm ‘the white is a log’, I mean that something which happens to be white is a log-not that white is the substratum in which log inheres, for it was not qua white or qua a species of white that the white (thing) came to be a log, and the white (thing) is consequently not a log except incidentally. On the other hand, when I affirm ‘the log is white’, I do not mean that something else, which happens also to be a log, is white (as I should if I said ‘the musician is white,’ which would mean ‘the man who happens also to be a musician is white’); on the contrary, log is here the substratum-the substratum which actually came to be white, and did so qua wood or qua a species of wood and qua nothing else.
If we must lay down a rule, let us entitle the latter kind of statement predication, and the former not predication at all, or not strict but accidental predication. ‘White’ and ‘log’ will thus serve as types respectively of predicate and subject.
We shall assume, then, that the predicate is invariably predicated strictly and not accidentally of the subject, for on such predication demonstrations depend for their force. It follows from this that when a single attribute is predicated of a single subject, the predicate must affirm of the subject either some element constituting its essential nature, or that it is in some way qualified, quantified, essentially related, active, passive, placed, or dated.
(2) Predicates which signify substance signify that the subject is identical with the predicate or with a species of the predicate. Predicates not signifying substance which are predicated of a subject not identical with themselves or with a species of themselves are accidental or coincidental; e.g. white is a coincident of man, seeing that man is not identical with white or a species of white, but rather with animal, since man is identical with a species of animal. These predicates which do not signify substance must be predicates of some other subject, and nothing can be white which is not also other than white. The Forms we can dispense with, for they are mere sound without sense; and even if there are such things, they are not relevant to our discussion, since demonstrations are concerned with predicates such as we have defined.
(3) If A is a quality of B, B cannot be a quality of A-a quality of a quality. Therefore A and B cannot be predicated reciprocally of one another in strict predication: they can be affirmed without falsehood of one another, but not genuinely predicated of each other. For one alternative is that they should be substantially predicated of one another, i.e. B would become the genus or differentia of A-the predicate now become subject. But it has been shown that in these substantial predications neither the ascending predicates nor the descending subjects form an infinite series; e.g. neither the series, man is biped, biped is animal, &c., nor the series predicating animal of man, man of Callias, Callias of a further. subject as an element of its essential nature, is infinite. For all such substance is definable, and an infinite series cannot be traversed in thought: consequently neither the ascent nor the descent is infinite, since a substance whose predicates were infinite would not be definable. Hence they will not be predicated each as the genus of the other; for this would equate a genus with one of its own species. Nor (the other alternative) can a quale be reciprocally predicated of a quale, nor any term belonging to an adjectival category of another such term, except by accidental predication; for all such predicates are coincidents and are predicated of substances. On the other hand-in proof of the impossibility of an infinite ascending series-every predication displays the subject as somehow qualified or quantified or as characterized under one of the other adjectival categories, or else is an element in its substantial nature: these latter are limited in number, and the number of the widest kinds under which predications fall is also limited, for every predication must exhibit its subject as somehow qualified, quantified, essentially related, acting or suffering, or in some place or at some time.
I assume first that predication implies a single subject and a single attribute, and secondly that predicates which are not substantial are not predicated of one another. We assume this because such predicates are all coincidents, and though some are essential coincidents, others of a different type, yet we maintain that all of them alike are predicated of some substratum and that a coincident is never a substratum-since we do not class as a coincident anything which does not owe its designation to its being something other than itself, but always hold that any coincident is predicated of some substratum other than itself, and that another group of coincidents may have a different substratum. Subject to these assumptions then, neither the ascending nor the descending series of predication in which a single attribute is predicated of a single subject is infinite. For the subjects of which coincidents are predicated are as many as the constitutive elements of each individual substance, and these we have seen are not infinite in number, while in the ascending series are contained those constitutive elements with their coincidents-both of which are finite. We conclude that there is a given subject (D) of which some attribute (C) is primarily predicable; that there must be an attribute (B) primarily predicable of the first attribute, and that the series must end with a term (A) not predicable of any term prior to the last subject of which it was predicated (B), and of which no term prior to it is predicable.
The argument we have given is one of the so-called proofs; an alternative proof follows. Predicates so related to their subjects that there are other predicates prior to them predicable of those subjects are demonstrable; but of demonstrable propositions one cannot have something better than knowledge, nor can one know them without demonstration. Secondly, if a consequent is only known through an antecedent (viz. premisses prior to it) and we neither know this antecedent nor have something better than knowledge of it, then we shall not have scientific knowledge of the consequent. Therefore, if it is possible through demonstration to know anything without qualification and not merely as dependent on the acceptance of certain premisses-i.e. hypothetically-the series of intermediate predications must terminate. If it does not terminate, and beyond any predicate taken as higher than another there remains another still higher, then every predicate is demonstrable. Consequently, since these demonstrable predicates are infinite in number and therefore cannot be traversed, we shall not know them by demonstration. If, therefore, we have not something better than knowledge of them, we cannot through demonstration have unqualified but only hypothetical science of anything.
As dialectical proofs of our contention these may carry conviction, but an analytic process will show more briefly that neither the ascent nor the descent of predication can be infinite in the demonstrative sciences which are the object of our investigation. Demonstration proves the inherence of essential attributes in things. Now attributes may be essential for two reasons: either because they are elements in the essential nature of their subjects, or because their subjects are elements in their essential nature. An example of the latter is odd as an attribute of number-though it is number’s attribute, yet number itself is an element in the definition of odd; of the former, multiplicity or the indivisible, which are elements in the definition of number. In neither kind of attribution can the terms be infinite. They are not infinite where each is related to the term below it as odd is to number, for this would mean the inherence in odd of another attribute of odd in whose nature odd was an essential element: but then number will be an ultimate subject of the whole infinite chain of attributes, and be an element in the definition of each of them. Hence, since an infinity of attributes such as contain their subject in their definition cannot inhere in a single thing, the ascending series is equally finite. Note, moreover, that all such attributes must so inhere in the ultimate subject-e.g. its attributes in number and number in them-as to be commensurate with the subject and not of wider extent. Attributes which are essential elements in the nature of their subjects are equally finite: otherwise definition would be impossible. Hence, if all the attributes predicated are essential and these cannot be infinite, the ascending series will terminate, and consequently the descending series too.
If this is so, it follows that the intermediates between any two terms are also always limited in number. An immediately obvious consequence of this is that demonstrations necessarily involve basic truths, and that the contention of some-referred to at the outset-that all truths are demonstrable is mistaken. For if there are basic truths, (a) not all truths are demonstrable, and (b) an infinite regress is impossible; since if either (a) or (b) were not a fact, it would mean that no interval was immediate and indivisible, but that all intervals were divisible. This is true because a conclusion is demonstrated by the interposition, not the apposition, of a fresh term. If such interposition could continue to infinity there might be an infinite number of terms between any two terms; but this is impossible if both the ascending and descending series of predication terminate; and of this fact, which before was shown dialectically, analytic proof has now been given.
It is an evident corollary of these conclusions that if the same attribute A inheres in two terms C and D predicable either not at all, or not of all instances, of one another, it does not always belong to them in virtue of a common middle term. Isosceles and scalene possess the attribute of having their angles equal to two right angles in virtue of a common middle; for they possess it in so far as they are both a certain kind of figure, and not in so far as they differ from one another. But this is not always the case: for, were it so, if we take B as the common middle in virtue of which A inheres in C and D, clearly B would inhere in C and D through a second common middle, and this in turn would inhere in C and D through a third, so that between two terms an infinity of intermediates would fall-an impossibility. Thus it need not always be in virtue of a common middle term that a single attribute inheres in several subjects, since there must be immediate intervals. Yet if the attribute to be proved common to two subjects is to be one of their essential attributes, the middle terms involved must be within one subject genus and be derived from the same group of immediate premisses; for we have seen that processes of proof cannot pass from one genus to another.
It is also clear that when A inheres in B, this can be demonstrated if there is a middle term. Further, the ‘elements’ of such a conclusion are the premisses containing the middle in question, and they are identical in number with the middle terms, seeing that the immediate propositions-or at least such immediate propositions as are universal-are the ‘elements’. If, on the other hand, there is no middle term, demonstration ceases to be possible: we are on the way to the basic truths. Similarly if A does not inhere in B, this can be demonstrated if there is a middle term or a term prior to B in which A does not inhere: otherwise there is no demonstration and a basic truth is reached. There are, moreover, as many ‘elements’ of the demonstrated conclusion as there are middle terms, since it is propositions containing these middle terms that are the basic premisses on which the demonstration rests; and as there are some indemonstrable basic truths asserting that ‘this is that’ or that ‘this inheres in that’, so there are others denying that ‘this is that’ or that ‘this inheres in that’-in fact some basic truths will affirm and some will deny being.
When we are to prove a conclusion, we must take a primary essential predicate-suppose it C-of the subject B, and then suppose A similarly predicable of C. If we proceed in this manner, no proposition or attribute which falls beyond A is admitted in the proof: the interval is constantly condensed until subject and predicate become indivisible, i.e. one. We have our unit when the premiss becomes immediate, since the immediate premiss alone is a single premiss in the unqualified sense of ‘single’. And as in other spheres the basic element is simple but not identical in all-in a system of weight it is the mina, in music the quarter-tone, and so on — so in syllogism the unit is an immediate premiss, and in the knowledge that demonstration gives it is an intuition. In syllogisms, then, which prove the inherence of an attribute, nothing falls outside the major term. In the case of negative syllogisms on the other hand, (1) in the first figure nothing falls outside the major term whose inherence is in question; e.g. to prove through a middle C that A does not inhere in B the premisses required are, all B is C, no C is A. Then if it has to be proved that no C is A, a middle must be found between and C; and this procedure will never vary.
(2) If we have to show that E is not D by means of the premisses, all D is C; no E, or not all E, is C; then the middle will never fall beyond E, and E is the subject of which D is to be denied in the conclusion.
(3) In the third figure the middle will never fall beyond the limits of the subject and the attribute denied of it.
Since demonstrations may be either commensurately universal or particular, and either affirmative or negative; the question arises, which form is the better? And the same question may be put in regard to so-called ‘direct’ demonstration and reductio ad impossibile. Let us first examine the commensurately universal and the particular forms, and when we have cleared up this problem proceed to discuss ‘direct’ demonstration and reductio ad impossibile.
The following considerations might lead some minds to prefer particular demonstration.
(1) The superior demonstration is the demonstration which gives us greater knowledge (for this is the ideal of demonstration), and we have greater knowledge of a particular individual when we know it in itself than when we know it through something else; e.g. we know Coriscus the musician better when we know that Coriscus is musical than when we know only that man is musical, and a like argument holds in all other cases. But commensurately universal demonstration, instead of proving that the subject itself actually is x, proves only that something else is x — e.g. in attempting to prove that isosceles is x, it proves not that isosceles but only that triangle is x — whereas particular demonstration proves that the subject itself is x. The demonstration, then, that a subject, as such, possesses an attribute is superior. If this is so, and if the particular rather than the commensurately universal forms demonstrates, particular demonstration is superior.
(2) The universal has not a separate being over against groups of singulars. Demonstration nevertheless creates the opinion that its function is conditioned by something like this-some separate entity belonging to the real world; that, for instance, of triangle or of figure or number, over against particular triangles, figures, and numbers. But demonstration which touches the real and will not mislead is superior to that which moves among unrealities and is delusory. Now commensurately universal demonstration is of the latter kind: if we engage in it we find ourselves reasoning after a fashion well illustrated by the argument that the proportionate is what answers to the definition of some entity which is neither line, number, solid, nor plane, but a proportionate apart from all these. Since, then, such a proof is characteristically commensurate and universal, and less touches reality than does particular demonstration, and creates a false opinion, it will follow that commensurate and universal is inferior to particular demonstration.
We may retort thus. (1) The first argument applies no more to commensurate and universal than to particular demonstration. If equality to two right angles is attributable to its subject not qua isosceles but qua triangle, he who knows that isosceles possesses that attribute knows the subject as qua itself possessing the attribute, to a less degree than he who knows that triangle has that attribute. To sum up the whole matter: if a subject is proved to possess qua triangle an attribute which it does not in fact possess qua triangle, that is not demonstration: but if it does possess it qua triangle the rule applies that the greater knowledge is his who knows the subject as possessing its attribute qua that in virtue of which it actually does possess it. Since, then, triangle is the wider term, and there is one identical definition of triangle-i.e. the term is not equivocal-and since equality to two right angles belongs to all triangles, it is isosceles qua triangle and not triangle qua isosceles which has its angles so related. It follows that he who knows a connexion universally has greater knowledge of it as it in fact is than he who knows the particular; and the inference is that commensurate and universal is superior to particular demonstration.
(2) If there is a single identical definition i.e. if the commensurate universal is unequivocal-then the universal will possess being not less but more than some of the particulars, inasmuch as it is universals which comprise the imperishable, particulars that tend to perish.
(3) Because the universal has a single meaning, we are not therefore compelled to suppose that in these examples it has being as a substance apart from its particulars-any more than we need make a similar supposition in the other cases of unequivocal universal predication, viz. where the predicate signifies not substance but quality, essential relatedness, or action. If such a supposition is entertained, the blame rests not with the demonstration but with the hearer.
(4) Demonstration is syllogism that proves the cause, i.e. the reasoned fact, and it is rather the commensurate universal than the particular which is causative (as may be shown thus: that which possesses an attribute through its own essential nature is itself the cause of the inherence, and the commensurate universal is primary; hence the commensurate universal is the cause). Consequently commensurately universal demonstration is superior as more especially proving the cause, that is the reasoned fact.
(5) Our search for the reason ceases, and we think that we know, when the coming to be or existence of the fact before us is not due to the coming to be or existence of some other fact, for the last step of a search thus conducted is eo ipso the end and limit of the problem. Thus: ‘Why did he come?’ ‘To get the money-wherewith to pay a debt-that he might thereby do what was right.’ When in this regress we can no longer find an efficient or final cause, we regard the last step of it as the end of the coming-or being or coming to be-and we regard ourselves as then only having full knowledge of the reason why he came.
If, then, all causes and reasons are alike in this respect, and if this is the means to full knowledge in the case of final causes such as we have exemplified, it follows that in the case of the other causes also full knowledge is attained when an attribute no longer inheres because of something else. Thus, when we learn that exterior angles are equal to four right angles because they are the exterior angles of an isosceles, there still remains the question ‘Why has isosceles this attribute?’ and its answer ‘Because it is a triangle, and a triangle has it because a triangle is a rectilinear figure.’ If rectilinear figure possesses the property for no further reason, at this point we have full knowledge-but at this point our knowledge has become commensurately universal, and so we conclude that commensurately universal demonstration is superior.
(6) The more demonstration becomes particular the more it sinks into an indeterminate manifold, while universal demonstration tends to the simple and determinate. But objects so far as they are an indeterminate manifold are unintelligible, so far as they are determinate, intelligible: they are therefore intelligible rather in so far as they are universal than in so far as they are particular. From this it follows that universals are more demonstrable: but since relative and correlative increase concomitantly, of the more demonstrable there will be fuller demonstration. Hence the commensurate and universal form, being more truly demonstration, is the superior.
(7) Demonstration which teaches two things is preferable to demonstration which teaches only one. He who possesses commensurately universal demonstration knows the particular as well, but he who possesses particular demonstration does not know the universal. So that this is an additional reason for preferring commensurately universal demonstration. And there is yet this further argument:
(8) Proof becomes more and more proof of the commensurate universal as its middle term approaches nearer to the basic truth, and nothing is so near as the immediate premiss which is itself the basic truth. If, then, proof from the basic truth is more accurate than proof not so derived, demonstration which depends more closely on it is more accurate than demonstration which is less closely dependent. But commensurately universal demonstration is characterized by this closer dependence, and is therefore superior. Thus, if A had to be proved to inhere in D, and the middles were B and C, B being the higher term would render the demonstration which it mediated the more universal.
Some of these arguments, however, are dialectical. The clearest indication of the precedence of commensurately universal demonstration is as follows: if of two propositions, a prior and a posterior, we have a grasp of the prior, we have a kind of knowledge-a potential grasp-of the posterior as well. For example, if one knows that the angles of all triangles are equal to two right angles, one knows in a sense-potentially-that the isosceles’ angles also are equal to two right angles, even if one does not know that the isosceles is a triangle; but to grasp this posterior proposition is by no means to know the commensurate universal either potentially or actually. Moreover, commensurately universal demonstration is through and through intelligible; particular demonstration issues in sense-perception.
The preceding arguments constitute our defence of the superiority of commensurately universal to particular demonstration. That affirmative demonstration excels negative may be shown as follows.
(1) We may assume the superiority ceteris paribus of the demonstration which derives from fewer postulates or hypotheses-in short from fewer premisses; for, given that all these are equally well known, where they are fewer knowledge will be more speedily acquired, and that is a desideratum. The argument implied in our contention that demonstration from fewer assumptions is superior may be set out in universal form as follows. Assuming that in both cases alike the middle terms are known, and that middles which are prior are better known than such as are posterior, we may suppose two demonstrations of the inherence of A in E, the one proving it through the middles B, C and D, the other through F and G. Then A-D is known to the same degree as A-E (in the second proof), but A-D is better known than and prior to A-E (in the first proof); since A-E is proved through A-D, and the ground is more certain than the conclusion.
Hence demonstration by fewer premisses is ceteris paribus superior. Now both affirmative and negative demonstration operate through three terms and two premisses, but whereas the former assumes only that something is, the latter assumes both that something is and that something else is not, and thus operating through more kinds of premiss is inferior.
(2) It has been proved that no conclusion follows if both premisses are negative, but that one must be negative, the other affirmative. So we are compelled to lay down the following additional rule: as the demonstration expands, the affirmative premisses must increase in number, but there cannot be more than one negative premiss in each complete proof. Thus, suppose no B is A, and all C is B. Then if both the premisses are to be again expanded, a middle must be interposed. Let us interpose D between A and B, and E between B and C. Then clearly E is affirmatively related to B and C, while D is affirmatively related to B but negatively to A; for all B is D, but there must be no D which is A. Thus there proves to be a single negative premiss, A-D. In the further prosyllogisms too it is the same, because in the terms of an affirmative syllogism the middle is always related affirmatively to both extremes; in a negative syllogism it must be negatively related only to one of them, and so this negation comes to be a single negative premiss, the other premisses being affirmative. If, then, that through which a truth is proved is a better known and more certain truth, and if the negative proposition is proved through the affirmative and not vice versa, affirmative demonstration, being prior and better known and more certain, will be superior.
(3) The basic truth of demonstrative syllogism is the universal immediate premiss, and the universal premiss asserts in affirmative demonstration and in negative denies: and the affirmative proposition is prior to and better known than the negative (since affirmation explains denial and is prior to denial, just as being is prior to not-being). It follows that the basic premiss of affirmative demonstration is superior to that of negative demonstration, and the demonstration which uses superior basic premisses is superior.
(4) Affirmative demonstration is more of the nature of a basic form of proof, because it is a sine qua non of negative demonstration.
Since affirmative demonstration is superior to negative, it is clearly superior also to reductio ad impossibile. We must first make certain what is the difference between negative demonstration and reductio ad impossibile. Let us suppose that no B is A, and that all C is B: the conclusion necessarily follows that no C is A. If these premisses are assumed, therefore, the negative demonstration that no C is A is direct. Reductio ad impossibile, on the other hand, proceeds as follows. Supposing we are to prove that does not inhere in B, we have to assume that it does inhere, and further that B inheres in C, with the resulting inference that A inheres in C. This we have to suppose a known and admitted impossibility; and we then infer that A cannot inhere in B. Thus if the inherence of B in C is not questioned, A’s inherence in B is impossible.
The order of the terms is the same in both proofs: they differ according to which of the negative propositions is the better known, the one denying A of B or the one denying A of C. When the falsity of the conclusion is the better known, we use reductio ad impossible; when the major premiss of the syllogism is the more obvious, we use direct demonstration. All the same the proposition denying A of B is, in the order of being, prior to that denying A of C; for premisses are prior to the conclusion which follows from them, and ‘no C is A’ is the conclusion, ‘no B is A’ one of its premisses. For the destructive result of reductio ad impossibile is not a proper conclusion, nor are its antecedents proper premisses. On the contrary: the constituents of syllogism are premisses related to one another as whole to part or part to whole, whereas the premisses A-C and A-B are not thus related to one another. Now the superior demonstration is that which proceeds from better known and prior premisses, and while both these forms depend for credence on the not-being of something, yet the source of the one is prior to that of the other. Therefore negative demonstration will have an unqualified superiority to reductio ad impossibile, and affirmative demonstration, being superior to negative, will consequently be superior also to reductio ad impossibile.
The science which is knowledge at once of the fact and of the reasoned fact, not of the fact by itself without the reasoned fact, is the more exact and the prior science.
A science such as arithmetic, which is not a science of properties qua inhering in a substratum, is more exact than and prior to a science like harmonics, which is a science of pr,operties inhering in a substratum; and similarly a science like arithmetic, which is constituted of fewer basic elements, is more exact than and prior to geometry, which requires additional elements. What I mean by ‘additional elements’ is this: a unit is substance without position, while a point is substance with position; the latter contains an additional element.
A single science is one whose domain is a single genus, viz. all the subjects constituted out of the primary entities of the genus-i.e. the parts of this total subject-and their essential properties.
One science differs from another when their basic truths have neither a common source nor are derived those of the one science from those the other. This is verified when we reach the indemonstrable premisses of a science, for they must be within one genus with its conclusions: and this again is verified if the conclusions proved by means of them fall within one genus-i.e. are homogeneous.
One can have several demonstrations of the same connexion not only by taking from the same series of predication middles which are other than the immediately cohering term e.g. by taking C, D, and F severally to prove A-B— but also by taking a middle from another series. Thus let A be change, D alteration of a property, B feeling pleasure, and G relaxation. We can then without falsehood predicate D of B and A of D, for he who is pleased suffers alteration of a property, and that which alters a property changes. Again, we can predicate A of G without falsehood, and G of B; for to feel pleasure is to relax, and to relax is to change. So the conclusion can be drawn through middles which are different, i.e. not in the same series-yet not so that neither of these middles is predicable of the other, for they must both be attributable to some one subject.
A further point worth investigating is how many ways of proving the same conclusion can be obtained by varying the figure,
Some hold that, owing to the necessity of knowing the primary premisses, there is no scientific knowledge. Others think there is, but that all truths are demonstrable. Neither doctrine is either true or a necessary deduction from the premisses. The first school, assuming that there is no way of knowing other than by demonstration, maintain that an infinite regress is involved, on the ground that if behind the prior stands no primary, we could not know the posterior through the prior (wherein they are right, for one cannot traverse an infinite series): if on the other hand-they say-the series terminates and there are primary premisses, yet these are unknowable because incapable of demonstration, which according to them is the only form of knowledge. And since thus one cannot know the primary premisses, knowledge of the conclusions which follow from them is not pure scientific knowledge nor properly knowing at all, but rests on the mere supposition that the premisses are true. The other party agree with them as regards knowing, holding that it is only possible by demonstration, but they see no difficulty in holding that all truths are demonstrated, on the ground that demonstration may be circular and reciprocal.
Our own doctrine is that not all knowledge is demonstrative: on the contrary, knowledge of the immediate premisses is independent of demonstration. (The necessity of this is obvious; for since we must know the prior premisses from which the demonstration is drawn, and since the regress must end in immediate truths, those truths must be indemonstrable.) Such, then, is our doctrine, and in addition we maintain that besides scientific knowledge there is its originative source which enables us to recognize the definitions.
Now demonstration must be based on premisses prior to and better known than the conclusion; and the same things cannot simultaneously be both prior and posterior to one another: so circular demonstration is clearly not possible in the unqualified sense of ‘demonstration’, but only possible if ‘demonstration’ be extended to include that other method of argument which rests on a distinction between truths prior to us and truths without qualification prior, i.e. the method by which induction produces knowledge. But if we accept this extension of its meaning, our definition of unqualified knowledge will prove faulty; for there seem to be two kinds of it. Perhaps, however, the second form of demonstration, that which proceeds from truths better known to us, is not demonstration in the unqualified sense of the term.
The advocates of circular demonstration are not only faced with the difficulty we have just stated: in addition their theory reduces to the mere statement that if a thing exists, then it does exist-an easy way of proving anything. That this is so can be clearly shown by taking three terms, for to constitute the circle it makes no difference whether many terms or few or even only two are taken. Thus by direct proof, if A is, B must be; if B is, C must be; therefore if A is, C must be. Since then-by the circular proof-if A is, B must be, and if B is, A must be, A may be substituted for C above. Then ‘if B is, A must be’=’if B is, C must be’, which above gave the conclusion ‘if A is, C must be’: but C and A have been identified. Consequently the upholders of circular demonstration are in the position of saying that if A is, A must be-a simple way of proving anything. Moreover, even such circular demonstration is impossible except in the case of attributes that imply one another, viz. ‘peculiar’ properties.
Now, it has been shown that the positing of one thing-be it one term or one premiss-never involves a necessary consequent: two premisses constitute the first and smallest foundation for drawing a conclusion at all and therefore a fortiori for the demonstrative syllogism of science. If, then, A is implied in B and C, and B and C are reciprocally implied in one another and in A, it is possible, as has been shown in my writings on the syllogism, to prove all the assumptions on which the original conclusion rested, by circular demonstration in the first figure. But it has also been shown that in the other figures either no conclusion is possible, or at least none which proves both the original premisses. Propositions the terms of which are not convertible cannot be circularly demonstrated at all, and since convertible terms occur rarely in actual demonstrations, it is clearly frivolous and impossible to say that demonstration is reciprocal and that therefore everything can be demonstrated.
There is no knowledge by demonstration of chance conjunctions; for chance conjunctions exist neither by necessity nor as general connexions but comprise what comes to be as something distinct from these. Now demonstration is concerned only with one or other of these two; for all reasoning proceeds from necessary or general premisses, the conclusion being necessary if the premisses are necessary and general if the premisses are general. Consequently, if chance conjunctions are neither general nor necessary, they are not demonstrable.
Scientific knowledge is not possible through the act of perception. Even if perception as a faculty is of ‘the such’ and not merely of a ‘this somewhat’, yet one must at any rate actually perceive a ‘this somewhat’, and at a definite present place and time: but that which is commensurately universal and true in all cases one cannot perceive, since it is not ‘this’ and it is not ‘now’; if it were, it would not be commensurately universal-the term we apply to what is always and everywhere. Seeing, therefore, that demonstrations are commensurately universal and universals imperceptible, we clearly cannot obtain scientific knowledge by the act of perception: nay, it is obvious that even if it were possible to perceive that a triangle has its angles equal to two right angles, we should still be looking for a demonstration-we should not (as some say) possess knowledge of it; for perception must be of a particular, whereas scientific knowledge involves the recognition of the commensurate universal. So if we were on the moon, and saw the earth shutting out the sun’s light, we should not know the cause of the eclipse: we should perceive the present fact of the eclipse, but not the reasoned fact at all, since the act of perception is not of the commensurate universal. I do not, of course, deny that by watching the frequent recurrence of this event we might, after tracking the commensurate universal, possess a demonstration, for the commensurate universal is elicited from the several groups of singulars.
The commensurate universal is precious because it makes clear the cause; so that in the case of facts like these which have a cause other than themselves universal knowledge is more precious than sense-perceptions and than intuition. (As regards primary truths there is of course a different account to be given.) Hence it is clear that knowledge of things demonstrable cannot be acquired by perception, unless the term perception is applied to the possession of scientific knowledge through demonstration. Nevertheless certain points do arise with regard to connexions to be proved which are referred for their explanation to a failure in sense-perception: there are cases when an act of vision would terminate our inquiry, not because in seeing we should be knowing, but because we should have elicited the universal from seeing; if, for example, we saw the pores in the glass and the light passing through, the reason of the kindling would be clear to us because we should at the same time see it in each instance and intuit that it must be so in all instances.
All syllogisms cannot have the same basic truths. This may be shown first of all by the following dialectical considerations. (1) Some syllogisms are true and some false: for though a true inference is possible from false premisses, yet this occurs once only-I mean if A for instance, is truly predicable of C, but B, the middle, is false, both A-B and B-C being false; nevertheless, if middles are taken to prove these premisses, they will be false because every conclusion which is a falsehood has false premisses, while true conclusions have true premisses, and false and true differ in kind. Then again, (2) falsehoods are not all derived from a single identical set of principles: there are falsehoods which are the contraries of one another and cannot coexist, e.g. ‘justice is injustice’, and ‘justice is cowardice’; ‘man is horse’, and ‘man is ox’; ‘the equal is greater’, and ‘the equal is less.’ From established principles we may argue the case as follows, confining-ourselves therefore to true conclusions. Not even all these are inferred from the same basic truths; many of them in fact have basic truths which differ generically and are not transferable; units, for instance, which are without position, cannot take the place of points, which have position. The transferred terms could only fit in as middle terms or as major or minor terms, or else have some of the other terms between them, others outside them.
Nor can any of the common axioms-such, I mean, as the law of excluded middle-serve as premisses for the proof of all conclusions. For the kinds of being are different, and some attributes attach to quanta and some to qualia only; and proof is achieved by means of the common axioms taken in conjunction with these several kinds and their attributes.
Again, it is not true that the basic truths are much fewer than the conclusions, for the basic truths are the premisses, and the premisses are formed by the apposition of a fresh extreme term or the interposition of a fresh middle. Moreover, the number of conclusions is indefinite, though the number of middle terms is finite; and lastly some of the basic truths are necessary, others variable.
Looking at it in this way we see that, since the number of conclusions is indefinite, the basic truths cannot be identical or limited in number. If, on the other hand, identity is used in another sense, and it is said, e.g. ‘these and no other are the fundamental truths of geometry, these the fundamentals of calculation, these again of medicine’; would the statement mean anything except that the sciences have basic truths? To call them identical because they are self-identical is absurd, since everything can be identified with everything in that sense of identity. Nor again can the contention that all conclusions have the same basic truths mean that from the mass of all possible premisses any conclusion may be drawn. That would be exceedingly naive, for it is not the case in the clearly evident mathematical sciences, nor is it possible in analysis, since it is the immediate premisses which are the basic truths, and a fresh conclusion is only formed by the addition of a new immediate premiss: but if it be admitted that it is these primary immediate premisses which are basic truths, each subject-genus will provide one basic truth. If, however, it is not argued that from the mass of all possible premisses any conclusion may be proved, nor yet admitted that basic truths differ so as to be generically different for each science, it remains to consider the possibility that, while the basic truths of all knowledge are within one genus, special premisses are required to prove special conclusions. But that this cannot be the case has been shown by our proof that the basic truths of things generically different themselves differ generically. For fundamental truths are of two kinds, those which are premisses of demonstration and the subject-genus; and though the former are common, the latter-number, for instance, and magnitude-are peculiar.
Scientific knowledge and its object differ from opinion and the object of opinion in that scientific knowledge is commensurately universal and proceeds by necessary connexions, and that which is necessary cannot be otherwise. So though there are things which are true and real and yet can be otherwise, scientific knowledge clearly does not concern them: if it did, things which can be otherwise would be incapable of being otherwise. Nor are they any concern of rational intuition-by rational intuition I mean an originative source of scientific knowledge-nor of indemonstrable knowledge, which is the grasping of the immediate premiss. Since then rational intuition, science, and opinion, and what is revealed by these terms, are the only things that can be ‘true’, it follows that it is opinion that is concerned with that which may be true or false, and can be otherwise: opinion in fact is the grasp of a premiss which is immediate but not necessary. This view also fits the observed facts, for opinion is unstable, and so is the kind of being we have described as its object. Besides, when a man thinks a truth incapable of being otherwise he always thinks that he knows it, never that he opines it. He thinks that he opines when he thinks that a connexion, though actually so, may quite easily be otherwise; for he believes that such is the proper object of opinion, while the necessary is the object of knowledge.
In what sense, then, can the same thing be the object of both opinion and knowledge? And if any one chooses to maintain that all that he knows he can also opine, why should not opinion be knowledge? For he that knows and he that opines will follow the same train of thought through the same middle terms until the immediate premisses are reached; because it is possible to opine not only the fact but also the reasoned fact, and the reason is the middle term; so that, since the former knows, he that opines also has knowledge.
The truth perhaps is that if a man grasp truths that cannot be other than they are, in the way in which he grasps the definitions through which demonstrations take place, he will have not opinion but knowledge: if on the other hand he apprehends these attributes as inhering in their subjects, but not in virtue of the subjects’ substance and essential nature possesses opinion and not genuine knowledge; and his opinion, if obtained through immediate premisses, will be both of the fact and of the reasoned fact; if not so obtained, of the fact alone. The object of opinion and knowledge is not quite identical; it is only in a sense identical, just as the object of true and false opinion is in a sense identical. The sense in which some maintain that true and false opinion can have the same object leads them to embrace many strange doctrines, particularly the doctrine that what a man opines falsely he does not opine at all. There are really many senses of ‘identical’, and in one sense the object of true and false opinion can be the same, in another it cannot. Thus, to have a true opinion that the diagonal is commensurate with the side would be absurd: but because the diagonal with which they are both concerned is the same, the two opinions have objects so far the same: on the other hand, as regards their essential definable nature these objects differ. The identity of the objects of knowledge and opinion is similar. Knowledge is the apprehension of, e.g. the attribute ‘animal’ as incapable of being otherwise, opinion the apprehension of ‘animal’ as capable of being otherwise-e.g. the apprehension that animal is an element in the essential nature of man is knowledge; the apprehension of animal as predicable of man but not as an element in man’s essential nature is opinion: man is the subject in both judgements, but the mode of inherence differs.
This also shows that one cannot opine and know the same thing simultaneously; for then one would apprehend the same thing as both capable and incapable of being otherwise-an impossibility. Knowledge and opinion of the same thing can co-exist in two different people in the sense we have explained, but not simultaneously in the same person. That would involve a man’s simultaneously apprehending, e.g. (1) that man is essentially animal-i.e. cannot be other than animal-and (2) that man is not essentially animal, that is, we may assume, may be other than animal.
Further consideration of modes of thinking and their distribution under the heads of discursive thought, intuition, science, art, practical wisdom, and metaphysical thinking, belongs rather partly to natural science, partly to moral philosophy.
Quick wit is a faculty of hitting upon the middle term instantaneously. It would be exemplified by a man who saw that the moon has her bright side always turned towards the sun, and quickly grasped the cause of this, namely that she borrows her light from him; or observed somebody in conversation with a man of wealth and divined that he was borrowing money, or that the friendship of these people sprang from a common enmity. In all these instances he has seen the major and minor terms and then grasped the causes, the middle terms.
Let A represent ‘bright side turned sunward’, B ‘lighted from the sun’, C the moon. Then B, ‘lighted from the sun’ is predicable of C, the moon, and A, ‘having her bright side towards the source of her light’, is predicable of B. So A is predicable of C through B.
Since the object of pure scientific knowledge cannot be other than it is, the truth obtained by demonstrative knowledge will be necessary. And since demonstrative knowledge is only present when we have a demonstration, it follows that demonstration is an inference from necessary premisses. So we must consider what are the premisses of demonstration-i.e. what is their character: and as a preliminary, let us define what we mean by an attribute ‘true in every instance of its subject’, an ‘essential’ attribute, and a ‘commensurate and universal’ attribute. I call ‘true in every instance’ what is truly predicable of all instances-not of one to the exclusion of others-and at all times, not at this or that time only; e.g. if animal is truly predicable of every instance of man, then if it be true to say ‘this is a man’, ‘this is an animal’ is also true, and if the one be true now the other is true now. A corresponding account holds if point is in every instance predicable as contained in line. There is evidence for this in the fact that the objection we raise against a proposition put to us as true in every instance is either an instance in which, or an occasion on which, it is not true. Essential attributes are (1) such as belong to their subject as elements in its essential nature (e.g. line thus belongs to triangle, point to line; for the very being or ‘substance’ of triangle and line is composed of these elements, which are contained in the formulae defining triangle and line): (2) such that, while they belong to certain subjects, the subjects to which they belong are contained in the attribute’s own defining formula. Thus straight and curved belong to line, odd and even, prime and compound, square and oblong, to number; and also the formula defining any one of these attributes contains its subject-e.g. line or number as the case may be.
Extending this classification to all other attributes, I distinguish those that answer the above description as belonging essentially to their respective subjects; whereas attributes related in neither of these two ways to their subjects I call accidents or ‘coincidents’; e.g. musical or white is a ‘coincident’ of animal.
Further (a) that is essential which is not predicated of a subject other than itself: e.g. ‘the walking [thing]’ walks and is white in virtue of being something else besides; whereas substance, in the sense of whatever signifies a ‘this somewhat’, is not what it is in virtue of being something else besides. Things, then, not predicated of a subject I call essential; things predicated of a subject I call accidental or ‘coincidental’.
In another sense again (b) a thing consequentially connected with anything is essential; one not so connected is ‘coincidental’. An example of the latter is ‘While he was walking it lightened’: the lightning was not due to his walking; it was, we should say, a coincidence. If, on the other hand, there is a consequential connexion, the predication is essential; e.g. if a beast dies when its throat is being cut, then its death is also essentially connected with the cutting, because the cutting was the cause of death, not death a ‘coincident’ of the cutting.
So far then as concerns the sphere of connexions scientifically known in the unqualified sense of that term, all attributes which (within that sphere) are essential either in the sense that their subjects are contained in them, or in the sense that they are contained in their subjects, are necessary as well as consequentially connected with their subjects. For it is impossible for them not to inhere in their subjects either simply or in the qualified sense that one or other of a pair of opposites must inhere in the subject; e.g. in line must be either straightness or curvature, in number either oddness or evenness. For within a single identical genus the contrary of a given attribute is either its privative or its contradictory; e.g. within number what is not odd is even, inasmuch as within this sphere even is a necessary consequent of not-odd. So, since any given predicate must be either affirmed or denied of any subject, essential attributes must inhere in their subjects of necessity.
Thus, then, we have established the distinction between the attribute which is ‘true in every instance’ and the ‘essential’ attribute.
I term ‘commensurately universal’ an attribute which belongs to every instance of its subject, and to every instance essentially and as such; from which it clearly follows that all commensurate universals inhere necessarily in their subjects. The essential attribute, and the attribute that belongs to its subject as such, are identical. E.g. point and straight belong to line essentially, for they belong to line as such; and triangle as such has two right angles, for it is essentially equal to two right angles.
An attribute belongs commensurately and universally to a subject when it can be shown to belong to any random instance of that subject and when the subject is the first thing to which it can be shown to belong. Thus, e.g. (1) the equality of its angles to two right angles is not a commensurately universal attribute of figure. For though it is possible to show that a figure has its angles equal to two right angles, this attribute cannot be demonstrated of any figure selected at haphazard, nor in demonstrating does one take a figure at random-a square is a figure but its angles are not equal to two right angles. On the other hand, any isosceles triangle has its angles equal to two right angles, yet isosceles triangle is not the primary subject of this attribute but triangle is prior. So whatever can be shown to have its angles equal to two right angles, or to possess any other attribute, in any random instance of itself and primarily-that is the first subject to which the predicate in question belongs commensurately and universally, and the demonstration, in the essential sense, of any predicate is the proof of it as belonging to this first subject commensurately and universally: while the proof of it as belonging to the other subjects to which it attaches is demonstration only in a secondary and unessential sense. Nor again (2) is equality to two right angles a commensurately universal attribute of isosceles; it is of wider application.
We must not fail to observe that we often fall into error because our conclusion is not in fact primary and commensurately universal in the sense in which we think we prove it so. We make this mistake (1) when the subject is an individual or individuals above which there is no universal to be found: (2) when the subjects belong to different species and there is a higher universal, but it has no name: (3) when the subject which the demonstrator takes as a whole is really only a part of a larger whole; for then the demonstration will be true of the individual instances within the part and will hold in every instance of it, yet the demonstration will not be true of this subject primarily and commensurately and universally. When a demonstration is true of a subject primarily and commensurately and universally, that is to be taken to mean that it is true of a given subject primarily and as such. Case (3) may be thus exemplified. If a proof were given that perpendiculars to the same line are parallel, it might be supposed that lines thus perpendicular were the proper subject of the demonstration because being parallel is true of every instance of them. But it is not so, for the parallelism depends not on these angles being equal to one another because each is a right angle, but simply on their being equal to one another. An example of (1) would be as follows: if isosceles were the only triangle, it would be thought to have its angles equal to two right angles qua isosceles. An instance of (2) would be the law that proportionals alternate. Alternation used to be demonstrated separately of numbers, lines, solids, and durations, though it could have been proved of them all by a single demonstration. Because there was no single name to denote that in which numbers, lengths, durations, and solids are identical, and because they differed specifically from one another, this property was proved of each of them separately. To-day, however, the proof is commensurately universal, for they do not possess this attribute qua lines or qua numbers, but qua manifesting this generic character which they are postulated as possessing universally. Hence, even if one prove of each kind of triangle that its angles are equal to two right angles, whether by means of the same or different proofs; still, as long as one treats separately equilateral, scalene, and isosceles, one does not yet know, except sophistically, that triangle has its angles equal to two right angles, nor does one yet know that triangle has this property commensurately and universally, even if there is no other species of triangle but these. For one does not know that triangle as such has this property, nor even that ‘all’ triangles have it-unless ‘all’ means ‘each taken singly’: if ‘all’ means ‘as a whole class’, then, though there be none in which one does not recognize this property, one does not know it of ‘all triangles’.
When, then, does our knowledge fail of commensurate universality, and when it is unqualified knowledge? If triangle be identical in essence with equilateral, i.e. with each or all equilaterals, then clearly we have unqualified knowledge: if on the other hand it be not, and the attribute belongs to equilateral qua triangle; then our knowledge fails of commensurate universality. ‘But’, it will be asked, ‘does this attribute belong to the subject of which it has been demonstrated qua triangle or qua isosceles? What is the point at which the subject. to which it belongs is primary? (i.e. to what subject can it be demonstrated as belonging commensurately and universally?)’ Clearly this point is the first term in which it is found to inhere as the elimination of inferior differentiae proceeds. Thus the angles of a brazen isosceles triangle are equal to two right angles: but eliminate brazen and isosceles and the attribute remains. ‘But’-you may say-’eliminate figure or limit, and the attribute vanishes.’ True, but figure and limit are not the first differentiae whose elimination destroys the attribute. ‘Then what is the first?’ If it is triangle, it will be in virtue of triangle that the attribute belongs to all the other subjects of which it is predicable, and triangle is the subject to which it can be demonstrated as belonging commensurately and universally.
Demonstrative knowledge must rest on necessary basic truths; for the object of scientific knowledge cannot be other than it is. Now attributes attaching essentially to their subjects attach necessarily to them: for essential attributes are either elements in the essential nature of their subjects, or contain their subjects as elements in their own essential nature. (The pairs of opposites which the latter class includes are necessary because one member or the other necessarily inheres.) It follows from this that premisses of the demonstrative syllogism must be connexions essential in the sense explained: for all attributes must inhere essentially or else be accidental, and accidental attributes are not necessary to their subjects.
We must either state the case thus, or else premise that the conclusion of demonstration is necessary and that a demonstrated conclusion cannot be other than it is, and then infer that the conclusion must be developed from necessary premisses. For though you may reason from true premisses without demonstrating, yet if your premisses are necessary you will assuredly demonstrate-in such necessity you have at once a distinctive character of demonstration. That demonstration proceeds from necessary premisses is also indicated by the fact that the objection we raise against a professed demonstration is that a premiss of it is not a necessary truth-whether we think it altogether devoid of necessity, or at any rate so far as our opponent’s previous argument goes. This shows how naive it is to suppose one’s basic truths rightly chosen if one starts with a proposition which is (1) popularly accepted and (2) true, such as the sophists’ assumption that to know is the same as to possess knowledge. For (1) popular acceptance or rejection is no criterion of a basic truth, which can only be the primary law of the genus constituting the subject matter of the demonstration; and (2) not all truth is ‘appropriate’.
A further proof that the conclusion must be the development of necessary premisses is as follows. Where demonstration is possible, one who can give no account which includes the cause has no scientific knowledge. If, then, we suppose a syllogism in which, though A necessarily inheres in C, yet B, the middle term of the demonstration, is not necessarily connected with A and C, then the man who argues thus has no reasoned knowledge of the conclusion, since this conclusion does not owe its necessity to the middle term; for though the conclusion is necessary, the mediating link is a contingent fact. Or again, if a man is without knowledge now, though he still retains the steps of the argument, though there is no change in himself or in the fact and no lapse of memory on his part; then neither had he knowledge previously. But the mediating link, not being necessary, may have perished in the interval; and if so, though there be no change in him nor in the fact, and though he will still retain the steps of the argument, yet he has not knowledge, and therefore had not knowledge before. Even if the link has not actually perished but is liable to perish, this situation is possible and might occur. But such a condition cannot be knowledge.
When the conclusion is necessary, the middle through which it was proved may yet quite easily be non-necessary. You can in fact infer the necessary even from a non-necessary premiss, just as you can infer the true from the not true. On the other hand, when the middle is necessary the conclusion must be necessary; just as true premisses always give a true conclusion. Thus, if A is necessarily predicated of B and B of C, then A is necessarily predicated of C. But when the conclusion is nonnecessary the middle cannot be necessary either. Thus: let A be predicated non-necessarily of C but necessarily of B, and let B be a necessary predicate of C; then A too will be a necessary predicate of C, which by hypothesis it is not.
To sum up, then: demonstrative knowledge must be knowledge of a necessary nexus, and therefore must clearly be obtained through a necessary middle term; otherwise its possessor will know neither the cause nor the fact that his conclusion is a necessary connexion. Either he will mistake the non-necessary for the necessary and believe the necessity of the conclusion without knowing it, or else he will not even believe it-in which case he will be equally ignorant, whether he actually infers the mere fact through middle terms or the reasoned fact and from immediate premisses.
Of accidents that are not essential according to our definition of essential there is no demonstrative knowledge; for since an accident, in the sense in which I here speak of it, may also not inhere, it is impossible to prove its inherence as a necessary conclusion. A difficulty, however, might be raised as to why in dialectic, if the conclusion is not a necessary connexion, such and such determinate premisses should be proposed in order to deal with such and such determinate problems. Would not the result be the same if one asked any questions whatever and then merely stated one’s conclusion? The solution is that determinate questions have to be put, not because the replies to them affirm facts which necessitate facts affirmed by the conclusion, but because these answers are propositions which if the answerer affirm, he must affirm the conclusion and affirm it with truth if they are true.
Since it is just those attributes within every genus which are essential and possessed by their respective subjects as such that are necessary it is clear that both the conclusions and the premisses of demonstrations which produce scientific knowledge are essential. For accidents are not necessary: and, further, since accidents are not necessary one does not necessarily have reasoned knowledge of a conclusion drawn from them (this is so even if the accidental premisses are invariable but not essential, as in proofs through signs; for though the conclusion be actually essential, one will not know it as essential nor know its reason); but to have reasoned knowledge of a conclusion is to know it through its cause. We may conclude that the middle must be consequentially connected with the minor, and the major with the middle.
It follows that we cannot in demonstrating pass from one genus to another. We cannot, for instance, prove geometrical truths by arithmetic. For there are three elements in demonstration: (1) what is proved, the conclusion-an attribute inhering essentially in a genus; (2) the axioms, i.e. axioms which are premisses of demonstration; (3) the subject-genus whose attributes, i.e. essential properties, are revealed by the demonstration. The axioms which are premisses of demonstration may be identical in two or more sciences: but in the case of two different genera such as arithmetic and geometry you cannot apply arithmetical demonstration to the properties of magnitudes unless the magnitudes in question are numbers. How in certain cases transference is possible I will explain later.
Arithmetical demonstration and the other sciences likewise possess, each of them, their own genera; so that if the demonstration is to pass from one sphere to another, the genus must be either absolutely or to some extent the same. If this is not so, transference is clearly impossible, because the extreme and the middle terms must be drawn from the same genus: otherwise, as predicated, they will not be essential and will thus be accidents. That is why it cannot be proved by geometry that opposites fall under one science, nor even that the product of two cubes is a cube. Nor can the theorem of any one science be demonstrated by means of another science, unless these theorems are related as subordinate to superior (e.g. as optical theorems to geometry or harmonic theorems to arithmetic). Geometry again cannot prove of lines any property which they do not possess qua lines, i.e. in virtue of the fundamental truths of their peculiar genus: it cannot show, for example, that the straight line is the most beautiful of lines or the contrary of the circle; for these qualities do not belong to lines in virtue of their peculiar genus, but through some property which it shares with other genera.
It is also clear that if the premisses from which the syllogism proceeds are commensurately universal, the conclusion of such i.e. in the unqualified sense-must also be eternal. Therefore no attribute can be demonstrated nor known by strictly scientific knowledge to inhere in perishable things. The proof can only be accidental, because the attribute’s connexion with its perishable subject is not commensurately universal but temporary and special. If such a demonstration is made, one premiss must be perishable and not commensurately universal (perishable because only if it is perishable will the conclusion be perishable; not commensurately universal, because the predicate will be predicable of some instances of the subject and not of others); so that the conclusion can only be that a fact is true at the moment-not commensurately and universally. The same is true of definitions, since a definition is either a primary premiss or a conclusion of a demonstration, or else only differs from a demonstration in the order of its terms. Demonstration and science of merely frequent occurrences-e.g. of eclipse as happening to the moon-are, as such, clearly eternal: whereas so far as they are not eternal they are not fully commensurate. Other subjects too have properties attaching to them in the same way as eclipse attaches to the moon.
It is clear that if the conclusion is to show an attribute inhering as such, nothing can be demonstrated except from its ‘appropriate’ basic truths. Consequently a proof even from true, indemonstrable, and immediate premisses does not constitute knowledge. Such proofs are like Bryson’s method of squaring the circle; for they operate by taking as their middle a common character-a character, therefore, which the subject may share with another-and consequently they apply equally to subjects different in kind. They therefore afford knowledge of an attribute only as inhering accidentally, not as belonging to its subject as such: otherwise they would not have been applicable to another genus.
Our knowledge of any attribute’s connexion with a subject is accidental unless we know that connexion through the middle term in virtue of which it inheres, and as an inference from basic premisses essential and ‘appropriate’ to the subject-unless we know, e.g. the property of possessing angles equal to two right angles as belonging to that subject in which it inheres essentially, and as inferred from basic premisses essential and ‘appropriate’ to that subject: so that if that middle term also belongs essentially to the minor, the middle must belong to the same kind as the major and minor terms. The only exceptions to this rule are such cases as theorems in harmonics which are demonstrable by arithmetic. Such theorems are proved by the same middle terms as arithmetical properties, but with a qualification-the fact falls under a separate science (for the subject genus is separate), but the reasoned fact concerns the superior science, to which the attributes essentially belong. Thus, even these apparent exceptions show that no attribute is strictly demonstrable except from its ‘appropriate’ basic truths, which, however, in the case of these sciences have the requisite identity of character.
It is no less evident that the peculiar basic truths of each inhering attribute are indemonstrable; for basic truths from which they might be deduced would be basic truths of all that is, and the science to which they belonged would possess universal sovereignty. This is so because he knows better whose knowledge is deduced from higher causes, for his knowledge is from prior premisses when it derives from causes themselves uncaused: hence, if he knows better than others or best of all, his knowledge would be science in a higher or the highest degree. But, as things are, demonstration is not transferable to another genus, with such exceptions as we have mentioned of the application of geometrical demonstrations to theorems in mechanics or optics, or of arithmetical demonstrations to those of harmonics.
It is hard to be sure whether one knows or not; for it is hard to be sure whether one’s knowledge is based on the basic truths appropriate to each attribute-the differentia of true knowledge. We think we have scientific knowledge if we have reasoned from true and primary premisses. But that is not so: the conclusion must be homogeneous with the basic facts of the science.
---
!!![[Posterior Analytics: Book II: 1]]
{{Posterior Analytics: Book II: 1}}
---
!!![[Posterior Analytics: Book II: 2]]
{{Posterior Analytics: Book II: 2}}
---
!!![[Posterior Analytics: Book II: 3]]
{{Posterior Analytics: Book II: 3}}
---
!!![[Posterior Analytics: Book II: 4]]
{{Posterior Analytics: Book II: 4}}
---
!!![[Posterior Analytics: Book II: 5]]
{{Posterior Analytics: Book II: 5}}
---
!!![[Posterior Analytics: Book II: 6]]
{{Posterior Analytics: Book II: 6}}
---
!!![[Posterior Analytics: Book II: 7]]
{{Posterior Analytics: Book II: 7}}
---
!!![[Posterior Analytics: Book II: 8]]
{{Posterior Analytics: Book II: 8}}
---
!!![[Posterior Analytics: Book II: 9]]
{{Posterior Analytics: Book II: 9}}
---
!!![[Posterior Analytics: Book II: 10]]
{{Posterior Analytics: Book II: 10}}
---
!!![[Posterior Analytics: Book II: 11]]
{{Posterior Analytics: Book II: 11}}
---
!!![[Posterior Analytics: Book II: 12]]
{{Posterior Analytics: Book II: 12}}
---
!!![[Posterior Analytics: Book II: 13]]
{{Posterior Analytics: Book II: 13}}
---
!!![[Posterior Analytics: Book II: 14]]
{{Posterior Analytics: Book II: 14}}
---
!!![[Posterior Analytics: Book II: 15]]
{{Posterior Analytics: Book II: 15}}
---
!!![[Posterior Analytics: Book II: 16]]
{{Posterior Analytics: Book II: 16}}
---
!!![[Posterior Analytics: Book II: 17]]
{{Posterior Analytics: Book II: 17}}
---
!!![[Posterior Analytics: Book II: 18]]
{{Posterior Analytics: Book II: 18}}
---
!!![[Posterior Analytics: Book II: 19]]
{{Posterior Analytics: Book II: 19}}
The kinds of question we ask are as many as the kinds of things which we know. They are in fact four:-(1) whether the connexion of an attribute with a thing is a fact, (2) what is the reason of the connexion, (3) whether a thing exists, (4) What is the nature of the thing. Thus, when our question concerns a complex of thing and attribute and we ask whether the thing is thus or otherwise qualified-whether, e.g. the sun suffers eclipse or not-then we are asking as to the fact of a connexion. That our inquiry ceases with the discovery that the sun does suffer eclipse is an indication of this; and if we know from the start that the sun suffers eclipse, we do not inquire whether it does so or not. On the other hand, when we know the fact we ask the reason; as, for example, when we know that the sun is being eclipsed and that an earthquake is in progress, it is the reason of eclipse or earthquake into which we inquire.
Where a complex is concerned, then, those are the two questions we ask; but for some objects of inquiry we have a different kind of question to ask, such as whether there is or is not a centaur or a God. (By ‘is or is not’ I mean ‘is or is not, without further qualification’; as opposed to ‘is or is not [e.g.] white’.) On the other hand, when we have ascertained the thing’s existence, we inquire as to its nature, asking, for instance, ‘what, then, is God?’ or ‘what is man?’.
Since definition is said to be the statement of a thing’s nature, obviously one kind of definition will be a statement of the meaning of the name, or of an equivalent nominal formula. A definition in this sense tells you, e.g. the meaning of the phrase ‘triangular character’. When we are aware that triangle exists, we inquire the reason why it exists. But it is difficult thus to learn the definition of things the existence of which we do not genuinely know-the cause of this difficulty being, as we said before, that we only know accidentally whether or not the thing exists. Moreover, a statement may be a unity in either of two ways, by conjunction, like the Iliad, or because it exhibits a single predicate as inhering not accidentally in a single subject.
That then is one way of defining definition. Another kind of definition is a formula exhibiting the cause of a thing’s existence. Thus the former signifies without proving, but the latter will clearly be a quasi-demonstration of essential nature, differing from demonstration in the arrangement of its terms. For there is a difference between stating why it thunders, and stating what is the essential nature of thunder; since the first statement will be ‘Because fire is quenched in the clouds’, while the statement of what the nature of thunder is will be ‘The noise of fire being quenched in the clouds’. Thus the same statement takes a different form: in one form it is continuous demonstration, in the other definition. Again, thunder can be defined as noise in the clouds, which is the conclusion of the demonstration embodying essential nature. On the other hand the definition of immediates is an indemonstrable positing of essential nature.
We conclude then that definition is (a) an indemonstrable statement of essential nature, or (b) a syllogism of essential nature differing from demonstration in grammatical form, or (c) the conclusion of a demonstration giving essential nature.
Our discussion has therefore made plain (1) in what sense and of what things the essential nature is demonstrable, and in what sense and of what things it is not; (2) what are the various meanings of the term definition, and in what sense and of what things it proves the essential nature, and in what sense and of what things it does not; (3) what is the relation of definition to demonstration, and how far the same thing is both definable and demonstrable and how far it is not.
We think we have scientific knowledge when we know the cause, and there are four causes: (1) the definable form, (2) an antecedent which necessitates a consequent, (3) the efficient cause, (4) the final cause. Hence each of these can be the middle term of a proof, for (a) though the inference from antecedent to necessary consequent does not hold if only one premiss is assumed-two is the minimum-still when there are two it holds on condition that they have a single common middle term. So it is from the assumption of this single middle term that the conclusion follows necessarily. The following example will also show this. Why is the angle in a semicircle a right angle?-or from what assumption does it follow that it is a right angle? Thus, let A be right angle, B the half of two right angles, C the angle in a semicircle. Then B is the cause in virtue of which A, right angle, is attributable to C, the angle in a semicircle, since B=A and the other, viz. C,=B, for C is half of two right angles. Therefore it is the assumption of B, the half of two right angles, from which it follows that A is attributable to C, i.e. that the angle in a semicircle is a right angle. Moreover, B is identical with (b) the defining form of A, since it is what A’s definition signifies. Moreover, the formal cause has already been shown to be the middle. (c) ‘Why did the Athenians become involved in the Persian war?’ means ‘What cause originated the waging of war against the Athenians?’ and the answer is, ‘Because they raided Sardis with the Eretrians’, since this originated the war. Let A be war, B unprovoked raiding, C the Athenians. Then B, unprovoked raiding, is true of C, the Athenians, and A is true of B, since men make war on the unjust aggressor. So A, having war waged upon them, is true of B, the initial aggressors, and B is true of C, the Athenians, who were the aggressors. Hence here too the cause-in this case the efficient cause-is the middle term. (d) This is no less true where the cause is the final cause. E.g. why does one take a walk after supper? For the sake of one’s health. Why does a house exist? For the preservation of one’s goods. The end in view is in the one case health, in the other preservation. To ask the reason why one must walk after supper is precisely to ask to what end one must do it. Let C be walking after supper, B the non-regurgitation of food, A health. Then let walking after supper possess the property of preventing food from rising to the orifice of the stomach, and let this condition be healthy; since it seems that B, the non-regurgitation of food, is attributable to C, taking a walk, and that A, health, is attributable to B. What, then, is the cause through which A, the final cause, inheres in C? It is B, the non-regurgitation of food; but B is a kind of definition of A, for A will be explained by it. Why is B the cause of A’s belonging to C? Because to be in a condition such as B is to be in health. The definitions must be transposed, and then the detail will become clearer. Incidentally, here the order of coming to be is the reverse of what it is in proof through the efficient cause: in the efficient order the middle term must come to be first, whereas in the teleological order the minor, C, must first take place, and the end in view comes last in time.
The same thing may exist for an end and be necessitated as well. For example, light shines through a lantern (1) because that which consists of relatively small particles necessarily passes through pores larger than those particles-assuming that light does issue by penetrationand (2) for an end, namely to save us from stumbling. If then, a thing can exist through two causes, can it come to be through two causes-as for instance if thunder be a hiss and a roar necessarily produced by the quenching of fire, and also designed, as the Pythagoreans say, for a threat to terrify those that lie in Tartarus? Indeed, there are very many such cases, mostly among the processes and products of the natural world; for nature, in different senses of the term ‘nature’, produces now for an end, now by necessity.
Necessity too is of two kinds. It may work in accordance with a thing’s natural tendency, or by constraint and in opposition to it; as, for instance, by necessity a stone is borne both upwards and downwards, but not by the same necessity.
Of the products of man’s intelligence some are never due to chance or necessity but always to an end, as for example a house or a statue; others, such as health or safety, may result from chance as well.
It is mostly in cases where the issue is indeterminate (though only where the production does not originate in chance, and the end is consequently good), that a result is due to an end, and this is true alike in nature or in art. By chance, on the other hand, nothing comes to be for an end.
The effect may be still coming to be, or its occurrence may be past or future, yet the cause will be the same as when it is actually existent-for it is the middle which is the cause-except that if the effect actually exists the cause is actually existent, if it is coming to be so is the cause, if its occurrence is past the cause is past, if future the cause is future. For example, the moon was eclipsed because the earth intervened, is becoming eclipsed because the earth is in process of intervening, will be eclipsed because the earth will intervene, is eclipsed because the earth intervenes.
To take a second example: assuming that the definition of ice is solidified water, let C be water, A solidified, B the middle, which is the cause, namely total failure of heat. Then B is attributed to C, and A, solidification, to B: ice when B is occurring, has formed when B has occurred, and will form when B shall occur.
This sort of cause, then, and its effect come to be simultaneously when they are in process of becoming, and exist simultaneously when they actually exist; and the same holds good when they are past and when they are future. But what of cases where they are not simultaneous? Can causes and effects different from one another form, as they seem to us to form, a continuous succession, a past effect resulting from a past cause different from itself, a future effect from a future cause different from it, and an effect which is coming-to-be from a cause different from and prior to it? Now on this theory it is from the posterior event that we reason (and this though these later events actually have their source of origin in previous events — a fact which shows that also when the effect is coming-to-be we still reason from the posterior event), and from the event we cannot reason (we cannot argue that because an event A has occurred, therefore an event B has occurred subsequently to A but still in the past-and the same holds good if the occurrence is future)-cannot reason because, be the time interval definite or indefinite, it will never be possible to infer that because it is true to say that A occurred, therefore it is true to say that B, the subsequent event, occurred; for in the interval between the events, though A has already occurred, the latter statement will be false. And the same argument applies also to future events; i.e. one cannot infer from an event which occurred in the past that a future event will occur. The reason of this is that the middle must be homogeneous, past when the extremes are past, future when they are future, coming to be when they are coming-to-be, actually existent when they are actually existent; and there cannot be a middle term homogeneous with extremes respectively past and future. And it is a further difficulty in this theory that the time interval can be neither indefinite nor definite, since during it the inference will be false. We have also to inquire what it is that holds events together so that the coming-to-be now occurring in actual things follows upon a past event. It is evident, we may suggest, that a past event and a present process cannot be ‘contiguous’, for not even two past events can be ‘contiguous’. For past events are limits and atomic; so just as points are not ‘contiguous’ neither are past events, since both are indivisible. For the same reason a past event and a present process cannot be ‘contiguous’, for the process is divisible, the event indivisible. Thus the relation of present process to past event is analogous to that of line to point, since a process contains an infinity of past events. These questions, however, must receive a more explicit treatment in our general theory of change.
The following must suffice as an account of the manner in which the middle would be identical with the cause on the supposition that coming-to-be is a series of consecutive events: for in the terms of such a series too the middle and major terms must form an immediate premiss; e.g. we argue that, since C has occurred, therefore A occurred: and C’s occurrence was posterior, A’s prior; but C is the source of the inference because it is nearer to the present moment, and the starting-point of time is the present. We next argue that, since D has occurred, therefore C occurred. Then we conclude that, since D has occurred, therefore A must have occurred; and the cause is C, for since D has occurred C must have occurred, and since C has occurred A must previously have occurred.
If we get our middle term in this way, will the series terminate in an immediate premiss, or since, as we said, no two events are ‘contiguous’, will a fresh middle term always intervene because there is an infinity of middles? No: though no two events are ‘contiguous’, yet we must start from a premiss consisting of a middle and the present event as major. The like is true of future events too, since if it is true to say that D will exist, it must be a prior truth to say that A will exist, and the cause of this conclusion is C; for if D will exist, C will exist prior to D, and if C will exist, A will exist prior to it. And here too the same infinite divisibility might be urged, since future events are not ‘contiguous’. But here too an immediate basic premiss must be assumed. And in the world of fact this is so: if a house has been built, then blocks must have been quarried and shaped. The reason is that a house having been built necessitates a foundation having been laid, and if a foundation has been laid blocks must have been shaped beforehand. Again, if a house will be built, blocks will similarly be shaped beforehand; and proof is through the middle in the same way, for the foundation will exist before the house.
Now we observe in Nature a certain kind of circular process of coming-to-be; and this is possible only if the middle and extreme terms are reciprocal, since conversion is conditioned by reciprocity in the terms of the proof. This-the convertibility of conclusions and premisses-has been proved in our early chapters, and the circular process is an instance of this. In actual fact it is exemplified thus: when the earth had been moistened an exhalation was bound to rise, and when an exhalation had risen cloud was bound to form, and from the formation of cloud rain necessarily resulted and by the fall of rain the earth was necessarily moistened: but this was the starting-point, so that a circle is completed; for posit any one of the terms and another follows from it, and from that another, and from that again the first.
Some occurrences are universal (for they are, or come-to-be what they are, always and in ever case); others again are not always what they are but only as a general rule: for instance, not every man can grow a beard, but it is the general rule. In the case of such connexions the middle term too must be a general rule. For if A is predicated universally of B and B of C, A too must be predicated always and in every instance of C, since to hold in every instance and always is of the nature of the universal. But we have assumed a connexion which is a general rule; consequently the middle term B must also be a general rule. So connexions which embody a general rule-i.e. which exist or come to be as a general rule-will also derive from immediate basic premisses.
We have already explained how essential nature is set out in the terms of a demonstration, and the sense in which it is or is not demonstrable or definable; so let us now discuss the method to be adopted in tracing the elements predicated as constituting the definable form.
Now of the attributes which inhere always in each several thing there are some which are wider in extent than it but not wider than its genus (by attributes of wider extent mean all such as are universal attributes of each several subject, but in their application are not confined to that subject). while an attribute may inhere in every triad, yet also in a subject not a triad-as being inheres in triad but also in subjects not numbers at all-odd on the other hand is an attribute inhering in every triad and of wider application (inhering as it does also in pentad), but which does not extend beyond the genus of triad; for pentad is a number, but nothing outside number is odd. It is such attributes which we have to select, up to the exact point at which they are severally of wider extent than the subject but collectively coextensive with it; for this synthesis must be the substance of the thing. For example every triad possesses the attributes number, odd, and prime in both senses, i.e. not only as possessing no divisors, but also as not being a sum of numbers. This, then, is precisely what triad is, viz. a number, odd, and prime in the former and also the latter sense of the term: for these attributes taken severally apply, the first two to all odd numbers, the last to the dyad also as well as to the triad, but, taken collectively, to no other subject. Now since we have shown above’ that attributes predicated as belonging to the essential nature are necessary and that universals are necessary, and since the attributes which we select as inhering in triad, or in any other subject whose attributes we select in this way, are predicated as belonging to its essential nature, triad will thus possess these attributes necessarily. Further, that the synthesis of them constitutes the substance of triad is shown by the following argument. If it is not identical with the being of triad, it must be related to triad as a genus named or nameless. It will then be of wider extent than triad-assuming that wider potential extent is the character of a genus. If on the other hand this synthesis is applicable to no subject other than the individual triads, it will be identical with the being of triad, because we make the further assumption that the substance of each subject is the predication of elements in its essential nature down to the last differentia characterizing the individuals. It follows that any other synthesis thus exhibited will likewise be identical with the being of the subject.
The author of a hand-book on a subject that is a generic whole should divide the genus into its first infimae species-number e.g. into triad and dyad-and then endeavour to seize their definitions by the method we have described-the definition, for example, of straight line or circle or right angle. After that, having established what the category is to which the subaltern genus belongs-quantity or quality, for instance-he should examine the properties ‘peculiar’ to the species, working through the proximate common differentiae. He should proceed thus because the attributes of the genera compounded of the infimae species will be clearly given by the definitions of the species; since the basic element of them all is the definition, i.e. the simple infirma species, and the attributes inhere essentially in the simple infimae species, in the genera only in virtue of these.
Divisions according to differentiae are a useful accessory to this method. What force they have as proofs we did, indeed, explain above, but that merely towards collecting the essential nature they may be of use we will proceed to show. They might, indeed, seem to be of no use at all, but rather to assume everything at the start and to be no better than an initial assumption made without division. But, in fact, the order in which the attributes are predicated does make a difference — it matters whether we say animal-tame-biped, or biped-animal-tame. For if every definable thing consists of two elements and ‘animal-tame’ forms a unity, and again out of this and the further differentia man (or whatever else is the unity under construction) is constituted, then the elements we assume have necessarily been reached by division. Again, division is the only possible method of avoiding the omission of any element of the essential nature. Thus, if the primary genus is assumed and we then take one of the lower divisions, the dividendum will not fall whole into this division: e.g. it is not all animal which is either whole-winged or split-winged but all winged animal, for it is winged animal to which this differentiation belongs. The primary differentiation of animal is that within which all animal falls. The like is true of every other genus, whether outside animal or a subaltern genus of animal; e.g. the primary differentiation of bird is that within which falls every bird, of fish that within which falls every fish. So, if we proceed in this way, we can be sure that nothing has been omitted: by any other method one is bound to omit something without knowing it.
To define and divide one need not know the whole of existence. Yet some hold it impossible to know the differentiae distinguishing each thing from every single other thing without knowing every single other thing; and one cannot, they say, know each thing without knowing its differentiae, since everything is identical with that from which it does not differ, and other than that from which it differs. Now first of all this is a fallacy: not every differentia precludes identity, since many differentiae inhere in things specifically identical, though not in the substance of these nor essentially. Secondly, when one has taken one’s differing pair of opposites and assumed that the two sides exhaust the genus, and that the subject one seeks to define is present in one or other of them, and one has further verified its presence in one of them; then it does not matter whether or not one knows all the other subjects of which the differentiae are also predicated. For it is obvious that when by this process one reaches subjects incapable of further differentiation one will possess the formula defining the substance. Moreover, to postulate that the division exhausts the genus is not illegitimate if the opposites exclude a middle; since if it is the differentia of that genus, anything contained in the genus must lie on one of the two sides.
In establishing a definition by division one should keep three objects in view: (1) the admission only of elements in the definable form, (2) the arrangement of these in the right order, (3) the omission of no such elements. The first is feasible because one can establish genus and differentia through the topic of the genus, just as one can conclude the inherence of an accident through the topic of the accident. The right order will be achieved if the right term is assumed as primary, and this will be ensured if the term selected is predicable of all the others but not all they of it; since there must be one such term. Having assumed this we at once proceed in the same way with the lower terms; for our second term will be the first of the remainder, our third the first of those which follow the second in a ‘contiguous’ series, since when the higher term is excluded, that term of the remainder which is ‘contiguous’ to it will be primary, and so on. Our procedure makes it clear that no elements in the definable form have been omitted: we have taken the differentia that comes first in the order of division, pointing out that animal, e.g. is divisible exhaustively into A and B, and that the subject accepts one of the two as its predicate. Next we have taken the differentia of the whole thus reached, and shown that the whole we finally reach is not further divisible-i.e. that as soon as we have taken the last differentia to form the concrete totality, this totality admits of no division into species. For it is clear that there is no superfluous addition, since all these terms we have selected are elements in the definable form; and nothing lacking, since any omission would have to be a genus or a differentia. Now the primary term is a genus, and this term taken in conjunction with its differentiae is a genus: moreover the differentiae are all included, because there is now no further differentia; if there were, the final concrete would admit of division into species, which, we said, is not the case.
To resume our account of the right method of investigation: We must start by observing a set of similar-i.e. specifically identical-individuals, and consider what element they have in common. We must then apply the same process to another set of individuals which belong to one species and are generically but not specifically identical with the former set. When we have established what the common element is in all members of this second species, and likewise in members of further species, we should again consider whether the results established possess any identity, and persevere until we reach a single formula, since this will be the definition of the thing. But if we reach not one formula but two or more, evidently the definiendum cannot be one thing but must be more than one. I may illustrate my meaning as follows. If we were inquiring what the essential nature of pride is, we should examine instances of proud men we know of to see what, as such, they have in common; e.g. if Alcibiades was proud, or Achilles and Ajax were proud, we should find on inquiring what they all had in common, that it was intolerance of insult; it was this which drove Alcibiades to war, Achilles wrath, and Ajax to suicide. We should next examine other cases, Lysander, for example, or Socrates, and then if these have in common indifference alike to good and ill fortune, I take these two results and inquire what common element have equanimity amid the vicissitudes of life and impatience of dishonour. If they have none, there will be two genera of pride. Besides, every definition is always universal and commensurate: the physician does not prescribe what is healthy for a single eye, but for all eyes or for a determinate species of eye. It is also easier by this method to define the single species than the universal, and that is why our procedure should be from the several species to the universal genera-this for the further reason too that equivocation is less readily detected in genera than in infimae species. Indeed, perspicuity is essential in definitions, just as inferential movement is the minimum required in demonstrations; and we shall attain perspicuity if we can collect separately the definition of each species through the group of singulars which we have established e.g. the definition of similarity not unqualified but restricted to colours and to figures; the definition of acuteness, but only of sound-and so proceed to the common universal with a careful avoidance of equivocation. We may add that if dialectical disputation must not employ metaphors, clearly metaphors and metaphorical expressions are precluded in definition: otherwise dialectic would involve metaphors.
In order to formulate the connexions we wish to prove we have to select our analyses and divisions. The method of selection consists in laying down the common genus of all our subjects of investigation-if e.g. they are animals, we lay down what the properties are which inhere in every animal. These established, we next lay down the properties essentially connected with the first of the remaining classes-e.g. if this first subgenus is bird, the essential properties of every bird-and so on, always characterizing the proximate subgenus. This will clearly at once enable us to say in virtue of what character the subgenera-man, e.g. or horse-possess their properties. Let A be animal, B the properties of every animal, C D E various species of animal. Then it is clear in virtue of what character B inheres in D-namely A-and that it inheres in C and E for the same reason: and throughout the remaining subgenera always the same rule applies.
We are now taking our examples from the traditional class-names, but we must not confine ourselves to considering these. We must collect any other common character which we observe, and then consider with what species it is connected and what.properties belong to it. For example, as the common properties of horned animals we collect the possession of a third stomach and only one row of teeth. Then since it is clear in virtue of what character they possess these attributes-namely their horned character-the next question is, to what species does the possession of horns attach?
Yet a further method of selection is by analogy: for we cannot find a single identical name to give to a squid’s pounce, a fish’s spine, and an animal’s bone, although these too possess common properties as if there were a single osseous nature.
Some connexions that require proof are identical in that they possess an identical ‘middle’ e.g. a whole group might be proved through ‘reciprocal replacement’-and of these one class are identical in genus, namely all those whose difference consists in their concerning different subjects or in their mode of manifestation. This latter class may be exemplified by the questions as to the causes respectively of echo, of reflection, and of the rainbow: the connexions to be proved which these questions embody are identical generically, because all three are forms of repercussion; but specifically they are different.
Other connexions that require proof only differ in that the ‘middle’ of the one is subordinate to the ‘middle’ of the other. For example: Why does the Nile rise towards the end of the month? Because towards its close the month is more stormy. Why is the month more stormy towards its close? Because the moon is waning. Here the one cause is subordinate to the other.
The question might be raised with regard to cause and effect whether when the effect is present the cause also is present; whether, for instance, if a plant sheds its leaves or the moon is eclipsed, there is present also the cause of the eclipse or of the fall of the leaves-the possession of broad leaves, let us say, in the latter case, in the former the earth’s interposition. For, one might argue, if this cause is not present, these phenomena will have some other cause: if it is present, its effect will be at once implied by it-the eclipse by the earth’s interposition, the fall of the leaves by the possession of broad leaves; but if so, they will be logically coincident and each capable of proof through the other. Let me illustrate: Let A be deciduous character, B the possession of broad leaves, C vine. Now if A inheres in B (for every broad-leaved plant is deciduous), and B in C (every vine possessing broad leaves); then A inheres in C (every vine is deciduous), and the middle term B is the cause. But we can also demonstrate that the vine has broad leaves because it is deciduous. Thus, let D be broad-leaved, E deciduous, F vine. Then E inheres in F (since every vine is deciduous), and D in E (for every deciduous plant has broad leaves): therefore every vine has broad leaves, and the cause is its deciduous character. If, however, they cannot each be the cause of the other (for cause is prior to effect, and the earth’s interposition is the cause of the moon’s eclipse and not the eclipse of the interposition)-if, then, demonstration through the cause is of the reasoned fact and demonstration not through the cause is of the bare fact, one who knows it through the eclipse knows the fact of the earth’s interposition but not the reasoned fact. Moreover, that the eclipse is not the cause of the interposition, but the interposition of the eclipse, is obvious because the interposition is an element in the definition of eclipse, which shows that the eclipse is known through the interposition and not vice versa.
On the other hand, can a single effect have more than one cause? One might argue as follows: if the same attribute is predicable of more than one thing as its primary subject, let B be a primary subject in which A inheres, and C another primary subject of A, and D and E primary subjects of B and C respectively. A will then inhere in D and E, and B will be the cause of A’s inherence in D, C of A’s inherence in E. The presence of the cause thus necessitates that of the effect, but the presence of the effect necessitates the presence not of all that may cause it but only of a cause which yet need not be the whole cause. We may, however, suggest that if the connexion to be proved is always universal and commensurate, not only will the cause be a whole but also the effect will be universal and commensurate. For instance, deciduous character will belong exclusively to a subject which is a whole, and, if this whole has species, universally and commensurately to those species-i.e. either to all species of plant or to a single species. So in these universal and commensurate connexions the ‘middle’ and its effect must reciprocate, i.e. be convertible. Supposing, for example, that the reason why trees are deciduous is the coagulation of sap, then if a tree is deciduous, coagulation must be present, and if coagulation is present-not in any subject but in a tree-then that tree must be deciduous.
Can the cause of an identical effect be not identical in every instance of the effect but different? Or is that impossible? Perhaps it is impossible if the effect is demonstrated as essential and not as inhering in virtue of a symptom or an accident-because the middle is then the definition of the major term-though possible if the demonstration is not essential. Now it is possible to consider the effect and its subject as an accidental conjunction, though such conjunctions would not be regarded as connexions demanding scientific proof. But if they are accepted as such, the middle will correspond to the extremes, and be equivocal if they are equivocal, generically one if they are generically one. Take the question why proportionals alternate. The cause when they are lines, and when they are numbers, is both different and identical; different in so far as lines are lines and not numbers, identical as involving a given determinate increment. In all proportionals this is so. Again, the cause of likeness between colour and colour is other than that between figure and figure; for likeness here is equivocal, meaning perhaps in the latter case equality of the ratios of the sides and equality of the angles, in the case of colours identity of the act of perceiving them, or something else of the sort. Again, connexions requiring proof which are identical by analogy middles also analogous.
The truth is that cause, effect, and subject are reciprocally predicable in the following way. If the species are taken severally, the effect is wider than the subject (e.g. the possession of external angles equal to four right angles is an attribute wider than triangle or are), but it is coextensive with the species taken collectively (in this instance with all figures whose external angles are equal to four right angles). And the middle likewise reciprocates, for the middle is a definition of the major; which is incidentally the reason why all the sciences are built up through definition.
We may illustrate as follows. Deciduous is a universal attribute of vine, and is at the same time of wider extent than vine; and of fig, and is of wider extent than fig: but it is not wider than but coextensive with the totality of the species. Then if you take the middle which is proximate, it is a definition of deciduous. I say that, because you will first reach a middle next the subject, and a premiss asserting it of the whole subject, and after that a middle-the coagulation of sap or something of the sort-proving the connexion of the first middle with the major: but it is the coagulation of sap at the junction of leaf-stalk and stem which defines deciduous.
If an explanation in formal terms of the inter-relation of cause and effect is demanded, we shall offer the following. Let A be an attribute of all B, and B of every species of D, but so that both A and B are wider than their respective subjects. Then B will be a universal attribute of each species of D (since I call such an attribute universal even if it is not commensurate, and I call an attribute primary universal if it is commensurate, not with each species severally but with their totality), and it extends beyond each of them taken separately.
Thus, B is the cause of A’s inherence in the species of D: consequently A must be of wider extent than B; otherwise why should B be the cause of A’s inherence in D any more than A the cause of B’s inherence in D? Now if A is an attribute of all the species of E, all the species of E will be united by possessing some common cause other than B: otherwise how shall we be able to say that A is predicable of all of which E is predicable, while E is not predicable of all of which A can be predicated? I mean how can there fail to be some special cause of A’s inherence in E, as there was of A’s inherence in all the species of D? Then are the species of E, too, united by possessing some common cause? This cause we must look for. Let us call it C.
We conclude, then, that the same effect may have more than one cause, but not in subjects specifically identical. For instance, the cause of longevity in quadrupeds is lack of bile, in birds a dry constitution-or certainly something different.
If immediate premisses are not reached at once, and there is not merely one middle but several middles, i.e. several causes; is the cause of the property’s inherence in the several species the middle which is proximate to the primary universal, or the middle which is proximate to the species? Clearly the cause is that nearest to each species severally in which it is manifested, for that is the cause of the subject’s falling under the universal. To illustrate formally: C is the cause of B’s inherence in D; hence C is the cause of A’s inherence in D, B of A’s inherence in C, while the cause of A’s inherence in B is B itself.
As regards syllogism and demonstration, the definition of, and the conditions required to produce each of them, are now clear, and with that also the definition of, and the conditions required to produce, demonstrative knowledge, since it is the same as demonstration. As to the basic premisses, how they become known and what is the developed state of knowledge of them is made clear by raising some preliminary problems.
We have already said that scientific knowledge through demonstration is impossible unless a man knows the primary immediate premisses. But there are questions which might be raised in respect of the apprehension of these immediate premisses: one might not only ask whether it is of the same kind as the apprehension of the conclusions, but also whether there is or is not scientific knowledge of both; or scientific knowledge of the latter, and of the former a different kind of knowledge; and, further, whether the developed states of knowledge are not innate but come to be in us, or are innate but at first unnoticed. Now it is strange if we possess them from birth; for it means that we possess apprehensions more accurate than demonstration and fail to notice them. If on the other hand we acquire them and do not previously possess them, how could we apprehend and learn without a basis of pre-existent knowledge? For that is impossible, as we used to find in the case of demonstration. So it emerges that neither can we possess them from birth, nor can they come to be in us if we are without knowledge of them to the extent of having no such developed state at all. Therefore we must possess a capacity of some sort, but not such as to rank higher in accuracy than these developed states. And this at least is an obvious characteristic of all animals, for they possess a congenital discriminative capacity which is called sense-perception. But though sense-perception is innate in all animals, in some the sense-impression comes to persist, in others it does not. So animals in which this persistence does not come to be have either no knowledge at all outside the act of perceiving, or no knowledge of objects of which no impression persists; animals in which it does come into being have perception and can continue to retain the sense-impression in the soul: and when such persistence is frequently repeated a further distinction at once arises between those which out of the persistence of such sense-impressions develop a power of systematizing them and those which do not. So out of sense-perception comes to be what we call memory, and out of frequently repeated memories of the same thing develops experience; for a number of memories constitute a single experience. From experience again-i.e. from the universal now stabilized in its entirety within the soul, the one beside the many which is a single identity within them all-originate the skill of the craftsman and the knowledge of the man of science, skill in the sphere of coming to be and science in the sphere of being.
We conclude that these states of knowledge are neither innate in a determinate form, nor developed from other higher states of knowledge, but from sense-perception. It is like a rout in battle stopped by first one man making a stand and then another, until the original formation has been restored. The soul is so constituted as to be capable of this process.
Let us now restate the account given already, though with insufficient clearness. When one of a number of logically indiscriminable particulars has made a stand, the earliest universal is present in the soul: for though the act of sense-perception is of the particular, its content is universal-is man, for example, not the man Callias. A fresh stand is made among these rudimentary universals, and the process does not cease until the indivisible concepts, the true universals, are established: e.g. such and such a species of animal is a step towards the genus animal, which by the same process is a step towards a further generalization.
Thus it is clear that we must get to know the primary premisses by induction; for the method by which even sense-perception implants the universal is inductive. Now of the thinking states by which we grasp truth, some are unfailingly true, others admit of error-opinion, for instance, and calculation, whereas scientific knowing and intuition are always true: further, no other kind of thought except intuition is more accurate than scientific knowledge, whereas primary premisses are more knowable than demonstrations, and all scientific knowledge is discursive. From these considerations it follows that there will be no scientific knowledge of the primary premisses, and since except intuition nothing can be truer than scientific knowledge, it will be intuition that apprehends the primary premisses-a result which also follows from the fact that demonstration cannot be the originative source of demonstration, nor, consequently, scientific knowledge of scientific knowledge.If, therefore, it is the only other kind of true thinking except scientific knowing, intuition will be the originative source of scientific knowledge. And the originative source of science grasps the original basic premiss, while science as a whole is similarly related as originative source to the whole body of fact.
These, then, are the four kinds of question we ask, and it is in the answers to these questions that our knowledge consists.
Now when we ask whether a connexion is a fact, or whether a thing without qualification is, we are really asking whether the connexion or the thing has a ‘middle’; and when we have ascertained either that the connexion is a fact or that the thing is-i.e. ascertained either the partial or the unqualified being of the thing-and are proceeding to ask the reason of the connexion or the nature of the thing, then we are asking what the ‘middle’ is.
(By distinguishing the fact of the connexion and the existence of the thing as respectively the partial and the unqualified being of the thing, I mean that if we ask ‘does the moon suffer eclipse?’, or ‘does the moon wax?’, the question concerns a part of the thing’s being; for what we are asking in such questions is whether a thing is this or that, i.e. has or has not this or that attribute: whereas, if we ask whether the moon or night exists, the question concerns the unqualified being of a thing.)
We conclude that in all our inquiries we are asking either whether there is a ‘middle’ or what the ‘middle’ is: for the ‘middle’ here is precisely the cause, and it is the cause that we seek in all our inquiries. Thus, ‘Does the moon suffer eclipse?’ means ‘Is there or is there not a cause producing eclipse of the moon?’, and when we have learnt that there is, our next question is, ‘What, then, is this cause? for the cause through which a thing is-not is this or that, i.e. has this or that attribute, but without qualification is-and the cause through which it is-not is without qualification, but is this or that as having some essential attribute or some accident-are both alike the middle’. By that which is without qualification I mean the subject, e.g. moon or earth or sun or triangle; by that which a subject is (in the partial sense) I mean a property, e.g. eclipse, equality or inequality, interposition or non-interposition. For in all these examples it is clear that the nature of the thing and the reason of the fact are identical: the question ‘What is eclipse?’ and its answer ‘The privation of the moon’s light by the interposition of the earth’ are identical with the question ‘What is the reason of eclipse?’ or ‘Why does the moon suffer eclipse?’ and the reply ‘Because of the failure of light through the earth’s shutting it out’. Again, for ‘What is a concord? A commensurate numerical ratio of a high and a low note’, we may substitute ‘What ratio makes a high and a low note concordant? Their relation according to a commensurate numerical ratio.’ ‘Are the high and the low note concordant?’ is equivalent to ‘Is their ratio commensurate?’; and when we find that it is commensurate, we ask ‘What, then, is their ratio?’.
Cases in which the ‘middle’ is sensible show that the object of our inquiry is always the ‘middle’: we inquire, because we have not perceived it, whether there is or is not a ‘middle’ causing, e.g. an eclipse. On the other hand, if we were on the moon we should not be inquiring either as to the fact or the reason, but both fact and reason would be obvious simultaneously. For the act of perception would have enabled us to know the universal too; since, the present fact of an eclipse being evident, perception would then at the same time give us the present fact of the earth’s screening the sun’s light, and from this would arise the universal.
Thus, as we maintain, to know a thing’s nature is to know the reason why it is; and this is equally true of things in so far as they are said without qualification to he as opposed to being possessed of some attribute, and in so far as they are said to be possessed of some attribute such as equal to right angles, or greater or less.
It is clear, then, that all questions are a search for a ‘middle’. Let us now state how essential nature is revealed and in what way it can be reduced to demonstration; what definition is, and what things are definable. And let us first discuss certain difficulties which these questions raise, beginning what we have to say with a point most intimately connected with our immediately preceding remarks, namely the doubt that might be felt as to whether or not it is possible to know the same thing in the same relation, both by definition and by demonstration. It might, I mean, be urged that definition is held to concern essential nature and is in every case universal and affirmative; whereas, on the other hand, some conclusions are negative and some are not universal; e.g. all in the second figure are negative, none in the third are universal. And again, not even all affirmative conclusions in the first figure are definable, e.g. ‘every triangle has its angles equal to two right angles’. An argument proving this difference between demonstration and definition is that to have scientific knowledge of the demonstrable is identical with possessing a demonstration of it: hence if demonstration of such conclusions as these is possible, there clearly cannot also be definition of them. If there could, one might know such a conclusion also in virtue of its definition without possessing the demonstration of it; for there is nothing to stop our having the one without the other.
Induction too will sufficiently convince us of this difference; for never yet by defining anything-essential attribute or accident-did we get knowledge of it. Again, if to define is to acquire knowledge of a substance, at any rate such attributes are not substances.
It is evident, then, that not everything demonstrable can be defined. What then? Can everything definable be demonstrated, or not? There is one of our previous arguments which covers this too. Of a single thing qua single there is a single scientific knowledge. Hence, since to know the demonstrable scientifically is to possess the demonstration of it, an impossible consequence will follow:-possession of its definition without its demonstration will give knowledge of the demonstrable.
Moreover, the basic premisses of demonstrations are definitions, and it has already been shown that these will be found indemonstrable; either the basic premisses will be demonstrable and will depend on prior premisses, and the regress will be endless; or the primary truths will be indemonstrable definitions.
But if the definable and the demonstrable are not wholly the same, may they yet be partially the same? Or is that impossible, because there can be no demonstration of the definable? There can be none, because definition is of the essential nature or being of something, and all demonstrations evidently posit and assume the essential nature-mathematical demonstrations, for example, the nature of unity and the odd, and all the other sciences likewise. Moreover, every demonstration proves a predicate of a subject as attaching or as not attaching to it, but in definition one thing is not predicated of another; we do not, e.g. predicate animal of biped nor biped of animal, nor yet figure of plane-plane not being figure nor figure plane. Again, to prove essential nature is not the same as to prove the fact of a connexion. Now definition reveals essential nature, demonstration reveals that a given attribute attaches or does not attach to a given subject; but different things require different demonstrations-unless the one demonstration is related to the other as part to whole. I add this because if all triangles have been proved to possess angles equal to two right angles, then this attribute has been proved to attach to isosceles; for isosceles is a part of which all triangles constitute the whole. But in the case before us the fact and the essential nature are not so related to one another, since the one is not a part of the other.
So it emerges that not all the definable is demonstrable nor all the demonstrable definable; and we may draw the general conclusion that there is no identical object of which it is possible to possess both a definition and a demonstration. It follows obviously that definition and demonstration are neither identical nor contained either within the other: if they were, their objects would be related either as identical or as whole and part.
So much, then, for the first stage of our problem. The next step is to raise the question whether syllogism-i.e. demonstration-of the definable nature is possible or, as our recent argument assumed, impossible.
We might argue it impossible on the following grounds:-(a) syllogism proves an attribute of a subject through the middle term; on the other hand (b) its definable nature is both ‘peculiar’ to a subject and predicated of it as belonging to its essence. But in that case (1) the subject, its definition, and the middle term connecting them must be reciprocally predicable of one another; for if A is to C, obviously A is ‘peculiar’ to B and B to C-in fact all three terms are ‘peculiar’ to one another: and further (2) if A inheres in the essence of all B and B is predicated universally of all C as belonging to C’s essence, A also must be predicated of C as belonging to its essence.
If one does not take this relation as thus duplicated-if, that is, A is predicated as being of the essence of B, but B is not of the essence of the subjects of which it is predicated-A will not necessarily be predicated of C as belonging to its essence. So both premisses will predicate essence, and consequently B also will be predicated of C as its essence. Since, therefore, both premisses do predicate essence-i.e. definable form-C’s definable form will appear in the middle term before the conclusion is drawn.
We may generalize by supposing that it is possible to prove the essential nature of man. Let C be man, A man’s essential nature — two-footed animal, or aught else it may be. Then, if we are to syllogize, A must be predicated of all B. But this premiss will be mediated by a fresh definition, which consequently will also be the essential nature of man. Therefore the argument assumes what it has to prove, since B too is the essential nature of man. It is, however, the case in which there are only the two premisses-i.e. in which the premisses are primary and immediate-which we ought to investigate, because it best illustrates the point under discussion.
Thus they who prove the essential nature of soul or man or anything else through reciprocating terms beg the question. It would be begging the question, for example, to contend that the soul is that which causes its own life, and that what causes its own life is a self-moving number; for one would have to postulate that the soul is a self-moving number in the sense of being identical with it. For if A is predicable as a mere consequent of B and B of C, A will not on that account be the definable form of C: A will merely be what it was true to say of C. Even if A is predicated of all B inasmuch as B is identical with a species of A, still it will not follow: being an animal is predicated of being a man-since it is true that in all instances to be human is to be animal, just as it is also true that every man is an animal-but not as identical with being man.
We conclude, then, that unless one takes both the premisses as predicating essence, one cannot infer that A is the definable form and essence of C: but if one does so take them, in assuming B one will have assumed, before drawing the conclusion, what the definable form of C is; so that there has been no inference, for one has begged the question.
Nor, as was said in my formal logic, is the method of division a process of inference at all, since at no point does the characterization of the subject follow necessarily from the premising of certain other facts: division demonstrates as little as does induction. For in a genuine demonstration the conclusion must not be put as a question nor depend on a concession, but must follow necessarily from its premisses, even if the respondent deny it. The definer asks ‘Is man animal or inanimate?’ and then assumes-he has not inferred-that man is animal. Next, when presented with an exhaustive division of animal into terrestrial and aquatic, he assumes that man is terrestrial. Moreover, that man is the complete formula, terrestrial-animal, does not follow necessarily from the premisses: this too is an assumption, and equally an assumption whether the division comprises many differentiae or few. (Indeed as this method of division is used by those who proceed by it, even truths that can be inferred actually fail to appear as such.) For why should not the whole of this formula be true of man, and yet not exhibit his essential nature or definable form? Again, what guarantee is there against an unessential addition, or against the omission of the final or of an intermediate determinant of the substantial being?
The champion of division might here urge that though these lapses do occur, yet we can solve that difficulty if all the attributes we assume are constituents of the definable form, and if, postulating the genus, we produce by division the requisite uninterrupted sequence of terms, and omit nothing; and that indeed we cannot fail to fulfil these conditions if what is to be divided falls whole into the division at each stage, and none of it is omitted; and that this-the dividendum-must without further question be (ultimately) incapable of fresh specific division. Nevertheless, we reply, division does not involve inference; if it gives knowledge, it gives it in another way. Nor is there any absurdity in this: induction, perhaps, is not demonstration any more than is division, et it does make evident some truth. Yet to state a definition reached by division is not to state a conclusion: as, when conclusions are drawn without their appropriate middles, the alleged necessity by which the inference follows from the premisses is open to a question as to the reason for it, so definitions reached by division invite the same question.
Thus to the question ‘What is the essential nature of man?’ the divider replies ‘Animal, mortal, footed, biped, wingless’; and when at each step he is asked ‘Why?’, he will say, and, as he thinks, proves by division, that all animal is mortal or immortal: but such a formula taken in its entirety is not definition; so that even if division does demonstrate its formula, definition at any rate does not turn out to be a conclusion of inference.
Can we nevertheless actually demonstrate what a thing essentially and substantially is, but hypothetically, i.e. by premising (1) that its definable form is constituted by the ‘peculiar’ attributes of its essential nature; (2) that such and such are the only attributes of its essential nature, and that the complete synthesis of them is peculiar to the thing; and thus-since in this synthesis consists the being of the thing-obtaining our conclusion? Or is the truth that, since proof must be through the middle term, the definable form is once more assumed in this minor premiss too?
Further, just as in syllogizing we do not premise what syllogistic inference is (since the premisses from which we conclude must be related as whole and part), so the definable form must not fall within the syllogism but remain outside the premisses posited. It is only against a doubt as to its having been a syllogistic inference at all that we have to defend our argument as conforming to the definition of syllogism. It is only when some one doubts whether the conclusion proved is the definable form that we have to defend it as conforming to the definition of definable form which we assumed. Hence syllogistic inference must be possible even without the express statement of what syllogism is or what definable form is.
The following type of hypothetical proof also begs the question. If evil is definable as the divisible, and the definition of a thing’s contrary-if it has one the contrary of the thing’s definition; then, if good is the contrary of evil and the indivisible of the divisible, we conclude that to be good is essentially to be indivisible. The question is begged because definable form is assumed as a premiss, and as a premiss which is to prove definable form. ‘But not the same definable form’, you may object. That I admit, for in demonstrations also we premise that ‘this’ is predicable of ‘that’; but in this premiss the term we assert of the minor is neither the major itself nor a term identical in definition, or convertible, with the major.
Again, both proof by division and the syllogism just described are open to the question why man should be animal-biped-terrestrial and not merely animal and terrestrial, since what they premise does not ensure that the predicates shall constitute a genuine unity and not merely belong to a single subject as do musical and grammatical when predicated of the same man.
How then by definition shall we prove substance or essential nature? We cannot show it as a fresh fact necessarily following from the assumption of premisses admitted to be facts-the method of demonstration: we may not proceed as by induction to establish a universal on the evidence of groups of particulars which offer no exception, because induction proves not what the essential nature of a thing is but that it has or has not some attribute. Therefore, since presumably one cannot prove essential nature by an appeal to sense perception or by pointing with the finger, what other method remains?
To put it another way: how shall we by definition prove essential nature? He who knows what human-or any other-nature is, must know also that man exists; for no one knows the nature of what does not exist-one can know the meaning of the phrase or name ‘goat-stag’ but not what the essential nature of a goat-stag is. But further, if definition can prove what is the essential nature of a thing, can it also prove that it exists? And how will it prove them both by the same process, since definition exhibits one single thing and demonstration another single thing, and what human nature is and the fact that man exists are not the same thing? Then too we hold that it is by demonstration that the being of everything must be proved-unless indeed to be were its essence; and, since being is not a genus, it is not the essence of anything. Hence the being of anything as fact is matter for demonstration; and this is the actual procedure of the sciences, for the geometer assumes the meaning of the word triangle, but that it is possessed of some attribute he proves. What is it, then, that we shall prove in defining essential nature? Triangle? In that case a man will know by definition what a thing’s nature is without knowing whether it exists. But that is impossible.
Moreover it is clear, if we consider the methods of defining actually in use, that definition does not prove that the thing defined exists: since even if there does actually exist something which is equidistant from a centre, yet why should the thing named in the definition exist? Why, in other words, should this be the formula defining circle? One might equally well call it the definition of mountain copper. For definitions do not carry a further guarantee that the thing defined can exist or that it is what they claim to define: one can always ask why.
Since, therefore, to define is to prove either a thing’s essential nature or the meaning of its name, we may conclude that definition, if it in no sense proves essential nature, is a set of words signifying precisely what a name signifies. But that were a strange consequence; for (1) both what is not substance and what does not exist at all would be definable, since even non-existents can be signified by a name: (2) all sets of words or sentences would be definitions, since any kind of sentence could be given a name; so that we should all be talking in definitions, and even the Iliad would be a definition: (3) no demonstration can prove that any particular name means any particular thing: neither, therefore, do definitions, in addition to revealing the meaning of a name, also reveal that the name has this meaning. It appears then from these considerations that neither definition and syllogism nor their objects are identical, and further that definition neither demonstrates nor proves anything, and that knowledge of essential nature is not to be obtained either by definition or by demonstration.
We must now start afresh and consider which of these conclusions are sound and which are not, and what is the nature of definition, and whether essential nature is in any sense demonstrable and definable or in none.
Now to know its essential nature is, as we said, the same as to know the cause of a thing’s existence, and the proof of this depends on the fact that a thing must have a cause. Moreover, this cause is either identical with the essential nature of the thing or distinct from it; and if its cause is distinct from it, the essential nature of the thing is either demonstrable or indemonstrable. Consequently, if the cause is distinct from the thing’s essential nature and demonstration is possible, the cause must be the middle term, and, the conclusion proved being universal and affirmative, the proof is in the first figure. So the method just examined of proving it through another essential nature would be one way of proving essential nature, because a conclusion containing essential nature must be inferred through a middle which is an essential nature just as a ‘peculiar’ property must be inferred through a middle which is a ‘peculiar’ property; so that of the two definable natures of a single thing this method will prove one and not the other.
Now it was said before that this method could not amount to demonstration of essential nature-it is actually a dialectical proof of it-so let us begin again and explain by what method it can be demonstrated. When we are aware of a fact we seek its reason, and though sometimes the fact and the reason dawn on us simultaneously, yet we cannot apprehend the reason a moment sooner than the fact; and clearly in just the same way we cannot apprehend a thing’s definable form without apprehending that it exists, since while we are ignorant whether it exists we cannot know its essential nature. Moreover we are aware whether a thing exists or not sometimes through apprehending an element in its character, and sometimes accidentally, as, for example, when we are aware of thunder as a noise in the clouds, of eclipse as a privation of light, or of man as some species of animal, or of the soul as a self-moving thing. As often as we have accidental knowledge that the thing exists, we must be in a wholly negative state as regards awareness of its essential nature; for we have not got genuine knowledge even of its existence, and to search for a thing’s essential nature when we are unaware that it exists is to search for nothing. On the other hand, whenever we apprehend an element in the thing’s character there is less difficulty. Thus it follows that the degree of our knowledge of a thing’s essential nature is determined by the sense in which we are aware that it exists. Let us then take the following as our first instance of being aware of an element in the essential nature. Let A be eclipse, C the moon, B the earth’s acting as a screen. Now to ask whether the moon is eclipsed or not is to ask whether or not B has occurred. But that is precisely the same as asking whether A has a defining condition; and if this condition actually exists, we assert that A also actually exists. Or again we may ask which side of a contradiction the defining condition necessitates: does it make the angles of a triangle equal or not equal to two right angles? When we have found the answer, if the premisses are immediate, we know fact and reason together; if they are not immediate, we know the fact without the reason, as in the following example: let C be the moon, A eclipse, B the fact that the moon fails to produce shadows though she is full and though no visible body intervenes between us and her. Then if B, failure to produce shadows in spite of the absence of an intervening body, is attributable A to C, and eclipse, is attributable to B, it is clear that the moon is eclipsed, but the reason why is not yet clear, and we know that eclipse exists, but we do not know what its essential nature is. But when it is clear that A is attributable to C and we proceed to ask the reason of this fact, we are inquiring what is the nature of B: is it the earth’s acting as a screen, or the moon’s rotation or her extinction? But B is the definition of the other term, viz. in these examples, of the major term A; for eclipse is constituted by the earth acting as a screen. Thus, (1) ‘What is thunder?’ ‘The quenching of fire in cloud’, and (2) ‘Why does it thunder?’ ‘Because fire is quenched in the cloud’, are equivalent. Let C be cloud, A thunder, B the quenching of fire. Then B is attributable to C, cloud, since fire is quenched in it; and A, noise, is attributable to B; and B is assuredly the definition of the major term A. If there be a further mediating cause of B, it will be one of the remaining partial definitions of A.
We have stated then how essential nature is discovered and becomes known, and we see that, while there is no syllogism-i.e. no demonstrative syllogism-of essential nature, yet it is through syllogism, viz. demonstrative syllogism, that essential nature is exhibited. So we conclude that neither can the essential nature of anything which has a cause distinct from itself be known without demonstration, nor can it be demonstrated; and this is what we contended in our preliminary discussions.
Now while some things have a cause distinct from themselves, others have not. Hence it is evident that there are essential natures which are immediate, that is are basic premisses; and of these not only that they are but also what they are must be assumed or revealed in some other way. This too is the actual procedure of the arithmetician, who assumes both the nature and the existence of unit. On the other hand, it is possible (in the manner explained) to exhibit through demonstration the essential nature of things which have a ‘middle’, i.e. a cause of their substantial being other than that being itself; but we do not thereby demonstrate it.
!![[Prior Analytics: Book I]]
{{Prior Analytics: Book I}}
!![[Prior Analytics: Book II]]
{{Prior Analytics: Book II}}
---
!!![[Prior Analytics: Book I: 1]]
{{Prior Analytics: Book I: 1}}
---
!!![[Prior Analytics: Book I: 2]]
{{Prior Analytics: Book I: 2}}
---
!!![[Prior Analytics: Book I: 3]]
{{Prior Analytics: Book I: 3}}
---
!!![[Prior Analytics: Book I: 4]]
{{Prior Analytics: Book I: 4}}
---
!!![[Prior Analytics: Book I: 5]]
{{Prior Analytics: Book I: 5}}
---
!!![[Prior Analytics: Book I: 6]]
{{Prior Analytics: Book I: 6}}
---
!!![[Prior Analytics: Book I: 7]]
{{Prior Analytics: Book I: 7}}
---
!!![[Prior Analytics: Book I: 8]]
{{Prior Analytics: Book I: 8}}
---
!!![[Prior Analytics: Book I: 9]]
{{Prior Analytics: Book I: 9}}
---
!!![[Prior Analytics: Book I: 10]]
{{Prior Analytics: Book I: 10}}
---
!!![[Prior Analytics: Book I: 11]]
{{Prior Analytics: Book I: 11}}
---
!!![[Prior Analytics: Book I: 12]]
{{Prior Analytics: Book I: 12}}
---
!!![[Prior Analytics: Book I: 13]]
{{Prior Analytics: Book I: 13}}
---
!!![[Prior Analytics: Book I: 14]]
{{Prior Analytics: Book I: 14}}
---
!!![[Prior Analytics: Book I: 15]]
{{Prior Analytics: Book I: 15}}
---
!!![[Prior Analytics: Book I: 16]]
{{Prior Analytics: Book I: 16}}
---
!!![[Prior Analytics: Book I: 17]]
{{Prior Analytics: Book I: 17}}
---
!!![[Prior Analytics: Book I: 18]]
{{Prior Analytics: Book I: 18}}
---
!!![[Prior Analytics: Book I: 19]]
{{Prior Analytics: Book I: 19}}
---
!!![[Prior Analytics: Book I: 20]]
{{Prior Analytics: Book I: 20}}
---
!!![[Prior Analytics: Book I: 21]]
{{Prior Analytics: Book I: 21}}
---
!!![[Prior Analytics: Book I: 22]]
{{Prior Analytics: Book I: 22}}
---
!!![[Prior Analytics: Book I: 23]]
{{Prior Analytics: Book I: 23}}
---
!!![[Prior Analytics: Book I: 24]]
{{Prior Analytics: Book I: 24}}
---
!!![[Prior Analytics: Book I: 25]]
{{Prior Analytics: Book I: 25}}
---
!!![[Prior Analytics: Book I: 26]]
{{Prior Analytics: Book I: 26}}
---
!!![[Prior Analytics: Book I: 27]]
{{Prior Analytics: Book I: 27}}
---
!!![[Prior Analytics: Book I: 28]]
{{Prior Analytics: Book I: 28}}
---
!!![[Prior Analytics: Book I: 29]]
{{Prior Analytics: Book I: 29}}
---
!!![[Prior Analytics: Book I: 30]]
{{Prior Analytics: Book I: 30}}
---
!!![[Prior Analytics: Book I: 31]]
{{Prior Analytics: Book I: 31}}
---
!!![[Prior Analytics: Book I: 32]]
{{Prior Analytics: Book I: 32}}
---
!!![[Prior Analytics: Book I: 33]]
{{Prior Analytics: Book I: 33}}
---
!!![[Prior Analytics: Book I: 34]]
{{Prior Analytics: Book I: 34}}
---
!!![[Prior Analytics: Book I: 35]]
{{Prior Analytics: Book I: 35}}
---
!!![[Prior Analytics: Book I: 36]]
{{Prior Analytics: Book I: 36}}
---
!!![[Prior Analytics: Book I: 37]]
{{Prior Analytics: Book I: 37}}
---
!!![[Prior Analytics: Book I: 38]]
{{Prior Analytics: Book I: 38}}
---
!!![[Prior Analytics: Book I: 39]]
{{Prior Analytics: Book I: 39}}
---
!!![[Prior Analytics: Book I: 40]]
{{Prior Analytics: Book I: 40}}
---
!!![[Prior Analytics: Book I: 41]]
{{Prior Analytics: Book I: 41}}
---
!!![[Prior Analytics: Book I: 42]]
{{Prior Analytics: Book I: 42}}
---
!!![[Prior Analytics: Book I: 43]]
{{Prior Analytics: Book I: 43}}
---
!!![[Prior Analytics: Book I: 44]]
{{Prior Analytics: Book I: 44}}
---
!!![[Prior Analytics: Book I: 45]]
{{Prior Analytics: Book I: 45}}
---
!!![[Prior Analytics: Book I: 46]]
{{Prior Analytics: Book I: 46}}
We must first state the subject of our inquiry and the faculty to which it belongs: its subject is demonstration and the faculty that carries it out demonstrative science. We must next define a premiss, a term, and a syllogism, and the nature of a perfect and of an imperfect syllogism; and after that, the inclusion or noninclusion of one term in another as in a whole, and what we mean by predicating one term of all, or none, of another.
A premiss then is a sentence affirming or denying one thing of another. This is either universal or particular or indefinite. By universal I mean the statement that something belongs to all or none of something else; by particular that it belongs to some or not to some or not to all; by indefinite that it does or does not belong, without any mark to show whether it is universal or particular, e.g. ‘contraries are subjects of the same science’, or ‘pleasure is not good’. The demonstrative premiss differs from the dialectical, because the demonstrative premiss is the assertion of one of two contradictory statements (the demonstrator does not ask for his premiss, but lays it down), whereas the dialectical premiss depends on the adversary’s choice between two contradictories. But this will make no difference to the production of a syllogism in either case; for both the demonstrator and the dialectician argue syllogistically after stating that something does or does not belong to something else. Therefore a syllogistic premiss without qualification will be an affirmation or denial of something concerning something else in the way we have described; it will be demonstrative, if it is true and obtained through the first principles of its science; while a dialectical premiss is the giving of a choice between two contradictories, when a man is proceeding by question, but when he is syllogizing it is the assertion of that which is apparent and generally admitted, as has been said in the Topics. The nature then of a premiss and the difference between syllogistic, demonstrative, and dialectical premisses, may be taken as sufficiently defined by us in relation to our present need, but will be stated accurately in the sequel.
I call that a term into which the premiss is resolved, i.e. both the predicate and that of which it is predicated, ‘being’ being added and ‘not being’ removed, or vice versa.
A syllogism is discourse in which, certain things being stated, something other than what is stated follows of necessity from their being so. I mean by the last phrase that they produce the consequence, and by this, that no further term is required from without in order to make the consequence necessary.
I call that a perfect syllogism which needs nothing other than what has been stated to make plain what necessarily follows; a syllogism is imperfect, if it needs either one or more propositions, which are indeed the necessary consequences of the terms set down, but have not been expressly stated as premisses.
That one term should be included in another as in a whole is the same as for the other to be predicated of all of the first. And we say that one term is predicated of all of another, whenever no instance of the subject can be found of which the other term cannot be asserted: ‘to be predicated of none’ must be understood in the same way.
In the second figure, if the negative premiss is necessary, then the conclusion will be necessary, but if the affirmative, not necessary. First let the negative be necessary; let A be possible of no B, and simply belong to C. Since then the negative statement is convertible, B is possible of no A. But A belongs to all C; consequently B is possible of no C. For C falls under A. The same result would be obtained if the minor premiss were negative: for if A is possible be of no C, C is possible of no A: but A belongs to all B, consequently C is possible of none of the Bs: for again we have obtained the first figure. Neither then is B possible of C: for conversion is possible without modifying the relation.
But if the affirmative premiss is necessary, the conclusion will not be necessary. Let A belong to all B necessarily, but to no C simply. If then the negative premiss is converted, the first figure results. But it has been proved in the case of the first figure that if the negative major premiss is not necessary the conclusion will not be necessary either. Therefore the same result will obtain here. Further, if the conclusion is necessary, it follows that C necessarily does not belong to some A. For if B necessarily belongs to no C, C will necessarily belong to no B. But B at any rate must belong to some A, if it is true (as was assumed) that A necessarily belongs to all B. Consequently it is necessary that C does not belong to some A. But nothing prevents such an A being taken that it is possible for C to belong to all of it. Further one might show by an exposition of terms that the conclusion is not necessary without qualification, though it is a necessary conclusion from the premisses. For example let A be animal, B man, C white, and let the premisses be assumed to correspond to what we had before: it is possible that animal should belong to nothing white. Man then will not belong to anything white, but not necessarily: for it is possible for man to be born white, not however so long as animal belongs to nothing white. Consequently under these conditions the conclusion will be necessary, but it is not necessary without qualification.
Similar results will obtain also in particular syllogisms. For whenever the negative premiss is both universal and necessary, then the conclusion will be necessary: but whenever the affirmative premiss is universal, the negative particular, the conclusion will not be necessary. First then let the negative premiss be both universal and necessary: let it be possible for no B that A should belong to it, and let A simply belong to some C. Since the negative statement is convertible, it will be possible for no A that B should belong to it: but A belongs to some C; consequently B necessarily does not belong to some of the Cs. Again let the affirmative premiss be both universal and necessary, and let the major premiss be affirmative. If then A necessarily belongs to all B, but does not belong to some C, it is clear that B will not belong to some C, but not necessarily. For the same terms can be used to demonstrate the point, which were used in the universal syllogisms. Nor again, if the negative statement is necessary but particular, will the conclusion be necessary. The point can be demonstrated by means of the same terms.
In the last figure when the terms are related universally to the middle, and both premisses are affirmative, if one of the two is necessary, then the conclusion will be necessary. But if one is negative, the other affirmative, whenever the negative is necessary the conclusion also will be necessary, but whenever the affirmative is necessary the conclusion will not be necessary. First let both the premisses be affirmative, and let A and B belong to all C, and let AC be necessary. Since then B belongs to all C, C also will belong to some B, because the universal is convertible into the particular: consequently if A belongs necessarily to all C, and C belongs to some B, it is necessary that A should belong to some B also. For B is under C. The first figure then is formed. A similar proof will be given also if BC is necessary. For C is convertible with some A: consequently if B belongs necessarily to all C, it will belong necessarily also to some A.
Again let AC be negative, BC affirmative, and let the negative premiss be necessary. Since then C is convertible with some B, but A necessarily belongs to no C, A will necessarily not belong to some B either: for B is under C. But if the affirmative is necessary, the conclusion will not be necessary. For suppose BC is affirmative and necessary, while AC is negative and not necessary. Since then the affirmative is convertible, C also will belong to some B necessarily: consequently if A belongs to none of the Cs, while C belongs to some of the Bs, A will not belong to some of the Bs-but not of necessity; for it has been proved, in the case of the first figure, that if the negative premiss is not necessary, neither will the conclusion be necessary. Further, the point may be made clear by considering the terms. Let the term A be ‘good’, let that which B signifies be ‘animal’, let the term C be ‘horse’. It is possible then that the term good should belong to no horse, and it is necessary that the term animal should belong to every horse: but it is not necessary that some animal should not be good, since it is possible for every animal to be good. Or if that is not possible, take as the term ‘awake’ or ‘asleep’: for every animal can accept these.
If, then, the premisses are universal, we have stated when the conclusion will be necessary. But if one premiss is universal, the other particular, and if both are affirmative, whenever the universal is necessary the conclusion also must be necessary. The demonstration is the same as before; for the particular affirmative also is convertible. If then it is necessary that B should belong to all C, and A falls under C, it is necessary that B should belong to some A. But if B must belong to some A, then A must belong to some B: for conversion is possible. Similarly also if AC should be necessary and universal: for B falls under C. But if the particular premiss is necessary, the conclusion will not be necessary. Let the premiss BC be both particular and necessary, and let A belong to all C, not however necessarily. If the proposition BC is converted the first figure is formed, and the universal premiss is not necessary, but the particular is necessary. But when the premisses were thus, the conclusion (as we proved was not necessary: consequently it is not here either. Further, the point is clear if we look at the terms. Let A be waking, B biped, and C animal. It is necessary that B should belong to some C, but it is possible for A to belong to C, and that A should belong to B is not necessary. For there is no necessity that some biped should be asleep or awake. Similarly and by means of the same terms proof can be made, should the proposition AC be both particular and necessary.
But if one premiss is affirmative, the other negative, whenever the universal is both negative and necessary the conclusion also will be necessary. For if it is not possible that A should belong to any C, but B belongs to some C, it is necessary that A should not belong to some B. But whenever the affirmative proposition is necessary, whether universal or particular, or the negative is particular, the conclusion will not be necessary. The proof of this by reduction will be the same as before; but if terms are wanted, when the universal affirmative is necessary, take the terms ‘waking’-’animal’-’man’, ‘man’ being middle, and when the affirmative is particular and necessary, take the terms ‘waking’-’animal’-’white’: for it is necessary that animal should belong to some white thing, but it is possible that waking should belong to none, and it is not necessary that waking should not belong to some animal. But when the negative proposition being particular is necessary, take the terms ‘biped’, ‘moving’, ‘animal’, ‘animal’ being middle.
It is clear then that a simple conclusion is not reached unless both premisses are simple assertions, but a necessary conclusion is possible although one only of the premisses is necessary. But in both cases, whether the syllogisms are affirmative or negative, it is necessary that one premiss should be similar to the conclusion. I mean by ‘similar’, if the conclusion is a simple assertion, the premiss must be simple; if the conclusion is necessary, the premiss must be necessary. Consequently this also is clear, that the conclusion will be neither necessary nor simple unless a necessary or simple premiss is assumed.
Perhaps enough has been said about the proof of necessity, how it comes about and how it differs from the proof of a simple statement. We proceed to discuss that which is possible, when and how and by what means it can be proved. I use the terms ‘to be possible’ and ‘the possible’ of that which is not necessary but, being assumed, results in nothing impossible. We say indeed ambiguously of the necessary that it is possible. But that my definition of the possible is correct is clear from the phrases by which we deny or on the contrary affirm possibility. For the expressions ‘it is not possible to belong’, ‘it is impossible to belong’, and ‘it is necessary not to belong’ are either identical or follow from one another; consequently their opposites also, ‘it is possible to belong’, ‘it is not impossible to belong’, and ‘it is not necessary not to belong’, will either be identical or follow from one another. For of everything the affirmation or the denial holds good. That which is possible then will be not necessary and that which is not necessary will be possible. It results that all premisses in the mode of possibility are convertible into one another. I mean not that the affirmative are convertible into the negative, but that those which are affirmative in form admit of conversion by opposition, e.g. ‘it is possible to belong’ may be converted into ‘it is possible not to belong’, and ‘it is possible for A to belong to all B’ into ‘it is possible for A to belong to no B’ or ‘not to all B’, and ‘it is possible for A to belong to some B’ into ‘it is possible for A not to belong to some B’. And similarly the other propositions in this mode can be converted. For since that which is possible is not necessary, and that which is not necessary may possibly not belong, it is clear that if it is possible that A should belong to B, it is possible also that it should not belong to B: and if it is possible that it should belong to all, it is also possible that it should not belong to all. The same holds good in the case of particular affirmations: for the proof is identical. And such premisses are affirmative and not negative; for ‘to be possible’ is in the same rank as ‘to be’, as was said above.
Having made these distinctions we next point out that the expression ‘to be possible’ is used in two ways. In one it means to happen generally and fall short of necessity, e.g. man’s turning grey or growing or decaying, or generally what naturally belongs to a thing (for this has not its necessity unbroken, since man’s existence is not continuous for ever, although if a man does exist, it comes about either necessarily or generally). In another sense the expression means the indefinite, which can be both thus and not thus, e.g. an animal’s walking or an earthquake’s taking place while it is walking, or generally what happens by chance: for none of these inclines by nature in the one way more than in the opposite.
That which is possible in each of its two senses is convertible into its opposite, not however in the same way: but what is natural is convertible because it does not necessarily belong (for in this sense it is possible that a man should not grow grey) and what is indefinite is convertible because it inclines this way no more than that. Science and demonstrative syllogism are not concerned with things which are indefinite, because the middle term is uncertain; but they are concerned with things that are natural, and as a rule arguments and inquiries are made about things which are possible in this sense. Syllogisms indeed can be made about the former, but it is unusual at any rate to inquire about them.
These matters will be treated more definitely in the sequel; our business at present is to state the moods and nature of the syllogism made from possible premisses. The expression ‘it is possible for this to belong to that’ may be understood in two senses: ‘that’ may mean either that to which ‘that’ belongs or that to which it may belong; for the expression ‘A is possible of the subject of B’ means that it is possible either of that of which B is stated or of that of which B may possibly be stated. It makes no difference whether we say, A is possible of the subject of B, or all B admits of A. It is clear then that the expression ‘A may possibly belong to all B’ might be used in two senses. First then we must state the nature and characteristics of the syllogism which arises if B is possible of the subject of C, and A is possible of the subject of B. For thus both premisses are assumed in the mode of possibility; but whenever A is possible of that of which B is true, one premiss is a simple assertion, the other a problematic. Consequently we must start from premisses which are similar in form, as in the other cases.
Whenever A may possibly belong to all B, and B to all C, there will be a perfect syllogism to prove that A may possibly belong to all C. This is clear from the definition: for it was in this way that we explained ‘to be possible for one term to belong to all of another’. Similarly if it is possible for A to belong no B, and for B to belong to all C, then it is possible for A to belong to no C. For the statement that it is possible for A not to belong to that of which B may be true means (as we saw) that none of those things which can possibly fall under the term B is left out of account. But whenever A may belong to all B, and B may belong to no C, then indeed no syllogism results from the premisses assumed, but if the premiss BC is converted after the manner of problematic propositions, the same syllogism results as before. For since it is possible that B should belong to no C, it is possible also that it should belong to all C. This has been stated above. Consequently if B is possible for all C, and A is possible for all B, the same syllogism again results. Similarly if in both the premisses the negative is joined with ‘it is possible’: e.g. if A may belong to none of the Bs, and B to none of the Cs. No syllogism results from the assumed premisses, but if they are converted we shall have the same syllogism as before. It is clear then that if the minor premiss is negative, or if both premisses are negative, either no syllogism results, or if one it is not perfect. For the necessity results from the conversion.
But if one of the premisses is universal, the other particular, when the major premiss is universal there will be a perfect syllogism. For if A is possible for all B, and B for some C, then A is possible for some C. This is clear from the definition of being possible. Again if A may belong to no B, and B may belong to some of the Cs, it is necessary that A may possibly not belong to some of the Cs. The proof is the same as above. But if the particular premiss is negative, and the universal is affirmative, the major still being universal and the minor particular, e.g. A is possible for all B, B may possibly not belong to some C, then a clear syllogism does not result from the assumed premisses, but if the particular premiss is converted and it is laid down that B possibly may belong to some C, we shall have the same conclusion as before, as in the cases given at the beginning.
But if the major premiss is the minor universal, whether both are affirmative, or negative, or different in quality, or if both are indefinite or particular, in no way will a syllogism be possible. For nothing prevents B from reaching beyond A, so that as predicates cover unequal areas. Let C be that by which B extends beyond A. To C it is not possible that A should belong-either to all or to none or to some or not to some, since premisses in the mode of possibility are convertible and it is possible for B to belong to more things than A can. Further, this is obvious if we take terms; for if the premisses are as assumed, the major term is both possible for none of the minor and must belong to all of it. Take as terms common to all the cases under consideration ‘animal’-’white’-’man’, where the major belongs necessarily to the minor; ‘animal’-’white’-’garment’, where it is not possible that the major should belong to the minor. It is clear then that if the terms are related in this manner, no syllogism results. For every syllogism proves that something belongs either simply or necessarily or possibly. It is clear that there is no proof of the first or of the second. For the affirmative is destroyed by the negative, and the negative by the affirmative. There remains the proof of possibility. But this is impossible. For it has been proved that if the terms are related in this manner it is both necessary that the major should belong to all the minor and not possible that it should belong to any. Consequently there cannot be a syllogism to prove the possibility; for the necessary (as we stated) is not possible.
It is clear that if the terms are universal in possible premisses a syllogism always results in the first figure, whether they are affirmative or negative, only a perfect syllogism results in the first case, an imperfect in the second. But possibility must be understood according to the definition laid down, not as covering necessity. This is sometimes forgotten.
If one premiss is a simple proposition, the other a problematic, whenever the major premiss indicates possibility all the syllogisms will be perfect and establish possibility in the sense defined; but whenever the minor premiss indicates possibility all the syllogisms will be imperfect, and those which are negative will establish not possibility according to the definition, but that the major does not necessarily belong to any, or to all, of the minor. For if this is so, we say it is possible that it should belong to none or not to all. Let A be possible for all B, and let B belong to all C. Since C falls under B, and A is possible for all B, clearly it is possible for all C also. So a perfect syllogism results. Likewise if the premiss AB is negative, and the premiss BC is affirmative, the former stating possible, the latter simple attribution, a perfect syllogism results proving that A possibly belongs to no C.
It is clear that perfect syllogisms result if the minor premiss states simple belonging: but that syllogisms will result if the modality of the premisses is reversed, must be proved per impossibile. At the same time it will be evident that they are imperfect: for the proof proceeds not from the premisses assumed. First we must state that if B’s being follows necessarily from A’s being, B’s possibility will follow necessarily from A’s possibility. Suppose, the terms being so related, that A is possible, and B is impossible. If then that which is possible, when it is possible for it to be, might happen, and if that which is impossible, when it is impossible, could not happen, and if at the same time A is possible and B impossible, it would be possible for A to happen without B, and if to happen, then to be. For that which has happened, when it has happened, is. But we must take the impossible and the possible not only in the sphere of becoming, but also in the spheres of truth and predicability, and the various other spheres in which we speak of the possible: for it will be alike in all. Further we must understand the statement that B’s being depends on A’s being, not as meaning that if some single thing A is, B will be: for nothing follows of necessity from the being of some one thing, but from two at least, i.e. when the premisses are related in the manner stated to be that of the syllogism. For if C is predicated of D, and D of F, then C is necessarily predicated of F. And if each is possible, the conclusion also is possible. If then, for example, one should indicate the premisses by A, and the conclusion by B, it would not only result that if A is necessary B is necessary, but also that if A is possible, B is possible.
Since this is proved it is evident that if a false and not impossible assumption is made, the consequence of the assumption will also be false and not impossible: e.g. if A is false, but not impossible, and if B is the consequence of A, B also will be false but not impossible. For since it has been proved that if B’s being is the consequence of A’s being, then B’s possibility will follow from A’s possibility (and A is assumed to be possible), consequently B will be possible: for if it were impossible, the same thing would at the same time be possible and impossible.
Since we have defined these points, let A belong to all B, and B be possible for all C: it is necessary then that should be a possible attribute for all C. Suppose that it is not possible, but assume that B belongs to all C: this is false but not impossible. If then A is not possible for C but B belongs to all C, then A is not possible for all B: for a syllogism is formed in the third degree. But it was assumed that A is a possible attribute for all B. It is necessary then that A is possible for all C. For though the assumption we made is false and not impossible, the conclusion is impossible. It is possible also in the first figure to bring about the impossibility, by assuming that B belongs to C. For if B belongs to all C, and A is possible for all B, then A would be possible for all C. But the assumption was made that A is not possible for all C.
We must understand ‘that which belongs to all’ with no limitation in respect of time, e.g. to the present or to a particular period, but simply without qualification. For it is by the help of such premisses that we make syllogisms, since if the premiss is understood with reference to the present moment, there cannot be a syllogism. For nothing perhaps prevents ‘man’ belonging at a particular time to everything that is moving, i.e. if nothing else were moving: but ‘moving’ is possible for every horse; yet ‘man’ is possible for no horse. Further let the major term be ‘animal’, the middle ‘moving’, the the minor ‘man’. The premisses then will be as before, but the conclusion necessary, not possible. For man is necessarily animal. It is clear then that the universal must be understood simply, without limitation in respect of time.
Again let the premiss AB be universal and negative, and assume that A belongs to no B, but B possibly belongs to all C. These propositions being laid down, it is necessary that A possibly belongs to no C. Suppose that it cannot belong, and that B belongs to C, as above. It is necessary then that A belongs to some B: for we have a syllogism in the third figure: but this is impossible. Thus it will be possible for A to belong to no C; for if at is supposed false, the consequence is an impossible one. This syllogism then does not establish that which is possible according to the definition, but that which does not necessarily belong to any part of the subject (for this is the contradictory of the assumption which was made: for it was supposed that A necessarily belongs to some C, but the syllogism per impossibile establishes the contradictory which is opposed to this). Further, it is clear also from an example that the conclusion will not establish possibility. Let A be ‘raven’, B ‘intelligent’, and C ‘man’. A then belongs to no B: for no intelligent thing is a raven. But B is possible for all C: for every man may possibly be intelligent. But A necessarily belongs to no C: so the conclusion does not establish possibility. But neither is it always necessary. Let A be ‘moving’, B ‘science’, C ‘man’. A then will belong to no B; but B is possible for all C. And the conclusion will not be necessary. For it is not necessary that no man should move; rather it is not necessary that any man should move. Clearly then the conclusion establishes that one term does not necessarily belong to any instance of another term. But we must take our terms better.
If the minor premiss is negative and indicates possibility, from the actual premisses taken there can be no syllogism, but if the problematic premiss is converted, a syllogism will be possible, as before. Let A belong to all B, and let B possibly belong to no C. If the terms are arranged thus, nothing necessarily follows: but if the proposition BC is converted and it is assumed that B is possible for all C, a syllogism results as before: for the terms are in the same relative positions. Likewise if both the relations are negative, if the major premiss states that A does not belong to B, and the minor premiss indicates that B may possibly belong to no C. Through the premisses actually taken nothing necessary results in any way; but if the problematic premiss is converted, we shall have a syllogism. Suppose that A belongs to no B, and B may possibly belong to no C. Through these comes nothing necessary. But if B is assumed to be possible for all C (and this is true) and if the premiss AB remains as before, we shall again have the same syllogism. But if it be assumed that B does not belong to any C, instead of possibly not belonging, there cannot be a syllogism anyhow, whether the premiss AB is negative or affirmative. As common instances of a necessary and positive relation we may take the terms white-animal-snow: of a necessary and negative relation, white-animal-pitch. Clearly then if the terms are universal, and one of the premisses is assertoric, the other problematic, whenever the minor premiss is problematic a syllogism always results, only sometimes it results from the premisses that are taken, sometimes it requires the conversion of one premiss. We have stated when each of these happens and the reason why. But if one of the relations is universal, the other particular, then whenever the major premiss is universal and problematic, whether affirmative or negative, and the particular is affirmative and assertoric, there will be a perfect syllogism, just as when the terms are universal. The demonstration is the same as before. But whenever the major premiss is universal, but assertoric, not problematic, and the minor is particular and problematic, whether both premisses are negative or affirmative, or one is negative, the other affirmative, in all cases there will be an imperfect syllogism. Only some of them will be proved per impossibile, others by the conversion of the problematic premiss, as has been shown above. And a syllogism will be possible by means of conversion when the major premiss is universal and assertoric, whether positive or negative, and the minor particular, negative, and problematic, e.g. if A belongs to all B or to no B, and B may possibly not belong to some C. For if the premiss BC is converted in respect of possibility, a syllogism results. But whenever the particular premiss is assertoric and negative, there cannot be a syllogism. As instances of the positive relation we may take the terms white-animal-snow; of the negative, white-animal-pitch. For the demonstration must be made through the indefinite nature of the particular premiss. But if the minor premiss is universal, and the major particular, whether either premiss is negative or affirmative, problematic or assertoric, nohow is a syllogism possible. Nor is a syllogism possible when the premisses are particular or indefinite, whether problematic or assertoric, or the one problematic, the other assertoric. The demonstration is the same as above. As instances of the necessary and positive relation we may take the terms animal-white-man; of the necessary and negative relation, animal-white-garment. It is evident then that if the major premiss is universal, a syllogism always results, but if the minor is universal nothing at all can ever be proved.
Whenever one premiss is necessary, the other problematic, there will be a syllogism when the terms are related as before; and a perfect syllogism when the minor premiss is necessary. If the premisses are affirmative the conclusion will be problematic, not assertoric, whether the premisses are universal or not: but if one is affirmative, the other negative, when the affirmative is necessary the conclusion will be problematic, not negative assertoric; but when the negative is necessary the conclusion will be problematic negative, and assertoric negative, whether the premisses are universal or not. Possibility in the conclusion must be understood in the same manner as before. There cannot be an inference to the necessary negative proposition: for ‘not necessarily to belong’ is different from ‘necessarily not to belong’.
If the premisses are affirmative, clearly the conclusion which follows is not necessary. Suppose A necessarily belongs to all B, and let B be possible for all C. We shall have an imperfect syllogism to prove that A may belong to all C. That it is imperfect is clear from the proof: for it will be proved in the same manner as above. Again, let A be possible for all B, and let B necessarily belong to all C. We shall then have a syllogism to prove that A may belong to all C, not that A does belong to all C: and it is perfect, not imperfect: for it is completed directly through the original premisses.
But if the premisses are not similar in quality, suppose first that the negative premiss is necessary, and let necessarily A not be possible for any B, but let B be possible for all C. It is necessary then that A belongs to no C. For suppose A to belong to all C or to some C. Now we assumed that A is not possible for any B. Since then the negative proposition is convertible, B is not possible for any A. But A is supposed to belong to all C or to some C. Consequently B will not be possible for any C or for all C. But it was originally laid down that B is possible for all C. And it is clear that the possibility of belonging can be inferred, since the fact of not belonging is inferred. Again, let the affirmative premiss be necessary, and let A possibly not belong to any B, and let B necessarily belong to all C. The syllogism will be perfect, but it will establish a problematic negative, not an assertoric negative. For the major premiss was problematic, and further it is not possible to prove the assertoric conclusion per impossibile. For if it were supposed that A belongs to some C, and it is laid down that A possibly does not belong to any B, no impossible relation between B and C follows from these premisses. But if the minor premiss is negative, when it is problematic a syllogism is possible by conversion, as above; but when it is necessary no syllogism can be formed. Nor again when both premisses are negative, and the minor is necessary. The same terms as before serve both for the positive relation-white-animal-snow, and for the negative relation-white-animal-pitch.
The same relation will obtain in particular syllogisms. Whenever the negative proposition is necessary, the conclusion will be negative assertoric: e.g. if it is not possible that A should belong to any B, but B may belong to some of the Cs, it is necessary that A should not belong to some of the Cs. For if A belongs to all C, but cannot belong to any B, neither can B belong to any A. So if A belongs to all C, to none of the Cs can B belong. But it was laid down that B may belong to some C. But when the particular affirmative in the negative syllogism, e.g. BC the minor premiss, or the universal proposition in the affirmative syllogism, e.g. AB the major premiss, is necessary, there will not be an assertoric conclusion. The demonstration is the same as before. But if the minor premiss is universal, and problematic, whether affirmative or negative, and the major premiss is particular and necessary, there cannot be a syllogism. Premisses of this kind are possible both where the relation is positive and necessary, e.g. animal-white-man, and where it is necessary and negative, e.g. animal-white-garment. But when the universal is necessary, the particular problematic, if the universal is negative we may take the terms animal-white-raven to illustrate the positive relation, or animal-white-pitch to illustrate the negative; and if the universal is affirmative we may take the terms animal-white-swan to illustrate the positive relation, and animal-white-snow to illustrate the negative and necessary relation. Nor again is a syllogism possible when the premisses are indefinite, or both particular. Terms applicable in either case to illustrate the positive relation are animal-white-man: to illustrate the negative, animal-white-inanimate. For the relation of animal to some white, and of white to some inanimate, is both necessary and positive and necessary and negative. Similarly if the relation is problematic: so the terms may be used for all cases.
Clearly then from what has been said a syllogism results or not from similar relations of the terms whether we are dealing with simple existence or necessity, with this exception, that if the negative premiss is assertoric the conclusion is problematic, but if the negative premiss is necessary the conclusion is both problematic and negative assertoric. [It is clear also that all the syllogisms are imperfect and are perfected by means of the figures above mentioned.]
In the second figure whenever both premisses are problematic, no syllogism is possible, whether the premisses are affirmative or negative, universal or particular. But when one premiss is assertoric, the other problematic, if the affirmative is assertoric no syllogism is possible, but if the universal negative is assertoric a conclusion can always be drawn. Similarly when one premiss is necessary, the other problematic. Here also we must understand the term ‘possible’ in the conclusion, in the same sense as before.
First we must point out that the negative problematic proposition is not convertible, e.g. if A may belong to no B, it does not follow that B may belong to no A. For suppose it to follow and assume that B may belong to no A. Since then problematic affirmations are convertible with negations, whether they are contraries or contradictories, and since B may belong to no A, it is clear that B may belong to all A. But this is false: for if all this can be that, it does not follow that all that can be this: consequently the negative proposition is not convertible. Further, these propositions are not incompatible, ‘A may belong to no B’, ‘B necessarily does not belong to some of the As’; e.g. it is possible that no man should be white (for it is also possible that every man should be white), but it is not true to say that it is possible that no white thing should be a man: for many white things are necessarily not men, and the necessary (as we saw) other than the possible.
Moreover it is not possible to prove the convertibility of these propositions by a reductio ad absurdum, i.e. by claiming assent to the following argument: ‘since it is false that B may belong to no A, it is true that it cannot belong to no A, for the one statement is the contradictory of the other. But if this is so, it is true that B necessarily belongs to some of the As: consequently A necessarily belongs to some of the Bs. But this is impossible.’ The argument cannot be admitted, for it does not follow that some A is necessarily B, if it is not possible that no A should be B. For the latter expression is used in two senses, one if A some is necessarily B, another if some A is necessarily not B. For it is not true to say that that which necessarily does not belong to some of the As may possibly not belong to any A, just as it is not true to say that what necessarily belongs to some A may possibly belong to all A. If any one then should claim that because it is not possible for C to belong to all D, it necessarily does not belong to some D, he would make a false assumption: for it does belong to all D, but because in some cases it belongs necessarily, therefore we say that it is not possible for it to belong to all. Hence both the propositions ‘A necessarily belongs to some B’ and ‘A necessarily does not belong to some B’ are opposed to the proposition ‘A belongs to all B’. Similarly also they are opposed to the proposition ‘A may belong to no B’. It is clear then that in relation to what is possible and not possible, in the sense originally defined, we must assume, not that A necessarily belongs to some B, but that A necessarily does not belong to some B. But if this is assumed, no absurdity results: consequently no syllogism. It is clear from what has been said that the negative proposition is not convertible.
This being proved, suppose it possible that A may belong to no B and to all C. By means of conversion no syllogism will result: for the major premiss, as has been said, is not convertible. Nor can a proof be obtained by a reductio ad absurdum: for if it is assumed that B can belong to all C, no false consequence results: for A may belong both to all C and to no C. In general, if there is a syllogism, it is clear that its conclusion will be problematic because neither of the premisses is assertoric; and this must be either affirmative or negative. But neither is possible. Suppose the conclusion is affirmative: it will be proved by an example that the predicate cannot belong to the subject. Suppose the conclusion is negative: it will be proved that it is not problematic but necessary. Let A be white, B man, C horse. It is possible then for A to belong to all of the one and to none of the other. But it is not possible for B to belong nor not to belong to C. That it is not possible for it to belong, is clear. For no horse is a man. Neither is it possible for it not to belong. For it is necessary that no horse should be a man, but the necessary we found to be different from the possible. No syllogism then results. A similar proof can be given if the major premiss is negative, the minor affirmative, or if both are affirmative or negative. The demonstration can be made by means of the same terms. And whenever one premiss is universal, the other particular, or both are particular or indefinite, or in whatever other way the premisses can be altered, the proof will always proceed through the same terms. Clearly then, if both the premisses are problematic, no syllogism results.
But if one premiss is assertoric, the other problematic, if the affirmative is assertoric and the negative problematic no syllogism will be possible, whether the premisses are universal or particular. The proof is the same as above, and by means of the same terms. But when the affirmative premiss is problematic, and the negative assertoric, we shall have a syllogism. Suppose A belongs to no B, but can belong to all C. If the negative proposition is converted, B will belong to no A. But ex hypothesi can belong to all C: so a syllogism is made, proving by means of the first figure that B may belong to no C. Similarly also if the minor premiss is negative. But if both premisses are negative, one being assertoric, the other problematic, nothing follows necessarily from these premisses as they stand, but if the problematic premiss is converted into its complementary affirmative a syllogism is formed to prove that B may belong to no C, as before: for we shall again have the first figure. But if both premisses are affirmative, no syllogism will be possible. This arrangement of terms is possible both when the relation is positive, e.g. health, animal, man, and when it is negative, e.g. health, horse, man.
The same will hold good if the syllogisms are particular. Whenever the affirmative proposition is assertoric, whether universal or particular, no syllogism is possible (this is proved similarly and by the same examples as above), but when the negative proposition is assertoric, a conclusion can be drawn by means of conversion, as before. Again if both the relations are negative, and the assertoric proposition is universal, although no conclusion follows from the actual premisses, a syllogism can be obtained by converting the problematic premiss into its complementary affirmative as before. But if the negative proposition is assertoric, but particular, no syllogism is possible, whether the other premiss is affirmative or negative. Nor can a conclusion be drawn when both premisses are indefinite, whether affirmative or negative, or particular. The proof is the same and by the same terms.
If one of the premisses is necessary, the other problematic, then if the negative is necessary a syllogistic conclusion can be drawn, not merely a negative problematic but also a negative assertoric conclusion; but if the affirmative premiss is necessary, no conclusion is possible. Suppose that A necessarily belongs to no B, but may belong to all C. If the negative premiss is converted B will belong to no A: but A ex hypothesi is capable of belonging to all C: so once more a conclusion is drawn by the first figure that B may belong to no C. But at the same time it is clear that B will not belong to any C. For assume that it does: then if A cannot belong to any B, and B belongs to some of the Cs, A cannot belong to some of the Cs: but ex hypothesi it may belong to all. A similar proof can be given if the minor premiss is negative. Again let the affirmative proposition be necessary, and the other problematic; i.e. suppose that A may belong to no B, but necessarily belongs to all C. When the terms are arranged in this way, no syllogism is possible. For (1) it sometimes turns out that B necessarily does not belong to C. Let A be white, B man, C swan. White then necessarily belongs to swan, but may belong to no man; and man necessarily belongs to no swan; Clearly then we cannot draw a problematic conclusion; for that which is necessary is admittedly distinct from that which is possible. (2) Nor again can we draw a necessary conclusion: for that presupposes that both premisses are necessary, or at any rate the negative premiss. (3) Further it is possible also, when the terms are so arranged, that B should belong to C: for nothing prevents C falling under B, A being possible for all B, and necessarily belonging to C; e.g. if C stands for ‘awake’, B for ‘animal’, A for ‘motion’. For motion necessarily belongs to what is awake, and is possible for every animal: and everything that is awake is animal. Clearly then the conclusion cannot be the negative assertion, if the relation must be positive when the terms are related as above. Nor can the opposite affirmations be established: consequently no syllogism is possible. A similar proof is possible if the major premiss is affirmative.
But if the premisses are similar in quality, when they are negative a syllogism can always be formed by converting the problematic premiss into its complementary affirmative as before. Suppose A necessarily does not belong to B, and possibly may not belong to C: if the premisses are converted B belongs to no A, and A may possibly belong to all C: thus we have the first figure. Similarly if the minor premiss is negative. But if the premisses are affirmative there cannot be a syllogism. Clearly the conclusion cannot be a negative assertoric or a negative necessary proposition because no negative premiss has been laid down either in the assertoric or in the necessary mode. Nor can the conclusion be a problematic negative proposition. For if the terms are so related, there are cases in which B necessarily will not belong to C; e.g. suppose that A is white, B swan, C man. Nor can the opposite affirmations be established, since we have shown a case in which B necessarily does not belong to C. A syllogism then is not possible at all.
Similar relations will obtain in particular syllogisms. For whenever the negative proposition is universal and necessary, a syllogism will always be possible to prove both a problematic and a negative assertoric proposition (the proof proceeds by conversion); but when the affirmative proposition is universal and necessary, no syllogistic conclusion can be drawn. This can be proved in the same way as for universal propositions, and by the same terms. Nor is a syllogistic conclusion possible when both premisses are affirmative: this also may be proved as above. But when both premisses are negative, and the premiss that definitely disconnects two terms is universal and necessary, though nothing follows necessarily from the premisses as they are stated, a conclusion can be drawn as above if the problematic premiss is converted into its complementary affirmative. But if both are indefinite or particular, no syllogism can be formed. The same proof will serve, and the same terms.
It is clear then from what has been said that if the universal and negative premiss is necessary, a syllogism is always possible, proving not merely a negative problematic, but also a negative assertoric proposition; but if the affirmative premiss is necessary no conclusion can be drawn. It is clear too that a syllogism is possible or not under the same conditions whether the mode of the premisses is assertoric or necessary. And it is clear that all the syllogisms are imperfect, and are completed by means of the figures mentioned.
Every premiss states that something either is or must be or may be the attribute of something else; of premisses of these three kinds some are affirmative, others negative, in respect of each of the three modes of attribution; again some affirmative and negative premisses are universal, others particular, others indefinite. It is necessary then that in universal attribution the terms of the negative premiss should be convertible, e.g. if no pleasure is good, then no good will be pleasure; the terms of the affirmative must be convertible, not however, universally, but in part, e.g. if every pleasure,is good, some good must be pleasure; the particular affirmative must convert in part (for if some pleasure is good, then some good will be pleasure); but the particular negative need not convert, for if some animal is not man, it does not follow that some man is not animal.
First then take a universal negative with the terms A and B. If no B is A, neither can any A be B. For if some A (say C) were B, it would not be true that no B is A; for C is a B. But if every B is A then some A is B. For if no A were B, then no B could be A. But we assumed that every B is A. Similarly too, if the premiss is particular. For if some B is A, then some of the As must be B. For if none were, then no B would be A. But if some B is not A, there is no necessity that some of the As should not be B; e.g. let B stand for animal and A for man. Not every animal is a man; but every man is an animal.
In the last figure a syllogism is possible whether both or only one of the premisses is problematic. When the premisses are problematic the conclusion will be problematic; and also when one premiss is problematic, the other assertoric. But when the other premiss is necessary, if it is affirmative the conclusion will be neither necessary or assertoric; but if it is negative the syllogism will result in a negative assertoric proposition, as above. In these also we must understand the expression ‘possible’ in the conclusion in the same way as before.
First let the premisses be problematic and suppose that both A and B may possibly belong to every C. Since then the affirmative proposition is convertible into a particular, and B may possibly belong to every C, it follows that C may possibly belong to some B. So, if A is possible for every C, and C is possible for some of the Bs, then A is possible for some of the Bs. For we have got the first figure. And A if may possibly belong to no C, but B may possibly belong to all C, it follows that A may possibly not belong to some B: for we shall have the first figure again by conversion. But if both premisses should be negative no necessary consequence will follow from them as they are stated, but if the premisses are converted into their corresponding affirmatives there will be a syllogism as before. For if A and B may possibly not belong to C, if ‘may possibly belong’ is substituted we shall again have the first figure by means of conversion. But if one of the premisses is universal, the other particular, a syllogism will be possible, or not, under the arrangement of the terms as in the case of assertoric propositions. Suppose that A may possibly belong to all C, and B to some C. We shall have the first figure again if the particular premiss is converted. For if A is possible for all C, and C for some of the Bs, then A is possible for some of the Bs. Similarly if the proposition BC is universal. Likewise also if the proposition AC is negative, and the proposition BC affirmative: for we shall again have the first figure by conversion. But if both premisses should be negative-the one universal and the other particular-although no syllogistic conclusion will follow from the premisses as they are put, it will follow if they are converted, as above. But when both premisses are indefinite or particular, no syllogism can be formed: for A must belong sometimes to all B and sometimes to no B. To illustrate the affirmative relation take the terms animal-man-white; to illustrate the negative, take the terms horse-man-white — white being the middle term.
If one premiss is pure, the other problematic, the conclusion will be problematic, not pure; and a syllogism will be possible under the same arrangement of the terms as before. First let the premisses be affirmative: suppose that A belongs to all C, and B may possibly belong to all C. If the proposition BC is converted, we shall have the first figure, and the conclusion that A may possibly belong to some of the Bs. For when one of the premisses in the first figure is problematic, the conclusion also (as we saw) is problematic. Similarly if the proposition BC is pure, AC problematic; or if AC is negative, BC affirmative, no matter which of the two is pure; in both cases the conclusion will be problematic: for the first figure is obtained once more, and it has been proved that if one premiss is problematic in that figure the conclusion also will be problematic. But if the minor premiss BC is negative, or if both premisses are negative, no syllogistic conclusion can be drawn from the premisses as they stand, but if they are converted a syllogism is obtained as before.
If one of the premisses is universal, the other particular, then when both are affirmative, or when the universal is negative, the particular affirmative, we shall have the same sort of syllogisms: for all are completed by means of the first figure. So it is clear that we shall have not a pure but a problematic syllogistic conclusion. But if the affirmative premiss is universal, the negative particular, the proof will proceed by a reductio ad impossibile. Suppose that B belongs to all C, and A may possibly not belong to some C: it follows that may possibly not belong to some B. For if A necessarily belongs to all B, and B (as has been assumed) belongs to all C, A will necessarily belong to all C: for this has been proved before. But it was assumed at the outset that A may possibly not belong to some C.
Whenever both premisses are indefinite or particular, no syllogism will be possible. The demonstration is the same as was given in the case of universal premisses, and proceeds by means of the same terms.
If one of the premisses is necessary, the other problematic, when the premisses are affirmative a problematic affirmative conclusion can always be drawn; when one proposition is affirmative, the other negative, if the affirmative is necessary a problematic negative can be inferred; but if the negative proposition is necessary both a problematic and a pure negative conclusion are possible. But a necessary negative conclusion will not be possible, any more than in the other figures. Suppose first that the premisses are affirmative, i.e. that A necessarily belongs to all C, and B may possibly belong to all C. Since then A must belong to all C, and C may belong to some B, it follows that A may (not does) belong to some B: for so it resulted in the first figure. A similar proof may be given if the proposition BC is necessary, and AC is problematic. Again suppose one proposition is affirmative, the other negative, the affirmative being necessary: i.e. suppose A may possibly belong to no C, but B necessarily belongs to all C. We shall have the first figure once more: and-since the negative premiss is problematic-it is clear that the conclusion will be problematic: for when the premisses stand thus in the first figure, the conclusion (as we found) is problematic. But if the negative premiss is necessary, the conclusion will be not only that A may possibly not belong to some B but also that it does not belong to some B. For suppose that A necessarily does not belong to C, but B may belong to all C. If the affirmative proposition BC is converted, we shall have the first figure, and the negative premiss is necessary. But when the premisses stood thus, it resulted that A might possibly not belong to some C, and that it did not belong to some C; consequently here it follows that A does not belong to some B. But when the minor premiss is negative, if it is problematic we shall have a syllogism by altering the premiss into its complementary affirmative, as before; but if it is necessary no syllogism can be formed. For A sometimes necessarily belongs to all B, and sometimes cannot possibly belong to any B. To illustrate the former take the terms sleep-sleeping horse-man; to illustrate the latter take the terms sleep-waking horse-man.
Similar results will obtain if one of the terms is related universally to the middle, the other in part. If both premisses are affirmative, the conclusion will be problematic, not pure; and also when one premiss is negative, the other affirmative, the latter being necessary. But when the negative premiss is necessary, the conclusion also will be a pure negative proposition; for the same kind of proof can be given whether the terms are universal or not. For the syllogisms must be made perfect by means of the first figure, so that a result which follows in the first figure follows also in the third. But when the minor premiss is negative and universal, if it is problematic a syllogism can be formed by means of conversion; but if it is necessary a syllogism is not possible. The proof will follow the same course as where the premisses are universal; and the same terms may be used.
It is clear then in this figure also when and how a syllogism can be formed, and when the conclusion is problematic, and when it is pure. It is evident also that all syllogisms in this figure are imperfect, and that they are made perfect by means of the first figure.
It is clear from what has been said that the syllogisms in these figures are made perfect by means of universal syllogisms in the first figure and are reduced to them. That every syllogism without qualification can be so treated, will be clear presently, when it has been proved that every syllogism is formed through one or other of these figures.
It is necessary that every demonstration and every syllogism should prove either that something belongs or that it does not, and this either universally or in part, and further either ostensively or hypothetically. One sort of hypothetical proof is the reductio ad impossibile. Let us speak first of ostensive syllogisms: for after these have been pointed out the truth of our contention will be clear with regard to those which are proved per impossibile, and in general hypothetically.
If then one wants to prove syllogistically A of B, either as an attribute of it or as not an attribute of it, one must assert something of something else. If now A should be asserted of B, the proposition originally in question will have been assumed. But if A should be asserted of C, but C should not be asserted of anything, nor anything of it, nor anything else of A, no syllogism will be possible. For nothing necessarily follows from the assertion of some one thing concerning some other single thing. Thus we must take another premiss as well. If then A be asserted of something else, or something else of A, or something different of C, nothing prevents a syllogism being formed, but it will not be in relation to B through the premisses taken. Nor when C belongs to something else, and that to something else and so on, no connexion however being made with B, will a syllogism be possible concerning A in its relation to B. For in general we stated that no syllogism can establish the attribution of one thing to another, unless some middle term is taken, which is somehow related to each by way of predication. For the syllogism in general is made out of premisses, and a syllogism referring to this out of premisses with the same reference, and a syllogism relating this to that proceeds through premisses which relate this to that. But it is impossible to take a premiss in reference to B, if we neither affirm nor deny anything of it; or again to take a premiss relating A to B, if we take nothing common, but affirm or deny peculiar attributes of each. So we must take something midway between the two, which will connect the predications, if we are to have a syllogism relating this to that. If then we must take something common in relation to both, and this is possible in three ways (either by predicating A of C, and C of B, or C of both, or both of C), and these are the figures of which we have spoken, it is clear that every syllogism must be made in one or other of these figures. The argument is the same if several middle terms should be necessary to establish the relation to B; for the figure will be the same whether there is one middle term or many.
It is clear then that the ostensive syllogisms are effected by means of the aforesaid figures; these considerations will show that reductiones ad also are effected in the same way. For all who effect an argument per impossibile infer syllogistically what is false, and prove the original conclusion hypothetically when something impossible results from the assumption of its contradictory; e.g. that the diagonal of the square is incommensurate with the side, because odd numbers are equal to evens if it is supposed to be commensurate. One infers syllogistically that odd numbers come out equal to evens, and one proves hypothetically the incommensurability of the diagonal, since a falsehood results through contradicting this. For this we found to be reasoning per impossibile, viz. proving something impossible by means of an hypothesis conceded at the beginning. Consequently, since the falsehood is established in reductions ad impossibile by an ostensive syllogism, and the original conclusion is proved hypothetically, and we have already stated that ostensive syllogisms are effected by means of these figures, it is evident that syllogisms per impossibile also will be made through these figures. Likewise all the other hypothetical syllogisms: for in every case the syllogism leads up to the proposition that is substituted for the original thesis; but the original thesis is reached by means of a concession or some other hypothesis. But if this is true, every demonstration and every syllogism must be formed by means of the three figures mentioned above. But when this has been shown it is clear that every syllogism is perfected by means of the first figure and is reducible to the universal syllogisms in this figure.
Further in every syllogism one of the premisses must be affirmative, and universality must be present: unless one of the premisses is universal either a syllogism will not be possible, or it will not refer to the subject proposed, or the original position will be begged. Suppose we have to prove that pleasure in music is good. If one should claim as a premiss that pleasure is good without adding ‘all’, no syllogism will be possible; if one should claim that some pleasure is good, then if it is different from pleasure in music, it is not relevant to the subject proposed; if it is this very pleasure, one is assuming that which was proposed at the outset to be proved. This is more obvious in geometrical proofs, e.g. that the angles at the base of an isosceles triangle are equal. Suppose the lines A and B have been drawn to the centre. If then one should assume that the angle AC is equal to the angle BD, without claiming generally that angles of semicircles are equal; and again if one should assume that the angle C is equal to the angle D, without the additional assumption that every angle of a segment is equal to every other angle of the same segment; and further if one should assume that when equal angles are taken from the whole angles, which are themselves equal, the remainders E and F are equal, he will beg the thing to be proved, unless he also states that when equals are taken from equals the remainders are equal.
It is clear then that in every syllogism there must be a universal premiss, and that a universal statement is proved only when all the premisses are universal, while a particular statement is proved both from two universal premisses and from one only: consequently if the conclusion is universal, the premisses also must be universal, but if the premisses are universal it is possible that the conclusion may not be universal. And it is clear also that in every syllogism either both or one of the premisses must be like the conclusion. I mean not only in being affirmative or negative, but also in being necessary, pure, problematic. We must consider also the other forms of predication.
It is clear also when a syllogism in general can be made and when it cannot; and when a valid, when a perfect syllogism can be formed; and that if a syllogism is formed the terms must be arranged in one of the ways that have been mentioned.
It is clear too that every demonstration will proceed through three terms and no more, unless the same conclusion is established by different pairs of propositions; e.g. the conclusion E may be established through the propositions A and B, and through the propositions C and D, or through the propositions A and B, or A and C, or B and C. For nothing prevents there being several middles for the same terms. But in that case there is not one but several syllogisms. Or again when each of the propositions A and B is obtained by syllogistic inference, e.g. by means of D and E, and again B by means of F and G. Or one may be obtained by syllogistic, the other by inductive inference. But thus also the syllogisms are many; for the conclusions are many, e.g. A and B and C. But if this can be called one syllogism, not many, the same conclusion may be reached by more than three terms in this way, but it cannot be reached as C is established by means of A and B. Suppose that the proposition E is inferred from the premisses A, B, C, and D. It is necessary then that of these one should be related to another as whole to part: for it has already been proved that if a syllogism is formed some of its terms must be related in this way. Suppose then that A stands in this relation to B. Some conclusion then follows from them. It must either be E or one or other of C and D, or something other than these.
(1) If it is E the syllogism will have A and B for its sole premisses. But if C and D are so related that one is whole, the other part, some conclusion will follow from them also; and it must be either E, or one or other of the propositions A and B, or something other than these. And if it is (i) E, or (ii) A or B, either (i) the syllogisms will be more than one, or (ii) the same thing happens to be inferred by means of several terms only in the sense which we saw to be possible. But if (iii) the conclusion is other than E or A or B, the syllogisms will be many, and unconnected with one another. But if C is not so related to D as to make a syllogism, the propositions will have been assumed to no purpose, unless for the sake of induction or of obscuring the argument or something of the sort.
(2) But if from the propositions A and B there follows not E but some other conclusion, and if from C and D either A or B follows or something else, then there are several syllogisms, and they do not establish the conclusion proposed: for we assumed that the syllogism proved E. And if no conclusion follows from C and D, it turns out that these propositions have been assumed to no purpose, and the syllogism does not prove the original proposition.
So it is clear that every demonstration and every syllogism will proceed through three terms only.
This being evident, it is clear that a syllogistic conclusion follows from two premisses and not from more than two. For the three terms make two premisses, unless a new premiss is assumed, as was said at the beginning, to perfect the syllogisms. It is clear therefore that in whatever syllogistic argument the premisses through which the main conclusion follows (for some of the preceding conclusions must be premisses) are not even in number, this argument either has not been drawn syllogistically or it has assumed more than was necessary to establish its thesis.
If then syllogisms are taken with respect to their main premisses, every syllogism will consist of an even number of premisses and an odd number of terms (for the terms exceed the premisses by one), and the conclusions will be half the number of the premisses. But whenever a conclusion is reached by means of prosyllogisms or by means of several continuous middle terms, e.g. the proposition AB by means of the middle terms C and D, the number of the terms will similarly exceed that of the premisses by one (for the extra term must either be added outside or inserted: but in either case it follows that the relations of predication are one fewer than the terms related), and the premisses will be equal in number to the relations of predication. The premisses however will not always be even, the terms odd; but they will alternate-when the premisses are even, the terms must be odd; when the terms are even, the premisses must be odd: for along with one term one premiss is added, if a term is added from any quarter. Consequently since the premisses were (as we saw) even, and the terms odd, we must make them alternately even and odd at each addition. But the conclusions will not follow the same arrangement either in respect to the terms or to the premisses. For if one term is added, conclusions will be added less by one than the pre-existing terms: for the conclusion is drawn not in relation to the single term last added, but in relation to all the rest, e.g. if to ABC the term D is added, two conclusions are thereby added, one in relation to A, the other in relation to B. Similarly with any further additions. And similarly too if the term is inserted in the middle: for in relation to one term only, a syllogism will not be constructed. Consequently the conclusions will be much more numerous than the terms or the premisses.
Since we understand the subjects with which syllogisms are concerned, what sort of conclusion is established in each figure, and in how many moods this is done, it is evident to us both what sort of problem is difficult and what sort is easy to prove. For that which is concluded in many figures and through many moods is easier; that which is concluded in few figures and through few moods is more difficult to attempt. The universal affirmative is proved by means of the first figure only and by this in only one mood; the universal negative is proved both through the first figure and through the second, through the first in one mood, through the second in two. The particular affirmative is proved through the first and through the last figure, in one mood through the first, in three moods through the last. The particular negative is proved in all the figures, but once in the first, in two moods in the second, in three moods in the third. It is clear then that the universal affirmative is most difficult to establish, most easy to overthrow. In general, universals are easier game for the destroyer than particulars: for whether the predicate belongs to none or not to some, they are destroyed: and the particular negative is proved in all the figures, the universal negative in two. Similarly with universal negatives: the original statement is destroyed, whether the predicate belongs to all or to some: and this we found possible in two figures. But particular statements can be refuted in one way only-by proving that the predicate belongs either to all or to none. But particular statements are easier to establish: for proof is possible in more figures and through more moods. And in general we must not forget that it is possible to refute statements by means of one another, I mean, universal statements by means of particular, and particular statements by means of universal: but it is not possible to establish universal statements by means of particular, though it is possible to establish particular statements by means of universal. At the same time it is evident that it is easier to refute than to establish.
The manner in which every syllogism is produced, the number of the terms and premisses through which it proceeds, the relation of the premisses to one another, the character of the problem proved in each figure, and the number of the figures appropriate to each problem, all these matters are clear from what has been said.
We must now state how we may ourselves always have a supply of syllogisms in reference to the problem proposed and by what road we may reach the principles relative to the problem: for perhaps we ought not only to investigate the construction of syllogisms, but also to have the power of making them.
Of all the things which exist some are such that they cannot be predicated of anything else truly and universally, e.g. Cleon and Callias, i.e. the individual and sensible, but other things may be predicated of them (for each of these is both man and animal); and some things are themselves predicated of others, but nothing prior is predicated of them; and some are predicated of others, and yet others of them, e.g. man of Callias and animal of man. It is clear then that some things are naturally not stated of anything: for as a rule each sensible thing is such that it cannot be predicated of anything, save incidentally: for we sometimes say that that white object is Socrates, or that that which approaches is Callias. We shall explain in another place that there is an upward limit also to the process of predicating: for the present we must assume this. Of these ultimate predicates it is not possible to demonstrate another predicate, save as a matter of opinion, but these may be predicated of other things. Neither can individuals be predicated of other things, though other things can be predicated of them. Whatever lies between these limits can be spoken of in both ways: they may be stated of others, and others stated of them. And as a rule arguments and inquiries are concerned with these things. We must select the premisses suitable to each problem in this manner: first we must lay down the subject and the definitions and the properties of the thing; next we must lay down those attributes which follow the thing, and again those which the thing follows, and those which cannot belong to it. But those to which it cannot belong need not be selected, because the negative statement implied above is convertible. Of the attributes which follow we must distinguish those which fall within the definition, those which are predicated as properties, and those which are predicated as accidents, and of the latter those which apparently and those which really belong. The larger the supply a man has of these, the more quickly will he reach a conclusion; and in proportion as he apprehends those which are truer, the more cogently will he demonstrate. But he must select not those which follow some particular but those which follow the thing as a whole, e.g. not what follows a particular man but what follows every man: for the syllogism proceeds through universal premisses. If the statement is indefinite, it is uncertain whether the premiss is universal, but if the statement is definite, the matter is clear. Similarly one must select those attributes which the subject follows as wholes, for the reason given. But that which follows one must not suppose to follow as a whole, e.g. that every animal follows man or every science music, but only that it follows, without qualification, and indeed we state it in a proposition: for the other statement is useless and impossible, e.g. that every man is every animal or justice is all good. But that which something follows receives the mark ‘every’. Whenever the subject, for which we must obtain the attributes that follow, is contained by something else, what follows or does not follow the highest term universally must not be selected in dealing with the subordinate term (for these attributes have been taken in dealing with the superior term; for what follows animal also follows man, and what does not belong to animal does not belong to man); but we must choose those attributes which are peculiar to each subject. For some things are peculiar to the species as distinct from the genus; for species being distinct there must be attributes peculiar to each. Nor must we take as things which the superior term follows, those things which the inferior term follows, e.g. take as subjects of the predicate ‘animal’ what are really subjects of the predicate ‘man’. It is necessary indeed, if animal follows man, that it should follow all these also. But these belong more properly to the choice of what concerns man. One must apprehend also normal consequents and normal antecedents-, for propositions which obtain normally are established syllogistically from premisses which obtain normally, some if not all of them having this character of normality. For the conclusion of each syllogism resembles its principles. We must not however choose attributes which are consequent upon all the terms: for no syllogism can be made out of such premisses. The reason why this is so will be clear in the sequel.
If men wish to establish something about some whole, they must look to the subjects of that which is being established (the subjects of which it happens to be asserted), and the attributes which follow that of which it is to be predicated. For if any of these subjects is the same as any of these attributes, the attribute originally in question must belong to the subject originally in question. But if the purpose is to establish not a universal but a particular proposition, they must look for the terms of which the terms in question are predicable: for if any of these are identical, the attribute in question must belong to some of the subject in question. Whenever the one term has to belong to none of the other, one must look to the consequents of the subject, and to those attributes which cannot possibly be present in the predicate in question: or conversely to the attributes which cannot possibly be present in the subject, and to the consequents of the predicate. If any members of these groups are identical, one of the terms in question cannot possibly belong to any of the other. For sometimes a syllogism in the first figure results, sometimes a syllogism in the second. But if the object is to establish a particular negative proposition, we must find antecedents of the subject in question and attributes which cannot possibly belong to the predicate in question. If any members of these two groups are identical, it follows that one of the terms in question does not belong to some of the other. Perhaps each of these statements will become clearer in the following way. Suppose the consequents of A are designated by B, the antecedents of A by C, attributes which cannot possibly belong to A by D. Suppose again that the attributes of E are designated by F, the antecedents of E by G, and attributes which cannot belong to E by H. If then one of the Cs should be identical with one of the Fs, A must belong to all E: for F belongs to all E, and A to all C, consequently A belongs to all E. If C and G are identical, A must belong to some of the Es: for A follows C, and E follows all G. If F and D are identical, A will belong to none of the Es by a prosyllogism: for since the negative proposition is convertible, and F is identical with D, A will belong to none of the Fs, but F belongs to all E. Again, if B and H are identical, A will belong to none of the Es: for B will belong to all A, but to no E: for it was assumed to be identical with H, and H belonged to none of the Es. If D and G are identical, A will not belong to some of the Es: for it will not belong to G, because it does not belong to D: but G falls under E: consequently A will not belong to some of the Es. If B is identical with G, there will be a converted syllogism: for E will belong to all A since B belongs to A and E to B (for B was found to be identical with G): but that A should belong to all E is not necessary, but it must belong to some E because it is possible to convert the universal statement into a particular.
It is clear then that in every proposition which requires proof we must look to the aforesaid relations of the subject and predicate in question: for all syllogisms proceed through these. But if we are seeking consequents and antecedents we must look for those which are primary and most universal, e.g. in reference to E we must look to KF rather than to F alone, and in reference to A we must look to KC rather than to C alone. For if A belongs to KF, it belongs both to F and to E: but if it does not follow KF, it may yet follow F. Similarly we must consider the antecedents of A itself: for if a term follows the primary antecedents, it will follow those also which are subordinate, but if it does not follow the former, it may yet follow the latter.
It is clear too that the inquiry proceeds through the three terms and the two premisses, and that all the syllogisms proceed through the aforesaid figures. For it is proved that A belongs to all E, whenever an identical term is found among the Cs and Fs. This will be the middle term; A and E will be the extremes. So the first figure is formed. And A will belong to some E, whenever C and G are apprehended to be the same. This is the last figure: for G becomes the middle term. And A will belong to no E, when D and F are identical. Thus we have both the first figure and the middle figure; the first, because A belongs to no F, since the negative statement is convertible, and F belongs to all E: the middle figure because D belongs to no A, and to all E. And A will not belong to some E, whenever D and G are identical. This is the last figure: for A will belong to no G, and E will belong to all G. Clearly then all syllogisms proceed through the aforesaid figures, and we must not select consequents of all the terms, because no syllogism is produced from them. For (as we saw) it is not possible at all to establish a proposition from consequents, and it is not possible to refute by means of a consequent of both the terms in question: for the middle term must belong to the one, and not belong to the other.
It is clear too that other methods of inquiry by selection of middle terms are useless to produce a syllogism, e.g. if the consequents of the terms in question are identical, or if the antecedents of A are identical with those attributes which cannot possibly belong to E, or if those attributes are identical which cannot belong to either term: for no syllogism is produced by means of these. For if the consequents are identical, e.g. B and F, we have the middle figure with both premisses affirmative: if the antecedents of A are identical with attributes which cannot belong to E, e.g. C with H, we have the first figure with its minor premiss negative. If attributes which cannot belong to either term are identical, e.g. C and H, both premisses are negative, either in the first or in the middle figure. But no syllogism is possible in this way.
It is evident too that we must find out which terms in this inquiry are identical, not which are different or contrary, first because the object of our investigation is the middle term, and the middle term must be not diverse but identical. Secondly, wherever it happens that a syllogism results from taking contraries or terms which cannot belong to the same thing, all arguments can be reduced to the aforesaid moods, e.g. if B and F are contraries or cannot belong to the same thing. For if these are taken, a syllogism will be formed to prove that A belongs to none of the Es, not however from the premisses taken but in the aforesaid mood. For B will belong to all A and to no E. Consequently B must be identical with one of the Hs. Again, if B and G cannot belong to the same thing, it follows that A will not belong to some of the Es: for then too we shall have the middle figure: for B will belong to all A and to no G. Consequently B must be identical with some of the Hs. For the fact that B and G cannot belong to the same thing differs in no way from the fact that B is identical with some of the Hs: for that includes everything which cannot belong to E.
It is clear then that from the inquiries taken by themselves no syllogism results; but if B and F are contraries B must be identical with one of the Hs, and the syllogism results through these terms. It turns out then that those who inquire in this manner are looking gratuitously for some other way than the necessary way because they have failed to observe the identity of the Bs with the Hs.
Syllogisms which lead to impossible conclusions are similar to ostensive syllogisms; they also are formed by means of the consequents and antecedents of the terms in question. In both cases the same inquiry is involved. For what is proved ostensively may also be concluded syllogistically per impossibile by means of the same terms; and what is proved per impossibile may also be proved ostensively, e.g. that A belongs to none of the Es. For suppose A to belong to some E: then since B belongs to all A and A to some of the Es, B will belong to some of the Es: but it was assumed that it belongs to none. Again we may prove that A belongs to some E: for if A belonged to none of the Es, and E belongs to all G, A will belong to none of the Gs: but it was assumed to belong to all. Similarly with the other propositions requiring proof. The proof per impossibile will always and in all cases be from the consequents and antecedents of the terms in question. Whatever the problem the same inquiry is necessary whether one wishes to use an ostensive syllogism or a reduction to impossibility. For both the demonstrations start from the same terms, e.g. suppose it has been proved that A belongs to no E, because it turns out that otherwise B belongs to some of the Es and this is impossible-if now it is assumed that B belongs to no E and to all A, it is clear that A will belong to no E. Again if it has been proved by an ostensive syllogism that A belongs to no E, assume that A belongs to some E and it will be proved per impossibile to belong to no E. Similarly with the rest. In all cases it is necessary to find some common term other than the subjects of inquiry, to which the syllogism establishing the false conclusion may relate, so that if this premiss is converted, and the other remains as it is, the syllogism will be ostensive by means of the same terms. For the ostensive syllogism differs from the reductio ad impossibile in this: in the ostensive syllogism both remisses are laid down in accordance with the truth, in the reductio ad impossibile one of the premisses is assumed falsely.
These points will be made clearer by the sequel, when we discuss the reduction to impossibility: at present this much must be clear, that we must look to terms of the kinds mentioned whether we wish to use an ostensive syllogism or a reduction to impossibility. In the other hypothetical syllogisms, I mean those which proceed by substitution, or by positing a certain quality, the inquiry will be directed to the terms of the problem to be proved-not the terms of the original problem, but the new terms introduced; and the method of the inquiry will be the same as before. But we must consider and determine in how many ways hypothetical syllogisms are possible.
Each of the problems then can be proved in the manner described; but it is possible to establish some of them syllogistically in another way, e.g. universal problems by the inquiry which leads up to a particular conclusion, with the addition of an hypothesis. For if the Cs and the Gs should be identical, but E should be assumed to belong to the Gs only, then A would belong to every E: and again if the Ds and the Gs should be identical, but E should be predicated of the Gs only, it follows that A will belong to none of the Es. Clearly then we must consider the matter in this way also. The method is the same whether the relation is necessary or possible. For the inquiry will be the same, and the syllogism will proceed through terms arranged in the same order whether a possible or a pure proposition is proved. We must find in the case of possible relations, as well as terms that belong, terms which can belong though they actually do not: for we have proved that the syllogism which establishes a possible relation proceeds through these terms as well. Similarly also with the other modes of predication.
It is clear then from what has been said not only that all syllogisms can be formed in this way, but also that they cannot be formed in any other. For every syllogism has been proved to be formed through one of the aforementioned figures, and these cannot be composed through other terms than the consequents and antecedents of the terms in question: for from these we obtain the premisses and find the middle term. Consequently a syllogism cannot be formed by means of other terms.
The same manner of conversion will hold good also in respect of necessary premisses. The universal negative converts universally; each of the affirmatives converts into a particular. If it is necessary that no B is A, it is necessary also that no A is B. For if it is possible that some A is B, it would be possible also that some B is A. If all or some B is A of necessity, it is necessary also that some A is B: for if there were no necessity, neither would some of the Bs be A necessarily. But the particular negative does not convert, for the same reason which we have already stated.
In respect of possible premisses, since possibility is used in several senses (for we say that what is necessary and what is not necessary and what is potential is possible), affirmative statements will all convert in a manner similar to those described. For if it is possible that all or some B is A, it will be possible that some A is B. For if that were not possible, then no B could possibly be A. This has been already proved. But in negative statements the case is different. Whatever is said to be possible, either because B necessarily is A, or because B is not necessarily A, admits of conversion like other negative statements, e.g. if one should say, it is possible that man is not horse, or that no garment is white. For in the former case the one term necessarily does not belong to the other; in the latter there is no necessity that it should: and the premiss converts like other negative statements. For if it is possible for no man to be a horse, it is also admissible for no horse to be a man; and if it is admissible for no garment to be white, it is also admissible for nothing white to be a garment. For if any white thing must be a garment, then some garment will necessarily be white. This has been already proved. The particular negative also must be treated like those dealt with above. But if anything is said to be possible because it is the general rule and natural (and it is in this way we define the possible), the negative premisses can no longer be converted like the simple negatives; the universal negative premiss does not convert, and the particular does. This will be plain when we speak about the possible. At present we may take this much as clear in addition to what has been said: the statement that it is possible that no B is A or some B is not A is affirmative in form: for the expression ‘is possible’ ranks along with ‘is’, and ‘is’ makes an affirmation always and in every case, whatever the terms to which it is added, in predication, e.g. ‘it is not-good’ or ‘it is not-white’ or in a word ‘it is not-this’. But this also will be proved in the sequel. In conversion these premisses will behave like the other affirmative propositions.
The method is the same in all cases, in philosophy, in any art or study. We must look for the attributes and the subjects of both our terms, and we must supply ourselves with as many of these as possible, and consider them by means of the three terms, refuting statements in one way, confirming them in another, in the pursuit of truth starting from premisses in which the arrangement of the terms is in accordance with truth, while if we look for dialectical syllogisms we must start from probable premisses. The principles of syllogisms have been stated in general terms, both how they are characterized and how we must hunt for them, so as not to look to everything that is said about the terms of the problem or to the same points whether we are confirming or refuting, or again whether we are confirming of all or of some, and whether we are refuting of all or some. we must look to fewer points and they must be definite. We have also stated how we must select with reference to everything that is, e.g. about good or knowledge. But in each science the principles which are peculiar are the most numerous. Consequently it is the business of experience to give the principles which belong to each subject. I mean for example that astronomical experience supplies the principles of astronomical science: for once the phenomena were adequately apprehended, the demonstrations of astronomy were discovered. Similarly with any other art or science. Consequently, if the attributes of the thing are apprehended, our business will then be to exhibit readily the demonstrations. For if none of the true attributes of things had been omitted in the historical survey, we should be able to discover the proof and demonstrate everything which admitted of proof, and to make that clear, whose nature does not admit of proof.
In general then we have explained fairly well how we must select premisses: we have discussed the matter accurately in the treatise concerning dialectic.
It is easy to see that division into classes is a small part of the method we have described: for division is, so to speak, a weak syllogism; for what it ought to prove, it begs, and it always establishes something more general than the attribute in question. First, this very point had escaped all those who used the method of division; and they attempted to persuade men that it was possible to make a demonstration of substance and essence. Consequently they did not understand what it is possible to prove syllogistically by division, nor did they understand that it was possible to prove syllogistically in the manner we have described. In demonstrations, when there is a need to prove a positive statement, the middle term through which the syllogism is formed must always be inferior to and not comprehend the first of the extremes. But division has a contrary intention: for it takes the universal as middle. Let animal be the term signified by A, mortal by B, and immortal by C, and let man, whose definition is to be got, be signified by D. The man who divides assumes that every animal is either mortal or immortal: i.e. whatever is A is all either B or C. Again, always dividing, he lays it down that man is an animal, so he assumes A of D as belonging to it. Now the true conclusion is that every D is either B or C, consequently man must be either mortal or immortal, but it is not necessary that man should be a mortal animal-this is begged: and this is what ought to have been proved syllogistically. And again, taking A as mortal animal, B as footed, C as footless, and D as man, he assumes in the same way that A inheres either in B or in C (for every mortal animal is either footed or footless), and he assumes A of D (for he assumed man, as we saw, to be a mortal animal); consequently it is necessary that man should be either a footed or a footless animal; but it is not necessary that man should be footed: this he assumes: and it is just this again which he ought to have demonstrated. Always dividing then in this way it turns out that these logicians assume as middle the universal term, and as extremes that which ought to have been the subject of demonstration and the differentiae. In conclusion, they do not make it clear, and show it to be necessary, that this is man or whatever the subject of inquiry may be: for they pursue the other method altogether, never even suspecting the presence of the rich supply of evidence which might be used. It is clear that it is neither possible to refute a statement by this method of division, nor to draw a conclusion about an accident or property of a thing, nor about its genus, nor in cases in which it is unknown whether it is thus or thus, e.g. whether the diagonal is incommensurate. For if he assumes that every length is either commensurate or incommensurate, and the diagonal is a length, he has proved that the diagonal is either incommensurate or commensurate. But if he should assume that it is incommensurate, he will have assumed what he ought to have proved. He cannot then prove it: for this is his method, but proof is not possible by this method. Let A stand for ‘incommensurate or commensurate’, B for ‘length’, C for ‘diagonal’. It is clear then that this method of investigation is not suitable for every inquiry, nor is it useful in those cases in which it is thought to be most suitable.
From what has been said it is clear from what elements demonstrations are formed and in what manner, and to what points we must look in each problem.
Our next business is to state how we can reduce syllogisms to the aforementioned figures: for this part of the inquiry still remains. If we should investigate the production of the syllogisms and had the power of discovering them, and further if we could resolve the syllogisms produced into the aforementioned figures, our original problem would be brought to a conclusion. It will happen at the same time that what has been already said will be confirmed and its truth made clearer by what we are about to say. For everything that is true must in every respect agree with itself First then we must attempt to select the two premisses of the syllogism (for it is easier to divide into large parts than into small, and the composite parts are larger than the elements out of which they are made); next we must inquire which are universal and which particular, and if both premisses have not been stated, we must ourselves assume the one which is missing. For sometimes men put forward the universal premiss, but do not posit the premiss which is contained in it, either in writing or in discussion: or men put forward the premisses of the principal syllogism, but omit those through which they are inferred, and invite the concession of others to no purpose. We must inquire then whether anything unnecessary has been assumed, or anything necessary has been omitted, and we must posit the one and take away the other, until we have reached the two premisses: for unless we have these, we cannot reduce arguments put forward in the way described. In some arguments it is easy to see what is wanting, but some escape us, and appear to be syllogisms, because something necessary results from what has been laid down, e.g. if the assumptions were made that substance is not annihilated by the annihilation of what is not substance, and that if the elements out of which a thing is made are annihilated, then that which is made out of them is destroyed: these propositions being laid down, it is necessary that any part of substance is substance; this has not however been drawn by syllogism from the propositions assumed, but premisses are wanting. Again if it is necessary that animal should exist, if man does, and that substance should exist, if animal does, it is necessary that substance should exist if man does: but as yet the conclusion has not been drawn syllogistically: for the premisses are not in the shape we required. We are deceived in such cases because something necessary results from what is assumed, since the syllogism also is necessary. But that which is necessary is wider than the syllogism: for every syllogism is necessary, but not everything which is necessary is a syllogism. Consequently, though something results when certain propositions are assumed, we must not try to reduce it directly, but must first state the two premisses, then divide them into their terms. We must take that term as middle which is stated in both the remisses: for it is necessary that the middle should be found in both premisses in all the figures.
If then the middle term is a predicate and a subject of predication, or if it is a predicate, and something else is denied of it, we shall have the first figure: if it both is a predicate and is denied of something, the middle figure: if other things are predicated of it, or one is denied, the other predicated, the last figure. For it was thus that we found the middle term placed in each figure. It is placed similarly too if the premisses are not universal: for the middle term is determined in the same way. Clearly then, if the same term is not stated more than once in the course of an argument, a syllogism cannot be made: for a middle term has not been taken. Since we know what sort of thesis is established in each figure, and in which the universal, in what sort the particular is described, clearly we must not look for all the figures, but for that which is appropriate to the thesis in hand. If the thesis is established in more figures than one, we shall recognize the figure by the position of the middle term.
Men are frequently deceived about syllogisms because the inference is necessary, as has been said above; sometimes they are deceived by the similarity in the positing of the terms; and this ought not to escape our notice. E.g. if A is stated of B, and B of C: it would seem that a syllogism is possible since the terms stand thus: but nothing necessary results, nor does a syllogism. Let A represent the term ‘being eternal’, B ‘Aristomenes as an object of thought’, C ‘Aristomenes’. It is true then that A belongs to B. For Aristomenes as an object of thought is eternal. But B also belongs to C: for Aristomenes is Aristomenes as an object of thought. But A does not belong to C: for Aristomenes is perishable. For no syllogism was made although the terms stood thus: that required that the premiss AB should be stated universally. But this is false, that every Aristomenes who is an object of thought is eternal, since Aristomenes is perishable. Again let C stand for ‘Miccalus’, B for ‘musical Miccalus’, A for ‘perishing to-morrow’. It is true to predicate B of C: for Miccalus is musical Miccalus. Also A can be predicated of B: for musical Miccalus might perish to-morrow. But to state A of C is false at any rate. This argument then is identical with the former; for it is not true universally that musical Miccalus perishes to-morrow: but unless this is assumed, no syllogism (as we have shown) is possible.
This deception then arises through ignoring a small distinction. For if we accept the conclusion as though it made no difference whether we said ‘This belong to that’ or ‘This belongs to all of that’.
Men will frequently fall into fallacies through not setting out the terms of the premiss well, e.g. suppose A to be health, B disease, C man. It is true to say that A cannot belong to any B (for health belongs to no disease) and again that B belongs to every C (for every man is capable of disease). It would seem to follow that health cannot belong to any man. The reason for this is that the terms are not set out well in the statement, since if the things which are in the conditions are substituted, no syllogism can be made, e.g. if ‘healthy’ is substituted for ‘health’ and ‘diseased’ for ‘disease’. For it is not true to say that being healthy cannot belong to one who is diseased. But unless this is assumed no conclusion results, save in respect of possibility: but such a conclusion is not impossible: for it is possible that health should belong to no man. Again the fallacy may occur in a similar way in the middle figure: ‘it is not possible that health should belong to any disease, but it is possible that health should belong to every man, consequently it is not possible that disease should belong to any man’. In the third figure the fallacy results in reference to possibility. For health and diseae and knowledge and ignorance, and in general contraries, may possibly belong to the same thing, but cannot belong to one another. This is not in agreement with what was said before: for we stated that when several things could belong to the same thing, they could belong to one another.
It is evident then that in all these cases the fallacy arises from the setting out of the terms: for if the things that are in the conditions are substituted, no fallacy arises. It is clear then that in such premisses what possesses the condition ought always to be substituted for the condition and taken as the term.
We must not always seek to set out the terms a single word: for we shall often have complexes of words to which a single name is not given. Hence it is difficult to reduce syllogisms with such terms. Sometimes too fallacies will result from such a search, e.g. the belief that syllogism can establish that which has no mean. Let A stand for two right angles, B for triangle, C for isosceles triangle. A then belongs to C because of B: but A belongs to B without the mediation of another term: for the triangle in virtue of its own nature contains two right angles, consequently there will be no middle term for the proposition AB, although it is demonstrable. For it is clear that the middle must not always be assumed to be an individual thing, but sometimes a complex of words, as happens in the case mentioned.
That the first term belongs to the middle, and the middle to the extreme, must not be understood in the sense that they can always be predicated of one another or that the first term will be predicated of the middle in the same way as the middle is predicated of the last term. The same holds if the premisses are negative. But we must suppose the verb ‘to belong’ to have as many meanings as the senses in which the verb ‘to be’ is used, and in which the assertion that a thing ‘is’ may be said to be true. Take for example the statement that there is a single science of contraries. Let A stand for ‘there being a single science’, and B for things which are contrary to one another. Then A belongs to B, not in the sense that contraries are the fact of there being a single science of them, but in the sense that it is true to say of the contraries that there is a single science of them.
It happens sometimes that the first term is stated of the middle, but the middle is not stated of the third term, e.g. if wisdom is knowledge, and wisdom is of the good, the conclusion is that there is knowledge of the good. The good then is not knowledge, though wisdom is knowledge. Sometimes the middle term is stated of the third, but the first is not stated of the middle, e.g. if there is a science of everything that has a quality, or is a contrary, and the good both is a contrary and has a quality, the conclusion is that there is a science of the good, but the good is not science, nor is that which has a quality or is a contrary, though the good is both of these. Sometimes neither the first term is stated of the middle, nor the middle of the third, while the first is sometimes stated of the third, and sometimes not: e.g. if there is a genus of that of which there is a science, and if there is a science of the good, we conclude that there is a genus of the good. But nothing is predicated of anything. And if that of which there is a science is a genus, and if there is a science of the good, we conclude that the good is a genus. The first term then is predicated of the extreme, but in the premisses one thing is not stated of another.
The same holds good where the relation is negative. For ‘that does not belong to this’ does not always mean that ‘this is not that’, but sometimes that ‘this is not of that’ or ‘for that’, e.g. ‘there is not a motion of a motion or a becoming of a becoming, but there is a becoming of pleasure: so pleasure is not a becoming.’ Or again it may be said that there is a sign of laughter, but there is not a sign of a sign, consequently laughter is not a sign. This holds in the other cases too, in which the thesis is refuted because the genus is asserted in a particular way, in relation to the terms of the thesis. Again take the inference ‘opportunity is not the right time: for opportunity belongs to God, but the right time does not, since nothing is useful to God’. We must take as terms opportunity-right time-God: but the premiss must be understood according to the case of the noun. For we state this universally without qualification, that the terms ought always to be stated in the nominative, e.g. man, good, contraries, not in oblique cases, e.g. of man, of a good, of contraries, but the premisses ought to be understood with reference to the cases of each term-either the dative, e.g. ‘equal to this’, or the genitive, e.g. ‘double of this’, or the accusative, e.g. ‘that which strikes or sees this’, or the nominative, e.g. ‘man is an animal’, or in whatever other way the word falls in the premiss.
The expressions ‘this belongs to that’ and ‘this holds true of that’ must be understood in as many ways as there are different categories, and these categories must be taken either with or without qualification, and further as simple or compound: the same holds good of the corresponding negative expressions. We must consider these points and define them better.
A term which is repeated in the premisses ought to be joined to the first extreme, not to the middle. I mean for example that if a syllogism should be made proving that there is knowledge of justice, that it is good, the expression ‘that it is good’ (or ‘qua good’) should be joined to the first term. Let A stand for ‘knowledge that it is good’, B for good, C for justice. It is true to predicate A of B. For of the good there is knowledge that it is good. Also it is true to predicate B of C. For justice is identical with a good. In this way an analysis of the argument can be made. But if the expression ‘that it is good’ were added to B, the conclusion will not follow: for A will be true of B, but B will not be true of C. For to predicate of justice the term ‘good that it is good’ is false and not intelligible. Similarly if it should be proved that the healthy is an object of knowledge qua good, of goat-stag an object of knowledge qua not existing, or man perishable qua an object of sense: in every case in which an addition is made to the predicate, the addition must be joined to the extreme.
The position of the terms is not the same when something is established without qualification and when it is qualified by some attribute or condition, e.g. when the good is proved to be an object of knowledge and when it is proved to be an object of knowledge that it is good. If it has been proved to be an object of knowledge without qualification, we must put as middle term ‘that which is’, but if we add the qualification ‘that it is good’, the middle term must be ‘that which is something’. Let A stand for ‘knowledge that it is something’, B stand for ‘something’, and C stand for ‘good’. It is true to predicate A of B: for ex hypothesi there is a science of that which is something, that it is something. B too is true of C: for that which C represents is something. Consequently A is true of C: there will then be knowledge of the good, that it is good: for ex hypothesi the term ‘something’ indicates the thing’s special nature. But if ‘being’ were taken as middle and ‘being’ simply were joined to the extreme, not ‘being something’, we should not have had a syllogism proving that there is knowledge of the good, that it is good, but that it is; e.g. let A stand for knowledge that it is, B for being, C for good. Clearly then in syllogisms which are thus limited we must take the terms in the way stated.
We ought also to exchange terms which have the same value, word for word, and phrase for phrase, and word and phrase, and always take a word in preference to a phrase: for thus the setting out of the terms will be easier. For example if it makes no difference whether we say that the supposable is not the genus of the opinable or that the opinable is not identical with a particular kind of supposable (for what is meant is the same in both statements), it is better to take as the terms the supposable and the opinable in preference to the phrase suggested.
After these distinctions we now state by what means, when, and how every syllogism is produced; subsequently we must speak of demonstration. Syllogism should be discussed before demonstration because syllogism is the general: the demonstration is a sort of syllogism, but not every syllogism is a demonstration.
Whenever three terms are so related to one another that the last is contained in the middle as in a whole, and the middle is either contained in, or excluded from, the first as in or from a whole, the extremes must be related by a perfect syllogism. I call that term middle which is itself contained in another and contains another in itself: in position also this comes in the middle. By extremes I mean both that term which is itself contained in another and that in which another is contained. If A is predicated of all B, and B of all C, A must be predicated of all C: we have already explained what we mean by ‘predicated of all’. Similarly also, if A is predicated of no B, and B of all C, it is necessary that no C will be A.
But if the first term belongs to all the middle, but the middle to none of the last term, there will be no syllogism in respect of the extremes; for nothing necessary follows from the terms being so related; for it is possible that the first should belong either to all or to none of the last, so that neither a particular nor a universal conclusion is necessary. But if there is no necessary consequence, there cannot be a syllogism by means of these premisses. As an example of a universal affirmative relation between the extremes we may take the terms animal, man, horse; of a universal negative relation, the terms animal, man, stone. Nor again can syllogism be formed when neither the first term belongs to any of the middle, nor the middle to any of the last. As an example of a positive relation between the extremes take the terms science, line, medicine: of a negative relation science, line, unit.
If then the terms are universally related, it is clear in this figure when a syllogism will be possible and when not, and that if a syllogism is possible the terms must be related as described, and if they are so related there will be a syllogism.
But if one term is related universally, the other in part only, to its subject, there must be a perfect syllogism whenever universality is posited with reference to the major term either affirmatively or negatively, and particularity with reference to the minor term affirmatively: but whenever the universality is posited in relation to the minor term, or the terms are related in any other way, a syllogism is impossible. I call that term the major in which the middle is contained and that term the minor which comes under the middle. Let all B be A and some C be B. Then if ‘predicated of all’ means what was said above, it is necessary that some C is A. And if no B is A but some C is B, it is necessary that some C is not A. The meaning of ‘predicated of none’ has also been defined. So there will be a perfect syllogism. This holds good also if the premiss BC should be indefinite, provided that it is affirmative: for we shall have the same syllogism whether the premiss is indefinite or particular.
But if the universality is posited with respect to the minor term either affirmatively or negatively, a syllogism will not be possible, whether the major premiss is positive or negative, indefinite or particular: e.g. if some B is or is not A, and all C is B. As an example of a positive relation between the extremes take the terms good, state, wisdom: of a negative relation, good, state, ignorance. Again if no C is B, but some B is or is not A or not every B is A, there cannot be a syllogism. Take the terms white, horse, swan: white, horse, raven. The same terms may be taken also if the premiss BA is indefinite.
Nor when the major premiss is universal, whether affirmative or negative, and the minor premiss is negative and particular, can there be a syllogism, whether the minor premiss be indefinite or particular: e.g. if all B is A and some C is not B, or if not all C is B. For the major term may be predicable both of all and of none of the minor, to some of which the middle term cannot be attributed. Suppose the terms are animal, man, white: next take some of the white things of which man is not predicated-swan and snow: animal is predicated of all of the one, but of none of the other. Consequently there cannot be a syllogism. Again let no B be A, but let some C not be B. Take the terms inanimate, man, white: then take some white things of which man is not predicated-swan and snow: the term inanimate is predicated of all of the one, of none of the other.
Further since it is indefinite to say some C is not B, and it is true that some C is not B, whether no C is B, or not all C is B, and since if terms are assumed such that no C is B, no syllogism follows (this has already been stated) it is clear that this arrangement of terms will not afford a syllogism: otherwise one would have been possible with a universal negative minor premiss. A similar proof may also be given if the universal premiss is negative.
Nor can there in any way be a syllogism if both the relations of subject and predicate are particular, either positively or negatively, or the one negative and the other affirmative, or one indefinite and the other definite, or both indefinite. Terms common to all the above are animal, white, horse: animal, white, stone.
It is clear then from what has been said that if there is a syllogism in this figure with a particular conclusion, the terms must be related as we have stated: if they are related otherwise, no syllogism is possible anyhow. It is evident also that all the syllogisms in this figure are perfect (for they are all completed by means of the premisses originally taken) and that all conclusions are proved by this figure, viz. universal and particular, affirmative and negative. Such a figure I call the first.
Since the expressions ‘pleasure is good’ and ‘pleasure is the good’ are not identical, we must not set out the terms in the same way; but if the syllogism is to prove that pleasure is the good, the term must be ‘the good’, but if the object is to prove that pleasure is good, the term will be ‘good’. Similarly in all other cases.
It is not the same, either in fact or in speech, that A belongs to all of that to which B belongs, and that A belongs to all of that to all of which B belongs: for nothing prevents B from belonging to C, though not to all C: e.g. let B stand for beautiful, and C for white. If beauty belongs to something white, it is true to say that beauty belongs to that which is white; but not perhaps to everything that is white. If then A belongs to B, but not to everything of which B is predicated, then whether B belongs to all C or merely belongs to C, it is not necessary that A should belong, I do not say to all C, but even to C at all. But if A belongs to everything of which B is truly stated, it will follow that A can be said of all of that of all of which B is said. If however A is said of that of all of which B may be said, nothing prevents B belonging to C, and yet A not belonging to all C or to any C at all. If then we take three terms it is clear that the expression ‘A is said of all of which B is said’ means this, ‘A is said of all the things of which B is said’. And if B is said of all of a third term, so also is A: but if B is not said of all of the third term, there is no necessity that A should be said of all of it.
We must not suppose that something absurd results through setting out the terms: for we do not use the existence of this particular thing, but imitate the geometrician who says that ‘this line a foot long’ or ‘this straight line’ or ‘this line without breadth’ exists although it does not, but does not use the diagrams in the sense that he reasons from them. For in general, if two things are not related as whole to part and part to whole, the prover does not prove from them, and so no syllogism a is formed. We (I mean the learner) use the process of setting out terms like perception by sense, not as though it were impossible to demonstrate without these illustrative terms, as it is to demonstrate without the premisses of the syllogism.
We should not forget that in the same syllogism not all conclusions are reached through one figure, but one through one figure, another through another. Clearly then we must analyse arguments in accordance with this. Since not every problem is proved in every figure, but certain problems in each figure, it is clear from the conclusion in what figure the premisses should be sought.
In reference to those arguments aiming at a definition which have been directed to prove some part of the definition, we must take as a term the point to which the argument has been directed, not the whole definition: for so we shall be less likely to be disturbed by the length of the term: e.g. if a man proves that water is a drinkable liquid, we must take as terms drinkable and water.
Further we must not try to reduce hypothetical syllogisms; for with the given premisses it is not possible to reduce them. For they have not been proved by syllogism, but assented to by agreement. For instance if a man should suppose that unless there is one faculty of contraries, there cannot be one science, and should then argue that not every faculty is of contraries, e.g. of what is healthy and what is sickly: for the same thing will then be at the same time healthy and sickly. He has shown that there is not one faculty of all contraries, but he has not proved that there is not a science. And yet one must agree. But the agreement does not come from a syllogism, but from an hypothesis. This argument cannot be reduced: but the proof that there is not a single faculty can. The latter argument perhaps was a syllogism: but the former was an hypothesis.
The same holds good of arguments which are brought to a conclusion per impossibile. These cannot be analysed either; but the reduction to what is impossible can be analysed since it is proved by syllogism, though the rest of the argument cannot, because the conclusion is reached from an hypothesis. But these differ from the previous arguments: for in the former a preliminary agreement must be reached if one is to accept the conclusion; e.g. an agreement that if there is proved to be one faculty of contraries, then contraries fall under the same science; whereas in the latter, even if no preliminary agreement has been made, men still accept the reasoning, because the falsity is patent, e.g. the falsity of what follows from the assumption that the diagonal is commensurate, viz. that then odd numbers are equal to evens.
Many other arguments are brought to a conclusion by the help of an hypothesis; these we ought to consider and mark out clearly. We shall describe in the sequel their differences, and the various ways in which hypothetical arguments are formed: but at present this much must be clear, that it is not possible to resolve such arguments into the figures. And we have explained the reason.
Whatever problems are proved in more than one figure, if they have been established in one figure by syllogism, can be reduced to another figure, e.g. a negative syllogism in the first figure can be reduced to the second, and a syllogism in the middle figure to the first, not all however but some only. The point will be clear in the sequel. If A belongs to no B, and B to all C, then A belongs to no C. Thus the first figure; but if the negative statement is converted, we shall have the middle figure. For B belongs to no A, and to all C. Similarly if the syllogism is not universal but particular, e.g. if A belongs to no B, and B to some C. Convert the negative statement and you will have the middle figure.
The universal syllogisms in the second figure can be reduced to the first, but only one of the two particular syllogisms. Let A belong to no B and to all C. Convert the negative statement, and you will have the first figure. For B will belong to no A and A to all C. But if the affirmative statement concerns B, and the negative C, C must be made first term. For C belongs to no A, and A to all B: therefore C belongs to no B. B then belongs to no C: for the negative statement is convertible.
But if the syllogism is particular, whenever the negative statement concerns the major extreme, reduction to the first figure will be possible, e.g. if A belongs to no B and to some C: convert the negative statement and you will have the first figure. For B will belong to no A and A to some C. But when the affirmative statement concerns the major extreme, no resolution will be possible, e.g. if A belongs to all B, but not to all C: for the statement AB does not admit of conversion, nor would there be a syllogism if it did.
Again syllogisms in the third figure cannot all be resolved into the first, though all syllogisms in the first figure can be resolved into the third. Let A belong to all B and B to some C. Since the particular affirmative is convertible, C will belong to some B: but A belonged to all B: so that the third figure is formed. Similarly if the syllogism is negative: for the particular affirmative is convertible: therefore A will belong to no B, and to some C.
Of the syllogisms in the last figure one only cannot be resolved into the first, viz. when the negative statement is not universal: all the rest can be resolved. Let A and B be affirmed of all C: then C can be converted partially with either A or B: C then belongs to some B. Consequently we shall get the first figure, if A belongs to all C, and C to some of the Bs. If A belongs to all C and B to some C, the argument is the same: for B is convertible in reference to C. But if B belongs to all C and A to some C, the first term must be B: for B belongs to all C, and C to some A, therefore B belongs to some A. But since the particular statement is convertible, A will belong to some B. If the syllogism is negative, when the terms are universal we must take them in a similar way. Let B belong to all C, and A to no C: then C will belong to some B, and A to no C; and so C will be middle term. Similarly if the negative statement is universal, the affirmative particular: for A will belong to no C, and C to some of the Bs. But if the negative statement is particular, no resolution will be possible, e.g. if B belongs to all C, and A not belong to some C: convert the statement BC and both premisses will be particular.
It is clear that in order to resolve the figures into one another the premiss which concerns the minor extreme must be converted in both the figures: for when this premiss is altered, the transition to the other figure is made.
One of the syllogisms in the middle figure can, the other cannot, be resolved into the third figure. Whenever the universal statement is negative, resolution is possible. For if A belongs to no B and to some C, both B and C alike are convertible in relation to A, so that B belongs to no A and C to some A. A therefore is middle term. But when A belongs to all B, and not to some C, resolution will not be possible: for neither of the premisses is universal after conversion.
Syllogisms in the third figure can be resolved into the middle figure, whenever the negative statement is universal, e.g. if A belongs to no C, and B to some or all C. For C then will belong to no A and to some B. But if the negative statement is particular, no resolution will be possible: for the particular negative does not admit of conversion.
It is clear then that the same syllogisms cannot be resolved in these figures which could not be resolved into the first figure, and that when syllogisms are reduced to the first figure these alone are confirmed by reduction to what is impossible.
It is clear from what we have said how we ought to reduce syllogisms, and that the figures may be resolved into one another.
In establishing or refuting, it makes some difference whether we suppose the expressions ‘not to be this’ and ‘to be not-this’ are identical or different in meaning, e.g. ‘not to be white’ and ‘to be not-white’. For they do not mean the same thing, nor is ‘to be not-white’ the negation of ‘to be white’, but ‘not to be white’. The reason for this is as follows. The relation of ‘he can walk’ to ‘he can not-walk’ is similar to the relation of ‘it is white’ to ‘it is not-white’; so is that of ‘he knows what is good’ to ‘he knows what is not-good’. For there is no difference between the expressions ‘he knows what is good’ and ‘he is knowing what is good’, or ‘he can walk’ and ‘he is able to walk’: therefore there is no difference between their contraries ‘he cannot walk’-’he is not able to walk’. If then ‘he is not able to walk’ means the same as ‘he is able not to walk’, capacity to walk and incapacity to walk will belong at the same time to the same person (for the same man can both walk and not-walk, and is possessed of knowledge of what is good and of what is not-good), but an affirmation and a denial which are opposed to one another do not belong at the same time to the same thing. As then ‘not to know what is good’ is not the same as ‘to know what is not good’, so ‘to be not-good’ is not the same as ‘not to be good’. For when two pairs correspond, if the one pair are different from one another, the other pair also must be different. Nor is ‘to be not-equal’ the same as ‘not to be equal’: for there is something underlying the one, viz. that which is not-equal, and this is the unequal, but there is nothing underlying the other. Wherefore not everything is either equal or unequal, but everything is equal or is not equal. Further the expressions ‘it is a not-white log’ and ‘it is not a white log’ do not imply one another’s truth. For if ‘it is a not-white log’, it must be a log: but that which is not a white log need not be a log at all. Therefore it is clear that ‘it is not-good’ is not the denial of ‘it is good’. If then every single statement may truly be said to be either an affirmation or a negation, if it is not a negation clearly it must in a sense be an affirmation. But every affirmation has a corresponding negation. The negation then of ‘it is not-good’ is ‘it is not not-good’. The relation of these statements to one another is as follows. Let A stand for ‘to be good’, B for ‘not to be good’, let C stand for ‘to be not-good’ and be placed under B, and let D stand for not to be not-good’ and be placed under A. Then either A or B will belong to everything, but they will never belong to the same thing; and either C or D will belong to everything, but they will never belong to the same thing. And B must belong to everything to which C belongs. For if it is true to say ‘it is a not-white’, it is true also to say ‘it is not white’: for it is impossible that a thing should simultaneously be white and be not-white, or be a not-white log and be a white log; consequently if the affirmation does not belong, the denial must belong. But C does not always belong to B: for what is not a log at all, cannot be a not-white log either. On the other hand D belongs to everything to which A belongs. For either C or D belongs to everything to which A belongs. But since a thing cannot be simultaneously not-white and white, D must belong to everything to which A belongs. For of that which is white it is true to say that it is not not-white. But A is not true of all D. For of that which is not a log at all it is not true to say A, viz. that it is a white log. Consequently D is true, but A is not true, i.e. that it is a white log. It is clear also that A and C cannot together belong to the same thing, and that B and D may possibly belong to the same thing.
Privative terms are similarly related positive ter terms respect of this arrangement. Let A stand for ‘equal’, B for ‘not equal’, C for ‘unequal’, D for ‘not unequal’.
In many things also, to some of which something belongs which does not belong to others, the negation may be true in a similar way, viz. that all are not white or that each is not white, while that each is not-white or all are not-white is false. Similarly also ‘every animal is not-white’ is not the negation of ‘every animal is white’ (for both are false): the proper negation is ‘every animal is not white’. Since it is clear that ‘it is not-white’ and ‘it is not white’ mean different things, and one is an affirmation, the other a denial, it is evident that the method of proving each cannot be the same, e.g. that whatever is an animal is not white or may not be white, and that it is true to call it not-white; for this means that it is not-white. But we may prove that it is true to call it white or not-white in the same way for both are proved constructively by means of the first figure. For the expression ‘it is true’ stands on a similar footing to ‘it is’. For the negation of ‘it is true to call it white’ is not ‘it is true to call it not-white’ but ‘it is not true to call it white’. If then it is to be true to say that whatever is a man is musical or is not-musical, we must assume that whatever is an animal either is musical or is not-musical; and the proof has been made. That whatever is a man is not musical is proved destructively in the three ways mentioned.
In general whenever A and B are such that they cannot belong at the same time to the same thing, and one of the two necessarily belongs to everything, and again C and D are related in the same way, and A follows C but the relation cannot be reversed, then D must follow B and the relation cannot be reversed. And A and D may belong to the same thing, but B and C cannot. First it is clear from the following consideration that D follows B. For since either C or D necessarily belongs to everything; and since C cannot belong to that to which B belongs, because it carries A along with it and A and B cannot belong to the same thing; it is clear that D must follow B. Again since C does not reciprocate with but A, but C or D belongs to everything, it is possible that A and D should belong to the same thing. But B and C cannot belong to the same thing, because A follows C; and so something impossible results. It is clear then that B does not reciprocate with D either, since it is possible that D and A should belong at the same time to the same thing.
It results sometimes even in such an arrangement of terms that one is deceived through not apprehending the opposites rightly, one of which must belong to everything, e.g. we may reason that ‘if A and B cannot belong at the same time to the same thing, but it is necessary that one of them should belong to whatever the other does not belong to: and again C and D are related in the same way, and follows everything which C follows: it will result that B belongs necessarily to everything to which D belongs’: but this is false. ‘Assume that F stands for the negation of A and B, and again that H stands for the negation of C and D. It is necessary then that either A or F should belong to everything: for either the affirmation or the denial must belong. And again either C or H must belong to everything: for they are related as affirmation and denial. And ex hypothesi A belongs to everything ever thing to which C belongs. Therefore H belongs to everything to which F belongs. Again since either F or B belongs to everything, and similarly either H or D, and since H follows F, B must follow D: for we know this. If then A follows C, B must follow D’. But this is false: for as we proved the sequence is reversed in terms so constituted. The fallacy arises because perhaps it is not necessary that A or F should belong to everything, or that F or B should belong to everything: for F is not the denial of A. For not good is the negation of good: and not-good is not identical with ‘neither good nor not-good’. Similarly also with C and D. For two negations have been assumed in respect to one term.
Whenever the same thing belongs to all of one subject, and to none of another, or to all of each subject or to none of either, I call such a figure the second; by middle term in it I mean that which is predicated of both subjects, by extremes the terms of which this is said, by major extreme that which lies near the middle, by minor that which is further away from the middle. The middle term stands outside the extremes, and is first in position. A syllogism cannot be perfect anyhow in this figure, but it may be valid whether the terms are related universally or not.
If then the terms are related universally a syllogism will be possible, whenever the middle belongs to all of one subject and to none of another (it does not matter which has the negative relation), but in no other way. Let M be predicated of no N, but of all O. Since, then, the negative relation is convertible, N will belong to no M: but M was assumed to belong to all O: consequently N will belong to no O. This has already been proved. Again if M belongs to all N, but to no O, then N will belong to no O. For if M belongs to no O, O belongs to no M: but M (as was said) belongs to all N: O then will belong to no N: for the first figure has again been formed. But since the negative relation is convertible, N will belong to no O. Thus it will be the same syllogism that proves both conclusions.
It is possible to prove these results also by reductio ad impossibile.
It is clear then that a syllogism is formed when the terms are so related, but not a perfect syllogism; for necessity is not perfectly established merely from the original premisses; others also are needed.
But if M is predicated of every N and O, there cannot be a syllogism. Terms to illustrate a positive relation between the extremes are substance, animal, man; a negative relation, substance, animal, number-substance being the middle term.
Nor is a syllogism possible when M is predicated neither of any N nor of any O. Terms to illustrate a positive relation are line, animal, man: a negative relation, line, animal, stone.
It is clear then that if a syllogism is formed when the terms are universally related, the terms must be related as we stated at the outset: for if they are otherwise related no necessary consequence follows.
If the middle term is related universally to one of the extremes, a particular negative syllogism must result whenever the middle term is related universally to the major whether positively or negatively, and particularly to the minor and in a manner opposite to that of the universal statement: by ‘an opposite manner’ I mean, if the universal statement is negative, the particular is affirmative: if the universal is affirmative, the particular is negative. For if M belongs to no N, but to some O, it is necessary that N does not belong to some O. For since the negative statement is convertible, N will belong to no M: but M was admitted to belong to some O: therefore N will not belong to some O: for the result is reached by means of the first figure. Again if M belongs to all N, but not to some O, it is necessary that N does not belong to some O: for if N belongs to all O, and M is predicated also of all N, M must belong to all O: but we assumed that M does not belong to some O. And if M belongs to all N but not to all O, we shall conclude that N does not belong to all O: the proof is the same as the above. But if M is predicated of all O, but not of all N, there will be no syllogism. Take the terms animal, substance, raven; animal, white, raven. Nor will there be a conclusion when M is predicated of no O, but of some N. Terms to illustrate a positive relation between the extremes are animal, substance, unit: a negative relation, animal, substance, science.
If then the universal statement is opposed to the particular, we have stated when a syllogism will be possible and when not: but if the premisses are similar in form, I mean both negative or both affirmative, a syllogism will not be possible anyhow. First let them be negative, and let the major premiss be universal, e.g. let M belong to no N, and not to some O. It is possible then for N to belong either to all O or to no O. Terms to illustrate the negative relation are black, snow, animal. But it is not possible to find terms of which the extremes are related positively and universally, if M belongs to some O, and does not belong to some O. For if N belonged to all O, but M to no N, then M would belong to no O: but we assumed that it belongs to some O. In this way then it is not admissible to take terms: our point must be proved from the indefinite nature of the particular statement. For since it is true that M does not belong to some O, even if it belongs to no O, and since if it belongs to no O a syllogism is (as we have seen) not possible, clearly it will not be possible now either.
Again let the premisses be affirmative, and let the major premiss as before be universal, e.g. let M belong to all N and to some O. It is possible then for N to belong to all O or to no O. Terms to illustrate the negative relation are white, swan, stone. But it is not possible to take terms to illustrate the universal affirmative relation, for the reason already stated: the point must be proved from the indefinite nature of the particular statement. But if the minor premiss is universal, and M belongs to no O, and not to some N, it is possible for N to belong either to all O or to no O. Terms for the positive relation are white, animal, raven: for the negative relation, white, stone, raven. If the premisses are affirmative, terms for the negative relation are white, animal, snow; for the positive relation, white, animal, swan. Evidently then, whenever the premisses are similar in form, and one is universal, the other particular, a syllogism can, not be formed anyhow. Nor is one possible if the middle term belongs to some of each of the extremes, or does not belong to some of either, or belongs to some of the one, not to some of the other, or belongs to neither universally, or is related to them indefinitely. Common terms for all the above are white, animal, man: white, animal, inanimate. It is clear then from what has been said that if the terms are related to one another in the way stated, a syllogism results of necessity; and if there is a syllogism, the terms must be so related. But it is evident also that all the syllogisms in this figure are imperfect: for all are made perfect by certain supplementary statements, which either are contained in the terms of necessity or are assumed as hypotheses, i.e. when we prove per impossibile. And it is evident that an affirmative conclusion is not attained by means of this figure, but all are negative, whether universal or particular.
But if one term belongs to all, and another to none, of a third, or if both belong to all, or to none, of it, I call such a figure the third; by middle term in it I mean that of which both the predicates are predicated, by extremes I mean the predicates, by the major extreme that which is further from the middle, by the minor that which is nearer to it. The middle term stands outside the extremes, and is last in position. A syllogism cannot be perfect in this figure either, but it may be valid whether the terms are related universally or not to the middle term.
If they are universal, whenever both P and R belong to S, it follows that P will necessarily belong to some R. For, since the affirmative statement is convertible, S will belong to some R: consequently since P belongs to all S, and S to some R, P must belong to some R: for a syllogism in the first figure is produced. It is possible to demonstrate this also per impossibile and by exposition. For if both P and R belong to all S, should one of the Ss, e.g. N, be taken, both P and R will belong to this, and thus P will belong to some R.
If R belongs to all S, and P to no S, there will be a syllogism to prove that P will necessarily not belong to some R. This may be demonstrated in the same way as before by converting the premiss RS. It might be proved also per impossibile, as in the former cases. But if R belongs to no S, P to all S, there will be no syllogism. Terms for the positive relation are animal, horse, man: for the negative relation animal, inanimate, man.
Nor can there be a syllogism when both terms are asserted of no S. Terms for the positive relation are animal, horse, inanimate; for the negative relation man, horse, inanimate-inanimate being the middle term.
It is clear then in this figure also when a syllogism will be possible and when not, if the terms are related universally. For whenever both the terms are affirmative, there will be a syllogism to prove that one extreme belongs to some of the other; but when they are negative, no syllogism will be possible. But when one is negative, the other affirmative, if the major is negative, the minor affirmative, there will be a syllogism to prove that the one extreme does not belong to some of the other: but if the relation is reversed, no syllogism will be possible. If one term is related universally to the middle, the other in part only, when both are affirmative there must be a syllogism, no matter which of the premisses is universal. For if R belongs to all S, P to some S, P must belong to some R. For since the affirmative statement is convertible S will belong to some P: consequently since R belongs to all S, and S to some P, R must also belong to some P: therefore P must belong to some R.
Again if R belongs to some S, and P to all S, P must belong to some R. This may be demonstrated in the same way as the preceding. And it is possible to demonstrate it also per impossibile and by exposition, as in the former cases. But if one term is affirmative, the other negative, and if the affirmative is universal, a syllogism will be possible whenever the minor term is affirmative. For if R belongs to all S, but P does not belong to some S, it is necessary that P does not belong to some R. For if P belongs to all R, and R belongs to all S, then P will belong to all S: but we assumed that it did not. Proof is possible also without reduction ad impossibile, if one of the Ss be taken to which P does not belong.
But whenever the major is affirmative, no syllogism will be possible, e.g. if P belongs to all S and R does not belong to some S. Terms for the universal affirmative relation are animate, man, animal. For the universal negative relation it is not possible to get terms, if R belongs to some S, and does not belong to some S. For if P belongs to all S, and R to some S, then P will belong to some R: but we assumed that it belongs to no R. We must put the matter as before.’ Since the expression ‘it does not belong to some’ is indefinite, it may be used truly of that also which belongs to none. But if R belongs to no S, no syllogism is possible, as has been shown. Clearly then no syllogism will be possible here.
But if the negative term is universal, whenever the major is negative and the minor affirmative there will be a syllogism. For if P belongs to no S, and R belongs to some S, P will not belong to some R: for we shall have the first figure again, if the premiss RS is converted.
But when the minor is negative, there will be no syllogism. Terms for the positive relation are animal, man, wild: for the negative relation, animal, science, wild-the middle in both being the term wild.
Nor is a syllogism possible when both are stated in the negative, but one is universal, the other particular. When the minor is related universally to the middle, take the terms animal, science, wild; animal, man, wild. When the major is related universally to the middle, take as terms for a negative relation raven, snow, white. For a positive relation terms cannot be found, if R belongs to some S, and does not belong to some S. For if P belongs to all R, and R to some S, then P belongs to some S: but we assumed that it belongs to no S. Our point, then, must be proved from the indefinite nature of the particular statement.
Nor is a syllogism possible anyhow, if each of the extremes belongs to some of the middle or does not belong, or one belongs and the other does not to some of the middle, or one belongs to some of the middle, the other not to all, or if the premisses are indefinite. Common terms for all are animal, man, white: animal, inanimate, white.
It is clear then in this figure also when a syllogism will be possible, and when not; and that if the terms are as stated, a syllogism results of necessity, and if there is a syllogism, the terms must be so related. It is clear also that all the syllogisms in this figure are imperfect (for all are made perfect by certain supplementary assumptions), and that it will not be possible to reach a universal conclusion by means of this figure, whether negative or affirmative.
It is evident also that in all the figures, whenever a proper syllogism does not result, if both the terms are affirmative or negative nothing necessary follows at all, but if one is affirmative, the other negative, and if the negative is stated universally, a syllogism always results relating the minor to the major term, e.g. if A belongs to all or some B, and B belongs to no C: for if the premisses are converted it is necessary that C does not belong to some A. Similarly also in the other figures: a syllogism always results by means of conversion. It is evident also that the substitution of an indefinite for a particular affirmative will effect the same syllogism in all the figures.
It is clear too that all the imperfect syllogisms are made perfect by means of the first figure. For all are brought to a conclusion either ostensively or per impossibile. In both ways the first figure is formed: if they are made perfect ostensively, because (as we saw) all are brought to a conclusion by means of conversion, and conversion produces the first figure: if they are proved per impossibile, because on the assumption of the false statement the syllogism comes about by means of the first figure, e.g. in the last figure, if A and B belong to all C, it follows that A belongs to some B: for if A belonged to no B, and B belongs to all C, A would belong to no C: but (as we stated) it belongs to all C. Similarly also with the rest.
It is possible also to reduce all syllogisms to the universal syllogisms in the first figure. Those in the second figure are clearly made perfect by these, though not all in the same way; the universal syllogisms are made perfect by converting the negative premiss, each of the particular syllogisms by reductio ad impossibile. In the first figure particular syllogisms are indeed made perfect by themselves, but it is possible also to prove them by means of the second figure, reducing them ad impossibile, e.g. if A belongs to all B, and B to some C, it follows that A belongs to some C. For if it belonged to no C, and belongs to all B, then B will belong to no C: this we know by means of the second figure. Similarly also demonstration will be possible in the case of the negative. For if A belongs to no B, and B belongs to some C, A will not belong to some C: for if it belonged to all C, and belongs to no B, then B will belong to no C: and this (as we saw) is the middle figure. Consequently, since all syllogisms in the middle figure can be reduced to universal syllogisms in the first figure, and since particular syllogisms in the first figure can be reduced to syllogisms in the middle figure, it is clear that particular syllogisms can be reduced to universal syllogisms in the first figure. Syllogisms in the third figure, if the terms are universal, are directly made perfect by means of those syllogisms; but, when one of the premisses is particular, by means of the particular syllogisms in the first figure: and these (we have seen) may be reduced to the universal syllogisms in the first figure: consequently also the particular syllogisms in the third figure may be so reduced. It is clear then that all syllogisms may be reduced to the universal syllogisms in the first figure.
We have stated then how syllogisms which prove that something belongs or does not belong to something else are constituted, both how syllogisms of the same figure are constituted in themselves, and how syllogisms of different figures are related to one another.
Since there is a difference according as something belongs, necessarily belongs, or may belong to something else (for many things belong indeed, but not necessarily, others neither necessarily nor indeed at all, but it is possible for them to belong), it is clear that there will be different syllogisms to prove each of these relations, and syllogisms with differently related terms, one syllogism concluding from what is necessary, another from what is, a third from what is possible.
There is hardly any difference between syllogisms from necessary premisses and syllogisms from premisses which merely assert. When the terms are put in the same way, then, whether something belongs or necessarily belongs (or does not belong) to something else, a syllogism will or will not result alike in both cases, the only difference being the addition of the expression ‘necessarily’ to the terms. For the negative statement is convertible alike in both cases, and we should give the same account of the expressions ‘to be contained in something as in a whole’ and ‘to be predicated of all of something’. With the exceptions to be made below, the conclusion will be proved to be necessary by means of conversion, in the same manner as in the case of simple predication. But in the middle figure when the universal statement is affirmative, and the particular negative, and again in the third figure when the universal is affirmative and the particular negative, the demonstration will not take the same form, but it is necessary by the ‘exposition’ of a part of the subject of the particular negative proposition, to which the predicate does not belong, to make the syllogism in reference to this: with terms so chosen the conclusion will necessarily follow. But if the relation is necessary in respect of the part taken, it must hold of some of that term in which this part is included: for the part taken is just some of that. And each of the resulting syllogisms is in the appropriate figure.
It happens sometimes also that when one premiss is necessary the conclusion is necessary, not however when either premiss is necessary, but only when the major is, e.g. if A is taken as necessarily belonging or not belonging to B, but B is taken as simply belonging to C: for if the premisses are taken in this way, A will necessarily belong or not belong to C. For since necessarily belongs, or does not belong, to every B, and since C is one of the Bs, it is clear that for C also the positive or the negative relation to A will hold necessarily. But if the major premiss is not necessary, but the minor is necessary, the conclusion will not be necessary. For if it were, it would result both through the first figure and through the third that A belongs necessarily to some B. But this is false; for B may be such that it is possible that A should belong to none of it. Further, an example also makes it clear that the conclusion not be necessary, e.g. if A were movement, B animal, C man: man is an animal necessarily, but an animal does not move necessarily, nor does man. Similarly also if the major premiss is negative; for the proof is the same.
In particular syllogisms, if the universal premiss is necessary, then the conclusion will be necessary; but if the particular, the conclusion will not be necessary, whether the universal premiss is negative or affirmative. First let the universal be necessary, and let A belong to all B necessarily, but let B simply belong to some C: it is necessary then that A belongs to some C necessarily: for C falls under B, and A was assumed to belong necessarily to all B. Similarly also if the syllogism should be negative: for the proof will be the same. But if the particular premiss is necessary, the conclusion will not be necessary: for from the denial of such a conclusion nothing impossible results, just as it does not in the universal syllogisms. The same is true of negative syllogisms. Try the terms movement, animal, white.
---
!!![[Prior Analytics: Book II: 1]]
{{Prior Analytics: Book II: 1}}
---
!!![[Prior Analytics: Book II: 2]]
{{Prior Analytics: Book II: 2}}
---
!!![[Prior Analytics: Book II: 3]]
{{Prior Analytics: Book II: 3}}
---
!!![[Prior Analytics: Book II: 4]]
{{Prior Analytics: Book II: 4}}
---
!!![[Prior Analytics: Book II: 5]]
{{Prior Analytics: Book II: 5}}
---
!!![[Prior Analytics: Book II: 6]]
{{Prior Analytics: Book II: 6}}
---
!!![[Prior Analytics: Book II: 7]]
{{Prior Analytics: Book II: 7}}
---
!!![[Prior Analytics: Book II: 8]]
{{Prior Analytics: Book II: 8}}
---
!!![[Prior Analytics: Book II: 9]]
{{Prior Analytics: Book II: 9}}
---
!!![[Prior Analytics: Book II: 10]]
{{Prior Analytics: Book II: 10}}
---
!!![[Prior Analytics: Book II: 11]]
{{Prior Analytics: Book II: 11}}
---
!!![[Prior Analytics: Book II: 12]]
{{Prior Analytics: Book II: 12}}
---
!!![[Prior Analytics: Book II: 13]]
{{Prior Analytics: Book II: 13}}
---
!!![[Prior Analytics: Book II: 14]]
{{Prior Analytics: Book II: 14}}
---
!!![[Prior Analytics: Book II: 15]]
{{Prior Analytics: Book II: 15}}
---
!!![[Prior Analytics: Book II: 16]]
{{Prior Analytics: Book II: 16}}
---
!!![[Prior Analytics: Book II: 17]]
{{Prior Analytics: Book II: 17}}
---
!!![[Prior Analytics: Book II: 18]]
{{Prior Analytics: Book II: 18}}
---
!!![[Prior Analytics: Book II: 19]]
{{Prior Analytics: Book II: 19}}
---
!!![[Prior Analytics: Book II: 20]]
{{Prior Analytics: Book II: 20}}
---
!!![[Prior Analytics: Book II: 21]]
{{Prior Analytics: Book II: 21}}
---
!!![[Prior Analytics: Book II: 22]]
{{Prior Analytics: Book II: 22}}
---
!!![[Prior Analytics: Book II: 23]]
{{Prior Analytics: Book II: 23}}
---
!!![[Prior Analytics: Book II: 24]]
{{Prior Analytics: Book II: 24}}
---
!!![[Prior Analytics: Book II: 25]]
{{Prior Analytics: Book II: 25}}
---
!!![[Prior Analytics: Book II: 26]]
{{Prior Analytics: Book II: 26}}
---
!!![[Prior Analytics: Book II: 27]]
{{Prior Analytics: Book II: 27}}
We have already explained the number of the figures, the character and number of the premisses, when and how a syllogism is formed; further what we must look for when a refuting and establishing propositions, and how we should investigate a given problem in any branch of inquiry, also by what means we shall obtain principles appropriate to each subject. Since some syllogisms are universal, others particular, all the universal syllogisms give more than one result, and of particular syllogisms the affirmative yield more than one, the negative yield only the stated conclusion. For all propositions are convertible save only the particular negative: and the conclusion states one definite thing about another definite thing. Consequently all syllogisms save the particular negative yield more than one conclusion, e.g. if A has been proved to to all or to some B, then B must belong to some A: and if A has been proved to belong to no B, then B belongs to no A. This is a different conclusion from the former. But if A does not belong to some B, it is not necessary that B should not belong to some A: for it may possibly belong to all A.
This then is the reason common to all syllogisms whether universal or particular. But it is possible to give another reason concerning those which are universal. For all the things that are subordinate to the middle term or to the conclusion may be proved by the same syllogism, if the former are placed in the middle, the latter in the conclusion; e.g. if the conclusion AB is proved through C, whatever is subordinate to B or C must accept the predicate A: for if D is included in B as in a whole, and B is included in A, then D will be included in A. Again if E is included in C as in a whole, and C is included in A, then E will be included in A. Similarly if the syllogism is negative. In the second figure it will be possible to infer only that which is subordinate to the conclusion, e.g. if A belongs to no B and to all C; we conclude that B belongs to no C. If then D is subordinate to C, clearly B does not belong to it. But that B does not belong to what is subordinate to A is not clear by means of the syllogism. And yet B does not belong to E, if E is subordinate to A. But while it has been proved through the syllogism that B belongs to no C, it has been assumed without proof that B does not belong to A, consequently it does not result through the syllogism that B does not belong to E.
But in particular syllogisms there will be no necessity of inferring what is subordinate to the conclusion (for a syllogism does not result when this premiss is particular), but whatever is subordinate to the middle term may be inferred, not however through the syllogism, e.g. if A belongs to all B and B to some C. Nothing can be inferred about that which is subordinate to C; something can be inferred about that which is subordinate to B, but not through the preceding syllogism. Similarly in the other figures. That which is subordinate to the conclusion cannot be proved; the other subordinate can be proved, only not through the syllogism, just as in the universal syllogisms what is subordinate to the middle term is proved (as we saw) from a premiss which is not demonstrated: consequently either a conclusion is not possible in the case of universal syllogisms or else it is possible also in the case of particular syllogisms.
In the third figure when the conclusion is converted into its contrary, neither of the premisses can be refuted in any of the syllogisms, but when the conclusion is converted into its contradictory, both premisses may be refuted and in all the moods. Suppose it has been proved that A belongs to some B, C being taken as middle, and the premisses being universal. If then it is assumed that A does not belong to some B, but B belongs to all C, no syllogism is formed about A and C. Nor if A does not belong to some B, but belongs to all C, will a syllogism be possible about B and C. A similar proof can be given if the premisses are not universal. For either both premisses arrived at by the conversion must be particular, or the universal premiss must refer to the minor extreme. But we found that no syllogism is possible thus either in the first or in the middle figure. But if the conclusion is converted into its contradictory, both the premisses can be refuted. For if A belongs to no B, and B to all C, then A belongs to no C: again if A belongs to no B, and to all C, B belongs to no C. And similarly if one of the premisses is not universal. For if A belongs to no B, and B to some C, A will not belong to some C: if A belongs to no B, and to C, B will belong to no C.
Similarly if the original syllogism is negative. Suppose it has been proved that A does not belong to some B, BC being affirmative, AC being negative: for it was thus that, as we saw, a syllogism could be made. Whenever then the contrary of the conclusion is assumed a syllogism will not be possible. For if A belongs to some B, and B to all C, no syllogism is possible (as we saw) about A and C. Nor, if A belongs to some B, and to no C, was a syllogism possible concerning B and C. Therefore the premisses are not refuted. But when the contradictory of the conclusion is assumed, they are refuted. For if A belongs to all B, and B to C, A belongs to all C: but A was supposed originally to belong to no C. Again if A belongs to all B, and to no C, then B belongs to no C: but it was supposed to belong to all C. A similar proof is possible if the premisses are not universal. For AC becomes universal and negative, the other premiss particular and affirmative. If then A belongs to all B, and B to some C, it results that A belongs to some C: but it was supposed to belong to no C. Again if A belongs to all B, and to no C, then B belongs to no C: but it was assumed to belong to some C. If A belongs to some B and B to some C, no syllogism results: nor yet if A belongs to some B, and to no C. Thus in one way the premisses are refuted, in the other way they are not.
From what has been said it is clear how a syllogism results in each figure when the conclusion is converted; when a result contrary to the premiss, and when a result contradictory to the premiss, is obtained. It is clear that in the first figure the syllogisms are formed through the middle and the last figures, and the premiss which concerns the minor extreme is alway refuted through the middle figure, the premiss which concerns the major through the last figure. In the second figure syllogisms proceed through the first and the last figures, and the premiss which concerns the minor extreme is always refuted through the first figure, the premiss which concerns the major extreme through the last. In the third figure the refutation proceeds through the first and the middle figures; the premiss which concerns the major is always refuted through the first figure, the premiss which concerns the minor through the middle figure.
It is clear then what conversion is, how it is effected in each figure, and what syllogism results. The syllogism per impossibile is proved when the contradictory of the conclusion stated and another premiss is assumed; it can be made in all the figures. For it resembles conversion, differing only in this: conversion takes place after a syllogism has been formed and both the premisses have been taken, but a reduction to the impossible takes place not because the contradictory has been agreed to already, but because it is clear that it is true. The terms are alike in both, and the premisses of both are taken in the same way. For example if A belongs to all B, C being middle, then if it is supposed that A does not belong to all B or belongs to no B, but to all C (which was admitted to be true), it follows that C belongs to no B or not to all B. But this is impossible: consequently the supposition is false: its contradictory then is true. Similarly in the other figures: for whatever moods admit of conversion admit also of the reduction per impossibile.
All the problems can be proved per impossibile in all the figures, excepting the universal affirmative, which is proved in the middle and third figures, but not in the first. Suppose that A belongs not to all B, or to no B, and take besides another premiss concerning either of the terms, viz. that C belongs to all A, or that B belongs to all D; thus we get the first figure. If then it is supposed that A does not belong to all B, no syllogism results whichever term the assumed premiss concerns; but if it is supposed that A belongs to no B, when the premiss BD is assumed as well we shall prove syllogistically what is false, but not the problem proposed. For if A belongs to no B, and B belongs to all D, A belongs to no D. Let this be impossible: it is false then A belongs to no B. But the universal affirmative is not necessarily true if the universal negative is false. But if the premiss CA is assumed as well, no syllogism results, nor does it do so when it is supposed that A does not belong to all B. Consequently it is clear that the universal affirmative cannot be proved in the first figure per impossibile.
But the particular affirmative and the universal and particular negatives can all be proved. Suppose that A belongs to no B, and let it have been assumed that B belongs to all or to some C. Then it is necessary that A should belong to no C or not to all C. But this is impossible (for let it be true and clear that A belongs to all C): consequently if this is false, it is necessary that A should belong to some B. But if the other premiss assumed relates to A, no syllogism will be possible. Nor can a conclusion be drawn when the contrary of the conclusion is supposed, e.g. that A does not belong to some B. Clearly then we must suppose the contradictory.
Again suppose that A belongs to some B, and let it have been assumed that C belongs to all A. It is necessary then that C should belong to some B. But let this be impossible, so that the supposition is false: in that case it is true that A belongs to no B. We may proceed in the same way if the proposition CA has been taken as negative. But if the premiss assumed concerns B, no syllogism will be possible. If the contrary is supposed, we shall have a syllogism and an impossible conclusion, but the problem in hand is not proved. Suppose that A belongs to all B, and let it have been assumed that C belongs to all A. It is necessary then that C should belong to all B. But this is impossible, so that it is false that A belongs to all B. But we have not yet shown it to be necessary that A belongs to no B, if it does not belong to all B. Similarly if the other premiss taken concerns B; we shall have a syllogism and a conclusion which is impossible, but the hypothesis is not refuted. Therefore it is the contradictory that we must suppose.
To prove that A does not belong to all B, we must suppose that it belongs to all B: for if A belongs to all B, and C to all A, then C belongs to all B; so that if this is impossible, the hypothesis is false. Similarly if the other premiss assumed concerns B. The same results if the original proposition CA was negative: for thus also we get a syllogism. But if the negative proposition concerns B, nothing is proved. If the hypothesis is that A belongs not to all but to some B, it is not proved that A belongs not to all B, but that it belongs to no B. For if A belongs to some B, and C to all A, then C will belong to some B. If then this is impossible, it is false that A belongs to some B; consequently it is true that A belongs to no B. But if this is proved, the truth is refuted as well; for the original conclusion was that A belongs to some B, and does not belong to some B. Further the impossible does not result from the hypothesis: for then the hypothesis would be false, since it is impossible to draw a false conclusion from true premisses: but in fact it is true: for A belongs to some B. Consequently we must not suppose that A belongs to some B, but that it belongs to all B. Similarly if we should be proving that A does not belong to some B: for if ‘not to belong to some’ and ‘to belong not to all’ have the same meaning, the demonstration of both will be identical.
It is clear then that not the contrary but the contradictory ought to be supposed in all the syllogisms. For thus we shall have necessity of inference, and the claim we make is one that will be generally accepted. For if of everything one or other of two contradictory statements holds good, then if it is proved that the negation does not hold, the affirmation must be true. Again if it is not admitted that the affirmation is true, the claim that the negation is true will be generally accepted. But in neither way does it suit to maintain the contrary: for it is not necessary that if the universal negative is false, the universal affirmative should be true, nor is it generally accepted that if the one is false the other is true.
It is clear then that in the first figure all problems except the universal affirmative are proved per impossibile. But in the middle and the last figures this also is proved. Suppose that A does not belong to all B, and let it have been assumed that A belongs to all C. If then A belongs not to all B, but to all C, C will not belong to all B. But this is impossible (for suppose it to be clear that C belongs to all B): consequently the hypothesis is false. It is true then that A belongs to all B. But if the contrary is supposed, we shall have a syllogism and a result which is impossible: but the problem in hand is not proved. For if A belongs to no B, and to all C, C will belong to no B. This is impossible; so that it is false that A belongs to no B. But though this is false, it does not follow that it is true that A belongs to all B.
When A belongs to some B, suppose that A belongs to no B, and let A belong to all C. It is necessary then that C should belong to no B. Consequently, if this is impossible, A must belong to some B. But if it is supposed that A does not belong to some B, we shall have the same results as in the first figure.
Again suppose that A belongs to some B, and let A belong to no C. It is necessary then that C should not belong to some B. But originally it belonged to all B, consequently the hypothesis is false: A then will belong to no B.
When A does not belong to an B, suppose it does belong to all B, and to no C. It is necessary then that C should belong to no B. But this is impossible: so that it is true that A does not belong to all B. It is clear then that all the syllogisms can be formed in the middle figure.
Similarly they can all be formed in the last figure. Suppose that A does not belong to some B, but C belongs to all B: then A does not belong to some C. If then this is impossible, it is false that A does not belong to some B; so that it is true that A belongs to all B. But if it is supposed that A belongs to no B, we shall have a syllogism and a conclusion which is impossible: but the problem in hand is not proved: for if the contrary is supposed, we shall have the same results as before.
But to prove that A belongs to some B, this hypothesis must be made. If A belongs to no B, and C to some B, A will belong not to all C. If then this is false, it is true that A belongs to some B.
When A belongs to no B, suppose A belongs to some B, and let it have been assumed that C belongs to all B. Then it is necessary that A should belong to some C. But ex hypothesi it belongs to no C, so that it is false that A belongs to some B. But if it is supposed that A belongs to all B, the problem is not proved.
But this hypothesis must be made if we are prove that A belongs not to all B. For if A belongs to all B and C to some B, then A belongs to some C. But this we assumed not to be so, so it is false that A belongs to all B. But in that case it is true that A belongs not to all B. If however it is assumed that A belongs to some B, we shall have the same result as before.
It is clear then that in all the syllogisms which proceed per impossibile the contradictory must be assumed. And it is plain that in the middle figure an affirmative conclusion, and in the last figure a universal conclusion, are proved in a way.
Demonstration per impossibile differs from ostensive proof in that it posits what it wishes to refute by reduction to a statement admitted to be false; whereas ostensive proof starts from admitted positions. Both, indeed, take two premisses that are admitted, but the latter takes the premisses from which the syllogism starts, the former takes one of these, along with the contradictory of the original conclusion. Also in the ostensive proof it is not necessary that the conclusion should be known, nor that one should suppose beforehand that it is true or not: in the other it is necessary to suppose beforehand that it is not true. It makes no difference whether the conclusion is affirmative or negative; the method is the same in both cases. Everything which is concluded ostensively can be proved per impossibile, and that which is proved per impossibile can be proved ostensively, through the same terms. Whenever the syllogism is formed in the first figure, the truth will be found in the middle or the last figure, if negative in the middle, if affirmative in the last. Whenever the syllogism is formed in the middle figure, the truth will be found in the first, whatever the problem may be. Whenever the syllogism is formed in the last figure, the truth will be found in the first and middle figures, if affirmative in first, if negative in the middle. Suppose that A has been proved to belong to no B, or not to all B, through the first figure. Then the hypothesis must have been that A belongs to some B, and the original premisses that C belongs to all A and to no B. For thus the syllogism was made and the impossible conclusion reached. But this is the middle figure, if C belongs to all A and to no B. And it is clear from these premisses that A belongs to no B. Similarly if has been proved not to belong to all B. For the hypothesis is that A belongs to all B; and the original premisses are that C belongs to all A but not to all B. Similarly too, if the premiss CA should be negative: for thus also we have the middle figure. Again suppose it has been proved that A belongs to some B. The hypothesis here is that is that A belongs to no B; and the original premisses that B belongs to all C, and A either to all or to some C: for in this way we shall get what is impossible. But if A and B belong to all C, we have the last figure. And it is clear from these premisses that A must belong to some B. Similarly if B or A should be assumed to belong to some C.
Again suppose it has been proved in the middle figure that A belongs to all B. Then the hypothesis must have been that A belongs not to all B, and the original premisses that A belongs to all C, and C to all B: for thus we shall get what is impossible. But if A belongs to all C, and C to all B, we have the first figure. Similarly if it has been proved that A belongs to some B: for the hypothesis then must have been that A belongs to no B, and the original premisses that A belongs to all C, and C to some B. If the syllogism is negative, the hypothesis must have been that A belongs to some B, and the original premisses that A belongs to no C, and C to all B, so that the first figure results. If the syllogism is not universal, but proof has been given that A does not belong to some B, we may infer in the same way. The hypothesis is that A belongs to all B, the original premisses that A belongs to no C, and C belongs to some B: for thus we get the first figure.
Again suppose it has been proved in the third figure that A belongs to all B. Then the hypothesis must have been that A belongs not to all B, and the original premisses that C belongs to all B, and A belongs to all C; for thus we shall get what is impossible. And the original premisses form the first figure. Similarly if the demonstration establishes a particular proposition: the hypothesis then must have been that A belongs to no B, and the original premisses that C belongs to some B, and A to all C. If the syllogism is negative, the hypothesis must have been that A belongs to some B, and the original premisses that C belongs to no A and to all B, and this is the middle figure. Similarly if the demonstration is not universal. The hypothesis will then be that A belongs to all B, the premisses that C belongs to no A and to some B: and this is the middle figure.
It is clear then that it is possible through the same terms to prove each of the problems ostensively as well. Similarly it will be possible if the syllogisms are ostensive to reduce them ad impossibile in the terms which have been taken, whenever the contradictory of the conclusion of the ostensive syllogism is taken as a premiss. For the syllogisms become identical with those which are obtained by means of conversion, so that we obtain immediately the figures through which each problem will be solved. It is clear then that every thesis can be proved in both ways, i.e. per impossibile and ostensively, and it is not possible to separate one method from the other.
In what figure it is possible to draw a conclusion from premisses which are opposed, and in what figure this is not possible, will be made clear in this way. Verbally four kinds of opposition are possible, viz. universal affirmative to universal negative, universal affirmative to particular negative, particular affirmative to universal negative, and particular affirmative to particular negative: but really there are only three: for the particular affirmative is only verbally opposed to the particular negative. Of the genuine opposites I call those which are universal contraries, the universal affirmative and the universal negative, e.g. ‘every science is good’, ‘no science is good’; the others I call contradictories.
In the first figure no syllogism whether affirmative or negative can be made out of opposed premisses: no affirmative syllogism is possible because both premisses must be affirmative, but opposites are, the one affirmative, the other negative: no negative syllogism is possible because opposites affirm and deny the same predicate of the same subject, and the middle term in the first figure is not predicated of both extremes, but one thing is denied of it, and it is affirmed of something else: but such premisses are not opposed.
In the middle figure a syllogism can be made both oLcontradictories and of contraries. Let A stand for good, let B and C stand for science. If then one assumes that every science is good, and no science is good, A belongs to all B and to no C, so that B belongs to no C: no science then is a science. Similarly if after taking ‘every science is good’ one took ‘the science of medicine is not good’; for A belongs to all B but to no C, so that a particular science will not be a science. Again, a particular science will not be a science if A belongs to all C but to no B, and B is science, C medicine, and A supposition: for after taking ‘no science is supposition’, one has assumed that a particular science is supposition. This syllogism differs from the preceding because the relations between the terms are reversed: before, the affirmative statement concerned B, now it concerns C. Similarly if one premiss is not universal: for the middle term is always that which is stated negatively of one extreme, and affirmatively of the other. Consequently it is possible that contradictories may lead to a conclusion, though not always or in every mood, but only if the terms subordinate to the middle are such that they are either identical or related as whole to part. Otherwise it is impossible: for the premisses cannot anyhow be either contraries or contradictories.
In the third figure an affirmative syllogism can never be made out of opposite premisses, for the reason given in reference to the first figure; but a negative syllogism is possible whether the terms are universal or not. Let B and C stand for science, A for medicine. If then one should assume that all medicine is science and that no medicine is science, he has assumed that B belongs to all A and C to no A, so that a particular science will not be a science. Similarly if the premiss BA is not assumed universally. For if some medicine is science and again no medicine is science, it results that some science is not science, The premisses are contrary if the terms are taken universally; if one is particular, they are contradictory.
We must recognize that it is possible to take opposites in the way we said, viz. ‘all science is good’ and ‘no science is good’ or ‘some science is not good’. This does not usually escape notice. But it is possible to establish one part of a contradiction through other premisses, or to assume it in the way suggested in the Topics. Since there are three oppositions to affirmative statements, it follows that opposite statements may be assumed as premisses in six ways; we may have either universal affirmative and negative, or universal affirmative and particular negative, or particular affirmative and universal negative, and the relations between the terms may be reversed; e.g. A may belong to all B and to no C, or to all C and to no B, or to all of the one, not to all of the other; here too the relation between the terms may be reversed. Similarly in the third figure. So it is clear in how many ways and in what figures a syllogism can be made by means of premisses which are opposed.
It is clear too that from false premisses it is possible to draw a true conclusion, as has been said before, but it is not possible if the premisses are opposed. For the syllogism is always contrary to the fact, e.g. if a thing is good, it is proved that it is not good, if an animal, that it is not an animal because the syllogism springs out of a contradiction and the terms presupposed are either identical or related as whole and part. It is evident also that in fallacious reasonings nothing prevents a contradiction to the hypothesis from resulting, e.g. if something is odd, it is not odd. For the syllogism owed its contrariety to its contradictory premisses; if we assume such premisses we shall get a result that contradicts our hypothesis. But we must recognize that contraries cannot be inferred from a single syllogism in such a way that we conclude that what is not good is good, or anything of that sort unless a self-contradictory premiss is at once assumed, e.g. ‘every animal is white and not white’, and we proceed ‘man is an animal’. Either we must introduce the contradiction by an additional assumption, assuming, e.g., that every science is supposition, and then assuming ‘Medicine is a science, but none of it is supposition’ (which is the mode in which refutations are made), or we must argue from two syllogisms. In no other way than this, as was said before, is it possible that the premisses should be really contrary.
To beg and assume the original question is a species of failure to demonstrate the problem proposed; but this happens in many ways. A man may not reason syllogistically at all, or he may argue from premisses which are less known or equally unknown, or he may establish the antecedent by means of its consequents; for demonstration proceeds from what is more certain and is prior. Now begging the question is none of these: but since we get to know some things naturally through themselves, and other things by means of something else (the first principles through themselves, what is subordinate to them through something else), whenever a man tries to prove what is not self-evident by means of itself, then he begs the original question. This may be done by assuming what is in question at once; it is also possible to make a transition to other things which would naturally be proved through the thesis proposed, and demonstrate it through them, e.g. if A should be proved through B, and B through C, though it was natural that C should be proved through A: for it turns out that those who reason thus are proving A by means of itself. This is what those persons do who suppose that they are constructing parallel straight lines: for they fail to see that they are assuming facts which it is impossible to demonstrate unless the parallels exist. So it turns out that those who reason thus merely say a particular thing is, if it is: in this way everything will be self-evident. But that is impossible.
If then it is uncertain whether A belongs to C, and also whether A belongs to B, and if one should assume that A does belong to B, it is not yet clear whether he begs the original question, but it is evident that he is not demonstrating: for what is as uncertain as the question to be answered cannot be a principle of a demonstration. If however B is so related to C that they are identical, or if they are plainly convertible, or the one belongs to the other, the original question is begged. For one might equally well prove that A belongs to B through those terms if they are convertible. But if they are not convertible, it is the fact that they are not that prevents such a demonstration, not the method of demonstrating. But if one were to make the conversion, then he would be doing what we have described and effecting a reciprocal proof with three propositions.
Similarly if he should assume that B belongs to C, this being as uncertain as the question whether A belongs to C, the question is not yet begged, but no demonstration is made. If however A and B are identical either because they are convertible or because A follows B, then the question is begged for the same reason as before. For we have explained the meaning of begging the question, viz. proving that which is not self-evident by means of itself.
If then begging the question is proving what is not self-evident by means of itself, in other words failing to prove when the failure is due to the thesis to be proved and the premiss through which it is proved being equally uncertain, either because predicates which are identical belong to the same subject, or because the same predicate belongs to subjects which are identical, the question may be begged in the middle and third figures in both ways, though, if the syllogism is affirmative, only in the third and first figures. If the syllogism is negative, the question is begged when identical predicates are denied of the same subject; and both premisses do not beg the question indifferently (in a similar way the question may be begged in the middle figure), because the terms in negative syllogisms are not convertible. In scientific demonstrations the question is begged when the terms are really related in the manner described, in dialectical arguments when they are according to common opinion so related.
The objection that ‘this is not the reason why the result is false’, which we frequently make in argument, is made primarily in the case of a reductio ad impossibile, to rebut the proposition which was being proved by the reduction. For unless a man has contradicted this proposition he will not say, ‘False cause’, but urge that something false has been assumed in the earlier parts of the argument; nor will he use the formula in the case of an ostensive proof; for here what one denies is not assumed as a premiss. Further when anything is refuted ostensively by the terms ABC, it cannot be objected that the syllogism does not depend on the assumption laid down. For we use the expression ‘false cause’, when the syllogism is concluded in spite of the refutation of this position; but that is not possible in ostensive proofs: since if an assumption is refuted, a syllogism can no longer be drawn in reference to it. It is clear then that the expression ‘false cause’ can only be used in the case of a reductio ad impossibile, and when the original hypothesis is so related to the impossible conclusion, that the conclusion results indifferently whether the hypothesis is made or not. The most obvious case of the irrelevance of an assumption to a conclusion which is false is when a syllogism drawn from middle terms to an impossible conclusion is independent of the hypothesis, as we have explained in the Topics. For to put that which is not the cause as the cause, is just this: e.g. if a man, wishing to prove that the diagonal of the square is incommensurate with the side, should try to prove Zeno’s theorem that motion is impossible, and so establish a reductio ad impossibile: for Zeno’s false theorem has no connexion at all with the original assumption. Another case is where the impossible conclusion is connected with the hypothesis, but does not result from it. This may happen whether one traces the connexion upwards or downwards, e.g. if it is laid down that A belongs to B, B to C, and C to D, and it should be false that B belongs to D: for if we eliminated A and assumed all the same that B belongs to C and C to D, the false conclusion would not depend on the original hypothesis. Or again trace the connexion upwards; e.g. suppose that A belongs to B, E to A and F to E, it being false that F belongs to A. In this way too the impossible conclusion would result, though the original hypothesis were eliminated. But the impossible conclusion ought to be connected with the original terms: in this way it will depend on the hypothesis, e.g. when one traces the connexion downwards, the impossible conclusion must be connected with that term which is predicate in the hypothesis: for if it is impossible that A should belong to D, the false conclusion will no longer result after A has been eliminated. If one traces the connexion upwards, the impossible conclusion must be connected with that term which is subject in the hypothesis: for if it is impossible that F should belong to B, the impossible conclusion will disappear if B is eliminated. Similarly when the syllogisms are negative.
It is clear then that when the impossibility is not related to the original terms, the false conclusion does not result on account of the assumption. Or perhaps even so it may sometimes be independent. For if it were laid down that A belongs not to B but to K, and that K belongs to C and C to D, the impossible conclusion would still stand. Similarly if one takes the terms in an ascending series. Consequently since the impossibility results whether the first assumption is suppressed or not, it would appear to be independent of that assumption. Or perhaps we ought not to understand the statement that the false conclusion results independently of the assumption, in the sense that if something else were supposed the impossibility would result; but rather we mean that when the first assumption is eliminated, the same impossibility results through the remaining premisses; since it is not perhaps absurd that the same false result should follow from several hypotheses, e.g. that parallels meet, both on the assumption that the interior angle is greater than the exterior and on the assumption that a triangle contains more than two right angles.
A false argument depends on the first false statement in it. Every syllogism is made out of two or more premisses. If then the false conclusion is drawn from two premisses, one or both of them must be false: for (as we proved) a false syllogism cannot be drawn from two premisses. But if the premisses are more than two, e.g. if C is established through A and B, and these through D, E, F, and G, one of these higher propositions must be false, and on this the argument depends: for A and B are inferred by means of D, E, F, and G. Therefore the conclusion and the error results from one of them.
In order to avoid having a syllogism drawn against us we must take care, whenever an opponent asks us to admit the reason without the conclusions, not to grant him the same term twice over in his premisses, since we know that a syllogism cannot be drawn without a middle term, and that term which is stated more than once is the middle. How we ought to watch the middle in reference to each conclusion, is evident from our knowing what kind of thesis is proved in each figure. This will not escape us since we know how we are maintaining the argument.
That which we urge men to beware of in their admissions, they ought in attack to try to conceal. This will be possible first, if, instead of drawing the conclusions of preliminary syllogisms, they take the necessary premisses and leave the conclusions in the dark; secondly if instead of inviting assent to propositions which are closely connected they take as far as possible those that are not connected by middle terms. For example suppose that A is to be inferred to be true of F, B, C, D, and E being middle terms. One ought then to ask whether A belongs to B, and next whether D belongs to E, instead of asking whether B belongs to C; after that he may ask whether B belongs to C, and so on. If the syllogism is drawn through one middle term, he ought to begin with that: in this way he will most likely deceive his opponent.
It is possible for the premisses of the syllogism to be true, or to be false, or to be the one true, the other false. The conclusion is either true or false necessarily. From true premisses it is not possible to draw a false conclusion, but a true conclusion may be drawn from false premisses, true however only in respect to the fact, not to the reason. The reason cannot be established from false premisses: why this is so will be explained in the sequel.
First then that it is not possible to draw a false conclusion from true premisses, is made clear by this consideration. If it is necessary that B should be when A is, it is necessary that A should not be when B is not. If then A is true, B must be true: otherwise it will turn out that the same thing both is and is not at the same time. But this is impossible. Let it not, because A is laid down as a single term, be supposed that it is possible, when a single fact is given, that something should necessarily result. For that is not possible. For what results necessarily is the conclusion, and the means by which this comes about are at the least three terms, and two relations of subject and predicate or premisses. If then it is true that A belongs to all that to which B belongs, and that B belongs to all that to which C belongs, it is necessary that A should belong to all that to which C belongs, and this cannot be false: for then the same thing will belong and not belong at the same time. So A is posited as one thing, being two premisses taken together. The same holds good of negative syllogisms: it is not possible to prove a false conclusion from true premisses.
But from what is false a true conclusion may be drawn, whether both the premisses are false or only one, provided that this is not either of the premisses indifferently, if it is taken as wholly false: but if the premiss is not taken as wholly false, it does not matter which of the two is false. (1) Let A belong to the whole of C, but to none of the Bs, neither let B belong to C. This is possible, e.g. animal belongs to no stone, nor stone to any man. If then A is taken to belong to all B and B to all C, A will belong to all C; consequently though both the premisses are false the conclusion is true: for every man is an animal. Similarly with the negative. For it is possible that neither A nor B should belong to any C, although A belongs to all B, e.g. if the same terms are taken and man is put as middle: for neither animal nor man belongs to any stone, but animal belongs to every man. Consequently if one term is taken to belong to none of that to which it does belong, and the other term is taken to belong to all of that to which it does not belong, though both the premisses are false the conclusion will be true. (2) A similar proof may be given if each premiss is partially false.
(3) But if one only of the premisses is false, when the first premiss is wholly false, e.g. AB, the conclusion will not be true, but if the premiss BC is wholly false, a true conclusion will be possible. I mean by ‘wholly false’ the contrary of the truth, e.g. if what belongs to none is assumed to belong to all, or if what belongs to all is assumed to belong to none. Let A belong to no B, and B to all C. If then the premiss BC which I take is true, and the premiss AB is wholly false, viz. that A belongs to all B, it is impossible that the conclusion should be true: for A belonged to none of the Cs, since A belonged to nothing to which B belonged, and B belonged to all C. Similarly there cannot be a true conclusion if A belongs to all B, and B to all C, but while the true premiss BC is assumed, the wholly false premiss AB is also assumed, viz. that A belongs to nothing to which B belongs: here the conclusion must be false. For A will belong to all C, since A belongs to everything to which B belongs, and B to all C. It is clear then that when the first premiss is wholly false, whether affirmative or negative, and the other premiss is true, the conclusion cannot be true.
(4) But if the premiss is not wholly false, a true conclusion is possible. For if A belongs to all C and to some B, and if B belongs to all C, e.g. animal to every swan and to some white thing, and white to every swan, then if we take as premisses that A belongs to all B, and B to all C, A will belong to all C truly: for every swan is an animal. Similarly if the statement AB is negative. For it is possible that A should belong to some B and to no C, and that B should belong to all C, e.g. animal to some white thing, but to no snow, and white to all snow. If then one should assume that A belongs to no B, and B to all C, then will belong to no C.
(5) But if the premiss AB, which is assumed, is wholly true, and the premiss BC is wholly false, a true syllogism will be possible: for nothing prevents A belonging to all B and to all C, though B belongs to no C, e.g. these being species of the same genus which are not subordinate one to the other: for animal belongs both to horse and to man, but horse to no man. If then it is assumed that A belongs to all B and B to all C, the conclusion will be true, although the premiss BC is wholly false. Similarly if the premiss AB is negative. For it is possible that A should belong neither to any B nor to any C, and that B should not belong to any C, e.g. a genus to species of another genus: for animal belongs neither to music nor to the art of healing, nor does music belong to the art of healing. If then it is assumed that A belongs to no B, and B to all C, the conclusion will be true.
(6) And if the premiss BC is not wholly false but in part only, even so the conclusion may be true. For nothing prevents A belonging to the whole of B and of C, while B belongs to some C, e.g. a genus to its species and difference: for animal belongs to every man and to every footed thing, and man to some footed things though not to all. If then it is assumed that A belongs to all B, and B to all C, A will belong to all C: and this ex hypothesi is true. Similarly if the premiss AB is negative. For it is possible that A should neither belong to any B nor to any C, though B belongs to some C, e.g. a genus to the species of another genus and its difference: for animal neither belongs to any wisdom nor to any instance of ‘speculative’, but wisdom belongs to some instance of ‘speculative’. If then it should be assumed that A belongs to no B, and B to all C, will belong to no C: and this ex hypothesi is true.
In particular syllogisms it is possible when the first premiss is wholly false, and the other true, that the conclusion should be true; also when the first premiss is false in part, and the other true; and when the first is true, and the particular is false; and when both are false. (7) For nothing prevents A belonging to no B, but to some C, and B to some C, e.g. animal belongs to no snow, but to some white thing, and snow to some white thing. If then snow is taken as middle, and animal as first term, and it is assumed that A belongs to the whole of B, and B to some C, then the premiss BC is wholly false, the premiss BC true, and the conclusion true. Similarly if the premiss AB is negative: for it is possible that A should belong to the whole of B, but not to some C, although B belongs to some C, e.g. animal belongs to every man, but does not follow some white, but man belongs to some white; consequently if man be taken as middle term and it is assumed that A belongs to no B but B belongs to some C, the conclusion will be true although the premiss AB is wholly false. (If the premiss AB is false in part, the conclusion may be true. For nothing prevents A belonging both to B and to some C, and B belonging to some C, e.g. animal to something beautiful and to something great, and beautiful belonging to something great. If then A is assumed to belong to all B, and B to some C, the a premiss AB will be partially false, the premiss BC will be true, and the conclusion true. Similarly if the premiss AB is negative. For the same terms will serve, and in the same positions, to prove the point.
(9) Again if the premiss AB is true, and the premiss BC is false, the conclusion may be true. For nothing prevents A belonging to the whole of B and to some C, while B belongs to no C, e.g. animal to every swan and to some black things, though swan belongs to no black thing. Consequently if it should be assumed that A belongs to all B, and B to some C, the conclusion will be true, although the statement BC is false. Similarly if the premiss AB is negative. For it is possible that A should belong to no B, and not to some C, while B belongs to no C, e.g. a genus to the species of another genus and to the accident of its own species: for animal belongs to no number and not to some white things, and number belongs to nothing white. If then number is taken as middle, and it is assumed that A belongs to no B, and B to some C, then A will not belong to some C, which ex hypothesi is true. And the premiss AB is true, the premiss BC false.
(10) Also if the premiss AB is partially false, and the premiss BC is false too, the conclusion may be true. For nothing prevents A belonging to some B and to some C, though B belongs to no C, e.g. if B is the contrary of C, and both are accidents of the same genus: for animal belongs to some white things and to some black things, but white belongs to no black thing. If then it is assumed that A belongs to all B, and B to some C, the conclusion will be true. Similarly if the premiss AB is negative: for the same terms arranged in the same way will serve for the proof.
(11) Also though both premisses are false the conclusion may be true. For it is possible that A may belong to no B and to some C, while B belongs to no C, e.g. a genus in relation to the species of another genus, and to the accident of its own species: for animal belongs to no number, but to some white things, and number to nothing white. If then it is assumed that A belongs to all B and B to some C, the conclusion will be true, though both premisses are false. Similarly also if the premiss AB is negative. For nothing prevents A belonging to the whole of B, and not to some C, while B belongs to no C, e.g. animal belongs to every swan, and not to some black things, and swan belongs to nothing black. Consequently if it is assumed that A belongs to no B, and B to some C, then A does not belong to some C. The conclusion then is true, but the premisses arc false.
Since we know when a syllogism can be formed and how its terms must be related, it is clear when refutation will be possible and when impossible. A refutation is possible whether everything is conceded, or the answers alternate (one, I mean, being affirmative, the other negative). For as has been shown a syllogism is possible whether the terms are related in affirmative propositions or one proposition is affirmative, the other negative: consequently, if what is laid down is contrary to the conclusion, a refutation must take place: for a refutation is a syllogism which establishes the contradictory. But if nothing is conceded, a refutation is impossible: for no syllogism is possible (as we saw) when all the terms are negative: therefore no refutation is possible. For if a refutation were possible, a syllogism must be possible; although if a syllogism is possible it does not follow that a refutation is possible. Similarly refutation is not possible if nothing is conceded universally: since the fields of refutation and syllogism are defined in the same way.
It sometimes happens that just as we are deceived in the arrangement of the terms, so error may arise in our thought about them, e.g. if it is possible that the same predicate should belong to more than one subject immediately, but although knowing the one, a man may forget the other and think the opposite true. Suppose that A belongs to B and to C in virtue of their nature, and that B and C belong to all D in the same way. If then a man thinks that A belongs to all B, and B to D, but A to no C, and C to all D, he will both know and not know the same thing in respect of the same thing. Again if a man were to make a mistake about the members of a single series; e.g. suppose A belongs to B, B to C, and C to D, but some one thinks that A belongs to all B, but to no C: he will both know that A belongs to D, and think that it does not. Does he then maintain after this simply that what he knows, he does not think? For he knows in a way that A belongs to C through B, since the part is included in the whole; so that what he knows in a way, this he maintains he does not think at all: but that is impossible.
In the former case, where the middle term does not belong to the same series, it is not possible to think both the premisses with reference to each of the two middle terms: e.g. that A belongs to all B, but to no C, and both B and C belong to all D. For it turns out that the first premiss of the one syllogism is either wholly or partially contrary to the first premiss of the other. For if he thinks that A belongs to everything to which B belongs, and he knows that B belongs to D, then he knows that A belongs to D. Consequently if again he thinks that A belongs to nothing to which C belongs, he thinks that A does not belong to some of that to which B belongs; but if he thinks that A belongs to everything to which B belongs, and again thinks that A does not belong to some of that to which B belongs, these beliefs are wholly or partially contrary. In this way then it is not possible to think; but nothing prevents a man thinking one premiss of each syllogism of both premisses of one of the two syllogisms: e.g. A belongs to all B, and B to D, and again A belongs to no C. An error of this kind is similar to the error into which we fall concerning particulars: e.g. if A belongs to all B, and B to all C, A will belong to all C. If then a man knows that A belongs to everything to which B belongs, he knows that A belongs to C. But nothing prevents his being ignorant that C exists; e.g. let A stand for two right angles, B for triangle, C for a particular diagram of a triangle. A man might think that C did not exist, though he knew that every triangle contains two right angles; consequently he will know and not know the same thing at the same time. For the expression ‘to know that every triangle has its angles equal to two right angles’ is ambiguous, meaning to have the knowledge either of the universal or of the particulars. Thus then he knows that C contains two right angles with a knowledge of the universal, but not with a knowledge of the particulars; consequently his knowledge will not be contrary to his ignorance. The argument in the Meno that learning is recollection may be criticized in a similar way. For it never happens that a man starts with a foreknowledge of the particular, but along with the process of being led to see the general principle he receives a knowledge of the particulars, by an act (as it were) of recognition. For we know some things directly; e.g. that the angles are equal to two right angles, if we know that the figure is a triangle. Similarly in all other cases.
By a knowledge of the universal then we see the particulars, but we do not know them by the kind of knowledge which is proper to them; consequently it is possible that we may make mistakes about them, but not that we should have the knowledge and error that are contrary to one another: rather we have the knowledge of the universal but make a mistake in apprehending the particular. Similarly in the cases stated above. The error in respect of the middle term is not contrary to the knowledge obtained through the syllogism, nor is the thought in respect of one middle term contrary to that in respect of the other. Nothing prevents a man who knows both that A belongs to the whole of B, and that B again belongs to C, thinking that A does not belong to C, e.g. knowing that every mule is sterile and that this is a mule, and thinking that this animal is with foal: for he does not know that A belongs to C, unless he considers the two propositions together. So it is evident that if he knows the one and does not know the other, he will fall into error. And this is the relation of knowledge of the universal to knowledge of the particular. For we know no sensible thing, once it has passed beyond the range of our senses, even if we happen to have perceived it, except by means of the universal and the possession of the knowledge which is proper to the particular, but without the actual exercise of that knowledge. For to know is used in three senses: it may mean either to have knowledge of the universal or to have knowledge proper to the matter in hand or to exercise such knowledge: consequently three kinds of error also are possible. Nothing then prevents a man both knowing and being mistaken about the same thing, provided that his knowledge and his error are not contrary. And this happens also to the man whose knowledge is limited to each of the premisses and who has not previously considered the particular question. For when he thinks that the mule is with foal he has not the knowledge in the sense of its actual exercise, nor on the other hand has his thought caused an error contrary to his knowledge: for the error contrary to the knowledge of the universal would be a syllogism.
But he who thinks the essence of good is the essence of bad will think the same thing to be the essence of good and the essence of bad. Let A stand for the essence of good and B for the essence of bad, and again C for the essence of good. Since then he thinks B and C identical, he will think that C is B, and similarly that B is A, consequently that C is A. For just as we saw that if B is true of all of which C is true, and A is true of all of which B is true, A is true of C, similarly with the word ‘think’. Similarly also with the word ‘is’; for we saw that if C is the same as B, and B as A, C is the same as A. Similarly therefore with ‘opine’. Perhaps then this is necessary if a man will grant the first point. But presumably that is false, that any one could suppose the essence of good to be the essence of bad, save incidentally. For it is possible to think this in many different ways. But we must consider this matter better.
Whenever the extremes are convertible it is necessary that the middle should be convertible with both. For if A belongs to C through B, then if A and C are convertible and C belongs everything to which A belongs, B is convertible with A, and B belongs to everything to which A belongs, through C as middle, and C is convertible with B through A as middle. Similarly if the conclusion is negative, e.g. if B belongs to C, but A does not belong to B, neither will A belong to C. If then B is convertible with A, C will be convertible with A. Suppose B does not belong to A; neither then will C: for ex hypothesi B belonged to all C. And if C is convertible with B, B is convertible also with A, for C is said of that of all of which B is said. And if C is convertible in relation to A and to B, B also is convertible in relation to A. For C belongs to that to which B belongs: but C does not belong to that to which A belongs. And this alone starts from the conclusion; the preceding moods do not do so as in the affirmative syllogism. Again if A and B are convertible, and similarly C and D, and if A or C must belong to anything whatever, then B and D will be such that one or other belongs to anything whatever. For since B belongs to that to which A belongs, and D belongs to that to which C belongs, and since A or C belongs to everything, but not together, it is clear that B or D belongs to everything, but not together. For example if that which is uncreated is incorruptible and that which is incorruptible is uncreated, it is necessary that what is created should be corruptible and what is corruptible should have been created. For two syllogisms have been put together. Again if A or B belongs to everything and if C or D belongs to everything, but they cannot belong together, then when A and C are convertible B and D are convertible. For if B does not belong to something to which D belongs, it is clear that A belongs to it. But if A then C: for they are convertible. Therefore C and D belong together. But this is impossible. When A belongs to the whole of B and to C and is affirmed of nothing else, and B also belongs to all C, it is necessary that A and B should be convertible: for since A is said of B and C only, and B is affirmed both of itself and of C, it is clear that B will be said of everything of which A is said, except A itself. Again when A and B belong to the whole of C, and C is convertible with B, it is necessary that A should belong to all B: for since A belongs to all C, and C to B by conversion, A will belong to all B.
When, of two opposites A and B, A is preferable to B, and similarly D is preferable to C, then if A and C together are preferable to B and D together, A must be preferable to D. For A is an object of desire to the same extent as B is an object of aversion, since they are opposites: and C is similarly related to D, since they also are opposites. If then A is an object of desire to the same extent as D, B is an object of aversion to the same extent as C (since each is to the same extent as each-the one an object of aversion, the other an object of desire). Therefore both A and C together, and B and D together, will be equally objects of desire or aversion. But since A and C are preferable to B and D, A cannot be equally desirable with D; for then B along with D would be equally desirable with A along with C. But if D is preferable to A, then B must be less an object of aversion than C: for the less is opposed to the less. But the greater good and lesser evil are preferable to the lesser good and greater evil: the whole BD then is preferable to the whole AC. But ex hypothesi this is not so. A then is preferable to D, and C consequently is less an object of aversion than B. If then every lover in virtue of his love would prefer A, viz. that the beloved should be such as to grant a favour, and yet should not grant it (for which C stands), to the beloved’s granting the favour (represented by D) without being such as to grant it (represented by B), it is clear that A (being of such a nature) is preferable to granting the favour. To receive affection then is preferable in love to sexual intercourse. Love then is more dependent on friendship than on intercourse. And if it is most dependent on receiving affection, then this is its end. Intercourse then either is not an end at all or is an end relative to the further end, the receiving of affection. And indeed the same is true of the other desires and arts.
It is clear then how the terms are related in conversion, and in respect of being in a higher degree objects of aversion or of desire. We must now state that not only dialectical and demonstrative syllogisms are formed by means of the aforesaid figures, but also rhetorical syllogisms and in general any form of persuasion, however it may be presented. For every belief comes either through syllogism or from induction.
Now induction, or rather the syllogism which springs out of induction, consists in establishing syllogistically a relation between one extreme and the middle by means of the other extreme, e.g. if B is the middle term between A and C, it consists in proving through C that A belongs to B. For this is the manner in which we make inductions. For example let A stand for long-lived, B for bileless, and C for the particular long-lived animals, e.g. man, horse, mule. A then belongs to the whole of C: for whatever is bileless is long-lived. But B also (’not possessing bile’) belongs to all C. If then C is convertible with B, and the middle term is not wider in extension, it is necessary that A should belong to B. For it has already been proved that if two things belong to the same thing, and the extreme is convertible with one of them, then the other predicate will belong to the predicate that is converted. But we must apprehend C as made up of all the particulars. For induction proceeds through an enumeration of all the cases.
Such is the syllogism which establishes the first and immediate premiss: for where there is a middle term the syllogism proceeds through the middle term; when there is no middle term, through induction. And in a way induction is opposed to syllogism: for the latter proves the major term to belong to the third term by means of the middle, the former proves the major to belong to the middle by means of the third. In the order of nature, syllogism through the middle term is prior and better known, but syllogism through induction is clearer to us.
We have an ‘example’ when the major term is proved to belong to the middle by means of a term which resembles the third. It ought to be known both that the middle belongs to the third term, and that the first belongs to that which resembles the third. For example let A be evil, B making war against neighbours, C Athenians against Thebans, D Thebans against Phocians. If then we wish to prove that to fight with the Thebans is an evil, we must assume that to fight against neighbours is an evil. Evidence of this is obtained from similar cases, e.g. that the war against the Phocians was an evil to the Thebans. Since then to fight against neighbours is an evil, and to fight against the Thebans is to fight against neighbours, it is clear that to fight against the Thebans is an evil. Now it is clear that B belongs to C and to D (for both are cases of making war upon one’s neighbours) and that A belongs to D (for the war against the Phocians did not turn out well for the Thebans): but that A belongs to B will be proved through D. Similarly if the belief in the relation of the middle term to the extreme should be produced by several similar cases. Clearly then to argue by example is neither like reasoning from part to whole, nor like reasoning from whole to part, but rather reasoning from part to part, when both particulars are subordinate to the same term, and one of them is known. It differs from induction, because induction starting from all the particular cases proves (as we saw) that the major term belongs to the middle, and does not apply the syllogistic conclusion to the minor term, whereas argument by example does make this application and does not draw its proof from all the particular cases.
By reduction we mean an argument in which the first term clearly belongs to the middle, but the relation of the middle to the last term is uncertain though equally or more probable than the conclusion; or again an argument in which the terms intermediate between the last term and the middle are few. For in any of these cases it turns out that we approach more nearly to knowledge. For example let A stand for what can be taught, B for knowledge, C for justice. Now it is clear that knowledge can be taught: but it is uncertain whether virtue is knowledge. If now the statement BC is equally or more probable than AC, we have a reduction: for we are nearer to knowledge, since we have taken a new term, being so far without knowledge that A belongs to C. Or again suppose that the terms intermediate between B and C are few: for thus too we are nearer knowledge. For example let D stand for squaring, E for rectilinear figure, F for circle. If there were only one term intermediate between E and F (viz. that the circle is made equal to a rectilinear figure by the help of lunules), we should be near to knowledge. But when BC is not more probable than AC, and the intermediate terms are not few, I do not call this reduction: nor again when the statement BC is immediate: for such a statement is knowledge.
An objection is a premiss contrary to a premiss. It differs from a premiss, because it may be particular, but a premiss either cannot be particular at all or not in universal syllogisms. An objection is brought in two ways and through two figures; in two ways because every objection is either universal or particular, by two figures because objections are brought in opposition to the premiss, and opposites can be proved only in the first and third figures. If a man maintains a universal affirmative, we reply with a universal or a particular negative; the former is proved from the first figure, the latter from the third. For example let stand for there being a single science, B for contraries. If a man premises that contraries are subjects of a single science, the objection may be either that opposites are never subjects of a single science, and contraries are opposites, so that we get the first figure, or that the knowable and the unknowable are not subjects of a single science: this proof is in the third figure: for it is true of C (the knowable and the unknowable) that they are contraries, and it is false that they are the subjects of a single science.
Similarly if the premiss objected to is negative. For if a man maintains that contraries are not subjects of a single science, we reply either that all opposites or that certain contraries, e.g. what is healthy and what is sickly, are subjects of the same science: the former argument issues from the first, the latter from the third figure.
In general if a man urges a universal objection he must frame his contradiction with reference to the universal of the terms taken by his opponent, e.g. if a man maintains that contraries are not subjects of the same science, his opponent must reply that there is a single science of all opposites. Thus we must have the first figure: for the term which embraces the original subject becomes the middle term.
If the objection is particular, the objector must frame his contradiction with reference to a term relatively to which the subject of his opponent’s premiss is universal, e.g. he will point out that the knowable and the unknowable are not subjects of the same science: ‘contraries’ is universal relatively to these. And we have the third figure: for the particular term assumed is middle, e.g. the knowable and the unknowable. Premisses from which it is possible to draw the contrary conclusion are what we start from when we try to make objections. Consequently we bring objections in these figures only: for in them only are opposite syllogisms possible, since the second figure cannot produce an affirmative conclusion.
Besides, an objection in the middle figure would require a fuller argument, e.g. if it should not be granted that A belongs to B, because C does not follow B. This can be made clear only by other premisses. But an objection ought not to turn off into other things, but have its new premiss quite clear immediately. For this reason also this is the only figure from which proof by signs cannot be obtained.
We must consider later the other kinds of objection, namely the objection from contraries, from similars, and from common opinion, and inquire whether a particular objection cannot be elicited from the first figure or a negative objection from the second.
A probability and a sign are not identical, but a probability is a generally approved proposition: what men know to happen or not to happen, to be or not to be, for the most part thus and thus, is a probability, e.g. ‘the envious hate’, ‘the beloved show affection’. A sign means a demonstrative proposition necessary or generally approved: for anything such that when it is another thing is, or when it has come into being the other has come into being before or after, is a sign of the other’s being or having come into being. Now an enthymeme is a syllogism starting from probabilities or signs, and a sign may be taken in three ways, corresponding to the position of the middle term in the figures. For it may be taken as in the first figure or the second or the third. For example the proof that a woman is with child because she has milk is in the first figure: for to have milk is the middle term. Let A represent to be with child, B to have milk, C woman. The proof that wise men are good, since Pittacus is good, comes through the last figure. Let A stand for good, B for wise men, C for Pittacus. It is true then to affirm both A and B of C: only men do not say the latter, because they know it, though they state the former. The proof that a woman is with child because she is pale is meant to come through the middle figure: for since paleness follows women with child and is a concomitant of this woman, people suppose it has been proved that she is with child. Let A stand for paleness, B for being with child, C for woman. Now if the one proposition is stated, we have only a sign, but if the other is stated as well, a syllogism, e.g. ‘Pittacus is generous, since ambitious men are generous and Pittacus is ambitious.’ Or again ‘Wise men are good, since Pittacus is not only good but wise.’ In this way then syllogisms are formed, only that which proceeds through the first figure is irrefutable if it is true (for it is universal), that which proceeds through the last figure is refutable even if the conclusion is true, since the syllogism is not universal nor correlative to the matter in question: for though Pittacus is good, it is not therefore necessary that all other wise men should be good. But the syllogism which proceeds through the middle figure is always refutable in any case: for a syllogism can never be formed when the terms are related in this way: for though a woman with child is pale, and this woman also is pale, it is not necessary that she should be with child. Truth then may be found in signs whatever their kind, but they have the differences we have stated.
We must either divide signs in the way stated, and among them designate the middle term as the index (for people call that the index which makes us know, and the middle term above all has this character), or else we must call the arguments derived from the extremes signs, that derived from the middle term the index: for that which is proved through the first figure is most generally accepted and most true.
It is possible to infer character from features, if it is granted that the body and the soul are changed together by the natural affections: I say ‘natural’, for though perhaps by learning music a man has made some change in his soul, this is not one of those affections which are natural to us; rather I refer to passions and desires when I speak of natural emotions. If then this were granted and also that for each change there is a corresponding sign, and we could state the affection and sign proper to each kind of animal, we shall be able to infer character from features. For if there is an affection which belongs properly to an individual kind, e.g. courage to lions, it is necessary that there should be a sign of it: for ex hypothesi body and soul are affected together. Suppose this sign is the possession of large extremities: this may belong to other kinds also though not universally. For the sign is proper in the sense stated, because the affection is proper to the whole kind, though not proper to it alone, according to our usual manner of speaking. The same thing then will be found in another kind, and man may be brave, and some other kinds of animal as well. They will then have the sign: for ex hypothesi there is one sign corresponding to each affection. If then this is so, and we can collect signs of this sort in these animals which have only one affection proper to them-but each affection has its sign, since it is necessary that it should have a single sign-we shall then be able to infer character from features. But if the kind as a whole has two properties, e.g. if the lion is both brave and generous, how shall we know which of the signs which are its proper concomitants is the sign of a particular affection? Perhaps if both belong to some other kind though not to the whole of it, and if, in those kinds in which each is found though not in the whole of their members, some members possess one of the affections and not the other: e.g. if a man is brave but not generous, but possesses, of the two signs, large extremities, it is clear that this is the sign of courage in the lion also. To judge character from features, then, is possible in the first figure if the middle term is convertible with the first extreme, but is wider than the third term and not convertible with it: e.g. let A stand for courage, B for large extremities, and C for lion. B then belongs to everything to which C belongs, but also to others. But A belongs to everything to which B belongs, and to nothing besides, but is convertible with B: otherwise, there would not be a single sign correlative with each affection.
In the middle figure it is possible in every way to reach a true conclusion through false premisses, whether the syllogisms are universal or particular, viz. when both premisses are wholly false; when each is partially false; when one is true, the other wholly false (it does not matter which of the two premisses is false); if both premisses are partially false; if one is quite true, the other partially false; if one is wholly false, the other partially true. For (1) if A belongs to no B and to all C, e.g. animal to no stone and to every horse, then if the premisses are stated contrariwise and it is assumed that A belongs to all B and to no C, though the premisses are wholly false they will yield a true conclusion. Similarly if A belongs to all B and to no C: for we shall have the same syllogism.
(2) Again if one premiss is wholly false, the other wholly true: for nothing prevents A belonging to all B and to all C, though B belongs to no C, e.g. a genus to its co-ordinate species. For animal belongs to every horse and man, and no man is a horse. If then it is assumed that animal belongs to all of the one, and none of the other, the one premiss will be wholly false, the other wholly true, and the conclusion will be true whichever term the negative statement concerns.
(3) Also if one premiss is partially false, the other wholly true. For it is possible that A should belong to some B and to all C, though B belongs to no C, e.g. animal to some white things and to every raven, though white belongs to no raven. If then it is assumed that A belongs to no B, but to the whole of C, the premiss AB is partially false, the premiss AC wholly true, and the conclusion true. Similarly if the negative statement is transposed: the proof can be made by means of the same terms. Also if the affirmative premiss is partially false, the negative wholly true, a true conclusion is possible. For nothing prevents A belonging to some B, but not to C as a whole, while B belongs to no C, e.g. animal belongs to some white things, but to no pitch, and white belongs to no pitch. Consequently if it is assumed that A belongs to the whole of B, but to no C, the premiss AB is partially false, the premiss AC is wholly true, and the conclusion is true.
(4) And if both the premisses are partially false, the conclusion may be true. For it is possible that A should belong to some B and to some C, and B to no C, e.g. animal to some white things and to some black things, though white belongs to nothing black. If then it is assumed that A belongs to all B and to no C, both premisses are partially false, but the conclusion is true. Similarly, if the negative premiss is transposed, the proof can be made by means of the same terms.
It is clear also that our thesis holds in particular syllogisms. For (5) nothing prevents A belonging to all B and to some C, though B does not belong to some C, e.g. animal to every man and to some white things, though man will not belong to some white things. If then it is stated that A belongs to no B and to some C, the universal premiss is wholly false, the particular premiss is true, and the conclusion is true. Similarly if the premiss AB is affirmative: for it is possible that A should belong to no B, and not to some C, though B does not belong to some C, e.g. animal belongs to nothing lifeless, and does not belong to some white things, and lifeless will not belong to some white things. If then it is stated that A belongs to all B and not to some C, the premiss AB which is universal is wholly false, the premiss AC is true, and the conclusion is true. Also a true conclusion is possible when the universal premiss is true, and the particular is false. For nothing prevents A following neither B nor C at all, while B does not belong to some C, e.g. animal belongs to no number nor to anything lifeless, and number does not follow some lifeless things. If then it is stated that A belongs to no B and to some C, the conclusion will be true, and the universal premiss true, but the particular false. Similarly if the premiss which is stated universally is affirmative. For it is possible that should A belong both to B and to C as wholes, though B does not follow some C, e.g. a genus in relation to its species and difference: for animal follows every man and footed things as a whole, but man does not follow every footed thing. Consequently if it is assumed that A belongs to the whole of B, but does not belong to some C, the universal premiss is true, the particular false, and the conclusion true.
(6) It is clear too that though both premisses are false they may yield a true conclusion, since it is possible that A should belong both to B and to C as wholes, though B does not follow some C. For if it is assumed that A belongs to no B and to some C, the premisses are both false, but the conclusion is true. Similarly if the universal premiss is affirmative and the particular negative. For it is possible that A should follow no B and all C, though B does not belong to some C, e.g. animal follows no science but every man, though science does not follow every man. If then A is assumed to belong to the whole of B, and not to follow some C, the premisses are false but the conclusion is true.
In the last figure a true conclusion may come through what is false, alike when both premisses are wholly false, when each is partly false, when one premiss is wholly true, the other false, when one premiss is partly false, the other wholly true, and vice versa, and in every other way in which it is possible to alter the premisses. For (1) nothing prevents neither A nor B from belonging to any C, while A belongs to some B, e.g. neither man nor footed follows anything lifeless, though man belongs to some footed things. If then it is assumed that A and B belong to all C, the premisses will be wholly false, but the conclusion true. Similarly if one premiss is negative, the other affirmative. For it is possible that B should belong to no C, but A to all C, and that should not belong to some B, e.g. black belongs to no swan, animal to every swan, and animal not to everything black. Consequently if it is assumed that B belongs to all C, and A to no C, A will not belong to some B: and the conclusion is true, though the premisses are false.
(2) Also if each premiss is partly false, the conclusion may be true. For nothing prevents both A and B from belonging to some C while A belongs to some B, e.g. white and beautiful belong to some animals, and white to some beautiful things. If then it is stated that A and B belong to all C, the premisses are partially false, but the conclusion is true. Similarly if the premiss AC is stated as negative. For nothing prevents A from not belonging, and B from belonging, to some C, while A does not belong to all B, e.g. white does not belong to some animals, beautiful belongs to some animals, and white does not belong to everything beautiful. Consequently if it is assumed that A belongs to no C, and B to all C, both premisses are partly false, but the conclusion is true.
(3) Similarly if one of the premisses assumed is wholly false, the other wholly true. For it is possible that both A and B should follow all C, though A does not belong to some B, e.g. animal and white follow every swan, though animal does not belong to everything white. Taking these then as terms, if one assumes that B belongs to the whole of C, but A does not belong to C at all, the premiss BC will be wholly true, the premiss AC wholly false, and the conclusion true. Similarly if the statement BC is false, the statement AC true, the conclusion may be true. The same terms will serve for the proof. Also if both the premisses assumed are affirmative, the conclusion may be true. For nothing prevents B from following all C, and A from not belonging to C at all, though A belongs to some B, e.g. animal belongs to every swan, black to no swan, and black to some animals. Consequently if it is assumed that A and B belong to every C, the premiss BC is wholly true, the premiss AC is wholly false, and the conclusion is true. Similarly if the premiss AC which is assumed is true: the proof can be made through the same terms.
(4) Again if one premiss is wholly true, the other partly false, the conclusion may be true. For it is possible that B should belong to all C, and A to some C, while A belongs to some B, e.g. biped belongs to every man, beautiful not to every man, and beautiful to some bipeds. If then it is assumed that both A and B belong to the whole of C, the premiss BC is wholly true, the premiss AC partly false, the conclusion true. Similarly if of the premisses assumed AC is true and BC partly false, a true conclusion is possible: this can be proved, if the same terms as before are transposed. Also the conclusion may be true if one premiss is negative, the other affirmative. For since it is possible that B should belong to the whole of C, and A to some C, and, when they are so, that A should not belong to all B, therefore it is assumed that B belongs to the whole of C, and A to no C, the negative premiss is partly false, the other premiss wholly true, and the conclusion is true. Again since it has been proved that if A belongs to no C and B to some C, it is possible that A should not belong to some C, it is clear that if the premiss AC is wholly true, and the premiss BC partly false, it is possible that the conclusion should be true. For if it is assumed that A belongs to no C, and B to all C, the premiss AC is wholly true, and the premiss BC is partly false.
(5) It is clear also in the case of particular syllogisms that a true conclusion may come through what is false, in every possible way. For the same terms must be taken as have been taken when the premisses are universal, positive terms in positive syllogisms, negative terms in negative. For it makes no difference to the setting out of the terms, whether one assumes that what belongs to none belongs to all or that what belongs to some belongs to all. The same applies to negative statements.
It is clear then that if the conclusion is false, the premisses of the argument must be false, either all or some of them; but when the conclusion is true, it is not necessary that the premisses should be true, either one or all, yet it is possible, though no part of the syllogism is true, that the conclusion may none the less be true; but it is not necessitated. The reason is that when two things are so related to one another, that if the one is, the other necessarily is, then if the latter is not, the former will not be either, but if the latter is, it is not necessary that the former should be. But it is impossible that the same thing should be necessitated by the being and by the not-being of the same thing. I mean, for example, that it is impossible that B should necessarily be great since A is white and that B should necessarily be great since A is not white. For whenever since this, A, is white it is necessary that that, B, should be great, and since B is great that C should not be white, then it is necessary if is white that C should not be white. And whenever it is necessary, since one of two things is, that the other should be, it is necessary, if the latter is not, that the former (viz. A) should not be. If then B is not great A cannot be white. But if, when A is not white, it is necessary that B should be great, it necessarily results that if B is not great, B itself is great. (But this is impossible.) For if B is not great, A will necessarily not be white. If then when this is not white B must be great, it results that if B is not great, it is great, just as if it were proved through three terms.
Circular and reciprocal proof means proof by means of the conclusion, i.e. by converting one of the premisses simply and inferring the premiss which was assumed in the original syllogism: e.g. suppose it has been necessary to prove that A belongs to all C, and it has been proved through B; suppose that A should now be proved to belong to B by assuming that A belongs to C, and C to B-so A belongs to B: but in the first syllogism the converse was assumed, viz. that B belongs to C. Or suppose it is necessary to prove that B belongs to C, and A is assumed to belong to C, which was the conclusion of the first syllogism, and B to belong to A but the converse was assumed in the earlier syllogism, viz. that A belongs to B. In no other way is reciprocal proof possible. If another term is taken as middle, the proof is not circular: for neither of the propositions assumed is the same as before: if one of the accepted terms is taken as middle, only one of the premisses of the first syllogism can be assumed in the second: for if both of them are taken the same conclusion as before will result: but it must be different. If the terms are not convertible, one of the premisses from which the syllogism results must be undemonstrated: for it is not possible to demonstrate through these terms that the third belongs to the middle or the middle to the first. If the terms are convertible, it is possible to demonstrate everything reciprocally, e.g. if A and B and C are convertible with one another. Suppose the proposition AC has been demonstrated through B as middle term, and again the proposition AB through the conclusion and the premiss BC converted, and similarly the proposition BC through the conclusion and the premiss AB converted. But it is necessary to prove both the premiss CB, and the premiss BA: for we have used these alone without demonstrating them. If then it is assumed that B belongs to all C, and C to all A, we shall have a syllogism relating B to A. Again if it is assumed that C belongs to all A, and A to all B, C must belong to all B. In both these syllogisms the premiss CA has been assumed without being demonstrated: the other premisses had ex hypothesi been proved. Consequently if we succeed in demonstrating this premiss, all the premisses will have been proved reciprocally. If then it is assumed that C belongs to all B, and B to all A, both the premisses assumed have been proved, and C must belong to A. It is clear then that only if the terms are convertible is circular and reciprocal demonstration possible (if the terms are not convertible, the matter stands as we said above). But it turns out in these also that we use for the demonstration the very thing that is being proved: for C is proved of B, and B of by assuming that C is said of and C is proved of A through these premisses, so that we use the conclusion for the demonstration.
In negative syllogisms reciprocal proof is as follows. Let B belong to all C, and A to none of the Bs: we conclude that A belongs to none of the Cs. If again it is necessary to prove that A belongs to none of the Bs (which was previously assumed) A must belong to no C, and C to all B: thus the previous premiss is reversed. If it is necessary to prove that B belongs to C, the proposition AB must no longer be converted as before: for the premiss ‘B belongs to no A’ is identical with the premiss ‘A belongs to no B’. But we must assume that B belongs to all of that to none of which longs. Let A belong to none of the Cs (which was the previous conclusion) and assume that B belongs to all of that to none of which A belongs. It is necessary then that B should belong to all C. Consequently each of the three propositions has been made a conclusion, and this is circular demonstration, to assume the conclusion and the converse of one of the premisses, and deduce the remaining premiss.
In particular syllogisms it is not possible to demonstrate the universal premiss through the other propositions, but the particular premiss can be demonstrated. Clearly it is impossible to demonstrate the universal premiss: for what is universal is proved through propositions which are universal, but the conclusion is not universal, and the proof must start from the conclusion and the other premiss. Further a syllogism cannot be made at all if the other premiss is converted: for the result is that both premisses are particular. But the particular premiss may be proved. Suppose that A has been proved of some C through B. If then it is assumed that B belongs to all A and the conclusion is retained, B will belong to some C: for we obtain the first figure and A is middle. But if the syllogism is negative, it is not possible to prove the universal premiss, for the reason given above. But it is possible to prove the particular premiss, if the proposition AB is converted as in the universal syllogism, i.e ‘B belongs to some of that to some of which A does not belong’: otherwise no syllogism results because the particular premiss is negative.
In the second figure it is not possible to prove an affirmative proposition in this way, but a negative proposition may be proved. An affirmative proposition is not proved because both premisses of the new syllogism are not affirmative (for the conclusion is negative) but an affirmative proposition is (as we saw) proved from premisses which are both affirmative. The negative is proved as follows. Let A belong to all B, and to no C: we conclude that B belongs to no C. If then it is assumed that B belongs to all A, it is necessary that A should belong to no C: for we get the second figure, with B as middle. But if the premiss AB was negative, and the other affirmative, we shall have the first figure. For C belongs to all A and B to no C, consequently B belongs to no A: neither then does A belong to B. Through the conclusion, therefore, and one premiss, we get no syllogism, but if another premiss is assumed in addition, a syllogism will be possible. But if the syllogism not universal, the universal premiss cannot be proved, for the same reason as we gave above, but the particular premiss can be proved whenever the universal statement is affirmative. Let A belong to all B, and not to all C: the conclusion is BC. If then it is assumed that B belongs to all A, but not to all C, A will not belong to some C, B being middle. But if the universal premiss is negative, the premiss AC will not be demonstrated by the conversion of AB: for it turns out that either both or one of the premisses is negative; consequently a syllogism will not be possible. But the proof will proceed as in the universal syllogisms, if it is assumed that A belongs to some of that to some of which B does not belong.
In the third figure, when both premisses are taken universally, it is not possible to prove them reciprocally: for that which is universal is proved through statements which are universal, but the conclusion in this figure is always particular, so that it is clear that it is not possible at all to prove through this figure the universal premiss. But if one premiss is universal, the other particular, proof of the latter will sometimes be possible, sometimes not. When both the premisses assumed are affirmative, and the universal concerns the minor extreme, proof will be possible, but when it concerns the other extreme, impossible. Let A belong to all C and B to some C: the conclusion is the statement AB. If then it is assumed that C belongs to all A, it has been proved that C belongs to some B, but that B belongs to some C has not been proved. And yet it is necessary, if C belongs to some B, that B should belong to some C. But it is not the same that this should belong to that, and that to this: but we must assume besides that if this belongs to some of that, that belongs to some of this. But if this is assumed the syllogism no longer results from the conclusion and the other premiss. But if B belongs to all C, and A to some C, it will be possible to prove the proposition AC, when it is assumed that C belongs to all B, and A to some B. For if C belongs to all B and A to some B, it is necessary that A should belong to some C, B being middle. And whenever one premiss is affirmative the other negative, and the affirmative is universal, the other premiss can be proved. Let B belong to all C, and A not to some C: the conclusion is that A does not belong to some B. If then it is assumed further that C belongs to all B, it is necessary that A should not belong to some C, B being middle. But when the negative premiss is universal, the other premiss is not except as before, viz. if it is assumed that that belongs to some of that, to some of which this does not belong, e.g. if A belongs to no C, and B to some C: the conclusion is that A does not belong to some B. If then it is assumed that C belongs to some of that to some of which does not belong, it is necessary that C should belong to some of the Bs. In no other way is it possible by converting the universal premiss to prove the other: for in no other way can a syllogism be formed.
It is clear then that in the first figure reciprocal proof is made both through the third and through the first figure-if the conclusion is affirmative through the first; if the conclusion is negative through the last. For it is assumed that that belongs to all of that to none of which this belongs. In the middle figure, when the syllogism is universal, proof is possible through the second figure and through the first, but when particular through the second and the last. In the third figure all proofs are made through itself. It is clear also that in the third figure and in the middle figure those syllogisms which are not made through those figures themselves either are not of the nature of circular proof or are imperfect.
To convert a syllogism means to alter the conclusion and make another syllogism to prove that either the extreme cannot belong to the middle or the middle to the last term. For it is necessary, if the conclusion has been changed into its opposite and one of the premisses stands, that the other premiss should be destroyed. For if it should stand, the conclusion also must stand. It makes a difference whether the conclusion is converted into its contradictory or into its contrary. For the same syllogism does not result whichever form the conversion takes. This will be made clear by the sequel. By contradictory opposition I mean the opposition of ‘to all’ to ‘not to all’, and of ‘to some’ to ‘to none’; by contrary opposition I mean the opposition of ‘to all’ to ‘to none’, and of ‘to some’ to ‘not to some’. Suppose that A been proved of C, through B as middle term. If then it should be assumed that A belongs to no C, but to all B, B will belong to no C. And if A belongs to no C, and B to all C, A will belong, not to no B at all, but not to all B. For (as we saw) the universal is not proved through the last figure. In a word it is not possible to refute universally by conversion the premiss which concerns the major extreme: for the refutation always proceeds through the third since it is necessary to take both premisses in reference to the minor extreme. Similarly if the syllogism is negative. Suppose it has been proved that A belongs to no C through B. Then if it is assumed that A belongs to all C, and to no B, B will belong to none of the Cs. And if A and B belong to all C, A will belong to some B: but in the original premiss it belonged to no B.
If the conclusion is converted into its contradictory, the syllogisms will be contradictory and not universal. For one premiss is particular, so that the conclusion also will be particular. Let the syllogism be affirmative, and let it be converted as stated. Then if A belongs not to all C, but to all B, B will belong not to all C. And if A belongs not to all C, but B belongs to all C, A will belong not to all B. Similarly if the syllogism is negative. For if A belongs to some C, and to no B, B will belong, not to no C at all, but-not to some C. And if A belongs to some C, and B to all C, as was originally assumed, A will belong to some B.
In particular syllogisms when the conclusion is converted into its contradictory, both premisses may be refuted, but when it is converted into its contrary, neither. For the result is no longer, as in the universal syllogisms, refutation in which the conclusion reached by O, conversion lacks universality, but no refutation at all. Suppose that A has been proved of some C. If then it is assumed that A belongs to no C, and B to some C, A will not belong to some B: and if A belongs to no C, but to all B, B will belong to no C. Thus both premisses are refuted. But neither can be refuted if the conclusion is converted into its contrary. For if A does not belong to some C, but to all B, then B will not belong to some C. But the original premiss is not yet refuted: for it is possible that B should belong to some C, and should not belong to some C. The universal premiss AB cannot be affected by a syllogism at all: for if A does not belong to some of the Cs, but B belongs to some of the Cs, neither of the premisses is universal. Similarly if the syllogism is negative: for if it should be assumed that A belongs to all C, both premisses are refuted: but if the assumption is that A belongs to some C, neither premiss is refuted. The proof is the same as before.
In the second figure it is not possible to refute the premiss which concerns the major extreme by establishing something contrary to it, whichever form the conversion of the conclusion may take. For the conclusion of the refutation will always be in the third figure, and in this figure (as we saw) there is no universal syllogism. The other premiss can be refuted in a manner similar to the conversion: I mean, if the conclusion of the first syllogism is converted into its contrary, the conclusion of the refutation will be the contrary of the minor premiss of the first, if into its contradictory, the contradictory. Let A belong to all B and to no C: conclusion BC. If then it is assumed that B belongs to all C, and the proposition AB stands, A will belong to all C, since the first figure is produced. If B belongs to all C, and A to no C, then A belongs not to all B: the figure is the last. But if the conclusion BC is converted into its contradictory, the premiss AB will be refuted as before, the premiss, AC by its contradictory. For if B belongs to some C, and A to no C, then A will not belong to some B. Again if B belongs to some C, and A to all B, A will belong to some C, so that the syllogism results in the contradictory of the minor premiss. A similar proof can be given if the premisses are transposed in respect of their quality.
If the syllogism is particular, when the conclusion is converted into its contrary neither premiss can be refuted, as also happened in the first figure,’ if the conclusion is converted into its contradictory, both premisses can be refuted. Suppose that A belongs to no B, and to some C: the conclusion is BC. If then it is assumed that B belongs to some C, and the statement AB stands, the conclusion will be that A does not belong to some C. But the original statement has not been refuted: for it is possible that A should belong to some C and also not to some C. Again if B belongs to some C and A to some C, no syllogism will be possible: for neither of the premisses taken is universal. Consequently the proposition AB is not refuted. But if the conclusion is converted into its contradictory, both premisses can be refuted. For if B belongs to all C, and A to no B, A will belong to no C: but it was assumed to belong to some C. Again if B belongs to all C and A to some C, A will belong to some B. The same proof can be given if the universal statement is affirmative.
!![[Topics: Book I]]
{{Topics: Book I}}
!![[Topics: Book II]]
{{Topics: Book II}}
!![[Topics: Book III]]
{{Topics: Book III}}
!![[Topics: Book IV]]
{{Topics: Book IV}}
!![[Topics: Book V]]
{{Topics: Book V}}
!![[Topics: Book VI]]
{{Topics: Book VI}}
!![[Topics: Book VII]]
{{Topics: Book VII}}
!![[Topics: Book VIII]]
{{Topics: Book VIII}}
---
!!![[Topics: Book I: 1]]
{{Topics: Book I: 1}}
---
!!![[Topics: Book I: 2]]
{{Topics: Book I: 2}}
---
!!![[Topics: Book I: 3]]
{{Topics: Book I: 3}}
---
!!![[Topics: Book I: 4]]
{{Topics: Book I: 4}}
---
!!![[Topics: Book I: 5]]
{{Topics: Book I: 5}}
---
!!![[Topics: Book I: 6]]
{{Topics: Book I: 6}}
---
!!![[Topics: Book I: 7]]
{{Topics: Book I: 7}}
---
!!![[Topics: Book I: 8]]
{{Topics: Book I: 8}}
---
!!![[Topics: Book I: 9]]
{{Topics: Book I: 9}}
---
!!![[Topics: Book I: 10]]
{{Topics: Book I: 10}}
---
!!![[Topics: Book I: 11]]
{{Topics: Book I: 11}}
---
!!![[Topics: Book I: 12]]
{{Topics: Book I: 12}}
---
!!![[Topics: Book I: 13]]
{{Topics: Book I: 13}}
---
!!![[Topics: Book I: 14]]
{{Topics: Book I: 14}}
---
!!![[Topics: Book I: 15]]
{{Topics: Book I: 15}}
---
!!![[Topics: Book I: 16]]
{{Topics: Book I: 16}}
---
!!![[Topics: Book I: 17]]
{{Topics: Book I: 17}}
---
!!![[Topics: Book I: 18]]
{{Topics: Book I: 18}}
Our treatise proposes to find a line of inquiry whereby we shall be able to reason from opinions that are generally accepted about every problem propounded to us, and also shall ourselves, when standing up to an argument, avoid saying anything that will obstruct us. First, then, we must say what reasoning is, and what its varieties are, in order to grasp dialectical reasoning: for this is the object of our search in the treatise before us.
Now reasoning is an argument in which, certain things being laid down, something other than these necessarily comes about through them. (a) It is a ‘demonstration’, when the premisses from which the reasoning starts are true and primary, or are such that our knowledge of them has originally come through premisses which are primary and true: (b) reasoning, on the other hand, is ‘dialectical’, if it reasons from opinions that are generally accepted. Things are ‘true’ and ‘primary’ which are believed on the strength not of anything else but of themselves: for in regard to the first principles of science it is improper to ask any further for the why and wherefore of them; each of the first principles should command belief in and by itself. On the other hand, those opinions are ‘generally accepted’ which are accepted by every one or by the majority or by the philosophers-i.e. by all, or by the majority, or by the most notable and illustrious of them. Again (c), reasoning is ‘contentious’ if it starts from opinions that seem to be generally accepted, but are not really such, or again if it merely seems to reason from opinions that are or seem to be generally accepted. For not every opinion that seems to be generally accepted actually is generally accepted. For in none of the opinions which we call generally accepted is the illusion entirely on the surface, as happens in the case of the principles of contentious arguments; for the nature of the fallacy in these is obvious immediately, and as a rule even to persons with little power of comprehension. So then, of the contentious reasonings mentioned, the former really deserves to be called ‘reasoning’ as well, but the other should be called ‘contentious reasoning’, but not ‘reasoning’, since it appears to reason, but does not really do so. Further (d), besides all the reasonings we have mentioned there are the mis-reasonings that start from the premisses peculiar to the special sciences, as happens (for example) in the case of geometry and her sister sciences. For this form of reasoning appears to differ from the reasonings mentioned above; the man who draws a false figure reasons from things that are neither true and primary, nor yet generally accepted. For he does not fall within the definition; he does not assume opinions that are received either by every one or by the majority or by philosophers-that is to say, by all, or by most, or by the most illustrious of them-but he conducts his reasoning upon assumptions which, though appropriate to the science in question, are not true; for he effects his mis-reasoning either by describing the semicircles wrongly or by drawing certain lines in a way in which they could not be drawn.
The foregoing must stand for an outline survey of the species of reasoning. In general, in regard both to all that we have already discussed and to those which we shall discuss later, we may remark that that amount of distinction between them may serve, because it is not our purpose to give the exact definition of any of them; we merely want to describe them in outline; we consider it quite enough from the point of view of the line of inquiry before us to be able to recognize each of them in some sort of way.
First, then, a definition must be given of a ‘dialectical proposition’ and a ‘dialectical problem’. For it is not every proposition nor yet every problem that is to be set down as dialectical: for no one in his senses would make a proposition of what no one holds, nor yet make a problem of what is obvious to everybody or to most people: for the latter admits of no doubt, while to the former no one would assent. Now a dialectical proposition consists in asking something that is held by all men or by most men or by the philosophers, i.e. either by all, or by most, or by the most notable of these, provided it be not contrary to the general opinion; for a man would probably assent to the view of the philosophers, if it be not contrary to the opinions of most men. Dialectical propositions also include views which are like those generally accepted; also propositions which contradict the contraries of opinions that are taken to be generally accepted, and also all opinions that are in accordance with the recognized arts. Thus, supposing it to be a general opinion that the knowledge of contraries is the same, it might probably pass for a general opinion also that the perception of contraries is the same: also, supposing it to be a general opinion that there is but one single science of grammar, it might pass for a general opinion that there is but one science of flute-playing as well, whereas, if it be a general opinion that there is more than one science of grammar, it might pass for a general opinion that there is more than one science of flute-playing as well: for all these seem to be alike and akin. Likewise, also, propositions contradicting the contraries of general opinions will pass as general opinions: for if it be a general opinion that one ought to do good to one’s friends, it will also be a general opinion that one ought not to do them harm. Here, that one ought to do harm to one’s friends is contrary to the general view, and that one ought not to do them harm is the contradictory of that contrary. Likewise also, if one ought to do good to one’s friends, one ought not to do good to one’s enemies: this too is the contradictory of the view contrary to the general view; the contrary being that one ought to do good to one’s enemies. Likewise, also, in other cases. Also, on comparison, it will look like a general opinion that the contrary predicate belongs to the contrary subject: e.g. if one ought to do good to one’s friends, one ought also to do evil to one’s enemies. it might appear also as if doing good to one’s friends were a contrary to doing evil to one’s enemies: but whether this is or is not so in reality as well will be stated in the course of the discussion upon contraries. Clearly also, all opinions that are in accordance with the arts are dialectical propositions; for people are likely to assent to the views held by those who have made a study of these things, e.g. on a question of medicine they will agree with the doctor, and on a question of geometry with the geometrician; and likewise also in other cases.
A dialectical problem is a subject of inquiry that contributes either to choice and avoidance, or to truth and knowledge, and that either by itself, or as a help to the solution of some other such problem. It must, moreover, be something on which either people hold no opinion either way, or the masses hold a contrary opinion to the philosophers, or the philosophers to the masses, or each of them among themselves. For some problems it is useful to know with a view to choice or avoidance, e.g. whether pleasure is to be chosen or not, while some it is useful to know merely with a view to knowledge, e.g. whether the universe is eternal or not: others, again, are not useful in and by themselves for either of these purposes, but yet help us in regard to some such problems; for there are many things which we do not wish to know in and by themselves, but for the sake of other things, in order that through them we may come to know something else. Problems also include questions in regard to which reasonings conflict (the difficulty then being whether so-and so is so or not, there being convincing arguments for both views); others also in regard to which we have no argument because they are so vast, and we find it difficult to give our reasons, e.g. the question whether the universe is eternal or no: for into questions of that kind too it is possible to inquire.
Problems, then, and propositions are to be defined as aforesaid. A ‘thesis’ is a supposition of some eminent philosopher that conflicts with the general opinion; e.g. the view that contradiction is impossible, as Antisthenes said; or the view of Heraclitus that all things are in motion; or that Being is one, as Melissus says: for to take notice when any ordinary person expresses views contrary to men’s usual opinions would be silly. Or it may be a view about which we have a reasoned theory contrary to men’s usual opinions, e.g. the view maintained by the sophists that what is need not in every case either have come to be or be eternal: for a musician who is a grammarian ‘is’ so without ever having ‘come to be’ so, or being so eternally. For even if a man does not accept this view, he might do so on the ground that it is reasonable.
Now a ‘thesis’ also is a problem, though a problem is not always a thesis, inasmuch as some problems are such that we have no opinion about them either way. That a thesis, however, also forms a problem, is clear: for it follows of necessity from what has been said that either the mass of men disagree with the philosophers about the thesis, or that the one or the other class disagree among themselves, seeing that the thesis is a supposition in conflict with general opinion. Practically all dialectical problems indeed are now called ‘theses’. But it should make no difference whichever description is used; for our object in thus distinguishing them has not been to create a terminology, but to recognize what differences happen to be found between them.
Not every problem, nor every thesis, should be examined, but only one which might puzzle one of those who need argument, not punishment or perception. For people who are puzzled to know whether one ought to honour the gods and love one’s parents or not need punishment, while those who are puzzled to know whether snow is white or not need perception. The subjects should not border too closely upon the sphere of demonstration, nor yet be too far removed from it: for the former cases admit of no doubt, while the latter involve difficulties too great for the art of the trainer.
Having drawn these definitions, we must distinguish how many species there are of dialectical arguments. There is on the one hand Induction, on the other Reasoning. Now what reasoning is has been said before: induction is a passage from individuals to universals, e.g. the argument that supposing the skilled pilot is the most effective, and likewise the skilled charioteer, then in general the skilled man is the best at his particular task. Induction is the more convincing and clear: it is more readily learnt by the use of the senses, and is applicable generally to the mass of men, though reasoning is more forcible and effective against contradictious people.
The classes, then, of things about which, and of things out of which, arguments are constructed, are to be distinguished in the way we have said before. The means whereby we are to become well supplied with reasonings are four: (1) the securing of propositions; (2) the power to distinguish in how many senses particular expression is used; (3) the discovery of the differences of things; (4) the investigation of likeness. The last three, as well, are in a certain sense propositions: for it is possible to make a proposition corresponding to each of them, e.g. (1) ‘The desirable may mean either the honourable or the pleasant or the expedient’; and (2) Sensation differs from knowledge in that the latter may be recovered again after it has been lost, while the former cannot’; and (3) The relation of the healthy to health is like that of the vigorous to vigour’. The first proposition depends upon the use of one term in several senses, the second upon the differences of things, the third upon their likenesses.
Propositions should be selected in a number of ways corresponding to the number of distinctions drawn in regard to the proposition: thus one may first take in hand the opinions held by all or by most men or by the philosophers, i.e. by all, or most, or the most notable of them; or opinions contrary to those that seem to be generally held; and, again, all opinions that are in accordance with the arts. We must make propositions also of the contradictories of opinions contrary to those that seem to be generally held, as was laid down before. It is useful also to make them by selecting not only those opinions that actually are accepted, but also those that are like these, e.g. ‘The perception of contraries is the same’-the knowledge of them being so-and ‘we see by admission of something into ourselves, not by an emission’; for so it is, too, in the case of the other senses; for in hearing we admit something into ourselves; we do not emit; and we taste in the same way. Likewise also in the other cases. Moreover, all statements that seem to be true in all or in most cases, should be taken as a principle or accepted position; for they are posited by those who do not also see what exception there may be. We should select also from the written handbooks of argument, and should draw up sketch-lists of them upon each several kind of subject, putting them down under separate headings, e.g. ‘On Good’, or ‘On Life’-and that ‘On Good’ should deal with every form of good, beginning with the category of essence. In the margin, too, one should indicate also the opinions of individual thinkers, e.g. ‘Empedocles said that the elements of bodies were four’: for any one might assent to the saying of some generally accepted authority.
Of propositions and problems there are-to comprehend the matter in outline-three divisions: for some are ethical propositions, some are on natural philosophy, while some are logical. Propositions such as the following are ethical, e.g. ‘Ought one rather to obey one’s parents or the laws, if they disagree?’; such as this are logical, e.g. ‘Is the knowledge of opposites the same or not?’; while such as this are on natural philosophy, e.g. ‘Is the universe eternal or not?’ Likewise also with problems. The nature of each of the aforesaid kinds of proposition is not easily rendered in a definition, but we have to try to recognize each of them by means of the familiarity attained through induction, examining them in the light of the illustrations given above.
For purposes of philosophy we must treat of these things according to their truth, but for dialectic only with an eye to general opinion. All propositions should be taken in their most universal form; then, the one should be made into many. E.g. ‘The knowledge of opposites is the same’; next, ‘The knowledge of contraries is the same’, and that ‘of relative terms’. In the same way these two should again be divided, as long as division is possible, e.g. the knowledge of ‘good and evil’, of ‘white and black’, or ‘cold and hot’. Likewise also in other cases.
On the formation, then, of propositions, the above remarks are enough. As regards the number of senses a term bears, we must not only treat of those terms which bear different senses, but we must also try to render their definitions; e.g. we must not merely say that justice and courage are called ‘good’ in one sense, and that what conduces to vigour and what conduces to health are called so in another, but also that the former are so called because of a certain intrinsic quality they themselves have, the latter because they are productive of a certain result and not because of any intrinsic quality in themselves. Similarly also in other cases.
Whether a term bears a number of specific meanings or one only, may be considered by the following means. First, look and see if its contrary bears a number of meanings, whether the discrepancy between them be one of kind or one of names. For in some cases a difference is at once displayed even in the names; e.g. the contrary of ‘sharp’ in the case of a note is ‘flat’, while in the case of a solid edge it is ‘dull’. Clearly, then, the contrary of ‘sharp’ bears several meanings, and if so, also does ‘sharp’; for corresponding to each of the former terms the meaning of its contrary will be different. For ‘sharp’ will not be the same when contrary to ‘dull’ and to ‘flat’, though ‘sharp’ is the contrary of each. Again Barhu (’flat’, ‘heavy’) in the case of a note has ‘sharp’ as its contrary, but in the case of a solid mass ‘light’, so that Barhu is used with a number of meanings, inasmuch as its contrary also is so used. Likewise, also, ‘fine’ as applied to a picture has ‘ugly’ as its contrary, but, as applied to a house, ‘ramshackle’; so that ‘fine’ is an ambiguous term.
In some cases there is no discrepancy of any sort in the names used, but a difference of kind between the meanings is at once obvious: e.g. in the case of ‘clear’ and ‘obscure’: for sound is called ‘clear’ and ‘obscure’, just as ‘colour’ is too. As regards the names, then, there is no discrepancy, but the difference in kind between the meanings is at once obvious: for colour is not called ‘clear’ in a like sense to sound. This is plain also through sensation: for of things that are the same in kind we have the same sensation, whereas we do not judge clearness by the same sensation in the case of sound and of colour, but in the latter case we judge by sight, in the former by hearing. Likewise also with ‘sharp’ and ‘dull’ in regard to flavours and solid edges: here in the latter case we judge by touch, but in the former by taste. For here again there is no discrepancy in the names used, in the case either of the original terms or of their contraries: for the contrary also of sharp in either sense is ‘dull’.
Moreover, see if one sense of a term has a contrary, while another has absolutely none; e.g. the pleasure of drinking has a contrary in the pain of thirst, whereas the pleasure of seeing that the diagonal is incommensurate with the side has none, so that ‘pleasure’ is used in more than one sense. To ‘love’ also, used of the frame of mind, has to ‘hate’ as its contrary, while as used of the physical activity (kissing) it has none: clearly, therefore, to ‘love’ is an ambiguous term. Further, see in regard to their intermediates, if some meanings and their contraries have an intermediate, others have none, or if both have one but not the same one, e.g. ‘clear’ and ‘obscure’ in the case of colours have ‘grey’ as an intermediate, whereas in the case of sound they have none, or, if they have, it is ‘harsh’, as some people say that a harsh sound is intermediate. ‘Clear’, then, is an ambiguous term, and likewise also ‘obscure’. See, moreover, if some of them have more than one intermediate, while others have but one, as is the case with ‘clear’ and ‘obscure’, for in the case of colours there are numbers of intermediates, whereas in regard to sound there is but one, viz. ‘harsh’.
Again, in the case of the contradictory opposite, look and see if it bears more than one meaning. For if this bears more than one meaning, then the opposite of it also will be used in more than one meaning; e.g. ‘to fail to see’ a phrase with more than one meaning, viz. (1) to fail to possess the power of sight, (2) to fail to put that power to active use. But if this has more than one meaning, it follows necessarily that ‘to see’ also has more than one meaning: for there will be an opposite to each sense of ‘to fail to see’; e.g. the opposite of ‘not to possess the power of sight’ is to possess it, while of ‘not to put the power of sight to active use’, the opposite is to put it to active use.
Moreover, examine the case of terms that denote the privation or presence of a certain state: for if the one term bears more than one meaning, then so will the remaining term: e.g. if ‘to have sense’ be used with more than one meaning, as applied to the soul and to the body, then ‘to be wanting in sense’ too will be used with more than one meaning, as applied to the soul and to the body. That the opposition between the terms now in question depends upon the privation or presence of a certain state is clear, since animals naturally possess each kind of ‘sense’, both as applied to the soul and as applied to the body.
Moreover, examine the inflected forms. For if ‘justly’ has more than one meaning, then ‘just’, also, will be used with more than one meaning; for there will be a meaning of ‘just’ to each of the meanings of ‘justly’; e.g. if the word ‘justly’ be used of judging according to one’s own opinion, and also of judging as one ought, then ‘just’ also will be used in like manner. In the same way also, if ‘healthy’ has more than one meaning, then ‘healthily’ also will be used with more than one meaning: e.g. if ‘healthy’ describes both what produces health and what preserves health and what betokens health, then ‘healthily’ also will be used to mean ‘in such a way as to produce’ or ‘preserve’ or ‘betoken’ health. Likewise also in other cases, whenever the original term bears more than one meaning, the inflexion also that is formed from it will be used with more than one meaning, and vice versa.
Look also at the classes of the predicates signified by the term, and see if they are the same in all cases. For if they are not the same, then clearly the term is ambiguous: e.g. ‘good’ in the case of food means ‘productive of pleasure’, and in the case of medicine ‘productive of health’, whereas as applied to the soul it means to be of a certain quality, e.g. temperate or courageous or just: and likewise also, as applied to ‘man’. Sometimes it signifies what happens at a certain time, as (e.g.) the good that happens at the right time: for what happens at the right time is called good. Often it signifies what is of certain quantity, e.g. as applied to the proper amount: for the proper amount too is called good. So then the term ‘good’ is ambiguous. In the same way also ‘clear’, as applied to a body, signifies a colour, but in regard to a note it denotes what is ‘easy to hear’. ‘Sharp’, too, is in a closely similar case: for the same term does not bear the same meaning in all its applications: for a sharp note is a swift note, as the mathematical theorists of harmony tell us, whereas a sharp (acute) angle is one that is less than a right angle, while a sharp dagger is one containing a sharp angle (point).
Look also at the genera of the objects denoted by the same term, and see if they are different without being subaltern, as (e.g.) ‘donkey’, which denotes both the animal and the engine. For the definition of them that corresponds to the name is different: for the one will be declared to be an animal of a certain kind, and the other to be an engine of a certain kind. If, however, the genera be subaltern, there is no necessity for the definitions to be different. Thus (e.g.) ‘animal’ is the genus of ‘raven’, and so is ‘bird’. Whenever therefore we say that the raven is a bird, we also say that it is a certain kind of animal, so that both the genera are predicated of it. Likewise also whenever we call the raven a ‘flying biped animal’, we declare it to be a bird: in this way, then, as well, both the genera are predicated of raven, and also their definition. But in the case of genera that are not subaltern this does not happen, for whenever we call a thing an ‘engine’, we do not call it an animal, nor vice versa.
Look also and see not only if the genera of the term before you are different without being subaltern, but also in the case of its contrary: for if its contrary bears several senses, clearly the term before you does so as well.
It is useful also to look at the definition that arises from the use of the term in combination, e.g. of a ‘clear (lit. white) body’ of a ‘clear note’. For then if what is peculiar in each case be abstracted, the same expression ought to remain over. This does not happen in the case of ambiguous terms, e.g. in the cases just mentioned. For the former will be body possessing such and such a colour’, while the latter will be ‘a note easy to hear’. Abstract, then, ‘a body ‘and’ a note’, and the remainder in each case is not the same. It should, however, have been had the meaning of ‘clear’ in each case been synonymous.
Often in the actual definitions as well ambiguity creeps in unawares, and for this reason the definitions also should be examined. If (e.g.) any one describes what betokens and what produces health as ‘related commensurably to health’, we must not desist but go on to examine in what sense he has used the term ‘commensurably’ in each case, e.g. if in the latter case it means that ‘it is of the right amount to produce health’, whereas in the for it means that ‘it is such as to betoken what kind of state prevails’.
Moreover, see if the terms cannot be compared as ‘more or less’ or as ‘in like manner’, as is the case (e.g.) with a ‘clear’ (lit. white) sound and a ‘clear’ garment, and a ‘sharp’ flavour and a ‘sharp’ note. For neither are these things said to be clear or sharp ‘in a like degree’, nor yet is the one said to be clearer or sharper than the other. ‘Clear’, then, and ‘sharp’ are ambiguous. For synonyms are always comparable; for they will always be used either in like manner, or else in a greater degree in one case.
Now since of genera that are different without being subaltern the differentiae also are different in kind, e.g. those of ‘animal’ and ‘knowledge’ (for the differentiae of these are different), look and see if the meanings comprised under the same term are differentiae of genera that are different without being subaltern, as e.g. ‘sharp’ is of a ‘note’ and a ‘solid’. For being ‘sharp’ differentiates note from note, and likewise also one solid from another. ‘Sharp’, then, is an ambiguous term: for it forms differentiae of genera that are different without being subaltern.
Again, see if the actual meanings included under the same term themselves have different differentiae, e.g. ‘colour’ in bodies and ‘colour’ in tunes: for the differentiae of ‘colour’ in bodies are ‘sight-piercing’ and ‘sight compressing’, whereas ‘colour’ in melodies has not the same differentiae. Colour, then, is an ambiguous term; for things that are the same have the same differentiae.
Moreover, since the species is never the differentia of anything, look and see if one of the meanings included under the same term be a species and another a differentia, as (e.g.) clear’ (lit. white) as applied to a body is a species of colour, whereas in the case of a note it is a differentia; for one note is differentiated from another by being ‘clear’.
The presence, then, of a number of meanings in a term may be investigated by these and like means. The differences which things present to each other should be examined within the same genera, e.g. ‘Wherein does justice differ from courage, and wisdom from temperance?’-for all these belong to the same genus; and also from one genus to another, provided they be not very much too far apart, e.g. ‘Wherein does sensation differ from knowledge?: for in the case of genera that are very far apart, the differences are entirely obvious.
Likeness should be studied, first, in the case of things belonging to different genera, the formulae being ‘A:B = C:D’ (e.g. as knowledge stands to the object of knowledge, so is sensation related to the object of sensation), and ‘As A is in B, so is C in D’ (e.g. as sight is in the eye, so is reason in the soul, and as is a calm in the sea, so is windlessness in the air). Practice is more especially needed in regard to terms that are far apart; for in the case of the rest, we shall be more easily able to see in one glance the points of likeness. We should also look at things which belong to the same genus, to see if any identical attribute belongs to them all, e.g. to a man and a horse and a dog; for in so far as they have any identical attribute, in so far they are alike.
It is useful to have examined the number of meanings of a term both for clearness’ sake (for a man is more likely to know what it is he asserts, if it bas been made clear to him how many meanings it may have), and also with a view to ensuring that our reasonings shall be in accordance with the actual facts and not addressed merely to the term used. For as long as it is not clear in how many senses a term is used, it is possible that the answerer and the questioner are not directing their minds upon the same thing: whereas when once it has been made clear how many meanings there are, and also upon which of them the former directs his mind when he makes his assertion, the questioner would then look ridiculous if he failed to address his argument to this. It helps us also both to avoid being misled and to mislead by false reasoning: for if we know the number of meanings of a term, we shall certainly never be misled by false reasoning, but shall know if the questioner fails to address his argument to the same point; and when we ourselves put the questions we shall be able to mislead him, if our answerer happens not to know the number of meanings of our terms. This, however, is not possible in all cases, but only when of the many senses some are true and others are false. This manner of argument, however, does not belong properly to dialectic; dialecticians should therefore by all means beware of this kind of verbal discussion, unless any one is absolutely unable to discuss the subject before him in any other way.
The discovery of the differences of things helps us both in reasonings about sameness and difference, and also in recognizing what any particular thing is. That it helps us in reasoning about sameness and difference is clear: for when we have discovered a difference of any kind whatever between the objects before us, we shall already have shown that they are not the same: while it helps us in recognizing what a thing is, because we usually distinguish the expression that is proper to the essence of each particular thing by means of the differentiae that are proper to it.
The examination of likeness is useful with a view both to inductive arguments and to hypothetical reasonings, and also with a view to the rendering of definitions. It is useful for inductive arguments, because it is by means of an induction of individuals in cases that are alike that we claim to bring the universal in evidence: for it is not easy to do this if we do not know the points of likeness. It is useful for hypothetical reasonings because it is a general opinion that among similars what is true of one is true also of the rest. If, then, with regard to any of them we are well supplied with matter for a discussion, we shall secure a preliminary admission that however it is in these cases, so it is also in the case before us: then when we have shown the former we shall have shown, on the strength of the hypothesis, the matter before us as well: for we have first made the hypothesis that however it is in these cases, so it is also in the case before us, and have then proved the point as regards these cases. It is useful for the rendering of definitions because, if we are able to see in one glance what is the same in each individual case of it, we shall be at no loss into what genus we ought to put the object before us when we define it: for of the common predicates that which is most definitely in the category of essence is likely to be the genus. Likewise, also, in the case of objects widely divergent, the examination of likeness is useful for purposes of definition, e.g. the sameness of a calm at sea, and windlessness in the air (each being a form of rest), and of a point on a line and the unit in number-each being a starting point. If, then, we render as the genus what is common to all the cases, we shall get the credit of defining not inappropriately. Definition-mongers too nearly always render them in this way: they declare the unit to be the startingpoint of number, and the point the startingpoint of a line. It is clear, then, that they place them in that which is common to both as their genus.
The means, then, whereby reasonings are effected, are these: the commonplace rules, for the observance of which the aforesaid means are useful, are as follows.
Next in order after the foregoing, we must say for how many and for what purposes the treatise is useful. They are three-intellectual training, casual encounters, and the philosophical sciences. That it is useful as a training is obvious on the face of it. The possession of a plan of inquiry will enable us more easily to argue about the subject proposed. For purposes of casual encounters, it is useful because when we have counted up the opinions held by most people, we shall meet them on the ground not of other people’s convictions but of their own, while we shift the ground of any argument that they appear to us to state unsoundly. For the study of the philosophical sciences it is useful, because the ability to raise searching difficulties on both sides of a subject will make us detect more easily the truth and error about the several points that arise. It has a further use in relation to the ultimate bases of the principles used in the several sciences. For it is impossible to discuss them at all from the principles proper to the particular science in hand, seeing that the principles are the prius of everything else: it is through the opinions generally held on the particular points that these have to be discussed, and this task belongs properly, or most appropriately, to dialectic: for dialectic is a process of criticism wherein lies the path to the principles of all inquiries.
We shall be in perfect possession of the way to proceed when we are in a position like that which we occupy in regard to rhetoric and medicine and faculties of that kind: this means the doing of that which we choose with the materials that are available. For it is not every method that the rhetorician will employ to persuade, or the doctor to heal; still, if he omits none of the available means, we shall say that his grasp of the science is adequate.
First, then, we must see of what parts our inquiry consists. Now if we were to grasp (a) with reference to how many, and what kind of, things arguments take place, and with what materials they start, and (h) how we are to become well supplied with these, we should have sufficiently won our goal. Now the materials with which arguments start are equal in number, and are identical, with the subjects on which reasonings take place. For arguments start with ‘propositions’, while the subjects on which reasonings take place are ‘problems’. Now every proposition and every problem indicates either a genus or a peculiarity or an accident-for the differentia too, applying as it does to a class (or genus), should be ranked together with the genus. Since, however, of what is peculiar to anything part signifies its essence, while part does not, let us divide the ‘peculiar’ into both the aforesaid parts, and call that part which indicates the essence a ‘definition’, while of the remainder let us adopt the terminology which is generally current about these things, and speak of it as a ‘property’. What we have said, then, makes it clear that according to our present division, the elements turn out to be four, all told, namely either property or definition or genus or accident. Do not let any one suppose us to mean that each of these enunciated by itself constitutes a proposition or problem, but only that it is from these that both problems and propositions are formed. The difference between a problem and a proposition is a difference in the turn of the phrase. For if it be put in this way, “’An animal that walks on two feet” is the definition of man, is it not?’ or ‘”Animal” is the genus of man, is it not?’ the result is a proposition: but if thus, ‘Is “an animal that walks on two feet” a definition of man or no?’ [or ‘Is “animal” his genus or no?’] the result is a problem. Similarly too in other cases. Naturally, then, problems and propositions are equal in number: for out of every proposition you will make a problem if you change the turn of the phrase.
We must now say what are ‘definition’, ‘property’, ‘genus’, and ‘accident’. A ‘definition’ is a phrase signifying a thing’s essence. It is rendered in the form either of a phrase in lieu of a term, or of a phrase in lieu of another phrase; for it is sometimes possible to define the meaning of a phrase as well. People whose rendering consists of a term only, try it as they may, clearly do not render the definition of the thing in question, because a definition is always a phrase of a certain kind. One may, however, use the word ‘definitory’ also of such a remark as ‘The “becoming” is “beautiful”’, and likewise also of the question, ‘Are sensation and knowledge the same or different?’, for argument about definitions is mostly concerned with questions of sameness and difference. In a word we may call ‘definitory’ everything that falls under the same branch of inquiry as definitions; and that all the above-mentioned examples are of this character is clear on the face of them. For if we are able to argue that two things are the same or are different, we shall be well supplied by the same turn of argument with lines of attack upon their definitions as well: for when we have shown that they are not the same we shall have demolished the definition. Observe, please, that the converse of this last statement does not hold: for to show that they are the same is not enough to establish a definition. To show, however, that they are not the same is enough of itself to overthrow it.
A ‘property’ is a predicate which does not indicate the essence of a thing, but yet belongs to that thing alone, and is predicated convertibly of it. Thus it is a property of man to-be-capable of learning grammar: for if A be a man, then he is capable of learning grammar, and if he be capable of learning grammar, he is a man. For no one calls anything a ‘property’ which may possibly belong to something else, e.g. ‘sleep’ in the case of man, even though at a certain time it may happen to belong to him alone. That is to say, if any such thing were actually to be called a property, it will be called not a ‘property’ absolutely, but a ‘temporary’ or a ‘relative’ property: for ‘being on the right hand side’ is a temporary property, while ‘two-footed’ is in point of fact ascribed as a property in certain relations; e.g. it is a property of man relatively to a horse and a dog. That nothing which may belong to anything else than A is a convertible predicate of A is clear: for it does not necessarily follow that if something is asleep it is a man.
A ‘genus’ is what is predicated in the category of essence of a number of things exhibiting differences in kind. We should treat as predicates in the category of essence all such things as it would be appropriate to mention in reply to the question, ‘What is the object before you?’; as, for example, in the case of man, if asked that question, it is appropriate to say ‘He is an animal’. The question, ‘Is one thing in the same genus as another or in a different one?’ is also a ‘generic’ question; for a question of that kind as well falls under the same branch of inquiry as the genus: for having argued that ‘animal’ is the genus of man, and likewise also of ox, we shall have argued that they are in the same genus; whereas if we show that it is the genus of the one but not of the other, we shall have argued that these things are not in the same genus.
An ‘accident’ is (i) something which, though it is none of the foregoing-i.e. neither a definition nor a property nor a genus yet belongs to the thing: (something which may possibly either belong or not belong to any one and the self-same thing, as (e.g.) the ‘sitting posture’ may belong or not belong to some self-same thing. Likewise also ‘whiteness’, for there is nothing to prevent the same thing being at one time white, and at another not white. Of the definitions of accident the second is the better: for if he adopts the first, any one is bound, if he is to understand it, to know already what ‘definition’ and ‘genus’ and ‘property’ are, whereas the second is sufficient of itself to tell us the essential meaning of the term in question. To Accident are to be attached also all comparisons of things together, when expressed in language that is drawn in any kind of way from what happens (accidit) to be true of them; such as, for example, the question, ‘Is the honourable or the expedient preferable?’ and ‘Is the life of virtue or the life of self-indulgence the pleasanter?’, and any other problem which may happen to be phrased in terms like these. For in all such cases the question is ‘to which of the two does the predicate in question happen (accidit) to belong more closely?’ It is clear on the face of it that there is nothing to prevent an accident from becoming a temporary or relative property. Thus the sitting posture is an accident, but will be a temporary property, whenever a man is the only person sitting, while if he be not the only one sitting, it is still a property relatively to those who are not sitting. So then, there is nothing to prevent an accident from becoming both a relative and a temporary property; but a property absolutely it will never be.
We must not fail to observe that all remarks made in criticism of a ‘property’ and ‘genus’ and ‘accident’ will be applicable to ‘definitions’ as well. For when we have shown that the attribute in question fails to belong only to the term defined, as we do also in the case of a property, or that the genus rendered in the definition is not the true genus, or that any of the things mentioned in the phrase used does not belong, as would be remarked also in the case of an accident, we shall have demolished the definition; so that, to use the phrase previously employed,’ all the points we have enumerated might in a certain sense be called ‘definitory’. But we must not on this account expect to find a single line of inquiry which will apply universally to them all: for this is not an easy thing to find, and, even were one found, it would be very obscure indeed, and of little service for the treatise before us. Rather, a special plan of inquiry must be laid down for each of the classes we have distinguished, and then, starting from the rules that are appropriate in each case, it will probably be easier to make our way right through the task before us. So then, as was said before,’ we must outline a division of our subject, and other questions we must relegate each to the particular branch to which it most naturally belongs, speaking of them as ‘definitory’ and ‘generic’ questions. The questions I mean have practically been already assigned to their several branches.
First of all we must define the number of senses borne by the term ‘Sameness’. Sameness would be generally regarded as falling, roughly speaking, into three divisions. We generally apply the term numerically or specifically or generically-numerically in cases where there is more than one name but only one thing, e.g. ‘doublet’ and ‘cloak’; specifically, where there is more than one thing, but they present no differences in respect of their species, as one man and another, or one horse and another: for things like this that fall under the same species are said to be ‘specifically the same’. Similarly, too, those things are called generically the same which fall under the same genus, such as a horse and a man. It might appear that the sense in which water from the same spring is called ‘the same water’ is somehow different and unlike the senses mentioned above: but really such a case as this ought to be ranked in the same class with the things that in one way or another are called ‘the same’ in view of unity of species. For all such things seem to be of one family and to resemble one another. For the reaon why all water is said to be specifically the same as all other water is because of a certain likeness it bears to it, and the only difference in the case of water drawn from the same spring is this, that the likeness is more emphatic: that is why we do not distinguish it from the things that in one way or another are called ‘the same’ in view of unity of species. It is generally supposed that the term ‘the same’ is most used in a sense agreed on by every one when applied to what is numerically one. But even so, it is apt to be rendered in more than one sense; its most literal and primary use is found whenever the sameness is rendered in reference to an alternative name or definition, as when a cloak is said to be the same as a doublet, or an animal that walks on two feet is said to be the same as a man: a second sense is when it is rendered in reference to a property, as when what can acquire knowledge is called the same as a man, and what naturally travels upward the same as fire: while a third use is found when it is rendered in reference to some term drawn from Accident, as when the creature who is sitting, or who is musical, is called the same as Socrates. For all these uses mean to signify numerical unity. That what I have just said is true may be best seen where one form of appellation is substituted for another. For often when we give the order to call one of the people who are sitting down, indicating him by name, we change our description, whenever the person to whom we give the order happens not to understand us; he will, we think, understand better from some accidental feature; so we bid him call to us ‘the man who is sitting’ or ‘who is conversing over there’-clearly supposing ourselves to be indicating the same object by its name and by its accident.
Of ‘sameness’ then, as has been said,’ three senses are to be distinguished. Now one way to confirm that the elements mentioned above are those out of which and through which and to which arguments proceed, is by induction: for if any one were to survey propositions and problems one by one, it would be seen that each was formed either from the definition of something or from its property or from its genus or from its accident. Another way to confirm it is through reasoning. For every predicate of a subject must of necessity be either convertible with its subject or not: and if it is convertible, it would be its definition or property, for if it signifies the essence, it is the definition; if not, it is a property: for this was what a property is, viz. what is predicated convertibly, but does not signify the essence. If, on the other hand, it is not predicated convertibly of the thing, it either is or is not one of the terms contained in the definition of the subject: and if it be one of those terms, then it will be the genus or the differentia, inasmuch as the definition consists of genus and differentiae; whereas, if it be not one of those terms, clearly it would be an accident, for accident was said’ to be what belongs as an attribute to a subject without being either its definition or its genus or a property.
Next, then, we must distinguish between the classes of predicates in which the four orders in question are found. These are ten in number: Essence, Quantity, Quality, Relation, Place, Time, Position, State, Activity, Passivity. For the accident and genus and property and definition of anything will always be in one of these categories: for all the propositions found through these signify either something’s essence or its quality or quantity or some one of the other types of predicate. It is clear, too, on the face of it that the man who signifies something’s essence signifies sometimes a substance, sometimes a quality, sometimes some one of the other types of predicate. For when man is set before him and he says that what is set there is ‘a man’ or ‘an animal’, he states its essence and signifies a substance; but when a white colour is set before him and he says that what is set there is ‘white’ or is ‘a colour’, he states its essence and signifies a quality. Likewise, also, if a magnitude of a cubit be set before him and he says that what is set there is a magnitude of a cubit, he will be describing its essence and signifying a quantity. Likewise, also, in the other cases: for each of these kinds of predicate, if either it be asserted of itself, or its genus be asserted of it, signifies an essence: if, on the other hand, one kind of predicate is asserted of another kind, it does not signify an essence, but a quantity or a quality or one of the other kinds of predicate. Such, then, and so many, are the subjects on which arguments take place, and the materials with which they start. How we are to acquire them, and by what means we are to become well supplied with them, falls next to be told.
---
!!![[Topics: Book II: 1]]
{{Topics: Book II: 1}}
---
!!![[Topics: Book II: 2]]
{{Topics: Book II: 2}}
---
!!![[Topics: Book II: 3]]
{{Topics: Book II: 3}}
---
!!![[Topics: Book II: 4]]
{{Topics: Book II: 4}}
---
!!![[Topics: Book II: 5]]
{{Topics: Book II: 5}}
---
!!![[Topics: Book II: 6]]
{{Topics: Book II: 6}}
---
!!![[Topics: Book II: 7]]
{{Topics: Book II: 7}}
---
!!![[Topics: Book II: 8]]
{{Topics: Book II: 8}}
---
!!![[Topics: Book II: 9]]
{{Topics: Book II: 9}}
---
!!![[Topics: Book II: 10]]
{{Topics: Book II: 10}}
---
!!![[Topics: Book II: 11]]
{{Topics: Book II: 11}}
Of problems some are universal, others particular. Universal problems are such as ‘Every pleasure is good’ and ‘No pleasure is good’; particular problems are such as ‘Some pleasure is good’ and ‘Some pleasure is not good’. The methods of establishing and overthrowing a view universally are common to both kinds of problems; for when we have shown that a predicate belongs in every case, we shall also have shown that it belongs in some cases. Likewise, also, if we show that it does not belong in any case, we shall also have shown that it does not belong in every case. First, then, we must speak of the methods of overthrowing a view universally, because such are common to both universal and particular problems, and because people more usually introduce theses asserting a predicate than denying it, while those who argue with them overthrow it. The conversion of an appropriate name which is drawn from the element ‘accident’ is an extremely precarious thing; for in the case of accidents and in no other it is possible for something to be true conditionally and not universally. Names drawn from the elements ‘definition’ and ‘property’ and ‘genus’ are bound to be convertible; e.g. if ‘to be an animal that walks on two feet is an attribute of S’, then it will be true by conversion to say that ‘S is an animal that walks on two feet’. Likewise, also, if drawn from the genus; for if ‘to be an animal is an attribute of S’, then ‘S is an animal’. The same is true also in the case of a property; for if ‘to be capable of learning grammar is an attribute of S’, then ‘S will be capable of learning grammar’. For none of these attributes can possibly belong or not belong in part; they must either belong or not belong absolutely. In the case of accidents, on the other hand, there is nothing to prevent an attribute (e.g. whiteness or justice) belonging in part, so that it is not enough to show that whiteness or justice is an attribute of a man in order to show that he is white or just; for it is open to dispute it and say that he is white or just in part only. Conversion, then, is not a necessary process in the case of accidents.
We must also define the errors that occur in problems. They are of two kinds, caused either by false statement or by transgression of the established diction. For those who make false statements, and say that an attribute belongs to thing which does not belong to it, commit error; and those who call objects by the names of other objects (e.g. calling a planetree a ‘man’) transgress the established terminology.
Again, look at things which are like the subject in question, and see if they are in like case; e.g. if one branch of knowledge has more than one object, so also will one opinion; and if to possess sight be to see, then also to possess hearing will be to hear. Likewise also in the case of other things, both those which are and those which are generally held to be like. The rule in question is useful for both purposes; for if it be as stated in the case of some one like thing, it is so with the other like things as well, whereas if it be not so in the case of some one of them, neither is it so in the case of the others. Look and see also whether the cases are alike as regards a single thing and a number of things: for sometimes there is a discrepancy. Thus, if to ‘know’ a thing be to ‘think of’ it, then also to ‘know many things’ is to ‘be thinking of many things’; whereas this is not true; for it is possible to know many things but not to be thinking of them. If, then, the latter proposition be not true, neither was the former that dealt with a single thing, viz. that to ‘know’ a thing is to ‘think of’ it.
Moreover, argue from greater and less degrees. In regard to greater degrees there are four commonplace rules. One is: See whether a greater degree of the predicate follows a greater degree of the subject: e.g. if pleasure be good, see whether also a greater pleasure be a greater good: and if to do a wrong be evil, see whether also to do a greater wrong is a greater evil. Now this rule is of use for both purposes: for if an increase of the accident follows an increase of the subject, as we have said, clearly the accident belongs; while if it does not follow, the accident does not belong. You should establish this by induction. Another rule is: If one predicate be attributed to two subjects; then supposing it does not belong to the subject to which it is the more likely to belong, neither does it belong where it is less likely to belong; while if it does belong where it is less likely to belong, then it belongs as well where it is more likely. Again: If two predicates be attributed to one subject, then if the one which is more generally thought to belong does not belong, neither does the one that is less generally thought to belong; or, if the one that is less generally thought to belong does belong, so also does the other. Moreover: If two predicates be attributed to two subjects, then if the one which is more usually thought to belong to the one subject does not belong, neither does the remaining predicate belong to the remaining subject; or, if the one which is less usually thought to belong to the one subject does belong, so too does the remaining predicate to the remaining subject.
Moreover, you can argue from the fact that an attribute belongs, or is generally supposed to belong, in a like degree, in three ways, viz. those described in the last three rules given in regard to a greater degree.’ For supposing that one predicate belongs, or is supposed to belong, to two subjects in a like degree, then if it does not belong to the one, neither does it belong to the other; while if it belongs to the one, it belongs to the remaining one as well. Or, supposing two predicates to belong in a like degree to the same subject, then, if the one does not belong, neither does the remaining one; while if the one does belong, the remaining one belongs as well. The case is the same also if two predicates belong in a like degree to two subjects; for if the one predicate does not belong to the one subject, neither does the remaining predicate belong to the remaining subject, while if the one predicate does belong to the one subject, the remaining predicate belongs to the remaining subject as well.
You can argue, then, from greater or less or like degrees of truth in the aforesaid number of ways. Moreover, you should argue from the addition of one thing to another. If the addition of one thing to another makes that other good or white, whereas formerly it was not white or good, then the thing added will be white or good-it will possess the character it imparts to the whole as well. Moreover, if an addition of something to a given object intensifies the character which it had as given, then the thing added will itself as well be of that character. Likewise, also, in the case of other attributes. The rule is not applicable in all cases, but only in those in which the excess described as an ‘increased intensity’ is found to take place. The above rule is, however, not convertible for overthrowing a view. For if the thing added does not make the other good, it is not thereby made clear whether in itself it may not be good: for the addition of good to evil does not necessarily make the whole good, any more than the addition of white to black makes the whole white.
Again, any predicate of which we can speak of greater or less degrees belongs also absolutely: for greater or less degrees of good or of white will not be attributed to what is not good or white: for a bad thing will never be said to have a greater or less degree of goodness than another, but always of badness. This rule is not convertible, either, for the purpose of overthrowing a predication: for several predicates of which we cannot speak of a greater degree belong absolutely: for the term ‘man’ is not attributed in greater and less degrees, but a man is a man for all that.
You should examine in the same way predicates attributed in a given respect, and at a given time and place: for if the predicate be possible in some respect, it is possible also absolutely. Likewise, also, is what is predicated at a given time or place: for what is absolutely impossible is not possible either in any respect or at any place or time. An objection may be raised that in a given respect people may be good by nature, e.g. they may be generous or temperately inclined, while absolutely they are not good by nature, because no one is prudent by nature. Likewise, also, it is possible for a destructible thing to escape destruction at a given time, whereas it is not possible for it to escape absolutely. In the same way also it is a good thing at certain places to follow see and such a diet, e.g. in infected areas, though it is not a good thing absolutely. Moreover, in certain places it is possible to live singly and alone, but absolutely it is not possible to exist singly and alone. In the same way also it is in certain places honourable to sacrifice one’s father, e.g. among the Triballi, whereas, absolutely, it is not honourable. Or possibly this may indicate a relativity not to places but to persons: for it is all the same wherever they may be: for everywhere it will be held honourable among the Triballi themselves, just because they are Triballi. Again, at certain times it is a good thing to take medicines, e.g. when one is ill, but it is not so absolutely. Or possibly this again may indicate a relativity not to a certain time, but to a certain state of health: for it is all the same whenever it occurs, if only one be in that state. A thing is ‘absolutely’ so which without any addition you are prepared to say is honourable or the contrary. Thus (e.g.) you will deny that to sacrifice one’s father is honourable: it is honourable only to certain persons: it is not therefore honourable absolutely. On the other hand, to honour the gods you will declare to be honourable without adding anything, because that is honourable absolutely. So that whatever without any addition is generally accounted to be honourable or dishonourable or anything else of that kind, will be said to be so ‘absolutely’.
Now one commonplace rule is to look and see if a man has ascribed as an accident what belongs in some other way. This mistake is most commonly made in regard to the genera of things, e.g. if one were to say that white happens (accidit) to be a colour-for being a colour does not happen by accident to white, but colour is its genus. The assertor may of course define it so in so many words, saying (e.g.) that ‘Justice happens (accidit) to be a virtue’; but often even without such definition it is obvious that he has rendered the genus as an accident; e.g. suppose that one were to say that whiteness is coloured or that walking is in motion. For a predicate drawn from the genus is never ascribed to the species in an inflected form, but always the genera are predicated of their species literally; for the species take on both the name and the definition of their genera. A man therefore who says that white is ‘coloured’ has not rendered ‘coloured’ as its genus, seeing that he has used an inflected form, nor yet as its property or as its definition: for the definition and property of a thing belong to it and to nothing else, whereas many things besides white are coloured, e.g. a log, a stone, a man, and a horse. Clearly then he renders it as an accident.
Another rule is to examine all cases where a predicate has been either asserted or denied universally to belong to something. Look at them species by species, and not in their infinite multitude: for then the inquiry will proceed more directly and in fewer steps. You should look and begin with the most primary groups, and then proceed in order down to those that are not further divisible: e.g. if a man has said that the knowledge of opposites is the same, you should look and see whether it be so of relative opposites and of contraries and of terms signifying the privation or presence of certain states, and of contradictory terms. Then, if no clear result be reached so far in these cases, you should again divide these until you come to those that are not further divisible, and see (e.g.) whether it be so of just deeds and unjust, or of the double and the half, or of blindness and sight, or of being and not-being: for if in any case it be shown that the knowledge of them is not the same we shall have demolished the problem. Likewise, also, if the predicate belongs in no case. This rule is convertible for both destructive and constructive purposes: for if, when we have suggested a division, the predicate appears to hold in all or in a large number of cases, we may then claim that the other should actually assert it universally, or else bring a negative instance to show in what case it is not so: for if he does neither of these things, a refusal to assert it will make him look absurd.
Another rule is to make definitions both of an accident and of its subject, either of both separately or else of one of them, and then look and see if anything untrue has been assumed as true in the definitions. Thus (e.g.) to see if it is possible to wrong a god, ask what is ‘to wrong’? For if it be ‘to injure deliberately’, clearly it is not possible for a god to be wronged: for it is impossible that God should be injured. Again, to see if the good man is jealous, ask who is the ‘jealous’ man and what is ‘jealousy’. For if ‘jealousy’ is pain at the apparent success of some well-behaved person, clearly the good man is not jealous: for then he would be bad. Again, to see if the indignant man is jealous, ask who each of them is: for then it will be obvious whether the statement is true or false; e.g. if he is ‘jealous’ who grieves at the successes of the good, and he is ‘indignant’ who grieves at the successes of the evil, then clearly the indignant man would not be jealous. A man should substitute definitions also for the terms contained in his definitions, and not stop until he comes to a familiar term: for often if the definition be rendered whole, the point at issue is not cleared up, whereas if for one of the terms used in the definition a definition be stated, it becomes obvious.
Moreover, a man should make the problem into a proposition for himself, and then bring a negative instance against it: for the negative instance will be a ground of attack upon the assertion. This rule is very nearly the same as the rule to look into cases where a predicate has been attributed or denied universally: but it differs in the turn of the argument.
Moreover, you should define what kind of things should be called as most men call them, and what should not. For this is useful both for establishing and for overthrowing a view: e.g. you should say that we ought to use our terms to mean the same things as most people mean by them, but when we ask what kind of things are or are not of such and such a kind, we should not here go with the multitude: e.g. it is right to call ‘healthy’ whatever tends to produce health, as do most men: but in saying whether the object before us tends to produce health or not, we should adopt the language no longer of the multitude but of the doctor.
Moreover, if a term be used in several senses, and it has been laid down that it is or that it is not an attribute of S, you should show your case of one of its several senses, if you cannot show it of both. This rule is to be observed in cases where the difference of meaning is undetected; for supposing this to be obvious, then the other man will object that the point which he himself questioned has not been discussed, but only the other point. This commonplace rule is convertible for purposes both of establishing and of overthrowing a view. For if we want to establish a statement, we shall show that in one sense the attribute belongs, if we cannot show it of both senses: whereas if we are overthrowing a statement, we shall show that in one sense the attribute does not belong, if we cannot show it of both senses. Of course, in overthrowing a statement there is no need to start the discussion by securing any admission, either when the statement asserts or when it denies the attribute universally: for if we show that in any case whatever the attribute does not belong, we shall have demolished the universal assertion of it, and likewise also if we show that it belongs in a single case, we shall demolish the universal denial of it. Whereas in establishing a statement we ought to secure a preliminary admission that if it belongs in any case whatever, it belongs universally, supposing this claim to be a plausible one. For it is not enough to discuss a single instance in order to show that an attribute belongs universally; e.g. to argue that if the soul of man be immortal, then every soul is immortal, so that a previous admission must be secured that if any soul whatever be immortal, then every soul is immortal. This is not to be done in every case, but only whenever we are not easily able to quote any single argument applying to all cases in common, as (e.g.) the geometrician can argue that the triangle has its angles equal to two right angles.
If, again, the variety of meanings of a term be obvious, distinguish how many meanings it has before proceeding either to demolish or to establish it: e.g. supposing ‘the right’ to mean ‘the expedient’ or ‘the honourable’, you should try either to establish or to demolish both descriptions of the subject in question; e.g. by showing that it is honourable and expedient, or that it is neither honourable nor expedient. Supposing, however, that it is impossible to show both, you should show the one, adding an indication that it is true in the one sense and not in the other. The same rule applies also when the number of senses into which it is divided is more than two.
Again, consider those expressions whose meanings are many, but differ not by way of ambiguity of a term, but in some other way: e.g. ‘The science of many things is one’: here ‘many things’ may mean the end and the means to that end, as (e.g.) medicine is the science both of producing health and of dieting; or they may be both of them ends, as the science of contraries is said to be the same (for of contraries the one is no more an end than the other); or again they may be an essential and an accidental attribute, as (e.g.) the essential fact that the triangle has its angles equal to two right angles, and the accidental fact that the equilateral figure has them so: for it is because of the accident of the equilateral triangle happening to be a triangle that we know that it has its angles equal to two right angles. If, then, it is not possible in any sense of the term that the science of many things should be the same, it clearly is altogether impossible that it should be so; or, if it is possible in some sense, then clearly it is possible. Distinguish as many meanings as are required: e.g. if we want to establish a view, we should bring forward all such meanings as admit that view and should divide them only into those meanings which also are required for the establishment of our case: whereas if we want to overthrow a view, we should bring forward all that do not admit that view, and leave the rest aside. We must deal also in these cases as well with any uncertainty about the number of meanings involved. Further, that one thing is, or is not, ‘of’ another should be established by means of the same commonplace rules; e.g. that a particular science is of a particular thing, treated either as an end or as a means to its end, or as accidentally connected with it; or again that it is not ‘of’ it in any of the aforesaid ways. The same rule holds true also of desire and all other terms that have more than one object. For the ‘desire of X’ may mean the desire of it as an end (e.g. the desire of health) or as a means to an end (e.g. the desire of being doctored), or as a thing desired accidentally, as, in the case of wine, the sweet-toothed person desires it not because it is wine but because it is sweet. For essentially he desires the sweet, and only accidentally the wine: for if it be dry, he no longer desires it. His desire for it is therefore accidental. This rule is useful in dealing with relative terms: for cases of this kind are generally cases of relative terms.
Moreover, it is well to alter a term into one more familiar, e.g. to substitute ‘clear’ for ‘exact’ in describing a conception, and ‘being fussy’ for ‘being busy’: for when the expression is made more familiar, the thesis becomes easier to attack. This commonplace rule also is available for both purposes alike, both for establishing and for overthrowing a view.
In order to show that contrary attributes belong to the same thing, look at its genus; e.g. if we want to show that rightness and wrongness are possible in regard to perception, and to perceive is to judge, while it is possible to judge rightly or wrongly, then in regard to perception as well rightness and wrongness must be possible. In the present instance the proof proceeds from the genus and relates to the species: for ‘to judge’ is the genus of ‘to — perceive’; for the man who perceives judges in a certain way. But per contra it may proceed from the species to the genus: for all the attributes that belong to the species belong to the genus as well; e.g. if there is a bad and a good knowledge there is also a bad and a good disposition: for ‘disposition’ is the genus of knowledge. Now the former commonplace argument is fallacious for purposes of establishing a view, while the second is true. For there is no necessity that all the attributes that belong to the genus should belong also to the species; for ‘animal’ is flying and quadruped, but not so ‘man’. All the attributes, on the other hand, that belong to the species must of necessity belong also to the genus; for if ‘man’ is good, then animal also is good. On the other hand, for purposes of overthrowing a view, the former argument is true while the latter is fallacious; for all the attributes which do not belong to the genus do not belong to the species either; whereas all those that are wanting to the species are not of necessity wanting to the genus.
Since those things of which the genus is predicated must also of necessity have one of its species predicated of them, and since those things that are possessed of the genus in question, or are described by terms derived from that genus, must also of necessity be possessed of one of its species or be described by terms derived from one of its species (e.g. if to anything the term ‘scientific knowledge’ be applied, then also there will be applied to it the term ‘grammatical’ or ‘musical’ knowledge, or knowledge of one of the other sciences; and if any one possesses scientific knowledge or is described by a term derived from ‘science’, then he will also possess grammatical or musical knowledge or knowledge of one of the other sciences, or will be described by a term derived from one of them, e.g. as a ‘grammarian’ or a ‘musician’)-therefore if any expression be asserted that is in any way derived from the genus (e.g. that the soul is in motion), look and see whether it be possible for the soul to be moved with any of the species of motion; whether (e.g.) it can grow or be destroyed or come to be, and so forth with all the other species of motion. For if it be not moved in any of these ways, clearly it does not move at all. This commonplace rule is common for both purposes, both for overthrowing and for establishing a view: for if the soul moves with one of the species of motion, clearly it does move; while if it does not move with any of the species of motion, clearly it does not move.
If you are not well equipped with an argument against the assertion, look among the definitions, real or apparent, of the thing before you, and if one is not enough, draw upon several. For it will be easier to attack people when committed to a definition: for an attack is always more easily made on definitions.
Moreover, look and see in regard to the thing in question, what it is whose reality conditions the reality of the thing in question, or what it is whose reality necessarily follows if the thing in question be real: if you wish to establish a view inquire what there is on whose reality the reality of the thing in question will follow (for if the former be shown to be real, then the thing in question will also have been shown to be real); while if you want to overthrow a view, ask what it is that is real if the thing in question be real, for if we show that what follows from the thing in question is unreal, we shall have demolished the thing in question.
Moreover, look at the time involved, to see if there be any discrepancy anywhere: e.g. suppose a man to have stated that what is being nourished of necessity grows: for animals are always of necessity being nourished, but they do not always grow. Likewise, also, if he has said that knowing is remembering: for the one is concerned with past time, whereas the other has to do also with the present and the future. For we are said to know things present and future (e.g. that there will be an eclipse), whereas it is impossible to remember anything save what is in the past.
Moreover, there is the sophistic turn of argument, whereby we draw our opponent into the kind of statement against which we shall be well supplied with lines of argument. This process is sometimes a real necessity, sometimes an apparent necessity, sometimes neither an apparent nor a real necessity. It is really necessary whenever the answerer has denied any view that would be useful in attacking the thesis, and the questioner thereupon addresses his arguments to the support of this view, and when moreover the view in question happens to be one of a kind on which he has a good stock of lines of argument. Likewise, also, it is really necessary whenever he (the questioner) first, by an induction made by means of the view laid down, arrives at a certain statement and then tries to demolish that statement: for when once this has been demolished, the view originally laid down is demolished as well. It is an apparent necessity, when the point to which the discussion comes to be directed appears to be useful, and relevant to the thesis, without being really so; whether it be that the man who is standing up to the argument has refused to concede something, or whether he (the questioner) has first reached it by a plausible induction based upon the thesis and then tries to demolish it. The remaining case is when the point to which the discussion comes to be directed is neither really nor apparently necessary, and it is the answerer’s luck to be confuted on a mere side issue You should beware of the last of the aforesaid methods; for it appears to be wholly disconnected from, and foreign to, the art of dialectic. For this reason, moreover, the answerer should not lose his temper, but assent to those statements that are of no use in attacking the thesis, adding an indication whenever he assents although he does not agree with the view. For, as a rule, it increases the confusion of questioners if, after all propositions of this kind have been granted them, they can then draw no conclusion.
Moreover, any one who has made any statement whatever has in a certain sense made several statements, inasmuch as each statement has a number of necessary consequences: e.g. the man who said ‘X is a man’ has also said that it is an animal and that it is animate and a biped and capable of acquiring reason and knowledge, so that by the demolition of any single one of these consequences, of whatever kind, the original statement is demolished as well. But you should beware here too of making a change to a more difficult subject: for sometimes the consequence, and sometimes the original thesis, is the easier to demolish.
In regard to subjects which must have one and one only of two predicates, as (e.g.) a man must have either a disease or health, supposing we are well supplied as regards the one for arguing its presence or absence, we shall be well equipped as regards the remaining one as well. This rule is convertible for both purposes: for when we have shown that the one attribute belongs, we shall have shown that the remaining one does not belong; while if we show that the one does not belong, we shall have shown that the remaining one does belong. Clearly then the rule is useful for both purposes.
Moreover, you may devise a line of attack by reinterpreting a term in its literal meaning, with the implication that it is most fitting so to take it rather than in its established meaning: e.g. the expression ‘strong at heart’ will suggest not the courageous man, according to the use now established, but the man the state of whose heart is strong; just as also the expression ‘of a good hope’ may be taken to mean the man who hopes for good things. Likewise also ‘well-starred’ may be taken to mean the man whose star is good, as Xenocrates says ‘well-starred is he who has a noble soul’.’ For a man’s star is his soul.
Some things occur of necessity, others usually, others however it may chance; if therefore a necessary event has been asserted to occur usually, or if a usual event (or, failing such an event itself, its contrary) has been stated to occur of necessity, it always gives an opportunity for attack. For if a necessary event has been asserted to occur usually, clearly the speaker has denied an attribute to be universal which is universal, and so has made a mistake: and so he has if he has declared the usual attribute to be necessary: for then he declares it to belong universally when it does not so belong. Likewise also if he has declared the contrary of what is usual to be necessary. For the contrary of a usual attribute is always a comparatively rare attribute: e.g. if men are usually bad, they are comparatively seldom good, so that his mistake is even worse if he has declared them to be good of necessity. The same is true also if he has declared a mere matter of chance to happen of necessity or usually; for a chance event happens neither of necessity nor usually. If the thing happens usually, then even supposing his statement does not distinguish whether he meant that it happens usually or that it happens necessarily, it is open to you to discuss it on the assumption that he meant that it happens necessarily: e.g. if he has stated without any distinction that disinherited persons are bad, you may assume in discussing it that he means that they are so necessarily.
Moreover, look and see also if he has stated a thing to be an accident of itself, taking it to be a different thing because it has a different name, as Prodicus used to divide pleasures into joy and delight and good cheer: for all these are names of the same thing, to wit, Pleasure. If then any one says that joyfulness is an accidental attribute of cheerfulness, he would be declaring it to be an accidental attribute of itself.
Inasmuch as contraries can be conjoined with each other in six ways, and four of these conjunctions constitute a contrariety, we must grasp the subject of contraries, in order that it may help us both in demolishing and in establishing a view. Well then, that the modes of conjunction are six is clear: for either (1) each of the contrary verbs will be conjoined to each of the contrary objects; and this gives two modes: e.g. to do good to friends and to do evil to enemies, or per contra to do evil to friends and to do good to enemies. Or else (2) both verbs may be attached to one object; and this too gives two modes, e.g. to do good to friends and to do evil to friends, or to do good to enemies and to do evil to enemies. Or (3) a single verb may be attached to both objects: and this also gives two modes; e.g. to do good to friends and to do good to enemies, or to do evil to friends and evil to enemies.
The first two then of the aforesaid conjunctions do not constitute any contrariety; for the doing of good to friends is not contrary to the doing of evil to enemies: for both courses are desirable and belong to the same disposition. Nor is the doing of evil to friends contrary to the doing of good to enemies: for both of these are objectionable and belong to the same disposition: and one objectionable thing is not generally thought to be the contrary of another, unless the one be an expression denoting an excess, and the other an expression denoting a defect: for an excess is generally thought to belong to the class of objectionable things, and likewise also a defect. But the other four all constitute a contrariety. For to do good to friends is contrary to the doing of evil to friends: for it proceeds from the contrary disposition, and the one is desirable, and the other objectionable. The case is the same also in regard to the other conjunctions: for in each combination the one course is desirable, and the other objectionable, and the one belongs to a reasonable disposition and the other to a bad. Clearly, then, from what has been said, the same course has more than one contrary. For the doing of good to friends has as its contrary both the doing of good to enemies and the doing of evil to friends. Likewise, if we examine them in the same way, we shall find that the contraries of each of the others also are two in number. Select therefore whichever of the two contraries is useful in attacking the thesis.
Moreover, if the accident of a thing have a contrary, see whether it belongs to the subject to which the accident in question has been declared to belong: for if the latter belongs the former could not belong; for it is impossible that contrary predicates should belong at the same time to the same thing.
Or again, look and see if anything has been said about something, of such a kind that if it be true, contrary predicates must necessarily belong to the thing: e.g. if he has said that the ‘Ideas’ exist in us. For then the result will be that they are both in motion and at rest, and moreover that they are objects both of sensation and of thought. For according to the views of those who posit the existence of Ideas, those Ideas are at rest and are objects of thought; while if they exist in us, it is impossible that they should be unmoved: for when we move, it follows necessarily that all that is in us moves with us as well. Clearly also they are objects of sensation, if they exist in us: for it is through the sensation of sight that we recognize the Form present in each individual.
Again, if there be posited an accident which has a contrary, look and see if that which admits of the accident will admit of its contrary as well: for the same thing admits of contraries. Thus (e.g.) if he has asserted that hatred follows anger, hatred would in that case be in the ‘spirited faculty’: for that is where anger is. You should therefore look and see if its contrary, to wit, friendship, be also in the ‘spirited faculty’: for if not-if friendship is in the faculty of desire-then hatred could not follow anger. Likewise also if he has asserted that the faculty of desire is ignorant. For if it were capable of ignorance, it would be capable of knowledge as well: and this is not generally held-I mean that the faculty of desire is capable of knowledge. For purposes, then, of overthrowing a view, as has been said, this rule should be observed: but for purposes of establishing one, though the rule will not help you to assert that the accident actually belongs, it will help you to assert that it may possibly belong. For having shown that the thing in question will not admit of the contrary of the accident asserted, we shall have shown that the accident neither belongs nor can possibly belong; while on the other hand, if we show that the contrary belongs, or that the thing is capable of the contrary, we shall not indeed as yet have shown that the accident asserted does belong as well; our proof will merely have gone to this point, that it is possible for it to belong.
Seeing that the modes of opposition are four in number, you should look for arguments among the contradictories of your terms, converting the order of their sequence, both when demolishing and when establishing a view, and you should secure them by means of induction-such arguments (e.g.) as that man be an animal, what is not an animal is not a man’: and likewise also in other instances of contradictories. For in those cases the sequence is converse: for ‘animal’ follows upon ‘man but ‘not-animal’ does not follow upon ‘not-man’, but conversely ‘not-man’ upon ‘not-animal’. In all cases, therefore, a postulate of this sort should be made, (e.g.) that ‘If the honourable is pleasant, what is not pleasant is not honourable, while if the latter be untrue, so is the former’. Likewise, also, ‘If what is not pleasant be not honourable, then what is honourable is pleasant’. Clearly, then, the conversion of the sequence formed by contradiction of the terms of the thesis is a method convertible for both purposes.
Then look also at the case of the contraries of S and P in the thesis, and see if the contrary of the one follows upon the contrary of the other, either directly or conversely, both when you are demolishing and when you are establishing a view: secure arguments of this kind as well by means of induction, so far as may be required. Now the sequence is direct in a case such as that of courage and cowardice: for upon the one of them virtue follows, and vice upon the other; and upon the one it follows that it is desirable, while upon the other it follows that it is objectionable. The sequence, therefore, in the latter case also is direct; for the desirable is the contrary of the objectionable. Likewise also in other cases. The sequence is, on the other hand, converse in such a case as this: Health follows upon vigour, but disease does not follow upon debility; rather debility follows upon disease. In this case, then, clearly the sequence is converse. Converse sequence is, however, rare in the case of contraries; usually the sequence is direct. If, therefore, the contrary of the one term does not follow upon the contrary of the other either directly or conversely, clearly neither does the one term follow upon the other in the statement made: whereas if the one followed the other in the case of the contraries, it must of necessity do so as well in the original statement.
You should look also into cases of the privation or presence of a state in like manner to the case of contraries. Only, in the case of such privations the converse sequence does not occur: the sequence is always bound to be direct: e.g. as sensation follows sight, while absence of sensation follows blindness. For the opposition of sensation to absence of sensation is an opposition of the presence to the privation of a state: for the one of them is a state, and the other the privation of it.
The case of relative terms should also be studied in like manner to that of a state and its privation: for the sequence of these as well is direct; e.g. if 3/1 is a multiple, then 1/3 is a fraction: for 3/1 is relative to 1/3, and so is a multiple to a fraction. Again, if knowledge be a conceiving, then also the object of knowledge is an object of conception; and if sight be a sensation, then also the object of sight is an object of sensation. An objection may be made that there is no necessity for the sequence to take place, in the case of relative terms, in the way described: for the object of sensation is an object of knowledge, whereas sensation is not knowledge. The objection is, however, not generally received as really true; for many people deny that there is knowledge of objects of sensation. Moreover, the principle stated is just as useful for the contrary purpose, e.g. to show that the object of sensation is not an object of knowledge, on the ground that neither is sensation knowledge.
Again look at the case of the co-ordinates and inflected forms of the terms in the thesis, both in demolishing and in establishing it. By co-ordinates’ are meant terms such as the following: ‘Just deeds’ and the ‘just man’ are coordinates of ‘justice’, and ‘courageous deeds’ and the ‘courageous man’ are co-ordinates of courage. Likewise also things that tend to produce and to preserve anything are called co-ordinates of that which they tend to produce and to preserve, as e.g. ‘healthy habits’ are co-ordinates of ‘health’ and a ‘vigorous constitutional’ of a ‘vigorous constitution’ and so forth also in other cases. ‘Co-ordinate’, then, usually describes cases such as these, whereas ‘inflected forms’ are such as the following: ‘justly’, ‘courageously’, ‘healthily’, and such as are formed in this way. It is usually held that words when used in their inflected forms as well are co-ordinates, as (e.g.) ‘justly’ in relation to justice, and ‘courageously’ to courage; and then ‘co-ordinate’ describes all the members of the same kindred series, e.g. ‘justice’, ‘just’, of a man or an act, ‘justly’. Clearly, then, when any one member, whatever its kind, of the same kindred series is shown to be good or praiseworthy, then all the rest as well come to be shown to be so: e.g. if ‘justice’ be something praiseworthy, then so will ‘just’, of a man or thing, and ‘justly’ connote something praiseworthy. Then ‘justly’ will be rendered also ‘praiseworthily’, derived will by the same inflexion from ‘the praiseworthy’ whereby ‘justly’ is derived from ‘justice’.
Look not only in the case of the subject mentioned, but also in the case of its contrary, for the contrary predicate: e.g. argue that good is not necessarily pleasant; for neither is evil painful: or that, if the latter be the case, so is the former. Also, if justice be knowledge, then injustice is ignorance: and if ‘justly’ means ‘knowingly’ and ‘skilfully’, then ‘unjustly’ means ‘ignorantly’ and ‘unskilfully’: whereas if the latter be not true, neither is the former, as in the instance given just now: for ‘unjustly’ is more likely to seem equivalent to ‘skilfully’ than to ‘unskilfully’. This commonplace rule has been stated before in dealing with the sequence of contraries; for all we are claiming now is that the contrary of P shall follow the contrary of S.
Moreover, look at the modes of generation and destruction of a thing, and at the things which tend to produce or to destroy it, both in demolishing and in establishing a view. For those things whose modes of generation rank among good things, are themselves also good; and if they themselves be good, so also are their modes of generation. If, on the other hand, their modes of generation be evil, then they themselves also are evil. In regard to modes of destruction the converse is true: for if the modes of destruction rank as good things, then they themselves rank as evil things; whereas if the modes of destruction count as evil, they themselves count as good. The same argument applies also to things tending to produce and destroy: for things whose productive causes are good, themselves also rank as good; whereas if causes destructive of them are good, they themselves rank as evil.
---
!!![[Topics: Book III: 1]]
{{Topics: Book III: 1}}
---
!!![[Topics: Book III: 2]]
{{Topics: Book III: 2}}
---
!!![[Topics: Book III: 3]]
{{Topics: Book III: 3}}
---
!!![[Topics: Book III: 4]]
{{Topics: Book III: 4}}
---
!!![[Topics: Book III: 5]]
{{Topics: Book III: 5}}
---
!!![[Topics: Book III: 6]]
{{Topics: Book III: 6}}
The question which is the more desirable, or the better, of two or more things, should be examined upon the following lines: only first of all it must be clearly laid down that the inquiry we are making concerns not things that are widely divergent and that exhibit great differences from one another (for nobody raises any doubt whether happiness or wealth is more desirable), but things that are nearly related and about which we commonly discuss for which of the two we ought rather to vote, because we do not see any advantage on either side as compared with the other. Clearly, in such cases if we can show a single advantage, or more than one, our judgement will record our assent that whichever side happens to have the advantage is the more desirable.
First, then, that which is more lasting or secure is more desirable than that which is less so: and so is that which is more likely to be chosen by the prudent or by the good man or by the right law, or by men who are good in any particular line, when they make their choice as such, or by the experts in regard to any particular class of things; i.e. either whatever most of them or what all of them would choose; e.g. in medicine or in carpentry those things are more desirable which most, or all, doctors would choose; or, in general, whatever most men or all men or all things would choose, e.g. the good: for everything aims at the good. You should direct the argument you intend to employ to whatever purpose you require. Of what is ‘better’ or ‘more desirable’ the absolute standard is the verdict of the better science, though relatively to a given individual the standard may be his own particular science.
In the second place, that which is known as ‘an x’ is more desirable than that which does not come within the genus ‘x’-e.g. justice than a just man; for the former falls within the genus ‘good’, whereas the other does not, and the former is called ‘a good’, whereas the latter is not: for nothing which does not happen to belong to the genus in question is called by the generic name; e.g. a ‘white man’ is not ‘a colour’. Likewise also in other cases.
Also, that which is desired for itself is more desirable than that which is desired for something else; e.g. health is more desirable than gymnastics: for the former is desired for itself, the latter for something else. Also, that which is desirable in itself is more desirable than what is desirable per accidens; e.g. justice in our friends than justice in our enemies: for the former is desirable in itself, the latter per accidens: for we desire that our enemies should be just per accidens, in order that they may do us no harm. This last principle is the same as the one that precedes it, with, however, a different turn of expression. For we desire justice in our friends for itself, even though it will make no difference to us, and even though they be in India; whereas in our enemies we desire it for something else, in order that they may do us no harm.
Also, that which is in itself the cause of good is more desirable than what is so per accidens, e.g. virtue than luck (for the former in itself, and the latter per accidens, the cause of good things), and so in other cases of the same kind. Likewise also in the case of the contrary; for what is in itself the cause of evil is more objectionable than what is so per accidens, e.g. vice and chance: for the one is bad in itself, whereas chance is so per accidens.
Also, what is good absolutely is more desirable than what is good for a particular person, e.g. recovery of health than a surgical operation; for the former is good absolutely, the latter only for a particular person, viz. the man who needs an operation. So too what is good by nature is more desirable than the good that is not so by nature, e.g. justice than the just man; for the one is good by nature, whereas in the other case the goodness is acquired. Also the attribute is more desirable which belongs to the better and more honourable subject, e.g. to a god rather than to a man, and to the soul rather than to the body. So too the property of the better thing is better than the property of the worse; e.g. the property of God than the property of man: for whereas in respect of what is common in both of them they do not differ at all from each other, in respect of their properties the one surpasses the other. Also that is better which is inherent in things better or prior or more honourable: thus (e.g.) health is better than strength and beauty: for the former is inherent in the moist and the dry, and the hot and the cold, in fact in all the primary constituents of an animal, whereas the others are inherent in what is secondary, strength being a feature of the sinews and bones, while beauty is generally supposed to consist in a certain symmetry of the limbs. Also the end is generally supposed to be more desirable than the means, and of two means, that which lies nearer the end. In general, too, a means directed towards the end of life is more desirable than a means to anything else, e.g. that which contributes to happiness than that which contributes to prudence. Also the competent is more desirable than the incompetent. Moreover, of two productive agents that one is more desirable whose end is better; while between a productive agent and an end we can decide by a proportional sum whenever the excess of the one end over the other is greater than that of the latter over its own productive means: e.g. supposing the excess of happiness over health to be greater than that of health over what produces health, then what produces happiness is better than health. For what produces happiness exceeds what produces health just as much as happiness exceeds health. But health exceeds what produces health by a smaller amount; ergo, the excess of what produces happiness over what produces health is greater than that of health over what produces health. Clearly, therefore, what produces happiness is more desirable than health: for it exceeds the same standard by a greater amount. Moreover, what is in itself nobler and more precious and praiseworthy is more desirable than what is less so, e.g. friendship than wealth, and justice than strength. For the former belong in themselves to the class of things precious and praiseworthy, while the latter do so not in themselves but for something else: for no one prizes wealth for itself but always for something else, whereas we prize friendship for itself, even though nothing else is likely to come to us from it.
Moreover, whenever two things are very much like one another, and we cannot see any superiority in the one over the other of them, we should look at them from the standpoint of their consequences. For the one which is followed by the greater good is the more desirable: or, if the consequences be evil, that is more desirable which is followed by the less evil. For though both may be desirable, yet there may possibly be some unpleasant consequence involved to turn the scale. Our survey from the point of view of consequences lies in two directions, for there are prior consequences and later consequences: e.g. if a man learns, it follows that he was ignorant before and knows afterwards. As a rule, the later consequence is the better to consider. You should take, therefore, whichever of the consequences suits your purpose.
Moreover, a greater number of good things is more desirable than a smaller, either absolutely or when the one is included in the other, viz. the smaller number in the greater. An objection may be raised suppose in some particular case the one is valued for the sake of the other; for then the two together are not more desirable than the one; e.g. recovery of health and health, than health alone, inasmuch as we desire recovery of health for the sake of health. Also it is quite possible for what is not good, together with what is, to be more desirable than a greater number of good things, e.g. the combination of happiness and something else which is not good may be more desirable than the combination of justice and courage. Also, the same things are more valuable if accompanied than if unaccompanied by pleasure, and likewise when free from pain than when attended with pain.
Also, everything is more desirable at the season when it is of greater consequence; e.g. freedom from pain in old age more than in youth: for it is of greater consequence in old age. On the same principle also, prudence is more desirable in old age; for no man chooses the young to guide him, because he does not expect them to be prudent. With courage, the converse is the case, for it is in youth that the active exercise of courage is more imperatively required. Likewise also with temperance; for the young are more troubled by their passions than are their elders.
Also, that is more desirable which is more useful at every season or at most seasons, e.g. justice and temperance rather than courage: for they are always useful, while courage is only useful at times. Also, that one of two things which if all possess, we do not need the other thing, is more desirable than that which all may possess and still we want the other one as well. Take the case of justice and courage; if everybody were just, there would be no use for courage, whereas all might be courageous, and still justice would be of use.
Moreover, judge by the destructions and losses and generations and acquisitions and contraries of things: for things whose destruction is more objectionable are themselves more desirable. Likewise also with the losses and contraries of things; for a thing whose loss or whose contrary is more objectionable is itself more desirable. With the generations or acquisitions of things the opposite is the case: for things whose acquisition or generation is more desirable are themselves also desirable. Another commonplace rule is that what is nearer to the good is better and more desirable, i.e. what more nearly resembles the good: thus justice is better than a just man. Also, that which is more like than another thing to something better than itself, as e.g. some say that Ajax was a better man than Odysseus because he was more like Achilles. An objection may be raised to this that it is not true: for it is quite possible that Ajax did not resemble Achilles more nearly than Odysseus in the points which made Achilles the best of them, and that Odysseus was a good man, though unlike Achilles. Look also to see whether the resemblance be that of a caricature, like the resemblance of a monkey to a man, whereas a horse bears none: for the monkey is not the more handsome creature, despite its nearer resemblance to a man. Again, in the case of two things, if one is more like the better thing while another is more like the worse, then that is likely to be better which is more like the better. This too, however, admits of an objection: for quite possibly the one only slightly resembles the better, while the other strongly resembles the worse, e.g. supposing the resemblance of Ajax to Achilles to be slight, while that of Odysseus to Nestor is strong. Also it may be that the one which is like the better type shows a degrading likeness, whereas the one which is like the worse type improves upon it: witness the likeness of a horse to a donkey, and that of a monkey to a man.
Another rule is that the more conspicuous good is more desirable than the less conspicuous, and the more difficult than the easier: for we appreciate better the possession of things that cannot be easily acquired. Also the more personal possession is more desirable than the more widely shared. Also, that which is more free from connexion with evil: for what is not attended by any unpleasantness is more desirable than what is so attended.
Moreover, if A be without qualification better than B, then also the best of the members of A is better than the best of the members of B; e.g. if Man be better than Horse, then also the best man is better than the best horse. Also, if the best in A be better than the best in B, then also A is better than B without qualification; e.g. if the best man be better than the best horse, then also Man is better than Horse without qualification.
Moreover, things which our friends can share are more desirable than those they cannot. Also, things which we like rather to do to our friend are more desirable than those we like to do to the man in the street, e.g. just dealing and the doing of good rather than the semblance of them: for we would rather really do good to our friends than seem to do so, whereas towards the man in the street the converse is the case.
Also, superfluities are better than necessities, and are sometimes more desirable as well: for the good life is better than mere life, and good life is a superfluity, whereas mere life itself is a necessity. Sometimes, though, what is better is not also more desirable: for there is no necessity that because it is better it should also be more desirable: at least to be a philosopher is better than to make money, but it is not more desirable for a man who lacks the necessities of life. The expression ‘superfluity’ applies whenever a man possesses the necessities of life and sets to work to secure as well other noble acquisitions. Roughly speaking, perhaps, necessities are more desirable, while superfluities are better.
Also, what cannot be got from another is more desirable than what can be got from another as well, as (e.g.) is the case of justice compared with courage. Also, A is more desirable if A is desirable without B, but not B without A: power (e.g.) is not desirable without prudence, but prudence is desirable without power. Also, if of two things we repudiate the one in order to be thought to possess the other, then that one is more desirable which we wish to be thought to possess; thus (e.g.) we repudiate the love of hard work in order that people may think us geniuses.
Moreover, that is more desirable in whose absence it is less blameworthy for people to be vexed; and that is more desirable in whose absence it is more blameworthy for a man not to be vexed.
Moreover, of things that belong to the same species one which possesses the peculiar virtue of the species is more desirable than one which does not. If both possess it, then the one which possesses it in a greater degree is more desirable.
Moreover, if one thing makes good whatever it touches, while another does not, the former is more desirable, just as also what makes things warm is warmer than what does not. If both do so, then that one is more desirable which does so in a greater degree, or if it render good the better and more important object-if (e.g.), the one makes good the soul, and the other the body.
Moreover, judge things by their inflexions and uses and actions and works, and judge these by them: for they go with each other: e.g. if ‘justly’ means something more desirable than ‘courageously’, then also justice means something more desirable than courage; and if justice be more desirable than courage, then also ‘justly’ means something more desirable than ‘courageously’. Similarly also in the other cases.
Moreover, if one thing exceeds while the other falls short of the same standard of good, the one which exceeds is the more desirable; or if the one exceeds an even higher standard. Nay more, if there be two things both preferable to something, the one which is more highly preferable to it is more desirable than the less highly preferable. Moreover, when the excess of a thing is more desirable than the excess of something else, that thing is itself also more desirable than the other, as (e.g.) friendship than money: for an excess of friendship is more desirable than an excess of money. So also that of which a man would rather that it were his by his own doing is more desirable than what he would rather get by another’s doing, e.g. friends than money. Moreover, judge by means of an addition, and see if the addition of A to the same thing as B makes the whole more desirable than does the addition of B. You must, however, beware of adducing a case in which the common term uses, or in some other way helps the case of, one of the things added to it, but not the other, as (e.g.) if you took a saw and a sickle in combination with the art of carpentry: for in the combination the saw is a more desirable thing, but it is not a more desirable thing without qualification. Again, a thing is more desirable if, when added to a lesser good, it makes the whole greater good. Likewise, also, you should judge by means of subtraction: for the thing upon whose subtraction the remainder is a lesser good may be taken to be a greater good, whichever it be whose subtraction makes the remainder a lesser good.
Also, if one thing be desirable for itself, and the other for the look of it, the former is more desirable, as (e.g.) health than beauty. A thing is defined as being desired for the look of it if, supposing no one knew of it, you would not care to have it. Also, it is more desirable both for itself and for the look of it, while the other thing is desirable on the one ground alone. Also, whichever is the more precious for itself, is also better and more desirable. A thing may be taken to be more precious in itself which we choose rather for itself, without anything else being likely to come of it.
Moreover, you should distinguish in how many senses ‘desirable’ is used, and with a view to what ends, e.g. expediency or honour or pleasure. For what is useful for all or most of them may be taken to be more desirable than what is not useful in like manner. If the same characters belong to both things you should look and see which possesses them more markedly, i.e. which of the two is the more pleasant or more honourable or more expedient. Again, that is more desirable which serves the better purpose, e.g. that which serves to promote virtue more than that which serves to promote pleasure. Likewise also in the case of objectionable things; for that is more objectionable which stands more in the way of what is desirable, e.g. disease more than ugliness: for disease is a greater hindrance both to pleasure and to being good.
Moreover, argue by showing that the thing in question is in like measure objectionable and desirable: for a thing of such a character that a man might well desire and object to it alike is less desirable than the other which is desirable only.
Comparisons of things together should therefore be conducted in the manner prescribed. The same commonplace rules are useful also for showing that anything is simply desirable or objectionable: for we have only to subtract the excess of one thing over another. For if what is more precious be more desirable, then also what is precious is desirable; and if what is more useful be more desirable, then also what is useful is desirable. Likewise, also, in the case of other things which admit of comparisons of that kind. For in some cases in the very course of comparing the things together we at once assert also that each of them, or the one of them, is desirable, e.g. whenever we call the one good ‘by nature’ and the other ‘not by nature’: for dearly what is good by nature is desirable.
The commonplace rules relating to comparative degrees and amounts ought to be taken in the most general possible form: for when so taken they are likely to be useful in a larger number of instances. It is possible to render some of the actual rules given above more universal by a slight alteration of the expression, e.g. that what by nature exhibits such and such a quality exhibits that quality in a greater degree than what exhibits it not by nature. Also, if one thing does, and another does not, impart such and such a quality to that which possesses it, or to which it belongs, then whichever does impart it is of that quality in greater degree than the one which does not impart it; and if both impart it, then that one exhibits it in a greater degree which imparts it in a greater degree.
Moreover, if in any character one thing exceeds and another falls short of the same standard; also, if the one exceeds something which exceeds a given standard, while the other does not reach that standard, then clearly the first-named thing exhibits that character in a greater degree. Moreover, you should judge by means of addition, and see if A when added to the same thing as B imparts to the whole such and such a character in a more marked degree than B, or if, when added to a thing which exhibits that character in a less degree, it imparts that character to the whole in a greater degree. Likewise, also, you may judge by means of subtraction: for a thing upon whose subtraction the remainder exhibits such and such a character in a less degree, itself exhibits that character in a greater degree. Also, things exhibit such and such a character in a greater degree if more free from admixture with their contraries; e.g. that is whiter which is more free from admixture with black. Moreover, apart from the rules given above, that has such and such a character in greater degree which admits in a greater degree of the definition proper to the given character; e.g. if the definition of ‘white’ be ‘a colour which pierces the vision’, then that is whiter which is in a greater degree a colour that pierces the vision.
If the question be put in a particular and not in a universal form, in the first place the universal constructive or destructive commonplace rules that have been given may all be brought into use. For in demolishing or establishing a thing universally we also show it in particular: for if it be true of all, it is true also of some, and if untrue of all, it is untrue of some. Especially handy and of general application are the commonplace rules that are drawn from the opposites and co-ordinates and inflexions of a thing: for public opinion grants alike the claim that if all pleasure be good, then also all pain is evil, and the claim that if some pleasure be good, then also some pain is evil. Moreover, if some form of sensation be not a capacity, then also some form of failure of sensation is not a failure of capacity. Also, if the object of conception is in some cases an object of knowledge, then also some form of conceiving is knowledge. Again, if what is unjust be in some cases good, then also what is just is in some cases evil; and if what happens justly is in some cases evil, then also what happens unjustly is in some cases good. Also, if what is pleasant is in some cases objectionable, then pleasure is in some cases an objectionable thing. On the same principle, also, if what is pleasant is in some cases beneficial, then pleasure is in some cases a beneficial thing. The case is the same also as regards the things that destroy, and the processes of generation and destruction. For if anything that destroys pleasure or knowledge be in some cases good, then we may take it that pleasure or knowledge is in some cases an evil thing. Likewise, also, if the destruction of knowledge be in some cases a good thing or its production an evil thing, then knowledge will be in some cases an evil thing; e.g. if for a man to forget his disgraceful conduct be a good thing, and to remember it be an evil thing, then the knowledge of his disgraceful conduct may be taken to be an evil thing. The same holds also in other cases: in all such cases the premiss and the conclusion are equally likely to be accepted.
Moreover you should judge by means of greater or smaller or like degrees: for if some member of another genus exhibit such and such a character in a more marked degree than your object, while no member of that genus exhibits that character at all, then you may take it that neither does the object in question exhibit it; e.g. if some form of knowledge be good in a greater degree than pleasure, while no form of knowledge is good, then you may take it that pleasure is not good either. Also, you should judge by a smaller or like degree in the same way: for so you will find it possible both to demolish and to establish a view, except that whereas both are possible by means of like degrees, by means of a smaller degree it is possible only to establish, not to overthrow. For if a certain form of capacity be good in a like degree to knowledge, and a certain form of capacity be good, then so also is knowledge; while if no form of capacity be good, then neither is knowledge. If, too, a certain form of capacity be good in a less degree than knowledge, and a certain form of capacity be good, then so also is knowledge; but if no form of capacity be good, there is no necessity that no form of knowledge either should be good. Clearly, then, it is only possible to establish a view by means of a less degree.
Not only by means of another genus can you overthrow a view, but also by means of the same, if you take the most marked instance of the character in question; e.g. if it be maintained that some form of knowledge is good, then, suppose it to be shown that prudence is not good, neither will any other kind be good, seeing that not even the kind upon which there is most general agreement is so. Moreover, you should go to work by means of an hypothesis; you should claim that the attribute, if it belongs or does not belong in one case, does so in a like degree in all, e.g. that if the soul of man be immortal, so are other souls as well, while if this one be not so, neither are the others. If, then, it be maintained that in some instance the attribute belongs, you must show that in some instance it does not belong: for then it will follow, by reason of the hypothesis, that it does not belong to any instance at all. If, on the other hand, it be maintained that it does not belong in some instance, you must show that it does belong in some instance, for in this way it will follow that it belongs to all instances. It is clear that the maker of the hypothesis universalizes the question, whereas it was stated in a particular form: for he claims that the maker of a particular admission should make a universal admission, inasmuch as he claims that if the attribute belongs in one instance, it belongs also in all instances alike.
If the problem be indefinite, it is possible to overthrow a statement in only one way; e.g. if a man has asserted that pleasure is good or is not good, without any further definition. For if he meant that a particular pleasure is good, you must show universally that no pleasure is good, if the proposition in question is to be demolished. And likewise, also, if he meant that some particular pleasure is not good you must show universally that all pleasure is good: it is impossible to demolish it in any other way. For if we show that some particular pleasure is not good or is good, the proposition in question is not yet demolished. It is clear, then, that it is possible to demolish an indefinite statement in one way only, whereas it can be established in two ways: for whether we show universally that all pleasure is good, or whether we show that a particular pleasure is good, the proposition in question will have been proved. Likewise, also, supposing we are required to argue that some particular pleasure is not good, if we show that no pleasure is good or that a particular pleasure is not good, we shall have produced an argument in both ways, both universally and in particular, to show that some particular pleasure is not good. If, on the other hand, the statement made be definite, it will be possible to demolish it in two ways; e.g. if it be maintained that it is an attribute of some particular pleasure to be good, while of some it is not: for whether it be shown that all pleasure, or that no pleasure, is good, the proposition in question will have been demolished. If, however, he has stated that only one single pleasure is good, it is possible to demolish it in three ways: for by showing that all pleasure, or that no pleasure, or that more than one pleasure, is good, we shall have demolished the statement in question. If the statement be made still more definite, e.g. that prudence alone of the virtues is knowledge, there are four ways of demolishing it: for if it be shown that all virtue is knowledge, or that no virtue is so, or that some other virtue (e.g. justice) is so, or that prudence itself is not knowledge, the proposition in question will have been demolished.
It is useful also to take a look at individual instances, in cases where some attribute has been said to belong or not to belong, as in the case of universal questions. Moreover, you should take a glance among genera, dividing them by their species until you come to those that are not further divisible, as has been said before:’ for whether the attribute is found to belong in all cases or in none, you should, after adducing several instances, claim that he should either admit your point universally, or else bring an objection showing in what case it does not hold. Moreover, in cases where it is possible to make the accident definite either specifically or numerically, you should look and see whether perhaps none of them belongs, showing e.g. that time is not moved, nor yet a movement, by enumerating how many species there are of movement: for if none of these belong to time, clearly it does not move, nor yet is a movement. Likewise, also, you can show that the soul is not a number, by dividing all numbers into either odd or even: for then, if the soul be neither odd nor even, clearly it is not a number.
In regard then to Accident, you should set to work by means like these, and in this manner.
---
!!![[Topics: Book IV: 1]]
{{Topics: Book IV: 1}}
---
!!![[Topics: Book IV: 2]]
{{Topics: Book IV: 2}}
---
!!![[Topics: Book IV: 3]]
{{Topics: Book IV: 3}}
---
!!![[Topics: Book IV: 4]]
{{Topics: Book IV: 4}}
---
!!![[Topics: Book IV: 5]]
{{Topics: Book IV: 5}}
---
!!![[Topics: Book IV: 6]]
{{Topics: Book IV: 6}}
Next we must go on to examine questions relating to Genus and Property. These are elements in the questions that relate to definitions, but dialecticians seldom address their inquiries to these by themselves. If, then, a genus be suggested for something that is, first take a look at all objects which belong to the same genus as the thing mentioned, and see whether the genus suggested is not predicated of one of them, as happens in the case of an accident: e.g. if ‘good’ be laid down to be the genus of ‘pleasure’, see whether some particular pleasure be not good: for, if so, clearly good’ is not the genus of pleasure: for the genus is predicated of all the members of the same species. Secondly, see whether it be predicated not in the category of essence, but as an accident, as ‘white’ is predicated of ‘snow’, or ‘self-moved’ of the soul. For ‘snow’ is not a kind of ‘white’, and therefore ‘white’ is not the genus of snow, nor is the soul a kind of ‘moving object’: its motion is an accident of it, as it often is of an animal to walk or to be walking. Moreover, ‘moving’ does not seem to indicate the essence, but rather a state of doing or of having something done to it. Likewise, also, ‘white’: for it indicates not the essence of snow, but a certain quality of it. So that neither of them is predicated in the category of ‘essence’.
Especially you should take a look at the definition of Accident, and see whether it fits the genus mentioned, as (e.g.) is also the case in the instances just given. For it is possible for a thing to be and not to be self-moved, and likewise, also, for it to be and not to be white. So that neither of these attributes is the genus but an accident, since we were saying that an accident is an attribute which can belong to a thing and also not belong.
Moreover, see whether the genus and the species be not found in the same division, but the one be a substance while the other is a quality, or the one be a relative while the other is a quality, as (e.g.) ‘slow’ and ‘swan’ are each a substance, while ‘white’ is not a substance but a quality, so that ‘white’ is not the genus either of ‘snow’ or of ‘swan’. Again, knowledge’ is a relative, while ‘good’ and ‘noble’ are each a quality, so that good, or noble, is not the genus of knowledge. For the genera of relatives ought themselves also to be relatives, as is the case with ‘double’: for multiple’, which is the genus of ‘double’, is itself also a relative. To speak generally, the genus ought to fall under the same division as the species: for if the species be a substance, so too should be the genus, and if the species be a quality, so too the genus should be a quality; e.g. if white be a quality, so too should colour be. Likewise, also, in other cases.
Again, see whether it be necessary or possible for the genus to partake of the object which has been placed in the genus. ‘To partake’ is defined as ‘to admit the definition of that which is partaken. Clearly, therefore, the species partake of the genera, but not the genera of the species: for the species admits the definition of the genus, whereas the genus does not admit that of the species. You must look, therefore, and see whether the genus rendered partakes or can possibly partake of the species, e.g. if any one were to render anything as genus of ‘being’ or of ‘unity’: for then the result will be that the genus partakes of the species: for of everything that is, ‘being’ and ‘unity’ are predicated, and therefore their definition as well.
Moreover, see if there be anything of which the species rendered is true, while the genus is not so, e.g. supposing ‘being’ or ‘object of knowledge’ were stated to be the genus of ‘object of opinion’. For ‘object of opinion’ will be a predicate of what does not exist; for many things which do not exist are objects of opinion; whereas that ‘being’ or ‘object of knowledge’ is not predicated of what does not exist is clear. So that neither ‘being’ nor ‘object of knowledge’ is the genus of ‘object of opinion’: for of the objects of which the species is predicated, the genus ought to be predicated as well.
Again, see whether the object placed in the genus be quite unable to partake of any of its species: for it is impossible that it should partake of the genus if it do not partake of any of its species, except it be one of the species reached by the first division: these do partake of the genus alone. If, therefore, ‘Motion’ be stated as the genus of pleasure, you should look and see if pleasure be neither locomotion nor alteration, nor any of the rest of the given modes of motion: for clearly you may then take it that it does not partake of any of the species, and therefore not of the genus either, since what partakes of the genus must necessarily partake of one of the species as well: so that pleasure could not be a species of Motion, nor yet be one of the individual phenomena comprised under the term ‘motion’. For individuals as well partake in the genus and the species, as (e.g.) an individual man partakes of both ‘man’ and ‘animal’.
Moreover, see if the term placed in the genus has a wider denotation than the genus, as (e.g.) ‘object of opinion’ has, as compared with ‘being’: for both what is and what is not are objects of opinion, so that ‘object of opinion’ could not be a species of being: for the genus is always of wider denotation than the species. Again, see if the species and its genus have an equal denotation; suppose, for instance, that of the attributes which go with everything, one were to be stated as a species and the other as its genus, as for example Being and Unity: for everything has being and unity, so that neither is the genus of the other, since their denotation is equal. Likewise, also, if the ‘first’ of a series and the ‘beginning’ were to be placed one under the other: for the beginning is first and the first is the beginning, so that either both expressions are identical or at any rate neither is the genus of the other. The elementary principle in regard to all such cases is that the genus has a wider denotation than the species and its differentia: for the differentia as well has a narrower denotation than the genus.
See also whether the genus mentioned fails, or might be generally thought to fail, to apply to some object which is not specifically different from the thing in question; or, if your argument be constructive, whether it does so apply. For all things that are not specifically different have the same genus. If, therefore, it be shown to apply to one, then clearly it applies to all, and if it fails to apply to one, clearly it fails to apply to any; e.g. if any one who assumes ‘indivisible lines’ were to say that the ‘indivisible’ is their genus. For the aforesaid term is not the genus of divisible lines, and these do not differ as regards their species from indivisible: for straight lines are never different from each other as regards their species.
Look and see, also, if there be any other genus of the given species which neither embraces the genus rendered nor yet falls under it, e.g. suppose any one were to lay down that ‘knowledge’ is the genus of justice. For virtue is its genus as well, and neither of these genera embraces the remaining one, so that knowledge could not be the genus of justice: for it is generally accepted that whenever one species falls under two genera, the one is embraced by the other. Yet a principle of this kind gives rise to a difficulty in some cases. For some people hold that prudence is both virtue and knowledge, and that neither of its genera is embraced by the other: although certainly not everybody admits that prudence is knowledge. If, however, any one were to admit the truth of this assertion, yet it would still be generally agreed to be necessary that the genera of the same object must at any rate be subordinate either the one to the other or both to the same, as actually is the case with virtue and knowledge. For both fall under the same genus; for each of them is a state and a disposition. You should look, therefore, and see whether neither of these things is true of the genus rendered; for if the genera be subordinate neither the one to the other nor both to the same, then what is rendered could not be the true genus.
Look, also, at the genus of the genus rendered, and so continually at the next higher genus, and see whether all are predicated of the species, and predicated in the category of essence: for all the higher genera should be predicated of the species in the category of essence. If, then, there be anywhere a discrepancy, clearly what is rendered is not the true genus. [Again, see whether either the genus itself, or one of its higher genera, partakes of the species: for the higher genus does not partake of any of the lower.] If, then, you are overthrowing a view, follow the rule as given: if establishing one, then-suppose that what has been named as genus be admitted to belong to the species, only it be disputed whether it belongs as genus-it is enough to show that one of its higher genera is predicated of the species in the category of essence. For if one of them be predicated in the category of essence, all of them, both higher and lower than this one, if predicated at all of the species, will be predicated of it in the category of essence: so that what has been rendered as genus is also predicated in the category of essence. The premiss that when one genus is predicated in the category of essence, all the rest, if predicated at all, will be predicated in the category of essence, should be secured by induction. Supposing, however, that it be disputed whether what has been rendered as genus belongs at all, it is not enough to show that one of the higher genera is predicated of the species in the category of essence: e.g. if any one has rendered ‘locomotion’ as the genus of walking, it is not enough to show that walking is ‘motion’ in order to show that it is ‘locomotion’, seeing that there are other forms of motion as well; but one must show in addition that walking does not partake of any of the species of motion produced by the same division except locomotion. For of necessity what partakes of the genus partakes also of one of the species produced by the first division of the genus. If, therefore, walking does not partake either of increase or decrease or of the other kinds of motion, clearly it would partake of locomotion, so that locomotion would be the genus of walking.
Again, look among the things of which the given species is predicated as genus, and see if what is rendered as its genus be also predicated in the category of essence of the very things of which the species is so predicated, and likewise if all the genera higher than this genus are so predicated as well. For if there be anywhere a discrepancy, clearly what has been rendered is not the true genus: for had it been the genus, then both the genera higher than it, and it itself, would all have been predicated in the category of essence of those objects of which the species too is predicated in the category of essence. If, then, you are overthrowing a view, it is useful to see whether the genus fails to be predicated in the category of essence of those things of which the species too is predicated. If establishing a view, it is useful to see whether it is predicated in the category of essence: for if so, the result will be that the genus and the species will be predicated of the same object in the category of essence, so that the same object falls under two genera: the genera must therefore of necessity be subordinate one to the other, and therefore if it be shown that the one we wish to establish as genus is not subordinate to the species, clearly the species would be subordinate to it, so that you may take it as shown that it is the genus.
Look, also, at the definitions of the genera, and see whether they apply both to the given species and to the objects which partake of the species. For of necessity the definitions of its genera must be predicated of the species and of the objects which partake of the species: if, then, there be anywhere a discrepancy, clearly what has been rendered is not the genus.
Again, see if he has rendered the differentia as the genus, e.g. ‘immortal’ as the genus of ‘God’. For ‘immortal’ is a differentia of ‘living being’, seeing that of living beings some are mortal and others immortal. Clearly, then, a bad mistake has been made; for the differentia of a thing is never its genus. And that this is true is clear: for a thing’s differentia never signifies its essence, but rather some quality, as do ‘walking’ and ‘biped’.
Also, see whether he has placed the differentia inside the genus, e.g. by taking ‘odd’ as a number’. For ‘odd’ is a differentia of number, not a species. Nor is the differentia generally thought to partake of the genus: for what partakes of the genus is always either a species or an individual, whereas the differentia is neither a species nor an individual. Clearly, therefore, the differentia does not partake of the genus, so that ‘odd’ too is no species but a differentia, seeing that it does not partake of the genus.
Moreover, see whether he has placed the genus inside the species, e.g. by taking ‘contact’ to be a ‘juncture’, or ‘mixture’ a ‘fusion’, or, as in Plato’s definition,’ ‘locomotion’ to be the same as ‘carriage’. For there is no necessity that contact should be juncture: rather, conversely, juncture must be contact: for what is in contact is not always joined, though what is joined is always in contact. Likewise, also, in the remaining instances: for mixture is not always a ‘fusion’ (for to mix dry things does not fuse them), nor is locomotion always ‘carriage’. For walking is not generally thought to be carriage: for ‘carriage’ is mostly used of things that change one place for another involuntarily, as happens in the case of inanimate things. Clearly, also, the species, in the instances given, has a wider denotation than the genus, whereas it ought to be vice versa.
Again, see whether he has placed the differentia inside the species, by taking (e.g.) ‘immortal’ to be ‘a god’. For the result will be that the species has an equal or wider denotation: and this cannot be, for always the differentia has an equal or a wider denotation than the species. Moreover, see whether he has placed the genus inside the differentia, by making ‘colour’ (e.g.) to be a thing that ‘pierces’, or ‘number’ a thing that is ‘odd’. Also, see if he has mentioned the genus as differentia: for it is possible for a man to bring forward a statement of this kind as well, e.g. that ‘mixture’ is the differentia of ‘fusion’, or that change of place’ is the differentia of ‘carriage’. All such cases should be examined by means of the same principles: for they depend upon common rules: for the genus should have a wider denotation that its differentia, and also should not partake of its differentia; whereas, if it be rendered in this manner, neither of the aforesaid requirements can be satisfied: for the genus will both have a narrower denotation than its differentia, and will partake of it.
Again, if no differentia belonging to the genus be predicated of the given species, neither will the genus be predicated of it; e.g. of ‘soul’ neither ‘odd’ nor ‘even’ is predicated: neither therefore is ‘number’. Moreover, see whether the species is naturally prior and abolishes the genus along with itself: for the contrary is the general view. Moreover, if it be possible for the genus stated, or for its differentia, to be absent from the alleged species, e.g. for ‘movement’ to be absent from the ‘soul’, or ‘truth and falsehood’ from ‘opinion’, then neither of the terms stated could be its genus or its differentia: for the general view is that the genus and the differentia accompany the species, as long as it exists.
Look and see, also, if what is placed in the genus partakes or could possibly partake of any contrary of the genus: for in that case the same thing will at the same time partake of contrary things, seeing that the genus is never absent from it, while it partakes, or can possibly partake, of the contrary genus as well. Moreover, see whether the species shares in any character which it is utterly impossible for any member of the genus to have. Thus (e.g.) if the soul has a share in life, while it is impossible for any number to live, then the soul could not be a species of number.
You should look and see, also, if the species be a homonym of the genus, and employ as your elementary principles those already stated for dealing with homonymity: for the genus and the species are synonymous.
Seeing that of every genus there is more than one species, look and see if it be impossible that there should be another species than the given one belonging to the genus stated: for if there should be none, then clearly what has been stated could not be a genus at all.
Look and see, also, if he has rendered as genus a metaphorical expression, describing (e.g. ‘temperance’ as a ‘harmony’: a ‘harmony’: for a genus is always predicated of its species in its literal sense, whereas ‘harmony’ is predicated of temperance not in a literal sense but metaphorically: for a harmony always consists in notes.
Moreover, if there be any contrary of the species, examine it. The examination may take different forms; first of all see if the contrary as well be found in the same genus as the species, supposing the genus to have no contrary; for contraries ought to be found in the same genus, if there be no contrary to the genus. Supposing, on the other hand, that there is a contrary to the genus, see if the contrary of the species be found in the contrary genus: for of necessity the contrary species must be in the contrary genus, if there be any contrary to the genus. Each of these points is made plain by means of induction. Again, see whether the contrary of the species be not found in any genus at all, but be itself a genus, e.g. ‘good’: for if this be not found in any genus, neither will its contrary be found in any genus, but will itself be a genus, as happens in the case of ‘good’ and ‘evil’: for neither of these is found in a genus, but each of them is a genus. Moreover, see if both genus and species be contrary to something, and one pair of contraries have an intermediary, but not the other. For if the genera have an intermediary, so should their species as well, and if the species have, so should their genera as well, as is the case with (1) virtue and vice and (2) justice and injustice: for each pair has an intermediary. An objection to this is that there is no intermediary between health and disease, although there is one between evil and good. Or see whether, though there be indeed an intermediary between both pairs, i.e. both between the species and between the genera, yet it be not similarly related, but in one case be a mere negation of the extremes, whereas in the other case it is a subject. For the general view is that the relation should be similar in both cases, as it is in the cases of virtue and vice and of justice and injustice: for the intermediaries between both are mere negations. Moreover, whenever the genus has no contrary, look and see not merely whether the contrary of the species be found in the same genus, but the intermediate as well: for the genus containing the extremes contains the intermediates as well, as (e.g.) in the case of white and black: for ‘colour’ is the genus both of these and of all the intermediate colours as well. An objection may be raised that ‘defect’ and ‘excess’ are found in the same genus (for both are in the genus ‘evil’), whereas moderate amount’, the intermediate between them, is found not in ‘evil’ but in ‘good’. Look and see also whether, while the genus has a contrary, the species has none; for if the genus be contrary to anything, so too is the species, as virtue to vice and justice to injustice.
Likewise. also, if one were to look at other instances, one would come to see clearly a fact like this. An objection may be raised in the case of health and disease: for health in general is the contrary of disease, whereas a particular disease, being a species of disease, e.g. fever and ophthalmia and any other particular disease, has no contrary.
If, therefore, you are demolishing a view, there are all these ways in which you should make your examination: for if the aforesaid characters do not belong to it, clearly what has been rendered is not the genus. If, on the other hand, you are establishing a view, there are three ways: in the first place, see whether the contrary of the species be found in the genus stated, suppose the genus have no contrary: for if the contrary be found in it, clearly the species in question is found in it as well. Moreover, see if the intermediate species is found in the genus stated: for whatever genus contains the intermediate contains the extremes as well. Again, if the genus have a contrary, look and see whether also the contrary species is found in the contrary genus: for if so, clearly also the species in question is found in the genus in question.
Again, consider in the case of the inflexions and the co-ordinates of species and genus, and see whether they follow likewise, both in demolishing and in establishing a view. For whatever attribute belongs or does not belong to one belongs or does not belong at the same time to all; e.g. if justice be a particular form of knowledge, then also ‘justly’ is ‘knowingly’ and the just man is a man of knowledge: whereas if any of these things be not so, then neither is any of the rest of them.
Again, consider the case of things that bear a like relation to one another. Thus (e.g.) the relation of the pleasant to pleasure is like that of the useful to the good: for in each case the one produces the other. If therefore pleasure be a kind of ‘good’, then also the pleasant will be a kind of ‘useful’: for clearly it may be taken to be productive of good, seeing that pleasure is good. In the same way also consider the case of processes of generation and destruction; if (e.g.) to build be to be active, then to have built is to have been active, and if to learn be to recollect, then also to have learnt is to have recollected, and if to be decomposed be to be destroyed, then to have been decomposed is to have been destroyed, and decomposition is a kind of destruction. Consider also in the same way the case of things that generate or destroy, and of the capacities and uses of things; and in general, both in demolishing and in establishing an argument, you should examine things in the light of any resemblance of whatever description, as we were saying in the case of generation and destruction. For if what tends to destroy tends to decompose, then also to be destroyed is to be decomposed: and if what tends to generate tends to produce, then to be generated is to be produced, and generation is production. Likewise, also, in the case of the capacities and uses of things: for if a capacity be a disposition, then also to be capable of something is to be disposed to it, and if the use of anything be an activity, then to use it is to be active, and to have used it is to have been active.
If the opposite of the species be a privation, there are two ways of demolishing an argument, first of all by looking to see if the opposite be found in the genus rendered: for either the privation is to be found absolutely nowhere in the same genus, or at least not in the same ultimate genus: e.g. if the ultimate genus containing sight be sensation, then blindness will not be a sensation. Secondly, if there be a sensation. Secondly, if there be a privation opposed to both genus and species, but the opposite of the species be not found in the opposite of the genus, then neither could the species rendered be in the genus rendered. If, then, you are demolishing a view, you should follow the rule as stated; but if establishing one there is but one way: for if the opposite species be found in the opposite genus, then also the species in question would be found in the genus in question: e.g. if ‘blindness’ be a form of ‘insensibility’, then ‘sight’ is a form of ‘sensation’.
Again, look at the negations of the genus and species and convert the order of terms, according to the method described in the case of Accident: e.g. if the pleasant be a kind of good, what is not good is not pleasant. For were this no something not good as well would then be pleasant. That, however, cannot be, for it is impossible, if ‘good’ be the genus of pleasant, that anything not good should be pleasant: for of things of which the genus is not predicated, none of the species is predicated either. Also, in establishing a view, you should adopt the same method of examination: for if what is not good be not pleasant, then what is pleasant is good, so that ‘good’ is the genus of ‘pleasant’.
If the species be a relative term, see whether the genus be a relative term as well: for if the species be a relative term, so too is the genus, as is the case with ‘double’ and ‘multiple’: for each is a relative term. If, on the other hand, the genus be a relative term, there is no necessity that the species should be so as well: for ‘knowledge’is a relative term, but not so ‘grammar’. Or possibly not even the first statement would be generally considered true: for virtue is a kind of ‘noble’ and a kind of ‘good’ thing, and yet, while ‘virtue’ is a relative term, ‘good’ and ‘noble’ are not relatives but qualities. Again, see whether the species fails to be used in the same relation when called by its own name, and when called by the name of its genus: e.g. if the term ‘double’ be used to mean the double of a ‘half’, then also the term ‘multiple’ ought to be used to mean multiple of a ‘half’. Otherwise ‘multiple’ could not be the genus of ‘double’.
Moreover, see whether the term fail to be used in the same relation both when called by the name of its genus, and also when called by those of all the genera of its genus. For if the double be a multiple of a half, then ‘in excess of ‘will also be used in relation to a ‘half’: and, in general, the double will be called by the names of all the higher genera in relation to a ‘half’. An objection may be raised that there is no necessity for a term to be used in the same relation when called by its own name and when called by that of its genus: for ‘knowledge’ is called knowledge ‘of an object’, whereas it is called a ‘state’ and ‘disposition’ not of an ‘object’ but of the ‘soul’.
Again, see whether the genus and the species be used in the same way in respect of the inflexions they take, e.g. datives and genitives and all the rest. For as the species is used, so should the genus be as well, as in the case of ‘double’ and its higher genera: for we say both ‘double of’ and ‘multiple of’ a thing. Likewise, also, in the case of ‘knowledge’: for both knowledge’ itself and its genera, e.g. ‘disposition’ and ‘state’, are said to be ‘of’ something. An objection may be raised that in some cases it is not so: for we say ‘superior to’ and ‘contrary to’ so and so, whereas ‘other’, which is the genus of these terms, demands not ‘to’ but ‘than’: for the expression is ‘other than’ so and so.
Again, see whether terms used in like case relationships fail to yield a like construction when converted, as do ‘double’ and ‘multiple’. For each of these terms takes a genitive both in itself and in its converted form: for we say both a half of’ and ‘a fraction of’ something. The case is the same also as regards both ‘knowledge’ and ‘conception’: for these take a genitive, and by conversion an ‘object of knowledge’ and an ‘object of conception’ are both alike used with a dative. If, then, in any cases the constructions after conversion be not alike, clearly the one term is not the genus of the other.
Again, see whether the species and the genus fail to be used in relation to an equal number of things: for the general view is that the uses of both are alike and equal in number, as is the case with ‘present’ and ‘grant’. For a present’ is of something or to some one, and also a ‘grant’ is of something and to some one: and ‘grant’ is the genus of ‘present’, for a ‘present’ is a ‘grant that need not be returned’. In some cases, however, the number of relations in which the terms are used happens not to be equal, for while ‘double’ is double of something, we speak of ‘in excess’ or ‘greater’ in something, as well as of or than something: for what is in excess or greater is always in excess in something, as well as in excess of something. Hence the terms in question are not the genera of ‘double’, inasmuch as they are not used in relation to an equal number of things with the species. Or possibly it is not universally true that species and genus are used in relation to an equal number of things.
See, also, if the opposite of the species have the opposite of the genus as its genus, e.g. whether, if ‘multiple’ be the genus of ‘double’, ‘fraction’ be also the genus of ‘half’. For the opposite of the genus should always be the genus of the opposite species. If, then, any one were to assert that knowledge is a kind of sensation, then also the object of knowledge will have to be a kind of object of sensation, whereas it is not: for an object of knowledge is not always an object of sensation: for objects of knowledge include some of the objects of intuition as well. Hence ‘object of sensation’ is not the genus of ‘object of knowledge’: and if this be so, neither is ‘sensation’ the genus of ‘knowledge’.
Seeing that of relative terms some are of necessity found in, or used of, the things in relation to which they happen at any time to be used (e.g. ‘disposition’ and ‘state’ and ‘balance’; for in nothing else can the aforesaid terms possibly be found except in the things in relation to which they are used), while others need not be found in the things in relation to which they are used at any time, though they still may be (e.g. if the term ‘object of knowledge’ be applied to the soul: for it is quite possible that the knowledge of itself should be possessed by the soul itself, but it is not necessary, for it is possible for this same knowledge to be found in some one else), while for others, again, it is absolutely impossible that they should be found in the things in relation to which they happen at any time to be used (as e.g. that the contrary should be found in the contrary or knowledge in the object of knowledge, unless the object of knowledge happen to be a soul or a man)-you should look, therefore, and see whether he places a term of one kind inside a genus that is not of that kind, e.g. suppose he has said that ‘memory’ is the ‘abiding of knowledge’. For ‘abiding’ is always found in that which abides, and is used of that, so that the abiding of knowledge also will be found in knowledge. Memory, then, is found in knowledge, seeing that it is the abiding of knowledge. But this is impossible, for memory is always found in the soul. The aforesaid commonplace rule is common to the subject of Accident as well: for it is all the same to say that ‘abiding’ is the genus of memory, or to allege that it is an accident of it. For if in any way whatever memory be the abiding of knowledge, the same argument in regard to it will apply.
Again, see if he has placed what is a ‘state’ inside the genus ‘activity’, or an activity inside the genus ‘state’, e.g. by defining ‘sensation’ as ‘movement communicated through the body’: for sensation is a ‘state’, whereas movement is an ‘activity’. Likewise, also, if he has said that memory is a ‘state that is retentive of a conception’, for memory is never a state, but rather an activity.
They also make a bad mistake who rank a ‘state’ within the ‘capacity’ that attends it, e.g. by defining ‘good temper’ as the ‘control of anger’, and ‘courage’ and ‘justice’ as ‘control of fears’ and of ‘gains’: for the terms ‘courageous’ and ‘good-tempered’ are applied to a man who is immune from passion, whereas ‘self-controlled’ describes the man who is exposed to passion and not led by it. Quite possibly, indeed, each of the former is attended by a capacity such that, if he were exposed to passion, he would control it and not be led by it: but, for all that, this is not what is meant by being ‘courageous’ in the one case, and ‘good tempered’ in the other; what is meant is an absolute immunity from any passions of that kind at all.
Sometimes, also, people state any kind of attendant feature as the genus, e.g. ‘pain’ as the genus of ‘anger’ and ‘conception’ as that of conviction’. For both of the things in question follow in a certain sense upon the given species, but neither of them is genus to it. For when the angry man feels pain, the pain bas appeared in him earlier than the anger: for his anger is not the cause of his pain, but his pain of his anger, so that anger emphatically is not pain. By the same reasoning, neither is conviction conception: for it is possible to have the same conception even without being convinced of it, whereas this is impossible if conviction be a species of conception: for it is impossible for a thing still to remain the same if it be entirely transferred out of its species, just as neither could the same animal at one time be, and at another not be, a man. If, on the other hand, any one says that a man who has a conception must of necessity be also convinced of it, then ‘conception’ and ‘conviction’ will be used with an equal denotation, so that not even so could the former be the genus of the latter: for the denotation of the genus should be wider.
See, also, whether both naturally come to be anywhere in the same thing: for what contains the species contains the genus as well: e.g. what contains ‘white’ contains ‘colour’ as well, and what contains ‘knowledge of grammar’ contains ‘knowledge’ as well. If, therefore, any one says that ‘shame’ is ‘fear’, or that ‘anger’ is ‘pain’, the result will be that genus and species are not found in the same thing: for shame is found in the ‘reasoning’ faculty, whereas fear is in the ‘spirited’ faculty, and ‘pain’ is found in the faculty of ‘desires’. (for in this pleasure also is found), whereas ‘anger’ is found in the ‘spirited’ faculty. Hence the terms rendered are not the genera, seeing that they do not naturally come to be in the same faculty as the species. Likewise, also, if ‘friendship’ be found in the faculty of desires, you may take it that it is not a form of ‘wishing’: for wishing is always found in the ‘reasoning’ faculty. This commonplace rule is useful also in dealing with Accident: for the accident and that of which it is an accident are both found in the same thing, so that if they do not appear in the same thing, clearly it is not an accident.
Again, see if the species partakes of the genus attributed only in some particular respect: for it is the general view that the genus is not thus imparted only in some particular respect: for a man is not an animal in a particular respect, nor is grammar knowledge in a particular respect only. Likewise also in other instances. Look, therefore, and see if in the case of any of its species the genus be imparted only in a certain respect; e.g. if ‘animal’ has been described as an ‘object of perception’ or of ‘sight’. For an animal is an object of perception or of sight in a particular respect only; for it is in respect of its body that it is perceived and seen, not in respect of its soul, so that-’object of sight’ and ‘object of perception’ could not be the genus of ‘animal’.
Sometimes also people place the whole inside the part without detection, defining (e.g.) ‘animal’ as an ‘animate body’; whereas the part is not predicated in any sense of the whole, so that ‘body’ could not be the genus of animal, seeing that it is a part.
See also if he has put anything that is blameworthy or objectionable into the class ‘capacity’ or ‘capable’, e.g. by defining a ‘sophist’ or a ‘slanderer’, or a ‘thief’ as ‘one who is capable of secretly thieving other people’s property’. For none of the aforesaid characters is so called because he is ‘capable’ in one of these respects: for even God and the good man are capable of doing bad things, but that is not their character: for it is always in respect of their choice that bad men are so called. Moreover, a capacity is always a desirable thing: for even the capacities for doing bad things are desirable, and therefore it is we say that even God and the good man possess them; for they are capable (we say) of doing evil. So then ‘capacity’ can never be the genus of anything blameworthy. Else, the result will be that what is blameworthy is sometimes desirable: for there will be a certain form of capacity that is blameworthy.
Also, see if he has put anything that is precious or desirable for its own sake into the class ‘capacity’ or ‘capable’ or ‘productive’ of anything. For capacity, and what is capable or productive of anything, is always desirable for the sake of something else.
Or see if he has put anything that exists in two genera or more into one of them only. For some things it is impossible to place in a single genus, e.g. the ‘cheat’ and the ‘slanderer’: for neither he who has the will without the capacity, nor he who has the capacity without the will, is a slanderer or cheat, but he who has both of them. Hence he must be put not into one genus, but into both the aforesaid genera.
Moreover, people sometimes in converse order render genus as differentia, and differentia as genus, defining (e.g.) astonishment as ‘excess of wonderment’ and conviction as ‘vehemence of conception’. For neither ‘excess’ nor ‘vehemence’ is the genus, but the differentia: for astonishment is usually taken to be an ‘excessive wonderment’, and conviction to be a ‘vehement conception’, so that ‘wonderment’ and ‘conception’ are the genus, while ‘excess’ and ‘vehemence’ are the differentia. Moreover, if any one renders ‘excess’ and ‘vehemence’ as genera, then inanimate things will be convinced and astonished. For ‘vehemence’ and ‘excess’ of a thing are found in a thing which is thus vehement and in excess. If, therefore, astonishment be excess of wonderment the astonishment will be found in the wonderment, so that ‘wonderment’ will be astonished! Likewise, also, conviction will be found in the conception, if it be ‘vehemence of conception’, so that the conception will be convinced. Moreover, a man who renders an answer in this style will in consequence find himself calling vehemence vehement and excess excessive: for there is such a thing as a vehement conviction: if then conviction be ‘vehemence’, there would be a ‘vehement vehemence’. Likewise, also, there is such a thing as excessive astonishment: if then astonishment be an excess, there would be an ‘excessive excess’. Whereas neither of these things is generally believed, any more than that knowledge is a knower or motion a moving thing.
Sometimes, too, people make the bad mistake of putting an affection into that which is affected, as its genus, e.g. those who say that immortality is everlasting life: for immortality seems to be a certain affection or accidental feature of life. That this saying is true would appear clear if any one were to admit that a man can pass from being mortal and become immortal: for no one will assert that he takes another life, but that a certain accidental feature or affection enters into this one as it is. So then ‘life’ is not the genus of immortality.
Again, see if to an affection he has ascribed as genus the object of which it is an affection, by defining (e.g.) wind as ‘air in motion’. Rather, wind is ‘a movement of air’: for the same air persists both when it is in motion and when it is still. Hence wind is not ‘air’ at all: for then there would also have been wind when the air was not in motion, seeing that the same air which formed the wind persists. Likewise, also, in other cases of the kind. Even, then, if we ought in this instance to admit the point that wind is ‘air in motion’, yet we should accept a definition of the kind, not about all those things of which the genus is not true, but only in cases where the genus rendered is a true predicate. For in some cases, e.g. ‘mud’ or ‘snow’, it is not generally held to be true. For people tell you that snow is ‘frozen water’ and mud is earth mixed with moisture’, whereas snow is not water, nor mud earth, so that neither of the terms rendered could be the genus: for the genus should be true of all its species. Likewise neither is wine ‘fermented water’, as Empedocles speaks of ‘water fermented in wood’;’ for it simply is not water at all.
Moreover, see whether the term rendered fail to be the genus of anything at all; for then clearly it also fails to be the genus of the species mentioned. Examine the point by seeing whether the objects that partake of the genus fail to be specifically different from one another, e.g. white objects: for these do not differ specifically from one another, whereas of a genus the species are always different, so that ‘white’ could not be the genus of anything.
Again, see whether he has named as genus or differentia some feature that goes with everything: for the number of attributes that follow everything is comparatively large: thus (e.g.) ‘Being’ and ‘Unity’ are among the number of attributes that follow everything. If, therefore, he has rendered ‘Being’ as a genus, clearly it would be the genus of everything, seeing that it is predicated of everything; for the genus is never predicated of anything except of its species. Hence Unity, inter alia, will be a species of Being. The result, therefore, is that of all things of which the genus is predicated, the species is predicated as well, seeing that Being and Unity are predicates of absolutely everything, whereas the predication of the species ought to be of narrower range. If, on the other hand, he has named as differentia some attribute that follows everything, clearly the denotation of the differentia will be equal to, or wider than, that of the genus. For if the genus, too, be some attribute that follows everything, the denotation of the differentia will be equal to its denotation, while if the genus do not follow everything, it will be still wider.
Moreover, see if the description ‘inherent in S’ be used of the genus rendered in relation to its species, as it is used of ‘white’ in the case of snow, thus showing clearly that it could not be the genus: for ‘true of S’ is the only description used of the genus in relation to its species. Look and see also if the genus fails to be synonymous with its species. For the genus is always predicated of its species synonymously.
Moreover, beware, whenever both species and genus have a contrary, and he places the better of the contraries inside the worse genus: for the result will be that the remaining species will be found in the remaining genus, seeing that contraries are found in contrary genera, so that the better species will be found in the worse genus and the worse in the better: whereas the usual view is that of the better species the genus too is better. Also see if he has placed the species inside the worse and not inside the better genus, when it is at the same time related in like manner to both, as (e.g.) if he has defined the ‘soul’ as a ‘form of motion’ or ‘a form of moving thing’. For the same soul is usually thought to be a principle alike of rest and of motion, so that, if rest is the better of the two, this is the genus into which the soul should have been put.
Moreover, judge by means of greater and less degrees: if overthrowing a view, see whether the genus admits of a greater degree, whereas neither the species itself does so, nor any term that is called after it: e.g. if virtue admits of a greater degree, so too does justice and the just man: for one man is called ‘more just than another’. If, therefore, the genus rendered admits of a greater degree, whereas neither the species does so itself nor yet any term called after it, then what has been rendered could not be the genus.
Again, if what is more generally, or as generally, thought to be the genus be not so, clearly neither is the genus rendered. The commonplace rule in question is useful especially in cases where the species appears to have several predicates in the category of essence, and where no distinction has been drawn between them, and we cannot say which of them is genus; e.g. both ‘pain’ and the ‘conception of a slight’ are usually thought to be predicates of ‘anger in the category of essence: for the angry man is both in pain and also conceives that he is slighted. The same mode of inquiry may be applied also to the case of the species, by comparing it with some other species: for if the one which is more generally, or as generally, thought to be found in the genus rendered be not found therein, then clearly neither could the species rendered be found therein.
In demolishing a view, therefore, you should follow the rule as stated. In establishing one, on the other hand, the commonplace rule that you should see if both the genus rendered and the species admit of a greater degree will not serve: for even though both admit it, it is still possible for one not to be the genus of the other. For both ‘beautiful’ and ‘white’ admit of a greater degree, and neither is the genus of the other. On the other hand, the comparison of the genera and of the species one with another is of use: e.g. supposing A and B to have a like claim to be genus, then if one be a genus, so also is the other. Likewise, also, if what has less claim be a genus, so also is what has more claim: e.g. if ‘capacity’ have more claim than ‘virtue’ to be the genus of self-control, and virtue be the genus, so also is capacity. The same observations will apply also in the case of the species. For instance, supposing A and B to have a like claim to be a species of the genus in question, then if the one be a species, so also is the other: and if that which is less generally thought to be so be a species, so also is that which is more generally thought to be so.
Moreover, to establish a view, you should look and see if the genus is predicated in the category of essence of those things of which it has been rendered as the genus, supposing the species rendered to be not one single species but several different ones: for then clearly it will be the genus. If, on the other, the species rendered be single, look and see whether the genus be predicated in the category of essence of other species as well: for then, again, the result will be that it is predicated of several different species.
Since some people think that the differentia, too, is a predicate of the various species in the category of essence, you should distinguish the genus from the differentia by employing the aforesaid elementary principles-(a) that the genus has a wider denotation than the differentia; (b) that in rendering the essence of a thing it is more fitting to state the genus than the differentia: for any one who says that ‘man’ is an ‘animal’ shows what man is better than he who describes him as ‘walking’; also (c) that the differentia always signifies a quality of the genus, whereas the genus does not do this of the differentia: for he who says ‘walking’ describes an animal of a certain quality, whereas he who says ‘animal’ describes an animal of a certain quality, whereas he who says ‘animal’ does not describe a walking thing of a certain quality.
The differentia, then, should be distinguished from the genus in this manner. Now seeing it is generally held that if what is musical, in being musical, possesses knowledge in some respect, then also ‘music’ is a particular kind of ‘knowledge’; and also that if what walks is moved in walking, then ‘walking’ is a particular kind of ‘movement’; you should therefore examine in the aforesaid manner any genus in which you want to establish the existence of something; e.g. if you wish to prove that ‘knowledge’ is a form of ‘conviction’, see whether the knower in knowing is convinced: for then clearly knowledge would be a particular kind of conviction. You should proceed in the same way also in regard to the other cases of this kind.
Moreover, seeing that it is difficult to distinguish whatever always follows along with a thing, and is not convertible with it, from its genus, if A follows B universally, whereas B does not follow A universally-as e.g. ‘rest’ always follows a ‘calm’ and ‘divisibility’ follows ‘number’, but not conversely (for the divisible is not always a number, nor rest a calm)-you may yourself assume in your treatment of them that the one which always follows is the genus, whenever the other is not convertible with it: if, on the other hand, some one else puts forward the proposition, do not accept it universally. An objection to it is that ‘not-being’ always follows what is ‘coming to be’ (for what is coming to be is not) and is not convertible with it (for what is not is not always coming to be), and that still ‘not-being’ is not the genus of ‘coming to be’: for ‘not-being’ has not any species at all. Questions, then, in regard to Genus should be investigated in the ways described.
---
!!![[Topics: Book V: 1]]
{{Topics: Book V: 1}}
---
!!![[Topics: Book V: 2]]
{{Topics: Book V: 2}}
---
!!![[Topics: Book V: 3]]
{{Topics: Book V: 3}}
---
!!![[Topics: Book V: 4]]
{{Topics: Book V: 4}}
---
!!![[Topics: Book V: 5]]
{{Topics: Book V: 5}}
---
!!![[Topics: Book V: 6]]
{{Topics: Book V: 6}}
---
!!![[Topics: Book V: 7]]
{{Topics: Book V: 7}}
---
!!![[Topics: Book V: 8]]
{{Topics: Book V: 8}}
The question whether the attribute stated is or is not a property, should be examined by the following methods:
Any ‘property’ rendered is always either essential and permanent or relative and temporary: e.g. it is an ‘essential property’ of man to be ‘by nature a civilized animal’: a ‘relative property’ is one like that of the soul in relation to the body, viz. that the one is fitted to command, and the other to obey: a ‘permanent property’ is one like the property which belongs to God, of being an ‘immortal living being’: a ‘temporary property’ is one like the property which belongs to any particular man of walking in the gymnasium.
[The rendering of a property ‘relatively’ gives rise either to two problems or to four. For if he at the same time render this property of one thing and deny it of another, only two problems arise, as in the case of a statement that it is a property of a man, in relation to a horse, to be a biped. For one might try both to show that a man is not a biped, and also that a horse is a biped: in both ways the property would be upset. If on the other hand he render one apiece of two attributes to each of two things, and deny it in each case of the other, there will then be four problems; as in the case of a statement that it is a property of a man in relation to a horse for the former to be a biped and the latter a quadruped. For then it is possible to try to show both that a man is not naturally a biped, and that he is a quadruped, and also that the horse both is a biped, and is not a quadruped. If you show any of these at all, the intended attribute is demolished.]
An ‘essential’ property is one which is rendered of a thing in comparison with everything else and distinguishes the said thing from everything else, as does ‘a mortal living being capable of receiving knowledge’ in the case of man. A ‘relative’ property is one which separates its subject off not from everything else but only from a particular definite thing, as does the property which virtue possesses, in comparison with knowledge, viz. that the former is naturally produced in more than one faculty, whereas the latter is produced in that of reason alone, and in those who have a reasoning faculty. A ‘permanent’ property is one which is true at every time, and never fails, like being’ compounded of soul and body’, in the case of a living creature. A ‘temporary’ property is one which is true at some particular time, and does not of necessity always follow; as, of some particular man, that he walks in the market-place.
To render a property ‘relatively’ to something else means to state the difference between them as it is found either universally and always, or generally and in most cases: thus a difference that is found universally and always, is one such as man possesses in comparison with a horse, viz. being a biped: for a man is always and in every case a biped, whereas a horse is never a biped at any time. On the other hand, a difference that is found generally and in most cases, is one such as the faculty of reason possesses in comparison with that of desire and spirit, in that the former commands, while the latter obeys: for the reasoning faculty does not always command, but sometimes also is under command, nor is that of desire and spirit always under command, but also on occasion assumes the command, whenever the soul of a man is vicious.
Of ‘properties’ the most ‘arguable’ are the essential and permanent and the relative. For a relative property gives rise, as we said before, to several questions: for of necessity the questions arising are either two or four, or that arguments in regard to these are several. An essential and a permanent property you can discuss in relation to many things, or can observe in relation to many periods of time: if essential’, discuss it in comparison with many things: for the property ought to belong to its subject in comparison with every single thing that is, so that if the subject be not distinguished by it in comparison with everything else, the property could not have been rendered correctly. So a permanent property you should observe in relation to many periods of time; for if it does not or did not, or is not going to, belong, it will not be a property. On the other hand, about a temporary property we do not inquire further than in regard to the time called ‘the present’; and so arguments in regard to it are not many; whereas an arguable’ question is one in regard to which it is possible for arguments both numerous and good to arise.
The so-called ‘relative’ property, then, should be examined by means of the commonplace arguments relating to Accident, to see whether it belongs to the one thing and not to the other: on the other hand, permanent and essential properties should be considered by the following methods.
First, see whether the property has or has not been rendered correctly. Of a rendering being incorrect or correct, one test is to see whether the terms in which the property is stated are not or are more intelligible-for destructive purposes, whether they are not so, and for constructive purposes, whether they are so. Of the terms not being more intelligible, one test is to see whether the property which he renders is altogether more unintelligible than the subject whose property he has stated: for, if so, the property will not have been stated correctly. For the object of getting a property constituted is to be intelligible: the terms therefore in which it is rendered should be more intelligible: for in that case it will be possible to conceive it more adequately, e.g. any one who has stated that it is a property of ‘fire’ to ‘bear a very close resemblance to the soul’, uses the term ‘soul’, which is less intelligible than ‘fire’-for we know better what fire is than what soul is-, and therefore a ‘very close resemblance to the soul’ could not be correctly stated to be a property of fire. Another test is to see whether the attribution of A (property) to B (subject) fails to be more intelligible. For not only should the property be more intelligible than its subject, but also it should be something whose attribution to the particular subject is a more intelligible attribution. For he who does not know whether it is an attribute of the particular subject at all, will not know either whether it belongs to it alone, so that whichever of these results happens, its character as a property becomes obscure. Thus (e.g.) a man who has stated that it is a property of fire to be ‘the primary element wherein the soul is naturally found’, has introduced a subject which is less intelligible than ‘fire’, viz. whether the soul is found in it, and whether it is found there primarily; and therefore to be ‘the primary element in which the soul is naturally found’ could not be correctly stated to be a property of ‘fire’. On the other hand, for constructive purposes, see whether the terms in which the property is stated are more intelligible, and if they are more intelligible in each of the aforesaid ways. For then the property will have been correctly stated in this respect: for of constructive arguments, showing the correctness of a rendering, some will show the correctness merely in this respect, while others will show it without qualification. Thus (e.g.) a man who has said that the ‘possession of sensation’ is a property of ‘animal’ has both used more intelligible terms and has rendered the property more intelligible in each of the aforesaid senses; so that to ‘possess sensation’ would in this respect have been correctly rendered as a property of ‘animal’.
Next, for destructive purposes, see whether any of the terms rendered in the property is used in more than one sense, or whether the whole expression too signifies more than one thing. For then the property will not have been correctly stated. Thus (e.g.) seeing that to ‘being natural sentient’ signifies more than one thing, viz. (1) to possess sensation, (2) to use one’s sensation, being naturally sentient’ could not be a correct statement of a property of ‘animal’. The reason why the term you use, or the whole expression signifying the property, should not bear more than one meaning is this, that an expression bearing more than one meaning makes the object described obscure, because the man who is about to attempt an argument is in doubt which of the various senses the expression bears: and this will not do, for the object of rendering the property is that he may understand. Moreover, in addition to this, it is inevitable that those who render a property after this fashion should be somehow refuted whenever any one addresses his syllogism to that one of the term’s several meanings which does not agree. For constructive purposes, on the other hand, see whether both all the terms and also the expression as a whole avoid bearing more than one sense: for then the property will have been correctly stated in this respect. Thus (e.g.) seeing that ‘body’ does not bear several meanings, nor quickest to move upwards in space’, nor yet the whole expression made by putting them together, it would be correct in this respect to say that it is a property of fire to be the ‘body quickest to move upwards in space’.
Next, for destructive purposes, see if the term of which he renders the property is used in more than one sense, and no distinction has been drawn as to which of them it is whose property he is stating: for then the property will not have been correctly rendered. The reasons why this is so are quite clear from what has been said above: for the same results are bound to follow. Thus (e.g.) seeing that ‘the knowledge of this’ signifies many things for it means (1) the possession of knowledge by it, (2) the use of its knowledge by it, (3) the existence of knowledge about it, (4) the use of knowledge about it-no property of the ‘knowledge of this’ could be rendered correctly unless he draw a distinction as to which of these it is whose property he is rendering. For constructive purposes, a man should see if the term of which he is rendering the property avoids bearing many senses and is one and simple: for then the property will have been correctly stated in this respect. Thus (e.g.) seeing that ‘man’ is used in a single sense, ‘naturally civilized animal’ would be correctly stated as a property of man.
Next, for destructive purposes, see whether the same term has been repeated in the property. For people often do this undetected in rendering ‘properties’ also, just as they do in their ‘definitions’ as well: but a property to which this has happened will not have been correctly stated: for the repetition of it confuses the hearer; thus inevitably the meaning becomes obscure, and further, such people are thought to babble. Repetition of the same term is likely to happen in two ways; one is, when a man repeatedly uses the same word, as would happen if any one were to render, as a property of fire, ‘the body which is the most rarefied of bodies’ (for he has repeated the word ‘body’); the second is, if a man replaces words by their definitions, as would happen if any one were to render, as a property of earth, ‘the substance which is by its nature most easily of all bodies borne downwards in space’, and were then to substitute ‘substances of such and such a kind’ for the word ‘bodies’: for ‘body’ and ‘a substance of such and such a kind’ mean one and the same thing. For he will have repeated the word ‘substance’, and accordingly neither of the properties would be correctly stated. For constructive purposes, on the other hand, see whether he avoids ever repeating the same term; for then the property will in this respect have been correctly rendered. Thus (e.g.) seeing that he who has stated ‘animal capable of acquiring knowledge’ as a property of man has avoided repeating the same term several times, the property would in this respect have been correctly rendered of man.
Next, for destructive purposes, see whether he has rendered in the property any such term as is a universal attribute. For one which does not distinguish its subject from other things is useless, and it is the business of the language Of ‘properties’, as also of the language of definitions, to distinguish. In the case contemplated, therefore, the property will not have been correctly rendered. Thus (e.g.) a man who has stated that it is a property of knowledge to be a ‘conception incontrovertible by argument, because of its unity’, has used in the property a term of that kind, viz. ‘unity’, which is a universal attribute; and therefore the property of knowledge could not have been correctly stated. For constructive purposes, on the other hand, see whether he has avoided all terms that are common to everything and used a term that distinguishes the subject from something: for then the property will in this respect have been correctly stated. Thus (e.g.) inasmuch as he who has said that it is a property of a ‘living creature’ to ‘have a soul’ has used no term that is common to everything, it would in this respect have been correctly stated to be a property of a ‘living creature’ to ‘have a soul’.
Next, for destructive purposes see whether he renders more than one property of the same thing, without a definite proviso that he is stating more than one: for then the property will not have been correctly stated. For just as in the case of definitions too there should be no further addition beside the expression which shows the essence, so too in the case of properties nothing further should be rendered beside the expression that constitutes the property mentioned: for such an addition is made to no purpose. Thus (e.g.) a man who has said that it is a property of fire to be ‘the most rarefied and lightest body’ has rendered more than one property (for each term is a true predicate of fire alone); and so it could not be a correctly stated property of fire to be ‘the most rarefied and lightest body’. On the other hand, for constructive purposes, see whether he has avoided rendering more than one property of the same thing, and has rendered one only: for then the property will in this respect have been correctly stated. Thus (e.g.) a man who has said that it is a property of a liquid to be a ‘body adaptable to every shape’ has rendered as its property a single character and not several, and so the property of ‘liquid’ would in this respect have been correctly stated.
Next, for destructive purposes, see whether he has employed either the actual subject whose property he is rendering, or any of its species: for then the property will not have been correctly stated. For the object of rendering the property is that people may understand: now the subject itself is just as unintelligible as it was to start with, while any one of its species is posterior to it, and so is no more intelligible. Accordingly it is impossible to understand anything further by the use of these terms. Thus (e.g.) any one who has said that it is property of ‘animal’ to be ‘the substance to which “man” belongs as a species’ has employed one of its species, and therefore the property could not have been correctly stated. For constructive purposes, on the other hand, see whether he avoids introducing either the subject itself or any of its species: for then the property will in this respect have been correctly stated. Thus (e.g.) a man who has stated that it is a property of a living creature to be ‘compounded of soul and body’ has avoided introducing among the rest either the subject itself or any of its species, and therefore in this respect the property of a ‘living creature’ would have been correctly rendered.
You should inquire in the same way also in the case of other terms that do or do not make the subject more intelligible: thus, for destructive purposes, see whether he has employed anything either opposite to the subject or, in general, anything simultaneous by nature with it or posterior to it: for then the property will not have been correctly stated. For an opposite is simultaneous by nature with its opposite, and what is simultaneous by nature or is posterior to it does not make its subject more intelligible. Thus (e.g.) any one who has said that it is a property of good to be ‘the most direct opposite of evil’, has employed the opposite of good, and so the property of good could not have been correctly rendered. For constructive purposes, on the other hand, see whether he has avoided employing anything either opposite to, or, in general, simultaneous by nature with the subject, or posterior to it: for then the property will in this respect have been correctly rendered. Thus (e.g.) a man who has stated that it is a property of knowledge to be ‘the most convincing conception’ has avoided employing anything either opposite to, or simultaneous by nature with, or posterior to, the subject; and so the property of knowledge would in this respect have been correctly stated.
Next, for destructive purposes, see whether he has rendered as property something that does not always follow the subject but sometimes ceases to be its property: for then the property will not have been correctly described. For there is no necessity either that the name of the subject must also be true of anything to which we find such an attribute belonging; nor yet that the name of the subject will be untrue of anything to which such an attribute is found not to belong. Moreover, in addition to this, even after he has rendered the property it will not be clear whether it belongs, seeing that it is the kind of attribute that may fall: and so the property will not be clear. Thus (e.g.) a man who has stated that it is a property of animal ‘sometimes to move and sometimes to stand still’ rendered the kind of property which sometimes is not a property, and so the property could not have been correctly stated. For constructive purposes, on the other hand, see whether he has rendered something that of necessity must always be a property: for then the property will have been in this respect correctly stated. Thus (e.g.) a man who has stated that it is a property of virtue to be ‘what makes its possessor good’ has rendered as property something that always follows, and so the property of virtue would in this respect have been correctly rendered.
Next, for destructive purposes, see whether in rendering the property of the present time he has omitted to make a definite proviso that it is the property of the present time which he is rendering: for else the property will not have been correctly stated. For in the first place, any unusual procedure always needs a definite proviso: and it is the usual procedure for everybody to render as property some attribute that always follows. In the second place, a man who omits to provide definitely whether it was the property of the present time which he intended to state, is obscure: and one should not give any occasion for adverse criticism. Thus (e.g.) a man who has stated it as the property of a particular man ‘to be sitting with a particular man’, states the property of the present time, and so he cannot have rendered the property correctly, seeing that he has described it without any definite proviso. For constructive purposes, on the other hand, see whether, in rendering the property of the present time, he has, in stating it, made a definite proviso that it is the property of the present time that he is stating: for then the property will in this respect have been correctly stated. Thus (e.g.) a man who has said that it is the property of a particular man ‘to be walking now’, has made this distinction in his statement, and so the property would have been correctly stated.
Next, for destructive purposes, see whether he has rendered a property of the kind whose appropriateness is not obvious except by sensation: for then the property will not have been correctly stated. For every sensible attribute, once it is taken beyond the sphere of sensation, becomes uncertain. For it is not clear whether it still belongs, because it is evidenced only by sensation. This principle will be true in the case of any attributes that do not always and necessarily follow. Thus (e.g.) any one who has stated that it is a property of the sun to be ‘the brightest star that moves over the earth’, has used in describing the property an expression of that kind, viz. ‘to move over the earth’, which is evidenced by sensation; and so the sun’s property could not have been correctly rendered: for it will be uncertain, whenever the sun sets, whether it continues to move over the earth, because sensation then fails us. For constructive purposes, on the other hand, see whether he has rendered the property of a kind that is not obvious to sensation, or, if it be sensible, must clearly belong of necessity: for then the property will in this respect have been correctly stated. Thus (e.g.) a man who has stated that it is a property of a surface to be ‘the primary thing that is coloured’, has introduced amongst the rest a sensible quality, ‘to be coloured’, but still a quality such as manifestly always belongs, and so the property of ‘surface’ would in this respect have been correctly rendered.
Next, for destructive purposes, see whether he has rendered the definition as a property: for then the property will not have been correctly stated: for the property of a thing ought not to show its essence. Thus (e.g.) a man who has said that it is the property of man to be ‘a walking, biped animal’ has rendered a property of man so as to signify his essence, and so the property of man could not have been correctly rendered. For constructive purposes, on the other hand, see whether the property which he has rendered forms a predicate convertible with its subject, without, however, signifying its essence: for then the property will in this respect have been correctly rendered. Thus (e.g.) he who has stated that it is a property of man to be a ‘naturally civilized animal’ has rendered the property so as to be convertible with its subject, without, however, showing its essence, and so the property of man’ would in this respect have been correctly rendered.
Next, for destructive purposes, see whether he has rendered the property without having placed the subject within its essence. For of properties, as also of definitions, the first term to be rendered should be the genus, and then the rest of it should be appended immediately afterwards, and should distinguish its subject from other things. Hence a property which is not stated in this way could not have been correctly rendered. Thus (e.g.) a man who has said that it is a property of a living creature to ‘have a soul’ has not placed ‘living creature’ within its essence, and so the property of a living creature could not have been correctly stated. For constructive purposes, on the other hand, see whether a man first places within its essence the subject whose property he is rendering, and then appends the rest: for then the property will in this respect have been correctly rendered. Thus (e.g.) he who has stated that is a property of man to be an ‘animal capable of receiving knowledge’, has rendered the property after placing the subject within its essence, and so the property of ‘man’ would in this respect have been correctly rendered.
The inquiry, then, whether the property has been correctly rendered or no, should be made by these means. The question, on the other hand, whether what is stated is or is not a property at all, you should examine from the following points of view. For the commonplace arguments which establish absolutely that the property is accurately stated will be the same as those that constitute it a property at all: accordingly they will be described in the course of them.
Firstly, then, for destructive purposes, take a look at each subject of which he has rendered the property, and see (e.g.) if it fails to belong to any of them at all, or to be true of them in that particular respect, or to be a property of each of them in respect of that character of which he has rendered the property: for then what is stated to be a property will not be a property. Thus, for example, inasmuch as it is not true of the geometrician that he ‘cannot be deceived by an argument’ (for a geometrician is deceived when his figure is misdrawn), it could not be a property of the man of science that he is not deceived by an argument. For constructive purposes, on the other hand, see whether the property rendered be true of every instance, and true in that particular respect: for then what is stated not to be a property will be a property. Thus, for example, in as much as the description ‘an animal capable of receiving knowledge’ is true of every man, and true of him qua man, it would be a property of man to be ‘an animal capable of receiving knowledge’. commonplace rule means-for destructive purposes, see if the description fails to be true of that of which the name is true; and if the name fails to be true of that of which the description is true: for constructive purposes, on the other hand, see if the description too is predicated of that of which the name is predicated, and if the name too is predicated of that of which the description is predicated.]
Next, for destructive purposes, see if the description fails to apply to that to which the name applies, and if the name fails to apply to that to which the description applies: for then what is stated to be a property will not be a property. Thus (e.g.) inasmuch as the description ‘a living being that partakes of knowledge’ is true of God, while ‘man’ is not predicated of God, to be a living being that partakes of knowledge’ could not be a property of man. For constructive purposes, on the other hand, see if the name as well be predicated of that of which the description is predicated, and if the description as well be predicated of that of which the name is predicated. For then what is stated not to be a property will be a property. Thus (e.g.) the predicate ‘living creature’ is true of that of which ‘having a soul’ is true, and ‘having a soul’ is true of that of which the predicate ‘living creature’ is true; and so ‘having a soul would be a property of ‘living creature’.
Next, for destructive purposes, see if he has rendered a subject as a property of that which is described as ‘in the subject’: for then what has been stated to be a property will not be a property. Thus (e.g.) inasmuch as he who has rendered ‘fire’ as the property of ‘the body with the most rarefied particles’, has rendered the subject as the property of its predicate, ‘fire’ could not be a property of ‘the body with the most rarefied particles’. The reason why the subject will not be a property of that which is found in the subject is this, that then the same thing will be the property of a number of things that are specifically different. For the same thing has quite a number of specifically different predicates that belong to it alone, and the subject will be a property of all of these, if any one states the property in this way. For constructive purposes, on the other hand, see if he has rendered what is found in the subject as a property of the subject: for then what has been stated not to be a property will be a property, if it be predicated only of the things of which it has been stated to be the property. Thus (e.g.) he who has said that it is a property of ‘earth’ to be ‘specifically the heaviest body’ has rendered of the subject as its property something that is said of the thing in question alone, and is said of it in the manner in which a property is predicated, and so the property of earth would have been rightly stated.
Next, for destructive purposes, see if he has rendered the property as partaken of: for then what is stated to be a property will not be a property. For an attribute of which the subject partakes is a constituent part of its essence: and an attribute of that kind would be a differentia applying to some one species. E.g. inasmuch as he who has said that ‘walking on two feet’ is property of man has rendered the property as partaken of, ‘walking on two feet’ could not be a property of ‘man’. For constructive purposes, on the other hand, see if he has avoided rendering the property as partaken of, or as showing the essence, though the subject is predicated convertibly with it: for then what is stated not to be a property will be a property. Thus (e.g.) he who has stated that to be ‘naturally sentient’ is a property of ‘animal’ has rendered the property neither as partaken of nor as showing the essence, though the subject is predicated convertibly with it; and so to be ‘naturally sentient’ would be a property of ‘animal’.
Next, for destructive purposes, see if the property cannot possibly belong simultaneously, but must belong either as posterior or as prior to the attribute described in the name: for then what is stated to be a property will not be a property either never, or not always. Thus (e.g.) inasmuch as it is possible for the attribute ‘walking through the market-place’ to belong to an object as prior and as posterior to the attribute ‘man’, ‘walking through the market-place’ could not be a property of ‘man’ either never, or not always. For constructive purposes, on the other hand, see if it always and of necessity belongs simultaneously, without being either a definition or a differentia: for then what is stated not to be a property will be a property. Thus (e.g.) the attribute ‘an animal capable of receiving knowledge’ always and of necessity belongs simultaneously with the attribute ‘man’, and is neither differentia nor definition of its subject, and so ‘an animal capable of receiving knowledge’ would be a property of ‘man’.
Next, for destructive purposes, see if the same thing fails to be a property of things that are the same as the subject, so far as they are the same: for then what is stated to be a property will not be a property. Thus, for example, inasmuch as it is no property of a ‘proper object of pursuit’ to ‘appear good to certain persons’, it could not be a property of the ‘desirable’ either to ‘appear good to certain persons’: for ‘proper object of pursuit’ and ‘desirable’ mean the same. For constructive purposes, on the other hand, see if the same thing be a property of something that is the same as the subject, in so far as it is the same. For then is stated not to be a property will be a property. Thus (e.g.) inasmuch as it is called a property of a man, in so far as he is a man, ‘to have a tripartite soul’, it would also be a property of a mortal, in so far as he is a mortal, to have a tripartite soul. This commonplace rule is useful also in dealing with Accident: for the same attributes ought either to belong or not belong to the same things, in so far as they are the same.
Next, for destructive purposes, see if the property of things that are the same in kind as the subject fails to be always the same in kind as the alleged property: for then neither will what is stated to be the property of the subject in question. Thus (e.g.) inasmuch as a man and a horse are the same in kind, and it is not always a property of a horse to stand by its own initiative, it could not be a property of a man to move by his own initiative; for to stand and to move by his own initiative are the same in kind, because they belong to each of them in so far as each is an ‘animal’. For constructive purposes, on the other hand, see if of things that are the same in kind as the subject the property that is the same as the alleged property is always true: for then what is stated not to be a property will be a property. Thus (e.g.) since it is a property of man to be a ‘walking biped,’ it would also be a property of a bird to be a ‘flying biped’: for each of these is the same in kind, in so far as the one pair have the sameness of species that fall under the same genus, being under the genus ‘animal’, while the other pair have that of differentiae of the genus, viz. of ‘animal’. This commonplace rule is deceptive whenever one of the properties mentioned belongs to some one species only while the other belongs to many, as does ‘walking quadruped’.
Inasmuch as ‘same’ and ‘different’ are terms used in several senses, it is a job to render to a sophistical questioner a property that belongs to one thing and that only. For an attribute that belongs to something qualified by an accident will also belong to the accident taken along with the subject which it qualifies; e.g. an attribute that belongs to ‘man’ will belong also to ‘white man’, if there be a white man, and one that belongs to ‘white man’ will belong also to ‘man’. One might, then, bring captious criticism against the majority of properties, by representing the subject as being one thing in itself, and another thing when combined with its accident, saying, for example, that ‘man’ is one thing, and white man’ another, and moreover by representing as different a certain state and what is called after that state. For an attribute that belongs to the state will belong also to what is called after that state, and one that belongs to what is called after a state will belong also to the state: e.g. inasmuch as the condition of the scientist is called after his science, it could not be a property of ‘science’ that it is ‘incontrovertible by argument’; for then the scientist also will be incontrovertible by argument. For constructive purposes, however, you should say that the subject of an accident is not absolutely different from the accident taken along with its subject; though it is called ‘another’ thing because the mode of being of the two is different: for it is not the same thing for a man to be a man and for a white man to be a white man. Moreover, you should take a look along at the inflections, and say that the description of the man of science is wrong: one should say not ‘it’ but ‘he is incontrovertible by argument’; while the description of Science is wrong too: one should say not ‘it’ but ‘she is incontrovertible by argument’. For against an objector who sticks at nothing the defence should stick at nothing.
Next, for destructive purposes, see if, while intending to render an attribute that naturally belongs, he states it in his language in such a way as to indicate one that invariably belongs: for then it would be generally agreed that what has been stated to be a property is upset. Thus (e.g.) the man who has said that ‘biped’ is a property of man intends to render the attribute that naturally belongs, but his expression actually indicates one that invariably belongs: accordingly, ‘biped’ could not be a property of man: for not every man is possessed of two feet. For constructive purposes, on the other hand, see if he intends to render the property that naturally belongs, and indicates it in that way in his language: for then the property will not be upset in this respect. Thus (e.g.) he who renders as a property of ‘man’ the phrase ‘an animal capable of receiving knowledge’ both intends, and by his language indicates, the property that belongs by nature, and so ‘an animal capable of receiving knowledge’ would not be upset or shown in that respect not to be a property of man.
Moreover, as regards all the things that are called as they are primarily after something else, or primarily in themselves, it is a job to render the property of such things. For if you render a property as belonging to the subject that is so called after something else, then it will be true of its primary subject as well; whereas if you state it of its primary subject, then it will be predicated also of the thing that is so called after this other. Thus (e.g.) if any one renders, coloured’ as the property of ‘surface’, ‘coloured’ will be true of body as well; whereas if he render it of ‘body’, it will be predicated also of ‘surface’. Hence the name as well will not be true of that of which the description is true.
In the case of some properties it mostly happens that some error is incurred because of a failure to define how as well as to what things the property is stated to belong. For every one tries to render as the property of a thing something that belongs to it either naturally, as ‘biped’ belongs to ‘man’, or actually, as ‘having four fingers’ belongs to a particular man, or specifically, as ‘consisting of most rarefied particles’ belongs to ‘fire’, or absolutely, as ‘life’ to ‘living being’, or one that belongs to a thing only as called after something else, as ‘wisdom’ to the ‘soul’, or on the other hand primarily, as ‘wisdom’ to the ‘rational faculty’, or because the thing is in a certain state, as ‘incontrovertible by argument’ belongs to a ‘scientist’ (for simply and solely by reason of his being in a certain state will he be ‘incontrovertible by argument’), or because it is the state possessed by something, as ‘incontrovertible by argument’ belongs to ‘science’, or because it is partaken of, as ‘sensation’ belongs to ‘animal’ (for other things as well have sensation, e.g. man, but they have it because they already partake of ‘animal’), or because it partakes of something else, as ‘life’ belongs to a particular kind of ‘living being’. Accordingly he makes a mistake if he has failed to add the word ‘naturally’, because what belongs naturally may fail to belong to the thing to which it naturally belongs, as (e.g.) it belongs to a man to have two feet: so too he errs if he does not make a definite proviso that he is rendering what actually belongs, because one day that attribute will not be what it now is, e.g. the man’s possession of four fingers. So he errs if he has not shown that he states a thing to be such and such primarily, or that he calls it so after something else, because then its name too will not be true of that of which the description is true, as is the case with ‘coloured’, whether rendered as a property of ‘surface’ or of ‘body’. So he errs if he has not said beforehand that he has rendered a property to a thing either because that thing possesses a state, or because it is a state possessed by something; because then it will not be a property. For, supposing he renders the property to something as being a state possessed, it will belong to what possesses that state; while supposing he renders it to what possesses the state, it will belong to the state possessed, as did ‘incontrovertible by argument’ when stated as a property of ‘science’ or of the ‘scientist’. So he errs if he has not indicated beforehand that the property belongs because the thing partakes of, or is partaken of by, something; because then the property will belong to certain other things as well. For if he renders it because its subject is partaken of, it will belong to the things which partake of it; whereas if he renders it because its subject partakes of something else, it will belong to the things partaken of, as (e.g.) if he were to state ‘life’ to be a property of a ‘particular kind of living being’, or just of ‘living being. So he errs if he has not expressly distinguished the property that belongs specifically, because then it will belong only to one of the things that fall under the term of which he states the property: for the superlative belongs only to one of them, e.g. ‘lightest’ as applied to ‘fire’. Sometimes, too, a man may even add the word ‘specifically’, and still make a mistake. For the things in question should all be of one species, whenever the word ‘specifically’ is added: and in some cases this does not occur, as it does not, in fact, in the case of fire. For fire is not all of one species; for live coals and flame and light are each of them ‘fire’, but are of different species. The reason why, whenever ‘specifically’ is added, there should not be any species other than the one mentioned, is this, that if there be, then the property in question will belong to some of them in a greater and to others in a less degree, as happens with ‘consisting of most rarefied particles’ in the case of fire: for ‘light’ consists of more rarefied particles than live coals and flame. And this should not happen unless the name too be predicated in a greater degree of that of which the description is truer; otherwise the rule that where the description is truer the name too should be truer is not fulfilled. Moreover, in addition to this, the same attribute will be the property both of the term which has it absolutely and of that element therein which has it in the highest degree, as is the condition of the property ‘consisting of most rarefied particles’ in the case of ‘fire’: for this same attribute will be the property of ‘light’ as well: for it is ‘light’ that ‘consists of the most rarefied particles’. If, then, any one else renders a property in this way one should attack it; for oneself, one should not give occasion for this objection, but should define in what manner one states the property at the actual time of making the statement.
Next, for destructive purposes, see if he has stated a thing as a property of itself: for then what has been stated to be a property will not be a property. For a thing itself always shows its own essence, and what shows the essence is not a property but a definition. Thus (e.g.) he who has said that ‘becoming’ is a property of ‘beautiful’ has rendered the term as a property of itself (for ‘beautiful’ and ‘becoming’ are the same); and so ‘becoming’ could not be a property of ‘beautiful’. For constructive purposes, on the other hand, see if he has avoided rendering a thing as a property of itself, but has yet stated a convertible predicate: for then what is stated not to be a property will be a property. Thus he who has stated ‘animate substance’ as a property of ‘living-creature’ has not stated ‘living-creature’ as a property of itself, but has rendered a convertible predicate, so that ‘animate substance’ would be a property of ‘living-creature’.
Next, in the case of things consisting of like parts, you should look and see, for destructive purposes, if the property of the whole be not true of the part, or if that of the part be not predicated of the whole: for then what has been stated to be the property will not be a property. In some cases it happens that this is so: for sometimes in rendering a property in the case of things that consist of like parts a man may have his eye on the whole, while sometimes he may address himself to what is predicated of the part: and then in neither case will it have been rightly rendered. Take an instance referring to the whole: the man who has said that it is a property of the ‘sea’ to be ‘the largest volume of salt water’, has stated the property of something that consists of like parts, but has rendered an attribute of such a kind as is not true of the part (for a particular sea is not ‘the largest volume of salt water’); and so the largest volume of salt water’ could not be a property of the ‘sea’. Now take one referring to the part: the man who has stated that it is a property of ‘air’ to be ‘breathable’ has stated the property of something that consists of like parts, but he has stated an attribute such as, though true of some air, is still not predicable of the whole (for the whole of the air is not breathable); and so ‘breathable’ could not be a property of ‘air’. For constructive purposes, on the other hand, see whether, while it is true of each of the things with similar parts, it is on the other hand a property of them taken as a collective whole: for then what has been stated not to be a property will be a property. Thus (e.g.) while it is true of earth everywhere that it naturally falls downwards, it is a property of the various particular pieces of earth taken as ‘the Earth’, so that it would be a property of ‘earth’ ‘naturally to fall downwards’.
Next, look from the point of view of the respective opposites, and first (a) from that of the contraries, and see, for destructive purposes, if the contrary of the term rendered fails to be a property of the contrary subject. For then neither will the contrary of the first be a property of the contrary of the second. Thus (e.g.) inasmuch as injustice is contrary to justice, and the lowest evil to the highest good, but ‘to be the highest good’ is not a property of ‘justice’, therefore ‘to be the lowest evil’ could not be a property of ‘injustice’. For constructive purposes, on the other hand, see if the contrary is the property of the contrary: for then also the contrary of the first will be the property of the contrary of the second. Thus (e.g.) inasmuch as evil is contrary to good, and objectionable to desirable, and ‘desirable’ is a property of ‘good’, ‘objectionable’ would be a property of ‘evil’.
Secondly (h) look from the point of view of relative opposites and see, for destructive purposes, if the correlative of the term rendered fails to be a property of the correlative of the subject: for then neither will the correlative of the first be a property of the correlative of the second. Thus (e.g.) inasmuch as ‘double’ is relative to ‘half’, and ‘in excess’ to ‘exceeded’, while ‘in excess’ is not a property of ‘double’, exceeded’ could not be a property of ‘half’. For constructive purposes, on the other hand, see if the correlative of the alleged property is a property of the subject’s correlative: for then also the correlative of the first will be a property of the correlative of the second: e.g. inasmuch as ‘double’ is relative to ‘half’, and the proportion 1:2 is relative to the proportion 2:1, while it is a property of ‘double’ to be ‘in the proportion of 2 to 1’, it would be a property of ‘half’ to be ‘in the proportion of 1 to 2’.
Thirdly (c) for destructive purposes, see if an attribute described in terms of a state (X) fails to be a property of the given state (Y): for then neither will the attribute described in terms of the privation (of X) be a property of the privation (of Y). Also if, on the other hand, an attribute described in terms of the privation (of X) be not a property of the given privation (of Y), neither will the attribute described in terms of the state (X) be a property of the state (Y). Thus, for example, inasmuch as it is not predicated as a property of ‘deafness’ to be a ‘lack of sensation’, neither could it be a property of ‘hearing’ to be a ‘sensation’. For constructive purposes, on the other hand, see if an attribute described in terms of a state (X) is a property of the given state (Y): for then also the attribute that is described in terms of the privation (of X) will be a property of the privation (of Y). Also, if an attribute described in terms of a privation (of X) be a property of the privation (of Y), then also the attribute that is described in terms of the state (X) will be a property of the state (Y). Thus (e.g.) inasmuch as ‘to see’ is a property of ‘sight’, inasmuch as we have sight, ‘failure to see’ would be a property of ‘blindness’, inasmuch as we have not got the sight we should naturally have.
Next, look from the point of view of positive and negative terms; and first (a) from the point of view of the predicates taken by themselves. This common-place rule is useful only for a destructive purpose. Thus (e.g.) see if the positive term or the attribute described in terms of it is a property of the subject: for then the negative term or the attribute described in terms of it will not be a property of the subject. Also if, on the other hand, the negative term or the attribute described in terms of it is a property of the subject, then the positive term or the attribute described in terms of it will not be a property of the subject: e.g. inasmuch as ‘animate’ is a property of ‘living creature’, ‘inanimate’ could not be a property of ‘living creature’.
Secondly (b) look from the point of view of the predicates, positive or negative, and their respective subjects; and see, for destructive purposes, if the positive term falls to be a property of the positive subject: for then neither will the negative term be a property of the negative subject. Also, if the negative term fails to be a property of the negative subject, neither will the positive term be a property of the positive subject. Thus (e.g.) inasmuch as ‘animal’ is not a property of ‘man’, neither could ‘not-animal’ be a property of ‘not-man’. Also if ‘not-animal’ seems not to be a property of ‘not-man’, neither will ‘animal’ be a property of ‘man’. For constructive purposes, on the other hand, see if the positive term is a property of the positive subject: for then the negative term will be a property of the negative subject as well. Also if the negative term be a property of the negative subject, the positive will be a property of the positive as well. Thus (e.g.) inasmuch as it is a property of ‘not-living being’ ‘not to live’, it would be a property of ‘living being’ ‘to live’: also if it seems to be a property of ‘living being’ ‘to live’, it will also seem to be a property of ‘not-living being’ ‘not to live’.
Thirdly (c) look from the point of view of the subjects taken by themselves, and see, for destructive purposes, if the property rendered is a property of the positive subject: for then the same term will not be a property of the negative subject as well. Also, if the term rendered be a property of the negative subject, it will not be a property of the positive. Thus (e.g.) inasmuch as ‘animate’ is a property of ‘living creature’, ‘animate’ could not be a property of ‘not-living creature’. For constructive purposes, on the other hand, if the term rendered fails to be a property of the affirmative subject it would be a property of the negative. This commonplace rule is, however, deceptive: for a positive term is not a property of a negative, or a negative of a positive. For a positive term does not belong at all to a negative, while a negative term, though it belongs to a positive, does not belong as a property.
Next, look from the point of view of the coordinate members of a division, and see, for destructive purposes, if none of the co-ordinate members (parallel with the property rendered) be a property of any of the remaining set of co-ordinate members (parallel with the subject): for then neither will the term stated be a property of that of which it is stated to be a property. Thus (e.g.) inasmuch as ‘sensible living being’ is not a property of any of the other living beings, ‘intelligible living being’ could not be a property of God. For constructive purposes, on the other hand, see if some one or other of the remaining co-ordinate members (parallel with the property rendered) be a property of each of these co-ordinate members (parallel with the subject): for then the remaining one too will be a property of that of which it has been stated not to be a property. Thus (e.g.) inasmuch as it is a property of ‘wisdom’ to be essentially ‘the natural virtue of the rational faculty’, then, taking each of the other virtues as well in this way, it would be a property of ‘temperance’ to be essentially ‘the natural virtue of the faculty of desire’.
Next, look from the point of view of the inflexions, and see, for destructive purposes, if the inflexion of the property rendered fails to be a property of the inflexion of the subject: for then neither will the other inflexion be a property of the other inflexion. Thus (e.g.) inasmuch as ‘beautifully’ is not a property of ‘justly’, neither could ‘beautiful’ be a property of ‘just’. For constructive purposes, on the other hand, see if the inflexion of the property rendered is a property of the inflexion of the subject: for then also the other inflexion will be a property of the other inflexion. Thus (e.g.) inasmuch as ‘walking biped’ is a property of man, it would also be any one’s property ‘as a man’ to be described ‘as a walking biped’. Not only in the case of the actual term mentioned should one look at the inflexions, but also in the case of its opposites, just as has been laid down in the case of the former commonplace rules as well.’ Thus, for destructive purposes, see if the inflexion of the opposite of the property rendered fails to be the property of the inflexion of the opposite of the subject: for then neither will the inflexion of the other opposite be a property of the inflexion of the other opposite. Thus (e.g.) inasmuch as ‘well’ is not a property of ‘justly’, neither could ‘badly’ be a property of ‘unjustly’. For constructive purposes, on the other hand, see if the inflexion of the opposite of the property originally suggested is a property of the inflexion of the opposite of the original subject: for then also the inflexion of the other opposite will be a property of the inflexion of the other opposite. Thus (e.g.) inasmuch as ‘best’ is a property of ‘the good’, ‘worst’ also will be a property of ‘the evil’.
Next, look from the point of view of things that are in a like relation, and see, for destructive purposes, if what is in a relation like that of the property rendered fails to be a property of what is in a relation like that of the subject: for then neither will what is in a relation like that of the first be a property of what is in a relation like that of the second. Thus (e.g.) inasmuch as the relation of the builder towards the production of a house is like that of the doctor towards the production of health, and it is not a property of a doctor to produce health, it could not be a property of a builder to produce a house. For constructive purposes, on the other hand, see if what is in a relation like that of the property rendered is a property of what is in a relation like that of the subject: for then also what is in a relation like that of the first will be a property of what is in a relation like that of the second. Thus (e.g.) inasmuch as the relation of a doctor towards the possession of ability to produce health is like that of a trainer towards the possession of ability to produce vigour, and it is a property of a trainer to possess the ability to produce vigour, it would be a property of a doctor to possess the ability to produce health.
Next look from the point of view of things that are identically related, and see, for destructive purposes, if the predicate that is identically related towards two subjects fails to be a property of the subject which is identically related to it as the subject in question; for then neither will the predicate that is identically related to both subjects be a property of the subject which is identically related to it as the first. If, on the other hand, the predicate which is identically related to two subjects is the property of the subject which is identically related to it as the subject in question, then it will not be a property of that of which it has been stated to be a property. (e.g.) inasmuch as prudence is identically related to both the noble and the base, since it is knowledge of each of them, and it is not a property of prudence to be knowledge of the noble, it could not be a property of prudence to be knowledge of the base. If, on the other hand, it is a property of prudence to be the knowledge of the noble, it could not be a property of it to be the knowledge of the base.] For it is impossible for the same thing to be a property of more than one subject. For constructive purposes, on the other hand, this commonplace rule is of no use: for what is ‘identically related’ is a single predicate in process of comparison with more than one subject.
Next, for destructive purposes, see if the predicate qualified by the verb ‘to be’ fails to be a property of the subject qualified by the verb ‘to be’: for then neither will the destruction of the one be a property of the other qualified by the verb ‘to be destroyed’, nor will the ‘becoming’the one be a property of the other qualified by the verb ‘to become’. Thus (e.g.) inasmuch as it is not a property of ‘man’ to be an animal, neither could it be a property of becoming a man to become an animal; nor could the destruction of an animal be a property of the destruction of a man. In the same way one should derive arguments also from ‘becoming’ to ‘being’ and ‘being destroyed’, and from ‘being destroyed’ to ‘being’ and to ‘becoming’ exactly as they have just been given from ‘being’ to ‘becoming’ and ‘being destroyed’. For constructive purposes, on the other hand, see if the subject set down as qualified by the verb ‘to be’ has the predicate set down as so qualified, as its property: for then also the subject qualified by the very ‘to become’ will have the predicate qualified by ‘to become’ as its property, and the subject qualified by the verb to be destroyed’ will have as its property the predicate rendered with this qualification. Thus, for example, inasmuch as it is a property of man to be a mortal, it would be a property of becoming a man to become a mortal, and the destruction of a mortal would be a property of the destruction of a man. In the same way one should derive arguments also from ‘becoming’ and ‘being destroyed’ both to ‘being’ and to the conclusions that follow from them, exactly as was directed also for the purpose of destruction.
Next take a look at the ‘idea’ of the subject stated, and see, for destructive purposes, if the suggested property fails to belong to the ‘idea’ in question, or fails to belong to it in virtue of that character which causes it to bear the description of which the property was rendered: for then what has been stated to be a property will not be a property. Thus (e.g.) inasmuch as ‘being motionless’ does not belong to ‘man-himself’ qua ‘man’, but qua ‘idea’, it could not be a property of ‘man’ to be motionless. For constructive purposes, on the other hand, see if the property in question belongs to the idea, and belongs to it in that respect in virtue of which there is predicated of it that character of which the predicate in question has been stated not to be a property: for then what has been stated not to be a property will be a property. Thus (e.g.) inasmuch as it belongs to ‘living-creature-itself’ to be compounded of soul and body, and further this belongs to it qua ‘living-creature’, it would be a property of ‘living-creature’ to be compounded of soul and body.
Next look from the point of view of greater and less degrees, and first (a) for destructive purposes, see if what is more-P fails to be a property of what is more-S: for then neither will what is less-P be a property of what is less-S, nor least-P of least-S, nor most-P of most-S, nor P simply of S simply. Thus (e.g.) inasmuch as being more highly coloured is not a property of what is more a body, neither could being less highly coloured be a property of what is less a body, nor being coloured be a property of body at all. For constructive purposes, on the other hand, see if what is more-P is a property of what is more-S: for then also what is less-P will be a property of what is less S, and least-P of least-S, and most-P of most-S, and P simply of S simply. Thus (e.g.) inasmuch as a higher degree of sensation is a property of a higher degree of life, a lower degree of sensation also would be a property of a lower degree of life, and the highest of the highest and the lowest of the lowest degree, and sensation simply of life simply.
Also you should look at the argument from a simple predication to the same qualified types of predication, and see, for destructive purposes, if P simply fails to be a property of S simply; for then neither will more-P be a property of more-S, nor less-P of less-S, nor most-P of most-S, nor least-P of least-S. Thus (e.g.) inasmuch as ‘virtuous’ is not a property of ‘man’, neither could ‘more virtuous’ be a property of what is ‘more human’. For constructive purposes, on the other hand, see if P simply is a property of S simply: for then more P also will be a property of more-S, and less-P of less-S, and least-P of least-S, and most-P of most-S. Thus (e.g.) a tendency to move upwards by nature is a property of fire, and so also a greater tendency to move upwards by nature would be a property of what is more fiery. In the same way too one should look at all these matters from the point of view of the others as well.
Secondly (b) for destructive purposes, see if the more likely property fails to be a property of the more likely subject: for then neither will the less likely property be a property of the less likely subject. Thus (e.g.) inasmuch as ‘perceiving’ is more likely to be a property of ‘animal’ than ‘knowing’ of ‘man’, and ‘perceiving’ is not a property of ‘animal’, ‘knowing’ could not be a property of ‘man’. For constructive purposes, on the other hand, see if the less likely property is a property of the less likely subject; for then too the more likely property will be a property of the more likely subject. Thus (e.g.) inasmuch as ‘to be naturally civilized’ is less likely to be a property of man than ‘to live’ of an animal, and it is a property of man to be naturally civilized, it would be a property of animal to live.
Thirdly (c) for destructive purposes, see if the predicate fails to be a property of that of which it is more likely to be a property: for then neither will it be a property of that of which it is less likely to be a property: while if it is a property of the former, it will not be a property of the latter. Thus (e.g.) inasmuch as ‘to be coloured’ is more likely to be a property of a ‘surface’ than of a ‘body’, and it is not a property of a surface, ‘to be coloured’ could not be a property of ‘body’; while if it is a property of a ‘surface’, it could not be a property of a ‘body’. For constructive purposes, on the other hand, this commonplace rule is not of any use: for it is impossible for the same thing to be a property of more than one thing.
Fourthly (d) for destructive purposes, see if what is more likely to be a property of a given subject fails to be its property: for then neither will what is less likely to be a property of it be its property. Thus (e.g.) inasmuch as ‘sensible’ is more likely than ‘divisible’ to be a property of ‘animal’, and ‘sensible’ is not a property of animal, ‘divisible’ could not be a property of animal. For constructive purposes, on the other hand, see if what is less likely to be a property of it is a property; for then what is more likely to be a property of it will be a property as well. Thus, for example, inasmuch as ‘sensation’ is less likely to be a property of ‘animal’ than life’, and ‘sensation’ is a property of animal, ‘life’ would be a property of animal.
Next, look from the point of view of the attributes that belong in a like manner, and first (a) for destructive purposes, see if what is as much a property fails to be a property of that of which it is as much a property: for then neither will that which is as much a property as it be a property of that of which it is as much a property. Thus (e.g.) inasmuch as ‘desiring’ is as much a property of the faculty of desire as reasoning’ is a property of the faculty of reason, and desiring is not a property of the faculty of desire, reasoning could not be a property of the faculty of reason. For constructive purposes, on the other hand, see if what is as much a property is a property of that of which it is as much a property: for then also what is as much a property as it will be a property of that of which it is as much a property. Thus (e.g.) inasmuch as it is as much a property of ‘the faculty of reason’ to be ‘the primary seat of wisdom’ as it is of ‘the faculty of desire’ to be ‘the primary seat of temperance’, and it is a property of the faculty of reason to be the primary seat of wisdom, it would be a property of the faculty of desire to be the primary seat of temperance.
Secondly (b) for destructive purposes, see if what is as much a property of anything fails to be a property of it: for then neither will what is as much a property be a property of it. Thus (e.g.) inasmuch as ‘seeing’ is as much a property of man as ‘hearing’, and ‘seeing’ is not a property of man, ‘hearing’ could not be a property of man. For constructive purposes, on the other hand, see if what is as much a property of it is its property: for then what is as much a property of it as the former will be its property as well. Thus (e.g.) it is as much a property of the soul to be the primary possessor of a part that desires as of a part that reasons, and it is a property of the soul to be the primary possessor of a part that desires, and so it be a property of the soul to be the primary possessor of a part that reasons.
Thirdly (c) for destructive purposes, see if it fails to be a property of that of which it is as much a property: for then neither will it be a property of that of which it is as much a property as of the former, while if it be a property of the former, it will not be a property of the other. Thus (e.g.) inasmuch as ‘to burn’ is as much a property of ‘flame’ as of ‘live coals’, and ‘to burn’ is not a property of flame, ‘to burn’ could not be a property of live coals: while if it is a property of flame, it could not be a property of live coals. For constructive purposes, on the other hand, this commonplace rule is of no use.
The rule based on things that are in a like relation’ differs from the rule based on attributes that belong in a like manner,’ because the former point is secured by analogy, not from reflection on the belonging of any attribute, while the latter is judged by a comparison based on the fact that an attribute belongs.
Next, for destructive purposes, see if in rendering the property potentially, he has also through that potentiality rendered the property relatively to something that does not exist, when the potentiality in question cannot belong to what does not exist: for then what is stated to be a property will not be a property. Thus (e.g.) he who has said that ‘breathable’ is a property of ‘air’ has, on the one hand, rendered the property potentially (for that is ‘breathable’ which is such as can be breathed), and on the other hand has also rendered the property relatively to what does not exist:-for while air may exist, even though there exist no animal so constituted as to breathe the air, it is not possible to breathe it if no animal exist: so that it will not, either, be a property of air to be such as can be breathed at a time when there exists no animal such as to breathe it and so it follows that ‘breathable’ could not be a property of air.
For constructive purposes, see if in rendering the property potentially he renders the property either relatively to something that exists, or to something that does not exist, when the potentiality in question can belong to what does not exist: for then what has been stated not to be a property will be a property. Thus e.g.) he who renders it as a property of ‘being’ to be ‘capable of being acted upon or of acting’, in rendering the property potentially, has rendered the property relatively to something that exists: for when ‘being’ exists, it will also be capable of being acted upon or of acting in a certain way: so that to be ‘capable of being acted upon or of acting’ would be a property of ‘being’.
Next, for destructive purposes, see if he has stated the property in the superlative: for then what has been stated to be a property will not be a property. For people who render the property in that way find that of the object of which the description is true, the name is not true as well: for though the object perish the description will continue in being none the less; for it belongs most nearly to something that is in being. An example would be supposing any one were to render ‘the lightest body’ as a property of ‘fire’: for, though fire perish, there eh re will still be some form of body that is the lightest, so that ‘the lightest body’ could not be a property of fire. For constructive purposes, on the other hand, see if he has avoided rendering the property in the superlative: for then the property will in this respect have been property of man has not rendered the property correctly stated. Thus (e.g.) inasmuch as he in the superlative, the property would in who states ‘a naturally civilized animal’ as a this respect have been correctly stated.
---
!!![[Topics: Book VI: 1]]
{{Topics: Book VI: 1}}
---
!!![[Topics: Book VI: 2]]
{{Topics: Book VI: 2}}
---
!!![[Topics: Book VI: 3]]
{{Topics: Book VI: 3}}
---
!!![[Topics: Book VI: 4]]
{{Topics: Book VI: 4}}
---
!!![[Topics: Book VI: 5]]
{{Topics: Book VI: 5}}
---
!!![[Topics: Book VI: 6]]
{{Topics: Book VI: 6}}
---
!!![[Topics: Book VI: 7]]
{{Topics: Book VI: 7}}
---
!!![[Topics: Book VI: 8]]
{{Topics: Book VI: 8}}
---
!!![[Topics: Book VI: 9]]
{{Topics: Book VI: 1}}
---
!!![[Topics: Book VI: 10]]
{{Topics: Book VI: 2}}
---
!!![[Topics: Book VI: 11]]
{{Topics: Book VI: 3}}
---
!!![[Topics: Book VI: 12]]
{{Topics: Book VI: 4}}
---
!!![[Topics: Book VI: 13]]
{{Topics: Book VI: 5}}
---
!!![[Topics: Book VI: 14]]
{{Topics: Book VI: 6}}
The discussion of Definitions falls into five parts. For you have to show either (1) that it is not true at all to apply the expression as well to that to which the term is applied (for the definition of Man ought to be true of every man); or (2) that though the object has a genus, he has failed to put the object defined into the genus, or to put it into the appropriate genus (for the framer of a definition should first place the object in its genus, and then append its differences: for of all the elements of the definition the genus is usually supposed to be the principal mark of the essence of what is defined): or (3) that the expression is not peculiar to the object (for, as we said above as well, a definition ought to be peculiar): or else (4) see if, though he has observed all the aforesaid cautions, he has yet failed to define the object, that is, to express its essence. (5) It remains, apart from the foregoing, to see if he has defined it, but defined it incorrectly.
Whether, then, the expression be not also true of that of which the term is true you should proceed to examine according to the commonplace rules that relate to Accident. For there too the question is always ‘Is so and so true or untrue?’: for whenever we argue that an accident belongs, we declare it to be true, while whenever we argue that it does not belong, we declare it to be untrue. If, again, he has failed to place the object in the appropriate genus, or if the expression be not peculiar to the object, we must go on to examine the case according to the commonplace rules that relate to genus and property.
It remains, then, to prescribe how to investigate whether the object has been either not defined at all, or else defined incorrectly. First, then, we must proceed to examine if it has been defined incorrectly: for with anything it is easier to do it than to do it correctly. Clearly, then, more mistakes are made in the latter task on account of its greater difficulty. Accordingly the attack becomes easier in the latter case than in the former.
Incorrectness falls into two branches: (1) first, the use of obscure language (for the language of a definition ought to be the very clearest possible, seeing that the whole purpose of rendering it is to make something known); (secondly, if the expression used be longer than is necessary: for all additional matter in a definition is superfluous. Again, each of the aforesaid branches is divided into a number of others.
Moreover, see whether the like inflexions in the definition apply to the like inflexions of the term; e.g. if ‘beneficial’ means ‘productive of health’, does ‘beneficially’ mean productively of health’ and a ‘benefactor’ a ‘producer of health’?
Look too and see whether the definition given will apply to the Idea as well. For in some cases it will not do so; e.g. in the Platonic definition where he adds the word ‘mortal’ in his definitions of living creatures: for the Idea (e.g. the absolute Man) is not mortal, so that the definition will not fit the Idea. So always wherever the words ‘capable of acting on’ or ‘capable of being acted upon’ are added, the definition and the Idea are absolutely bound to be discrepant: for those who assert the existence of Ideas hold that they are incapable of being acted upon, or of motion. In dealing with these people even arguments of this kind are useful.
Further, see if he has rendered a single common definition of terms that are used ambiguously. For terms whose definition corresponding their common name is one and the same, are synonymous; if, then, the definition applies in a like manner to the whole range of the ambiguous term, it is not true of any one of the objects described by the term. This is, moreover, what happens to Dionysius’ definition of ‘life’ when stated as ‘a movement of a creature sustained by nutriment, congenitally present with it’: for this is found in plants as much as in animals, whereas ‘life’ is generally understood to mean not one kind of thing only, but to be one thing in animals and another in plants. It is possible to hold the view that life is a synonymous term and is always used to describe one thing only, and therefore to render the definition in this way on purpose: or it may quite well happen that a man may see the ambiguous character of the word, and wish to render the definition of the one sense only, and yet fail to see that he has rendered a definition common to both senses instead of one peculiar to the sense he intends. In either case, whichever course he pursues, he is equally at fault. Since ambiguous terms sometimes pass unobserved, it is best in questioning to treat such terms as though they were synonymous (for the definition of the one sense will not apply to the other, so that the answerer will be generally thought not to have defined it correctly, for to a synonymous term the definition should apply in its full range), whereas in answering you should yourself distinguish between the senses. Further, as some answerers call ‘ambiguous’ what is really synonymous, whenever the definition rendered fails to apply universally, and, vice versa, call synonymous what is really ambiguous supposing their definition applies to both senses of the term, one should secure a preliminary admission on such points, or else prove beforehand that so-and-so is ambiguous or synonymous, as the case may be: for people are more ready to agree when they do not foresee what the consequence will be. If, however, no admission has been made, and the man asserts that what is really synonymous is ambiguous because the definition he has rendered will not apply to the second sense as well, see if the definition of this second meaning applies also to the other meanings: for if so, this meaning must clearly be synonymous with those others. Otherwise, there will be more than one definition of those other meanings, for there are applicable to them two distinct definitions in explanation of the term, viz. the one previously rendered and also the later one. Again, if any one were to define a term used in several senses, and, finding that his definition does not apply to them all, were to contend not that the term is ambiguous, but that even the term does not properly apply to all those senses, just because his definition will not do so either, then one may retort to such a man that though in some things one must not use the language of the people, yet in a question of terminology one is bound to employ the received and traditional usage and not to upset matters of that sort.
Suppose now that a definition has been rendered of some complex term, take away the definition of one of the elements in the complex, and see if also the rest of the definition defines the rest of it: if not, it is clear that neither does the whole definition define the whole complex. Suppose, e.g. that some one has defined a ‘finite straight line’ as ‘the limit of a finite plane, such that its centre is in a line with its extremes’; if now the definition of a finite line’ be the ‘limit of a finite plane’, the rest (viz. ‘such that its centre is in a line with its extremes’) ought to be a definition of straight’. But an infinite straight line has neither centre nor extremes and yet is straight so that this remainder does not define the remainder of the term.
Moreover, if the term defined be a compound notion, see if the definition rendered be equimembral with the term defined. A definition is said to be equimembral with the term defined when the number of the elements compounded in the latter is the same as the number of nouns and verbs in the definition. For the exchange in such cases is bound to be merely one of term for term, in the case of some if not of all, seeing that there are no more terms used now than formerly; whereas in a definition terms ought to be rendered by phrases, if possible in every case, or if not, in the majority. For at that rate, simple objects too could be defined by merely calling them by a different name, e.g. ‘cloak’ instead of ‘doublet’.
The mistake is even worse, if actually a less well known term be substituted, e.g. ‘pellucid mortal’ for ‘white man’: for it is no definition, and moreover is less intelligible when put in that form.
Look and see also whether, in the exchange of words, the sense fails still to be the same. Take, for instance, the explanation of ‘speculative knowledge’ as ‘speculative conception’: for conception is not the same as knowledge-as it certainly ought to be if the whole is to be the same too: for though the word ‘speculative’ is common to both expressions, yet the remainder is different.
Moreover, see if in replacing one of the terms by something else he has exchanged the genus and not the differentia, as in the example just given: for ‘speculative’ is a less familiar term than knowledge; for the one is the genus and the other the differentia, and the genus is always the most familiar term of all; so that it is not this, but the differentia, that ought to have been changed, seeing that it is the less familiar. It might be held that this criticism is ridiculous: because there is no reason why the most familiar term should not describe the differentia, and not the genus; in which case, clearly, the term to be altered would also be that denoting the genus and not the differentia. If, however, a man is substituting for a term not merely another term but a phrase, clearly it is of the differentia rather than of the genus that a definition should be rendered, seeing that the object of rendering the definition is to make the subject familiar; for the differentia is less familiar than the genus.
If he has rendered the definition of the differentia, see whether the definition rendered is common to it and something else as well: e.g. whenever he says that an odd number is a ‘number with a middle’, further definition is required of how it has a middle: for the word ‘number’ is common to both expressions, and it is the word ‘odd’ for which the phrase has been substituted. Now both a line and a body have a middle, yet they are not ‘odd’; so that this could not be a definition of ‘odd’. If, on the other hand, the phrase ‘with a middle’ be used in several senses, the sense here intended requires to be defined. So that this will either discredit the definition or prove that it is no definition at all.
Again, see if the term of which he renders the definition is a reality, whereas what is contained in the definition is not, e.g. Suppose ‘white’ to be defined as ‘colour mingled with fire’: for what is bodiless cannot be mingled with body, so that ‘colour’ ‘mingled with fire’ could not exist, whereas ‘white’ does exist.
Moreover, those who in the case of relative terms do not distinguish to what the object is related, but have described it only so as to include it among too large a number of things, are wrong either wholly or in part; e.g. suppose some one to have defined ‘medicine’ as a science of Reality’. For if medicine be not a science of anything that is real, the definition is clearly altogether false; while if it be a science of some real thing, but not of another, it is partly false; for it ought to hold of all reality, if it is said to be of Reality essentially and not accidentally: as is the case with other relative terms: for every object of knowledge is a term relative to knowledge: likewise, also, with other relative terms, inasmuch as all such are convertible. Moreover, if the right way to render account of a thing be to render it as it is not in itself but accidentally, then each and every relative term would be used in relation not to one thing but to a number of things. For there is no reason why the same thing should not be both real and white and good, so that it would be a correct rendering to render the object in relation to any one whatsoever of these, if to render what it is accidentally be a correct way to render it. It is, moreover, impossible that a definition of this sort should be peculiar to the term rendered: for not only but the majority of the other sciences too, have for their object some real thing, so that each will be a science of reality. Clearly, then, such a definition does not define any science at all; for a definition ought to be peculiar to its own term, not general.
Sometimes, again, people define not the thing but only the thing in a good or perfect condition. Such is the definition of a rhetorician as ‘one who can always see what will persuade in the given circumstances, and omit nothing’; or of a thief, as ‘one who pilfers in secret’: for clearly, if they each do this, then the one will be a good rhetorician, and the other a good thief: whereas it is not the actual pilfering in secret, but the wish to do it, that constitutes the thief.
Again, see if he has rendered what is desirable for its own sake as desirable for what it produces or does, or as in any way desirable because of something else, e.g. by saying that justice is ‘what preserves the laws’ or that wisdom is ‘what produces happiness’; for what produces or preserves something else is one of the things desirable for something else. It might be said that it is possible for what is desirable in itself to be desirable for something else as well: but still to define what is desirable in itself in such a way is none the less wrong: for the essence contains par excellence what is best in anything, and it is better for a thing to be desirable in itself than to be desirable for something else, so that this is rather what the definition too ought to have indicated.
See also whether in defining anything a man has defined it as an ‘A and B’, or as a ‘product of A and B’ or as an ‘A+B’. If he defines it as and B’, the definition will be true of both and yet of neither of them; suppose, e.g. justice to be defined as ‘temperance and courage.’ For if of two persons each has one of the two only, both and yet neither will be just: for both together have justice, and yet each singly fails to have it. Even if the situation here described does not so far appear very absurd because of the occurrence of this kind of thing in other cases also (for it is quite possible for two men to have a mina between them, though neither of them has it by himself), yet least that they should have contrary attributes surely seems quite absurd; and yet this will follow if the one be temperate and yet a coward, and the other, though brave, be a profligate; for then both will exhibit both justice and injustice: for if justice be temperance and bravery, then injustice will be cowardice and profligacy. In general, too, all the ways of showing that the whole is not the same as the sum of its parts are useful in meeting the type just described; for a man who defines in this way seems to assert that the parts are the same as the whole. The arguments are particularly appropriate in cases where the process of putting the parts together is obvious, as in a house and other things of that sort: for there, clearly, you may have the parts and yet not have the whole, so that parts and whole cannot be the same.
If, however, he has said that the term being defined is not ‘A and B’ but the ‘product of A and B’, look and see in the first place if A and B cannot in the nature of things have a single product: for some things are so related to one another that nothing can come of them, e.g. a line and a number. Moreover, see if the term that has been defined is in the nature of things found primarily in some single subject, whereas the things which he has said produce it are not found primarily in any single subject, but each in a separate one. If so, clearly that term could not be the product of these things: for the whole is bound to be in the same things wherein its parts are, so that the whole will then be found primarily not in one subject only, but in a number of them. If, on the other hand, both parts and whole are found primarily in some single subject, see if that medium is not the same, but one thing in the case of the whole and another in that of the parts. Again, see whether the parts perish together with the whole: for it ought to happen, vice versa, that the whole perishes when the parts perish; when the whole perishes, there is no necessity that the parts should perish too. Or again, see if the whole be good or evil, and the parts neither, or, vice versa, if the parts be good or evil and the whole neither. For it is impossible either for a neutral thing to produce something good or bad, or for things good or bad to produce a neutral thing. Or again, see if the one thing is more distinctly good than the other is evil, and yet the product be no more good than evil, e.g. suppose shamelessness be defined as ‘the product of courage and false opinion’: here the goodness of courage exceeds the evil of false opinion; accordingly the product of these ought to have corresponded to this excess, and to be either good without qualification, or at least more good than evil. Or it may be that this does not necessarily follow, unless each be in itself good or bad; for many things that are productive are not good in themselves, but only in combination; or, per contra, they are good taken singly, and bad or neutral in combination. What has just been said is most clearly illustrated in the case of things that make for health or sickness; for some drugs are such that each taken alone is good, but if they are both administered in a mixture, bad.
Again, see whether the whole, as produced from a better and worse, fails to be worse than the better and better than the worse element. This again, however, need not necessarily be the case, unless the elements compounded be in themselves good; if they are not, the whole may very well not be good, as in the cases just instanced.
Moreover, see if the whole be synonymous with one of the elements: for it ought not to be, any more than in the case of syllables: for the syllable is not synonymous with any of the letters of which it is made up.
Moreover, see if he has failed to state the manner of their composition: for the mere mention of its elements is not enough to make the thing intelligible. For the essence of any compound thing is not merely that it is a product of so-and-so, but that it is a product of them compounded in such and such a way, just as in the case of a house: for here the materials do not make a house irrespective of the way they are put together.
If a man has defined an object as ‘A+B’, the first thing to be said is that ‘A+B’ means the same either as ‘A and B’, or as the ‘product of A and B.’ for ‘honey+water’ means either the honey and the water, or the ‘drink made of honey and water’. If, then, he admits that ‘A+B’ is + B’ is the same as either of these two things, the same criticisms will apply as have already been given for meeting each of them. Moreover, distinguish between the different senses in which one thing may be said to be ‘+’ another, and see if there is none of them in which A could be said to exist ‘+ B.’ Thus e.g. supposing the expression to mean that they exist either in some identical thing capable of containing them (as e.g. justice and courage are found in the soul), or else in the same place or in the same time, and if this be in no way true of the A and B in question, clearly the definition rendered could not hold of anything, as there is no possible way in which A can exist B’. If, however, among the various senses above distinguished, it be true that A and B are each found in the same time as the other, look and see if possibly the two are not used in the same relation. Thus e.g. suppose courage to have been defined as ‘daring with right reasoning’: here it is possible that the person exhibits daring in robbery, and right reasoning in regard to the means of health: but he may have ‘the former quality+the latter’ at the same time, and not as yet be courageous! Moreover, even though both be used in the same relation as well, e.g. in relation to medical treatment (for a man may exhibit both daring and right reasoning in respect of medical treatment), still, none the less, not even this combination of ‘the one+the other ‘makes him ‘courageous’. For the two must not relate to any casual object that is the same, any more than each to a different object; rather, they must relate to the function of courage, e.g. meeting the perils of war, or whatever is more properly speaking its function than this.
Some definitions rendered in this form fail to come under the aforesaid division at all, e.g. a definition of anger as ‘pain with a consciousness of being slighted’. For what this means to say is that it is because of a consciousness of this sort that the pain occurs; but to occur ‘because of’ a thing is not the same as to occur ‘+ a thing’ in any of its aforesaid senses.
Again, if he have described the whole compounded as the ‘composition’ of these things (e.g. ‘a living creature’ as a ‘composition of soul and body’), first of all see whether he has omitted to state the kind of composition, as (e.g.) in a definition of ‘flesh’ or ‘bone’ as the ‘composition of fire, earth, and air’. For it is not enough to say it is a composition, but you should also go on to define the kind of composition: for these things do not form flesh irrespective of the manner of their composition, but when compounded in one way they form flesh, when in another, bone. It appears, moreover, that neither of the aforesaid substances is the same as a ‘composition’ at all: for a composition always has a decomposition as its contrary, whereas neither of the aforesaid has any contrary. Moreover, if it is equally probable that every compound is a composition or else that none is, and every kind of living creature, though a compound, is never a composition, then no other compound could be a composition either.
Again, if in the nature of a thing two contraries are equally liable to occur, and the thing has been defined through the one, clearly it has not been defined; else there will be more than one definition of the same thing; for how is it any more a definition to define it through this one than through the other, seeing that both alike are naturally liable to occur in it? Such is the definition of the soul, if defined as a substance capable of receiving knowledge: for it has a like capacity for receiving ignorance.
Also, even when one cannot attack the definition as a whole for lack of acquaintance with the whole, one should attack some part of it, if one knows that part and sees it to be incorrectly rendered: for if the part be demolished, so too is the whole definition. Where, again, a definition is obscure, one should first of all correct and reshape it in order to make some part of it clear and get a handle for attack, and then proceed to examine it. For the answerer is bound either to accept the sense as taken by the questioner, or else himself to explain clearly whatever it is that his definition means. Moreover, just as in the assemblies the ordinary practice is to move an emendation of the existing law and, if the emendation is better, they repeal the existing law, so one ought to do in the case of definitions as well: one ought oneself to propose a second definition: for if it is seen to be better, and more indicative of the object defined, clearly the definition already laid down will have been demolished, on the principle that there cannot be more than one definition of the same thing.
In combating definitions it is always one of the chief elementary principles to take by oneself a happy shot at a definition of the object before one, or to adopt some correctly expressed definition. For one is bound, with the model (as it were) before one’s eyes, to discern both any shortcoming in any features that the definition ought to have, and also any superfluous addition, so that one is better supplied with lines of attack.
As to definitions, then, let so much suffice.
One commonplace rule, then, in regard to obscurity is, See if the meaning intended by the definition involves an ambiguity with any other, e.g. ‘Becoming is a passage into being’, or ‘Health is the balance of hot and cold elements’. Here ‘passage’ and ‘balance’ are ambiguous terms: it is accordingly not clear which of the several possible senses of the term he intends to convey. Likewise also, if the term defined be used in different senses and he has spoken without distinguishing between them: for then it is not clear to which of them the definition rendered applies, and one can then bring a captious objection on the ground that the definition does not apply to all the things whose definition he has rendered: and this kind of thing is particularly easy in the case where the definer does not see the ambiguity of his terms. Or, again, the questioner may himself distinguish the various senses of the term rendered in the definition, and then institute his argument against each: for if the expression used be not adequate to the subject in any of its senses, it is clear that he cannot have defined it in any sense aright.
Another rule is, See if he has used a metaphorical expression, as, for instance, if he has defined knowledge as ‘unsupplantable’, or the earth as a ‘nurse’, or temperance as a ‘harmony’. For a metaphorical expression is always obscure. It is possible, also, to argue sophistically against the user of a metaphorical expression as though he had used it in its literal sense: for the definition stated will not apply to the term defined, e.g. in the case of temperance: for harmony is always found between notes. Moreover, if harmony be the genus of temperance, then the same object will occur in two genera of which neither contains the other: for harmony does not contain virtue, nor virtue harmony. Again, see if he uses terms that are unfamiliar, as when Plato describes the eye as ‘brow-shaded’, or a certain spider as poison-fanged’, or the marrow as ‘boneformed’. For an unusual phrase is always obscure.
Sometimes a phrase is used neither ambiguously, nor yet metaphorically, nor yet literally, as when the law is said to be the ‘measure’ or ‘image’ of the things that are by nature just. Such phrases are worse than metaphor; for the latter does make its meaning to some extent clear because of the likeness involved; for those who use metaphors do so always in view of some likeness: whereas this kind of phrase makes nothing clear; for there is no likeness to justify the description ‘measure’ or ‘image’, as applied to the law, nor is the law ordinarily so called in a literal sense. So then, if a man says that the law is literally a ‘measure’ or an ‘image’, he speaks falsely: for an image is something produced by imitation, and this is not found in the case of the law. If, on the other hand, he does not mean the term literally, it is clear that he has used an unclear expression, and one that is worse than any sort of metaphorical expression.
Moreover, see if from the expression used the definition of the contrary be not clear; for definitions that have been correctly rendered also indicate their contraries as well. Or, again, see if, when it is merely stated by itself, it is not evident what it defines: just as in the works of the old painters, unless there were an inscription, the figures used to be unrecognizable.
If, then, the definition be not clear, you should proceed to examine on lines such as these. If, on the other hand, he has phrased the definition redundantly, first of all look and see whether he has used any attribute that belongs universally, either to real objects in general, or to all that fall under the same genus as the object defined: for the mention of this is sure to be redundant. For the genus ought to divide the object from things in general, and the differentia from any of the things contained in the same genus. Now any term that belongs to everything separates off the given object from absolutely nothing, while any that belongs to all the things that fall under the same genus does not separate it off from the things contained in the same genus. Any addition, then, of that kind will be pointless.
Or see if, though the additional matter may be peculiar to the given term, yet even when it is struck out the rest of the expression too is peculiar and makes clear the essence of the term. Thus, in the definition of man, the addition ‘capable of receiving knowledge’ is superfluous; for strike it out, and still the expression is peculiar and makes clear his essence. Speaking generally, everything is superfluous upon whose removal the remainder still makes the term that is being defined clear. Such, for instance, would also be the definition of the soul, assuming it to be stated as a ‘self-moving number’; for the soul is just ‘the self-moving’, as Plato defined it. Or perhaps the expression used, though appropriate, yet does not declare the essence, if the word ‘number’ be eliminated. Which of the two is the real state of the case it is difficult to determine clearly: the right way to treat the matter in all cases is to be guided by convenience. Thus (e.g.) it is said that the definition of phlegm is the ‘undigested moisture that comes first off food’. Here the addition of the word ‘undigested’ is superfluous, seeing that ‘the first’ is one and not many, so that even when undigested’ is left out the definition will still be peculiar to the subject: for it is impossible that both phlegm and also something else should both be the first to arise from the food. Or perhaps the phlegm is not absolutely the first thing to come off the food, but only the first of the undigested matters, so that the addition ‘undigested’ is required; for stated the other way the definition would not be true unless the phlegm comes first of all.
Moreover, see if anything contained in the definition fails to apply to everything that falls under the same species: for this sort of definition is worse than those which include an attribute belonging to all things universally. For in that case, if the remainder of the expression be peculiar, the whole too will be peculiar: for absolutely always, if to something peculiar anything whatever that is true be added, the whole too becomes peculiar. Whereas if any part of the expression do not apply to everything that falls under the same species, it is impossible that the expression as a whole should be peculiar: for it will not be predicated convertibly with the object; e.g. ‘a walking biped animal six feet high’: for an expression of that kind is not predicated convertibly with the term, because the attribute ‘six feet high’ does not belong to everything that falls under the same species.
Again, see if he has said the same thing more than once, saying (e.g.) ‘desire’ is a ‘conation for the pleasant’. For ‘desire’ is always ‘for the pleasant’, so that what is the same as desire will also be ‘for the pleasant’. Accordingly our definition of desire becomes ‘conation-for-the-pleasant’: for the word ‘desire’ is the exact equivalent of the words ‘conation for-the-pleasant’, so that both alike will be ‘for the pleasant’. Or perhaps there is no absurdity in this; for consider this instance:-Man is a biped’: therefore, what is the same as man is a biped: but ‘a walking biped animal’ is the same as man, and therefore walking biped animal is a biped’. But this involves no real absurdity. For ‘biped’ is not a predicate of ‘walking animal’: if it were, then we should certainly have ‘biped’ predicated twice of the same thing; but as a matter of fact the subject said to be a biped is’a walking biped animal’, so that the word ‘biped’ is only used as a predicate once. Likewise also in the case of ‘desire’ as well: for it is not ‘conation’ that is said to be ‘for the pleasant’, but rather the whole idea, so that there too the predication is only made once. Absurdity results, not when the same word is uttered twice, but when the same thing is more than once predicated of a subject; e.g. if he says, like Xenocrates, that wisdom defines and contemplates reality:’ for definition is a certain type of contemplation, so that by adding the words ‘and contemplates’ over again he says the same thing twice over. Likewise, too, those fail who say that ‘cooling’ is ‘the privation of natural heat’. For all privation is a privation of some natural attribute, so that the addition of the word ‘natural’ is superfluous: it would have been enough to say ‘privation of heat’, for the word ‘privation’ shows of itself that the heat meant is natural heat.
Again, see if a universal have been mentioned and then a particular case of it be added as well, e.g. ‘Equity is a remission of what is expedient and just’; for what is just is a branch of what is expedient and is therefore included in the latter term: its mention is therefore redundant, an addition of the particular after the universal has been already stated. So also, if he defines ‘medicine’ as ‘knowledge of what makes for health in animals and men’, or ‘the law’ as ‘the image of what is by nature noble and just’; for what is just is a branch of what is noble, so that he says the same thing more than once.
Whether, then, a man defines a thing correctly or incorrectly you should proceed to examine on these and similar lines. But whether he has mentioned and defined its essence or no, should be examined as follows: First of all, see if he has failed to make the definition through terms that are prior and more intelligible. For the reason why the definition is rendered is to make known the term stated, and we make things known by taking not any random terms, but such as are prior and more intelligible, as is done in demonstrations (for so it is with all teaching and learning); accordingly, it is clear that a man who does not define through terms of this kind has not defined at all. Otherwise, there will be more than one definition of the same thing: for clearly he who defines through terms that are prior and more intelligible has also framed a definition, and a better one, so that both would then be definitions of the same object. This sort of view, however, does not generally find acceptance: for of each real object the essence is single: if, then, there are to be a number of definitions of the same thing, the essence of the object will be the same as it is represented to be in each of the definitions, and these representations are not the same, inasmuch as the definitions are different. Clearly, then, any one who has not defined a thing through terms that are prior and more intelligible has not defined it at all.
The statement that a definition has not been made through more intelligible terms may be understood in two senses, either supposing that its terms are absolutely less intelligible, or supposing that they are less intelligible to us: for either sense is possible. Thus absolutely the prior is more intelligible than the posterior, a point, for instance, than a line, a line than a plane, and a plane than a solid; just as also a unit is more intelligible than a number; for it is the prius and starting-point of all number. Likewise, also, a letter is more intelligible than a syllable. Whereas to us it sometimes happens that the converse is the case: for the solid falls under perception most of all-more than a plane-and a plane more than a line, and a line more than a point; for most people learn things like the former earlier than the latter; for any ordinary intelligence can grasp them, whereas the others require an exact and exceptional understanding.
Absolutely, then, it is better to try to make what is posterior known through what is prior, inasmuch as such a way of procedure is more scientific. Of course, in dealing with persons who cannot recognize things through terms of that kind, it may perhaps be necessary to frame the expression through terms that are intelligible to them. Among definitions of this kind are those of a point, a line, and a plane, all of which explain the prior by the posterior; for they say that a point is the limit of a line, a line of a plane, a plane of a solid. One must, however, not fail to observe that those who define in this way cannot show the essential nature of the term they define, unless it so happens that the same thing is more intelligible both to us and also absolutely, since a correct definition must define a thing through its genus and its differentiae, and these belong to the order of things which are absolutely more intelligible than, and prior to, the species. For annul the genus and differentia, and the species too is annulled, so that these are prior to the species. They are also more intelligible; for if the species be known, the genus and differentia must of necessity be known as well (for any one who knows what a man is knows also what ‘animal’ and ‘walking’ are), whereas if the genus or the differentia be known it does not follow of necessity that the species is known as well: thus the species is less intelligible. Moreover, those who say that such definitions, viz. those which proceed from what is intelligible to this, that, or the other man, are really and truly definitions, will have to say that there are several definitions of one and the same thing. For, as it happens, different things are more intelligible to different people, not the same things to all; and so a different definition would have to be rendered to each several person, if the definition is to be constructed from what is more intelligible to particular individuals. Moreover, to the same people different things are more intelligible at different times; first of all the objects of sense; then, as they become more sharpwitted, the converse; so that those who hold that a definition ought to be rendered through what is more intelligible to particular individuals would not have to render the same definition at all times even to the same person. It is clear, then, that the right way to define is not through terms of that kind, but through what is absolutely more intelligible: for only in this way could the definition come always to be one and the same. Perhaps, also, what is absolutely intelligible is what is intelligible, not to all, but to those who are in a sound state of understanding, just as what is absolutely healthy is what is healthy to those in a sound state of body. All such points as this ought to be made very precise, and made use of in the course of discussion as occasion requires. The demolition of a definition will most surely win a general approval if the definer happens to have framed his expression neither from what is absolutely more intelligible nor yet from what is so to us.
One form, then, of the failure to work through more intelligible terms is the exhibition of the prior through the posterior, as we remarked before.’ Another form occurs if we find that the definition has been rendered of what is at rest and definite through what is indefinite and in motion: for what is still and definite is prior to what is indefinite and in motion.
Of the failure to use terms that are prior there are three forms:
(1) The first is when an opposite has been defined through its opposite, e.g.i. good through evil: for opposites are always simultaneous by nature. Some people think, also, that both are objects of the same science, so that the one is not even more intelligible than the other. One must, however, observe that it is perhaps not possible to define some things in any other way, e.g. the double without the half, and all the terms that are essentially relative: for in all such cases the essential being is the same as a certain relation to something, so that it is impossible to understand the one term without the other, and accordingly in the definition of the one the other too must be embraced. One ought to learn up all such points as these, and use them as occasion may seem to require.
(2) Another is-if he has used the term defined itself. This passes unobserved when the actual name of the object is not used, e.g. supposing any one had defined the sun as a star that appears by day’. For in bringing in ‘day’ he brings in the sun. To detect errors of this sort, exchange the word for its definition, e.g. the definition of ‘day’ as the ‘passage of the sun over the earth’. Clearly, whoever has said ‘the passage of the sun over the earth’ has said ‘the sun’, so that in bringing in the ‘day’ he has brought in the sun.
(3) Again, see if he has defined one coordinate member of a division by another, e.g. ‘an odd number’ as ‘that which is greater by one than an even number’. For the co-ordinate members of a division that are derived from the same genus are simultaneous by nature and ‘odd’ and ‘even’ are such terms: for both are differentiae of number.
Likewise also, see if he has defined a superior through a subordinate term, e.g. ‘An “even number” is “a number divisible into halves”’, or ‘”the good” is a “state of virtue” ‘. For ‘half’ is derived from ‘two’, and ‘two’ is an even number: virtue also is a kind of good, so that the latter terms are subordinate to the former. Moreover, in using the subordinate term one is bound to use the other as well: for whoever employs the term ‘virtue’ employs the term ‘good’, seeing that virtue is a certain kind of good: likewise, also, whoever employs the term ‘half’ employs the term ‘even’, for to be ‘divided in half’ means to be divided into two, and two is even.
Generally speaking, then, one commonplace rule relates to the failure to frame the expression by means of terms that are prior and more intelligible: and of this the subdivisions are those specified above. A second is, see whether, though the object is in a genus, it has not been placed in a genus. This sort of error is always found where the essence of the object does not stand first in the expression, e.g. the definition of ‘body’ as ‘that which has three dimensions’, or the definition of ‘man’, supposing any one to give it, as ‘that which knows how to count’: for it is not stated what it is that has three dimensions, or what it is that knows how to count: whereas the genus is meant to indicate just this, and is submitted first of the terms in the definition.
Moreover, see if, while the term to be defined is used in relation to many things, he has failed to render it in relation to all of them; as (e.g.) if he define ‘grammar’ as the ‘knowledge how to write from dictation’: for he ought also to say that it is a knowledge how to read as well. For in rendering it as ‘knowledge of writing’ has no more defined it than by rendering it as ‘knowledge of reading’: neither in fact has succeeded, but only he who mentions both these things, since it is impossible that there should be more than one definition of the same thing. It is only, however, in some cases that what has been said corresponds to the actual state of things: in some it does not, e.g. all those terms which are not used essentially in relation to both things: as medicine is said to deal with the production of disease and health; for it is said essentially to do the latter, but the former only by accident: for it is absolutely alien to medicine to produce disease. Here, then, the man who renders medicine as relative to both of these things has not defined it any better than he who mentions the one only. In fact he has done it perhaps worse, for any one else besides the doctor is capable of producing disease.
Moreover, in a case where the term to be defined is used in relation to several things, see if he has rendered it as relative to the worse rather than to the better; for every form of knowledge and potentiality is generally thought to be relative to the best.
Again, if the thing in question be not placed in its own proper genus, one must examine it according to the elementary rules in regard to genera, as has been said before.’
Moreover, see if he uses language which transgresses the genera of the things he defines, defining, e.g. justice as a ‘state that produces equality’ or ‘distributes what is equal’: for by defining it so he passes outside the sphere of virtue, and so by leaving out the genus of justice he fails to express its essence: for the essence of a thing must in each case bring in its genus. It is the same thing if the object be not put into its nearest genus; for the man who puts it into the nearest one has stated all the higher genera, seeing that all the higher genera are predicated of the lower. Either, then, it ought to be put into its nearest genus, or else to the higher genus all the differentiae ought to be appended whereby the nearest genus is defined. For then he would not have left out anything: but would merely have mentioned the subordinate genus by an expression instead of by name. On the other hand, he who mentions merely the higher genus by itself, does not state the subordinate genus as well: in saying ‘plant’ a man does not specify ‘a tree’.
Again, in regard to the differentiae, we must examine in like manner whether the differentiae, too, that he has stated be those of the genus. For if a man has not defined the object by the differentiae peculiar to it, or has mentioned something such as is utterly incapable of being a differentia of anything, e.g. ‘animal’ or ‘substance’, clearly he has not defined it at all: for the aforesaid terms do not differentiate anything at all. Further, we must see whether the differentia stated possesses anything that is co-ordinate with it in a division; for, if not, clearly the one stated could not be a differentia of the genus. For a genus is always divided by differentiae that are co-ordinate members of a division, as, for instance, by the terms ‘walking’, ‘flying’, ‘aquatic’, and ‘biped’. Or see if, though the contrasted differentia exists, it yet is not true of the genus, for then, clearly, neither of them could be a differentia of the genus; for differentiae that are co-ordinates in a division with the differentia of a thing are all true of the genus to which the thing belongs. Likewise, also, see if, though it be true, yet the addition of it to the genus fails to make a species. For then, clearly, this could not be a specific differentia of the genus: for a specific differentia, if added to the genus, always makes a species. If, however, this be no true differentia, no more is the one adduced, seeing that it is a co-ordinate member of a division with this.
Moreover, see if he divides the genus by a negation, as those do who define line as ‘length without breadth’: for this means simply that it has not any breadth. The genus will then be found to partake of its own species: for, since of everything either an affirmation or its negation is true, length must always either lack breadth or possess it, so that ‘length’ as well, i.e. the genus of ‘line’, will be either with or without breadth. But ‘length without breadth’ is the definition of a species, as also is ‘length with breadth’: for ‘without breadth’ and ‘with breadth’ are differentiae, and the genus and differentia constitute the definition of the species. Hence the genus would admit of the definition of its species. Likewise, also, it will admit of the definition of the differentia, seeing that one or the other of the aforesaid differentiae is of necessity predicated of the genus. The usefulness of this principle is found in meeting those who assert the existence of ‘Ideas’: for if absolute length exist, how will it be predicable of the genus that it has breadth or that it lacks it? For one assertion or the other will have to be true of ‘length’ universally, if it is to be true of the genus at all: and this is contrary to the fact: for there exist both lengths which have, and lengths which have not, breadth. Hence the only people against whom the rule can be employed are those who assert that a genus is always numerically one; and this is what is done by those who assert the real existence of the ‘Ideas’; for they allege that absolute length and absolute animal are the genus.
It may be that in some cases the definer is obliged to employ a negation as well, e.g. in defining privations. For ‘blind’ means a thing which cannot see when its nature is to see. There is no difference between dividing the genus by a negation, and dividing it by such an affirmation as is bound to have a negation as its co-ordinate in a division, e.g. supposing he had defined something as ‘length possessed of breadth’; for co-ordinate in the division with that which is possessed of breadth is that which possesses no breadth and that only, so that again the genus is divided by a negation.
Again, see if he rendered the species as a differentia, as do those who define ‘contumely’ as ‘insolence accompanied by jeering’; for jeering is a kind of insolence, i.e. it is a species and not a differentia.
Moreover, see if he has stated the genus as the differentia, e.g. ‘Virtue is a good or noble state: for ‘good’ is the genus of ‘virtue’. Or possibly ‘good’ here is not the genus but the differentia, on the principle that the same thing cannot be in two genera of which neither contains the other: for ‘good’ does not include ‘state’, nor vice versa: for not every state is good nor every good a ‘state’. Both, then, could not be genera, and consequently, if ‘state’ is the genus of virtue, clearly ‘good’ cannot be its genus: it must rather be the differentia’. Moreover, ‘a state’ indicates the essence of virtue, whereas ‘good’ indicates not the essence but a quality: and to indicate a quality is generally held to be the function of the differentia. See, further, whether the differentia rendered indicates an individual rather than a quality: for the general view is that the differentia always expresses a quality.
Look and see, further, whether the differentia belongs only by accident to the object defined. For the differentia is never an accidental attribute, any more than the genus is: for the differentia of a thing cannot both belong and not belong to it.
Moreover, if either the differentia or the species, or any of the things which are under the species, is predicable of the genus, then he could not have defined the term. For none of the aforesaid can possibly be predicated of the genus, seeing that the genus is the term with the widest range of all. Again, see if the genus be predicated of the differentia; for the general view is that the genus is predicated, not of the differentia, but of the objects of which the differentia is predicated. Animal (e.g.) is predicated of ‘man’ or ‘ox’ or other walking animals, not of the actual differentia itself which we predicate of the species. For if ‘animal’ is to be predicated of each of its differentiae, then ‘animal’ would be predicated of the species several times over; for the differentiae are predicates of the species. Moreover, the differentiae will be all either species or individuals, if they are animals; for every animal is either a species or an individual.
Likewise you must inquire also if the species or any of the objects that come under it is predicated of the differentia: for this is impossible, seeing that the differentia is a term with a wider range than the various species. Moreover, if any of the species be predicated of it, the result will be that the differentia is a species: if, for instance, ‘man’ be predicated, the differentia is clearly the human race. Again, see if the differentia fails to be prior to the species: for the differentia ought to be posterior to the genus, but prior to the species.
Look and see also if the differentia mentioned belongs to a different genus, neither contained in nor containing the genus in question. For the general view is that the same differentia cannot be used of two non-subaltern genera. Else the result will be that the same species as well will be in two non-subaltern genera: for each of the differentiae imports its own genus, e.g. ‘walking’ and ‘biped’ import with them the genus ‘animal’. If, then, each of the genera as well is true of that of which the differentia is true, it clearly follows that the species must be in two non-subaltern genera. Or perhaps it is not impossible for the same differentia to be used of two non-subaltern genera, and we ought to add the words ‘except they both be subordinate members of the same genus’. Thus ‘walking animal’ and ‘flying animal’ are non-subaltern genera, and ‘biped’ is the differentia of both. The words ‘except they both be subordinate members of the same genus’ ought therefore to be added; for both these are subordinate to ‘animal’. From this possibility, that the same differentia may be used of two non-subaltern genera, it is clear also that there is no necessity for the differentia to carry with it the whole of the genus to which it belongs, but only the one or the other of its limbs together with the genera that are higher than this, as ‘biped’ carries with it either ‘flying’ or ‘walking animal’.
See, too, if he has rendered ‘existence in’ something as the differentia of a thing’s essence: for the general view is that locality cannot differentiate between one essence and another. Hence, too, people condemn those who divide animals by means of the terms ‘walking’ and ‘aquatic’, on the ground that ‘walking’ and ‘aquatic’ indicate mere locality. Or possibly in this case the censure is undeserved; for ‘aquatic’ does not mean ‘in’ anything; nor does it denote a locality, but a certain quality: for even if the thing be on the dry land, still it is aquatic: and likewise a land-animal, even though it be in the water, will still be a and not an aquatic-animal. But all the same, if ever the differentia does denote existence in something, clearly he will have made a bad mistake.
Again, see if he has rendered an affection as the differentia: for every affection, if intensified, subverts the essence of the thing, while the differentia is not of that kind: for the differentia is generally considered rather to preserve that which it differentiates; and it is absolutely impossible for a thing to exist without its own special differentia: for if there be no ‘walking’, there will be no ‘man’. In fact, we may lay down absolutely that a thing cannot have as its differentia anything in respect of which it is subject to alteration: for all things of that kind, if intensified, destroy its essence. If, then, a man has rendered any differentia of this kind, he has made a mistake: for we undergo absolutely no alteration in respect of our differentiae.
Again, see if he has failed to render the differentia of a relative term relatively to something else; for the differentiae of relative terms are themselves relative, as in the case also of knowledge. This is classed as speculative, practical and productive; and each of these denotes a relation: for it speculates upon something, and produces something and does something.
Look and see also if the definer renders each relative term relatively to its natural purpose: for while in some cases the particular relative term can be used in relation to its natural purpose only and to nothing else, some can be used in relation to something else as well. Thus sight can only be used for seeing, but a strigil can also be used to dip up water. Still, if any one were to define a strigil as an instrument for dipping water, he has made a mistake: for that is not its natural function. The definition of a thing’s natural function is ‘that for which it would be used by the prudent man, acting as such, and by the science that deals specially with that thing’.
Or see if, whenever a term happens to be used in a number of relations, he has failed to introduce it in its primary relation: e.g. by defining ‘wisdom’ as the virtue of ‘man’ or of the ‘soul,’ rather than of the ‘reasoning faculty’: for ‘wisdom’ is the virtue primarily of the reasoning faculty: for it is in virtue of this that both the man and his soul are said to be wise.
Moreover, if the thing of which the term defined has been stated to be an affection or disposition, or whatever it may be, be unable to admit it, the definer has made a mistake. For every disposition and every affection is formed naturally in that of which it is an affection or disposition, as knowledge, too, is formed in the soul, being a disposition of soul. Sometimes, however, people make bad mistakes in matters of this sort, e.g. all those who say that ‘sleep’ is a ‘failure of sensation’, or that ‘perplexity’ is a state of ‘equality between contrary reasonings’, or that ‘pain’ is a ‘violent disruption of parts that are naturally conjoined’. For sleep is not an attribute of sensation, whereas it ought to be, if it is a failure of sensation. Likewise, perplexity is not an attribute of opposite reasonings, nor pain of parts naturally conjoined: for then inanimate things will be in pain, since pain will be present in them. Similar in character, too, is the definition of ‘health’, say, as a ‘balance of hot and cold elements’: for then health will be necessarily exhibited by the hot and cold elements: for balance of anything is an attribute inherent in those things of which it is the balance, so that health would be an attribute of them. Moreover, people who define in this way put effect for cause, or cause for effect. For the disruption of parts naturally conjoined is not pain, but only a cause of pain: nor again is a failure of sensation sleep, but the one is the cause of the other: for either we go to sleep because sensation fails, or sensation fails because we go to sleep. Likewise also an equality between contrary reasonings would be generally considered to be a cause of perplexity: for it is when we reflect on both sides of a question and find everything alike to be in keeping with either course that we are perplexed which of the two we are to do.
Moreover, with regard to all periods of time look and see whether there be any discrepancy between the differentia and the thing defined: e.g. supposing the ‘immortal’ to be defined as a ‘living thing immune at present from destruction’. For a living thing that is immune ‘at present’ from destruction will be immortal ‘at present’. Possibly, indeed, in this case this result does not follow, owing to the ambiguity of the words ‘immune at present from destruction’: for it may mean either that the thing has not been destroyed at present, or that it cannot be destroyed at present, or that at present it is such that it never can be destroyed. Whenever, then, we say that a living thing is at present immune from destruction, we mean that it is at present a living thing of such a kind as never to be destroyed: and this is equivalent to saying that it is immortal, so that it is not meant that it is immortal only at present. Still, if ever it does happen that what has been rendered according to the definition belongs in the present only or past, whereas what is meant by the word does not so belong, then the two could not be the same. So, then, this commonplace rule ought to be followed, as we have said.
You should look and see also whether the term being defined is applied in consideration of something other than the definition rendered. Suppose (e.g.) a definition of ‘justice’ as the ‘ability to distribute what is equal’. This would not be right, for ‘just’ describes rather the man who chooses, than the man who is able to distribute what is equal: so that justice could not be an ability to distribute what is equal: for then also the most just man would be the man with the most ability to distribute what is equal.
Moreover, see if the thing admits of degrees, whereas what is rendered according to the definition does not, or, vice versa, what is rendered according to the definition admits of degrees while the thing does not. For either both must admit them or else neither, if indeed what is rendered according to the definition is the same as the thing. Moreover, see if, while both of them admit of degrees, they yet do not both become greater together: e.g. suppose sexual love to be the desire for intercourse: for he who is more intensely in love has not a more intense desire for intercourse, so that both do not become intensified at once: they certainly should, however, had they been the same thing.
Moreover, suppose two things to be before you, see if the term to be defined applies more particularly to the one to which the content of the definition is less applicable. Take, for instance, the definition of ‘fire’ as the ‘body that consists of the most rarefied particles’. For ‘fire’ denotes flame rather than light, but flame is less the body that consists of the most rarefied particles than is light: whereas both ought to be more applicable to the same thing, if they had been the same. Again, see if the one expression applies alike to both the objects before you, while the other does not apply to both alike, but more particularly to one of them.
Moreover, see if he renders the definition relative to two things taken separately: thus, the beautiful’ is ‘what is pleasant to the eyes or to the ears”: or ‘the real’ is ‘what is capable of being acted upon or of acting’. For then the same thing will be both beautiful and not beautiful, and likewise will be both real and not real. For ‘pleasant to the ears’ will be the same as ‘beautiful’, so that ‘not pleasant to the ears’ will be the same as ‘not beautiful’: for of identical things the opposites, too, are identical, and the opposite of ‘beautiful’ is ‘not beautiful’, while of ‘pleasant to the ears’ the opposite is not pleasant to the cars’: clearly, then, ‘not pleasant to the ears’ is the same thing as ‘not beautiful’. If, therefore, something be pleasant to the eyes but not to the ears, it will be both beautiful and not beautiful. In like manner we shall show also that the same thing is both real and unreal.
Moreover, of both genera and differentiae and all the other terms rendered in definitions you should frame definitions in lieu of the terms, and then see if there be any discrepancy between them.
If the term defined be relative, either in itself or in respect of its genus, see whether the definition fails to mention that to which the term, either in itself or in respect of its genus, is relative, e.g. if he has defined ‘knowledge’ as an ‘incontrovertible conception’ or ‘wishing’ as ‘painless conation’. For of everything relative the essence is relative to something else, seeing that the being of every relative term is identical with being in a certain relation to something. He ought, therefore, to have said that knowledge is ‘conception of a knowable’ and that wishing is ‘conation for a good’. Likewise, also, if he has defined ‘grammar’ as ‘knowledge of letters’: whereas in the definition there ought to be rendered either the thing to which the term itself is relative, or that, whatever it is, to which its genus is relative. Or see if a relative term has been described not in relation to its end, the end in anything being whatever is best in it or gives its purpose to the rest. Certainly it is what is best or final that should be stated, e.g. that desire is not for the pleasant but for pleasure: for this is our purpose in choosing what is pleasant as well.
Look and see also if that in relation to which he has rendered the term be a process or an activity: for nothing of that kind is an end, for the completion of the activity or process is the end rather than the process or activity itself. Or perhaps this rule is not true in all cases, for almost everybody prefers the present experience of pleasure to its cessation, so that they would count the activity as the end rather than its completion.
Again see in some cases if he has failed to distinguish the quantity or quality or place or other differentiae of an object; e.g. the quality and quantity of the honour the striving for which makes a man ambitious: for all men strive for honour, so that it is not enough to define the ambitious man as him who strives for honour, but the aforesaid differentiae must be added. Likewise, also, in defining the covetous man the quantity of money he aims at, or in the case of the incontinent man the quality of the pleasures, should be stated. For it is not the man who gives way to any sort of pleasure whatever who is called incontinent, but only he who gives way to a certain kind of pleasure. Or again, people sometimes define night as a ‘shadow on the earth’, or an earthquake as a movement of the earth’, or a cloud as ‘condensation of the air’, or a wind as a ‘movement of the air’; whereas they ought to specify as well quantity, quality, place, and cause. Likewise, also, in other cases of the kind: for by omitting any differentiae whatever he fails to state the essence of the term. One should always attack deficiency. For a movement of the earth does not constitute an earthquake, nor a movement of the air a wind, irrespective of its manner and the amount involved.
Moreover, in the case of conations, and in any other cases where it applies, see if the word ‘apparent’ is left out, e.g. ‘wishing is a conation after the good’, or ‘desire is a conation after the pleasant’-instead of saying ‘the apparently good’, or ‘pleasant’. For often those who exhibit the conation do not perceive what is good or pleasant, so that their aim need not be really good or pleasant, but only apparently so. They ought, therefore, to have rendered the definition also accordingly. On the other hand, any one who maintains the existence of Ideas ought to be brought face to face with his Ideas, even though he does render the word in question: for there can be no Idea of anything merely apparent: the general view is that an Idea is always spoken of in relation to an Idea: thus absolute desire is for the absolutely pleasant, and absolute wishing is for the absolutely good; they therefore cannot be for an apparent good or an apparently pleasant: for the existence of an absolutely-apparently-good or pleasant would be an absurdity.
Moreover, if the definition be of the state of anything, look at what is in the state, while if it be of what is in the state, look at the state: and likewise also in other cases of the kind. Thus if the pleasant be identical with the beneficial, then, too, the man who is pleased is benefited. Speaking generally, in definitions of this sort it happens that what the definer defines is in a sense more than one thing: for in defining knowledge, a man in a sense defines ignorance as well, and likewise also what has knowledge and what lacks it, and what it is to know and to be ignorant. For if the first be made clear, the others become in a certain sense clear as well. We have, then, to be on our guard in all such cases against discrepancy, using the elementary principles drawn from consideration of contraries and of coordinates.
Moreover, in the case of relative terms, see if the species is rendered as relative to a species of that to which the genus is rendered as relative, e.g. supposing belief to be relative to some object of belief, see whether a particular belief is made relative to some particular object of belief: and, if a multiple be relative to a fraction, see whether a particular multiple be made relative to a particular fraction. For if it be not so rendered, clearly a mistake has been made.
See, also, if the opposite of the term has the opposite definition, whether (e.g.) the definition of ‘half’ is the opposite of that of ‘double’: for if ‘double’ is ‘that which exceeds another by an equal amount to that other’, ‘half’ is ‘that which is exceeded by an amount equal to itself’. In the same way, too, with contraries. For to the contrary term will apply the definition that is contrary in some one of the ways in which contraries are conjoined. Thus (e.g.) if ‘useful’=’productive of good’, ‘injurious’=productive of evil’ or ‘destructive of good’, for one or the other of thee is bound to be contrary to the term originally used. Suppose, then, neither of these things to be the contrary of the term originally used, then clearly neither of the definitions rendered later could be the definition of the contrary of the term originally defined: and therefore the definition originally rendered of the original term has not been rightly rendered either. Seeing, moreover, that of contraries, the one is sometimes a word forced to denote the privation of the other, as (e.g.) inequality is generally held to be the privation of equality (for ‘unequal’ merely describes things that are not equal’), it is therefore clear that that contrary whose form denotes the privation must of necessity be defined through the other; whereas the other cannot then be defined through the one whose form denotes the privation; for else we should find that each is being interpreted by the other. We must in the case of contrary terms keep an eye on this mistake, e.g. supposing any one were to define equality as the contrary of inequality: for then he is defining it through the term which denotes privation of it. Moreover, a man who so defines is bound to use in his definition the very term he is defining; and this becomes clear, if for the word we substitute its definition. For to say ‘inequality’ is the same as to say ‘privation of equality’. Therefore equality so defined will be ‘the contrary of the privation of equality’, so that he would have used the very word to be defined. Suppose, however, that neither of the contraries be so formed as to denote privation, but yet the definition of it be rendered in a manner like the above, e.g. suppose ‘good’ to be defined as ‘the contrary of evil’, then, since it is clear that ‘evil’ too will be ‘the contrary of good’ (for the definition of things that are contrary in this must be rendered in a like manner), the result again is that he uses the very term being defined: for ‘good’ is inherent in the definition of ‘evil’. If, then, ‘good’ be the contrary of evil, and evil be nothing other than the ‘contrary of good’, then ‘good’ will be the ‘contrary of the contrary of good’. Clearly, then, he has used the very word to be defined.
Moreover, see if in rendering a term formed to denote privation, he has failed to render the term of which it is the privation, e.g. the state, or contrary, or whatever it may be whose privation it is: also if he has omitted to add either any term at all in which the privation is naturally formed, or else that in which it is naturally formed primarily, e.g. whether in defining ‘ignorance’ a privation he has failed to say that it is the privation of ‘knowledge’; or has failed to add in what it is naturally formed, or, though he has added this, has failed to render the thing in which it is primarily formed, placing it (e.g.) in ‘man’ or in ‘the soul’, and not in the ‘reasoning faculty’: for if in any of these respects he fails, he has made a mistake. Likewise, also, if he has failed to say that ‘blindness’ is the ‘privation of sight in an eye’: for a proper rendering of its essence must state both of what it is the privation and what it is that is deprived.
Examine further whether he has defined by the expression ‘a privation’ a term that is not used to denote a privation: thus a mistake of this sort also would be generally thought to be incurred in the case of ‘error’ by any one who is not using it as a merely negative term. For what is generally thought to be in error is not that which has no knowledge, but rather that which has been deceived, and for this reason we do not talk of inanimate things or of children as ‘erring’. ‘Error’, then, is not used to denote a mere privation of knowledge.
---
!!![[Topics: Book VII: 1]]
{{Topics: Book VII: 1}}
---
!!![[Topics: Book VII: 2]]
{{Topics: Book VII: 2}}
---
!!![[Topics: Book VII: 3]]
{{Topics: Book VII: 3}}
---
!!![[Topics: Book VII: 4]]
{{Topics: Book VII: 4}}
---
!!![[Topics: Book VII: 5]]
{{Topics: Book VII: 5}}
Whether two things are ‘the same’ or ‘different’, in the most literal of the meanings ascribed to ‘sameness’ (and we said’ that ‘the same’ applies in the most literal sense to what is numerically one), may be examined in the light of their inflexions and coordinates and opposites. For if justice be the same as courage, then too the just man is the same as the brave man, and ‘justly’ is the same as ‘bravely’. Likewise, too, in the case of their opposites: for if two things be the same, their opposites also will be the same, in any of the recognized forms of opposition. For it is the same thing to take the opposite of the one or that of the other, seeing that they are the same. Again it may be examined in the light of those things which tend to produce or to destroy the things in question of their formation and destruction, and in general of any thing that is related in like manner to each. For where things are absolutely the same, their formations and destructions also are the same, and so are the things that tend to produce or to destroy them. Look and see also, in a case where one of two things is said to be something or other in a superlative degree, if the other of these alleged identical things can also be described by a superlative in the same respect. Thus Xenocrates argues that the happy life and the good life are the same, seeing that of all forms of life the good life is the most desirable and so also is the happy life: for ‘the most desirable’ and the greatest’ apply but to one thing.’ Likewise also in other cases of the kind. Each, however, of the two things termed ‘greatest’ or most desirable’ must be numerically one: otherwise no proof will have been given that they are the same; for it does not follow because Peloponnesians and Spartans are the bravest of the Greeks, that Peloponnesians are the same as Spartans, seeing that ‘Peloponnesian’ is not any one person nor yet ‘Spartan’; it only follows that the one must be included under the other as ‘Spartans’ are under ‘Peloponnesians’: for otherwise, if the one class be not included under the other, each will be better than the other. For then the Peloponnesians are bound to be better than the Spartans, seeing that the one class is not included under the other; for they are better than anybody else. Likewise also the Spartans must perforce be better than the Peloponnesians; for they too are better than anybody else; each then is better than the other! Clearly therefore what is styled ‘best’ and ‘greatest’ must be a single thing, if it is to be proved to be ‘the same’ as another. This also is why Xenocrates fails to prove his case: for the happy life is not numerically single, nor yet the good life, so that it does not follow that, because they are both the most desirable, they are therefore the same, but only that the one falls under the other.
Again, look and see if, supposing the one to be the same as something, the other also is the same as it: for if they be not both the same as the same thing, clearly neither are they the same as one another.
Moreover, examine them in the light of their accidents or of the things of which they are accidents: for any accident belonging to the one must belong also to the other, and if the one belong to anything as an accident, so must the other also. If in any of these respects there is a discrepancy, clearly they are not the same.
See further whether, instead of both being found in one class of predicates, the one signifies a quality and the other a quantity or relation. Again, see if the genus of each be not the same, the one being ‘good’ and the other evil’, or the one being ‘virtue’ and the other ‘knowledge’: or see if, though the genus is the same, the differentiae predicted of either be not the same, the one (e.g.) being distinguished as a ‘speculative’ science, the other as a ‘practical’ science. Likewise also in other cases.
Moreover, from the point of view of ‘degrees’, see if the one admits an increase of degree but not the other, or if though both admit it, they do not admit it at the same time; just as it is not the case that a man desires intercourse more intensely, the more intensely he is in love, so that love and the desire for intercourse are not the same.
Moreover, examine them by means of an addition, and see whether the addition of each to the same thing fails to make the same whole; or if the subtraction of the same thing from each leaves a different remainder. Suppose (e.g.) that he has declared ‘double a half’ to be the same as ‘a multiple of a half’: then, subtracting the words ‘a half’ from each, the remainders ought to have signified the same thing: but they do not; for ‘double’ and ‘a multiple of’ do not signify the same thing.
Inquire also not only if some impossible consequence results directly from the statement made, that A and B are the same, but also whether it is possible for a supposition to bring it about; as happens to those who assert that ‘empty’ is the same as ‘full of air’: for clearly if the air be exhausted, the vessel will not be less but more empty, though it will no longer be full of air. So that by a supposition, which may be true or may be false (it makes no difference which), the one character is annulled and not the other, showing that they are not the same.
Speaking generally, one ought to be on the look-out for any discrepancy anywhere in any sort of predicate of each term, and in the things of which they are predicated. For all that is predicated of the one should be predicated also of the other, and of whatever the one is a predicate, the other should be a predicate of it as well.
Moreover, as ‘sameness’ is a term used in many senses, see whether things that are the same in one way are the same also in a different way. For there is either no necessity or even no possibility that things that are the same specifically or generically should be numerically the same, and it is with the question whether they are or are not the same in that sense that we are concerned.
Moreover, see whether the one can exist without the other; for, if so, they could not be the same.
Such is the number of the commonplace rules that relate to ‘sameness’. It is clear from what has been said that all the destructive commonplaces relating to sameness are useful also in questions of definition, as was said before:’ for if what is signified by the term and by the expression be not the same, clearly the expression rendered could not be a definition. None of the constructive commonplaces, on the other hand, helps in the matter of definition; for it is not enough to show the sameness of content between the expression and the term, in order to establish that the former is a definition, but a definition must have also all the other characters already announced.
This then is the way, and these the arguments, whereby the attempt to demolish a definition should always be made. If, on the other hand, we desire to establish one, the first thing to observe is that few if any who engage in discussion arrive at a definition by reasoning: they always assume something of the kind as their starting points-both in geometry and in arithmetic and the other studies of that kind. In the second place, to say accurately what a definition is, and how it should be given, belongs to another inquiry. At present it concerns us only so far as is required for our present purpose, and accordingly we need only make the bare statement that to reason to a thing’s definition and essence is quite possible. For if a definition is an expression signifying the essence of the thing and the predicates contained therein ought also to be the only ones which are predicated of the thing in the category of essence; and genera and differentiae are so predicated in that category: it is obvious that if one were to get an admission that so and so are the only attributes predicated in that category, the expression containing so and so would of necessity be a definition; for it is impossible that anything else should be a definition, seeing that there is not anything else predicated of the thing in the category of essence.
That a definition may thus be reached by a process of reasoning is obvious. The means whereby it should be established have been more precisely defined elsewhere, but for the purposes of the inquiry now before us the same commonplace rules serve. For we have to examine into the contraries and other opposites of the thing, surveying the expressions used both as wholes and in detail: for if the opposite definition defines that opposite term, the definition given must of necessity be that of the term before us. Seeing, however, that contraries may be conjoined in more than one way, we have to select from those contraries the one whose contrary definition seems most obvious. The expressions, then, have to be examined each as a whole in the way we have said, and also in detail as follows. First of all, see that the genus rendered is correctly rendered; for if the contrary thing be found in the contrary genus to that stated in the definition, and the thing before you is not in that same genus, then it would clearly be in the contrary genus: for contraries must of necessity be either in the same genus or in contrary genera. The differentiae, too, that are predicated of contraries we expect to be contrary, e.g. those of white and black, for the one tends to pierce the vision, while the other tends to compress it. So that if contrary differentiae to those in the definition are predicated of the contrary term, then those rendered in the definition would be predicated of the term before us. Seeing, then, that both the genus and the differentiae have been rightly rendered, clearly the expression given must be the right definition. It might be replied that there is no necessity why contrary differentiae should be predicated of contraries, unless the contraries be found within the same genus: of things whose genera are themselves contraries it may very well be that the same differentia is used of both, e.g. of justice and injustice; for the one is a virtue and the other a vice of the soul: ‘of the soul’, therefore, is the differentia in both cases, seeing that the body as well has its virtue and vice. But this much at least is true, that the differentiae of contraries are either contrary or else the same. If, then, the contrary differentia to that given be predicated of the contrary term and not of the one in hand, clearly the differentia stated must be predicated of the latter. Speaking generally, seeing that the definition consists of genus and differentiae, if the definition of the contrary term be apparent, the definition of the term before you will be apparent also: for since its contrary is found either in the same genus or in the contrary genus, and likewise also the differentiae predicated of opposites are either contrary to, or the same as, each other, clearly of the term before you there will be predicated either the same genus as of its contrary, while, of its differentiae, either all are contrary to those of its contrary, or at least some of them are so while the rest remain the same; or, vice versa, the differentiae will be the same and the genera contrary; or both genera and differentiae will be contrary. And that is all; for that both should be the same is not possible; else contraries will have the same definition.
Moreover, look at it from the point of view of its inflexions and coordinates. For genera and definitions are bound to correspond in either case. Thus if forgetfulness be the loss of knowledge, to forget is to lose knowledge, and to have forgotten is to have lost knowledge. If, then, any one whatever of these is agreed to, the others must of necessity be agreed to as well. Likewise, also, if destruction is the decomposition of the thing’s essence, then to be destroyed is to have its essence decomposed, and ‘destructively’ means ‘in such a way as to decompose its essence’; if again ‘destructive’ means ‘apt to decompose something’s essence’, then also ‘destruction’ means ‘the decomposition of its essence’. Likewise also with the rest: an admission of any one of them whatever, and all the rest are admitted too.
Moreover, look at it from the point of view of things that stand in relations that are like each other. For if ‘healthy’ means ‘productive of health’, ‘vigorous’ too will mean ‘productive of vigour’, and ‘useful’ will mean ‘productive of good.’ For each of these things is related in like manner to its own peculiar end, so that if one of them is defined as ‘productive of’ that end, this will also be the definition of each of the rest as well.
Moreover, look at it from the point of and like degrees, in all the ways in which it is possible to establish a result by comparing two and two together. Thus if A defines a better than B defines and B is a definition of so too is A of a. Further, if A’s claim to define a is like B’s to define B, and B defines B, then A too defines a. This examination from the point of view of greater degrees is of no use when a single definition is compared with two things, or two definitions with one thing; for there cannot possibly be one definition of two things or two of the same thing.
The most handy of all the commonplace arguments are those just mentioned and those from co-ordinates and inflexions, and these therefore are those which it is most important to master and to have ready to hand: for they are the most useful on the greatest number of occasions. Of the rest, too, the most important are those of most general application: for these are the most effective, e.g. that you should examine the individual cases, and then look to see in the case of their various species whether the definition applies. For the species is synonymous with its individuals. This sort of inquiry is of service against those who assume the existence of Ideas, as has been said before.’ Moreover see if a man has used a term metaphorically, or predicated it of itself as though it were something different. So too if any other of the commonplace rules is of general application and effective, it should be employed.
That it is more difficult to establish than to overthrow a definition, is obvious from considerations presently to be urged. For to see for oneself, and to secure from those whom one is questioning, an admission of premisses of this sort is no simple matter, e.g. that of the elements of the definition rendered the one is genus and the other differentia, and that only the genus and differentiae are predicated in the category of essence. Yet without these premisses it is impossible to reason to a definition; for if any other things as well are predicated of the thing in the category of essence, there is no telling whether the formula stated or some other one is its definition, for a definition is an expression indicating the essence of a thing. The point is clear also from the following: It is easier to draw one conclusion than many. Now in demolishing a definition it is sufficient to argue against one point only (for if we have overthrown any single point whatsoever, we shall have demolished the definition); whereas in establishing a definition, one is bound to bring people to the view that everything contained in the definition is attributable. Moreover, in establishing a case, the reasoning brought forward must be universal: for the definition put forward must be predicated of everything of which the term is predicated, and must moreover be convertible, if the definition rendered is to be peculiar to the subject. In overthrowing a view, on the other hand, there is no longer any necessity to show one’s point universally: for it is enough to show that the formula is untrue of any one of the things embraced under the term.
Further, even supposing it should be necessary to overthrow something by a universal proposition, not even so is there any need to prove the converse of the proposition in the process of overthrowing the definition. For merely to show that the definition fails to be predicated of every one of the things of which the term is predicated, is enough to overthrow it universally: and there is no need to prove the converse of this in order to show that the term is predicated of things of which the expression is not predicated. Moreover, even if it applies to everything embraced under the term, but not to it alone, the definition is thereby demolished.
The case stands likewise in regard to the property and genus of a term also. For in both cases it is easier to overthrow than to establish. As regards the property this is clear from what has been said: for as a rule the property is rendered in a complex phrase, so that to overthrow it, it is only necessary to demolish one of the terms used, whereas to establish it is necessary to reason to them all. Then, too, nearly all the other rules that apply to the definition will apply also to the property of a thing. For in establishing a property one has to show that it is true of everything included under the term in question, whereas to overthrow one it is enough to show in a single case only that it fails to belong: further, even if it belongs to everything falling under the term, but not to that only, it is overthrown in this case as well, as was explained in the case of the definition. In regard to the genus, it is clear that you are bound to establish it in one way only, viz. by showing that it belongs in every case, while of overthrowing it there are two ways: for if it has been shown that it belongs either never or not in a certain case, the original statement has been demolished. Moreover, in establishing a genus it is not enough to show that it belongs, but also that it belongs as genus has to be shown; whereas in overthrowing it, it is enough to show its failure to belong either in some particular case or in every case. It appears, in fact, as though, just as in other things to destroy is easier than to create, so in these matters too to overthrow is easier than to establish.
In the case of an accidental attribute the universal proposition is easier to overthrow than to establish; for to establish it, one has to show that it belongs in every case, whereas to overthrow it, it is enough to show that it does not belong in one single case. The particular proposition is, on the contrary, easier to establish than to overthrow: for to establish it, it is enough to show that it belongs in a particular instance, whereas to overthrow it, it has to be shown that it never belongs at all.
It is clear also that the easiest thing of all is to overthrow a definition. For on account of the number of statements involved we are presented in the definition with the greatest number of points for attack, and the more plentiful the material, the quicker an argument comes: for there is more likelihood of a mistake occurring in a large than in a small number of things. Moreover, the other rules too may be used as means for attacking a definition: for if either the formula be not peculiar, or the genus rendered be the wrong one, or something included in the formula fail to belong, the definition is thereby demolished. On the other hand, against the others we cannot bring all of the arguments drawn from definitions, nor yet of the rest: for only those relating to accidental attributes apply generally to all the aforesaid kinds of attribute. For while each of the aforesaid kinds of attribute must belong to the thing in question, yet the genus may very well not belong as a property without as yet being thereby demolished. Likewise also the property need not belong as a genus, nor the accident as a genus or property, so long as they do belong. So that it is impossible to use one set as a basis of attack upon the other except in the case of definition. Clearly, then, it is the easiest of all things to demolish a definition, while to establish one is the hardest. For there one both has to establish all those other points by reasoning (i.e. that the attributes stated belong, and that the genus rendered is the true genus, and that the formula is peculiar to the term), and moreover, besides this, that the formula indicates the essence of the thing; and this has to be done correctly.
Of the rest, the property is most nearly of this kind: for it is easier to demolish, because as a rule it contains several terms; while it is the hardest to establish, both because of the number of things that people must be brought to accept, and, besides this, because it belongs to its subject alone and is predicated convertibly with its subject.
The easiest thing of all to establish is an accidental predicate: for in other cases one has to show not only that the predicate belongs, but also that it belongs in such and such a particular way: whereas in the case of the accident it is enough to show merely that it belongs. On the other hand, an accidental predicate is the hardest thing to overthrow, because it affords the least material: for in stating accident a man does not add how the predicate belongs; and accordingly, while in other cases it is possible to demolish what is said in two ways, by showing either that the predicate does not belong, or that it does not belong in the particular way stated, in the case of an accidental predicate the only way to demolish it is to show that it does not belong at all.
The commonplace arguments through which we shall be well supplied with lines of argument with regard to our several problems have now been enumerated at about sufficient length.
---
!!![[Topics: Book VIII: 1]]
{{Topics: Book VIII: 1}}
---
!!![[Topics: Book VIII: 2]]
{{Topics: Book VIII: 2}}
---
!!![[Topics: Book VIII: 3]]
{{Topics: Book VIII: 3}}
---
!!![[Topics: Book VIII: 4]]
{{Topics: Book VIII: 4}}
---
!!![[Topics: Book VIII: 5]]
{{Topics: Book VIII: 5}}
---
!!![[Topics: Book VIII: 6]]
{{Topics: Book VIII: 6}}
---
!!![[Topics: Book VIII: 7]]
{{Topics: Book VIII: 7}}
---
!!![[Topics: Book VIII: 8]]
{{Topics: Book VIII: 8}}
---
!!![[Topics: Book VIII: 9]]
{{Topics: Book VIII: 1}}
---
!!![[Topics: Book VIII: 10]]
{{Topics: Book VIII: 2}}
---
!!![[Topics: Book VIII: 11]]
{{Topics: Book VIII: 3}}
---
!!![[Topics: Book VIII: 12]]
{{Topics: Book VIII: 4}}
---
!!![[Topics: Book VIII: 13]]
{{Topics: Book VIII: 5}}
---
!!![[Topics: Book VIII: 14]]
{{Topics: Book VIII: 6}}
Next there fall to be discussed the problems of arrangement and method in putting questions. Any one who intends to frame questions must, first of all, select the ground from which he should make his attack; secondly, he must frame them and arrange them one by one to himself; thirdly and lastly, he must proceed actually to put them to the other party. Now so far as the selection of his ground is concerned the problem is one alike for the philosopher and the dialectician; but how to go on to arrange his points and frame his questions concerns the dialectician only: for in every problem of that kind a reference to another party is involved. Not so with the philosopher, and the man who is investigating by himself: the premisses of his reasoning, although true and familiar, may be refused by the answerer because they lie too near the original statement and so he foresees what will follow if he grants them: but for this the philosopher does not care. Nay, he may possibly be even anxious to secure axioms as familiar and as near to the question in hand as possible: for these are the bases on which scientific reasonings are built up.
The sources from which one’s commonplace arguments should be drawn have already been described:’ we have now to discuss the arrangement and formation of questions and first to distinguish the premisses, other than the necessary premisses, which have to be adopted. By necessary premisses are meant those through which the actual reasoning is constructed. Those which are secured other than these are of four kinds; they serve either inductively to secure the universal premiss being granted, or to lend weight to the argument, or to conceal the conclusion, or to render the argument more clear. Beside these there is no other premiss which need be secured: these are the ones whereby you should try to multiply and formulate your questions. Those which are used to conceal the conclusion serve a controversial purpose only; but inasmuch as an undertaking of this sort is always conducted against another person, we are obliged to employ them as well.
The necessary premisses through which the reasoning is effected, ought not to be propounded directly in so many words. Rather one should soar as far aloof from them as possible. Thus if one desires to secure an admission that the knowledge of contraries is one, one should ask him to admit it not of contraries, but of opposites: for, if he grants this, one will then argue that the knowledge of contraries is also the same, seeing that contraries are opposites; if he does not, one should secure the admission by induction, by formulating a proposition to that effect in the case of some particular pair of contraries. For one must secure the necessary premisses either by reasoning or by induction, or else partly by one and partly by the other, although any propositions which are too obvious to be denied may be formulated in so many words. This is because the coming conclusion is less easily discerned at the greater distance and in the process of induction, while at the same time, even if one cannot reach the required premisses in this way, it is still open to one to formulate them in so many words. The premisses, other than these, that were mentioned above, must be secured with a view to the latter. The way to employ them respectively is as follows: Induction should proceed from individual cases to the universal and from the known to the unknown; and the objects of perception are better known, to most people if not invariably. Concealment of one’s plan is obtained by securing through prosyllogisms the premisses through which the proof of the original proposition is going to be constructed-and as many of them as possible. This is likely to be effected by making syllogisms to prove not only the necessary premisses but also some of those which are required to establish them. Moreover, do not state the conclusions of these premisses but draw them later one after another; for this is likely to keep the answerer at the greatest possible distance from the original proposition. Speaking generally, a man who desires to get information by a concealed method should so put his questions that when he has put his whole argument and has stated the conclusion, people still ask ‘Well, but why is that?’ This result will be secured best of all by the method above described: for if one states only the final conclusion, it is unclear how it comes about; for the answerer does not foresee on what grounds it is based, because the previous syllogisms have not been made articulate to him: while the final syllogism, showing the conclusion, is likely to be kept least articulate if we lay down not the secured propositions on which it is based, but only the grounds on which we reason to them.
It is a useful rule, too, not to secure the admissions claimed as the bases of the syllogisms in their proper order, but alternately those that conduce to one conclusion and those that conduce to another; for, if those which go together are set side by side, the conclusion that will result from them is more obvious in advance.
One should also, wherever possible, secure the universal premiss by a definition relating not to the precise terms themselves but to their co-ordinates; for people deceive themselves, whenever the definition is taken in regard to a co-ordinate, into thinking that they are not making the admission universally. An instance would be, supposing one had to secure the admission that the angry man desires vengeance on account of an apparent slight, and were to secure this, that ‘anger’ is a desire for vengeance on account of an apparent slight: for, clearly, if this were secured, we should have universally what we intend. If, on the other hand, people formulate propositions relating to the actual terms themselves, they often find that the answerer refuses to grant them because on the actual term itself he is readier with his objection, e.g. that the ‘angry man’ does not desire vengeance, because we become angry with our parents, but we do not desire vengeance on them. Very likely the objection is not valid; for upon some people it is vengeance enough to cause them pain and make them sorry; but still it gives a certain plausibility and air of reasonableness to the denial of the proposition. In the case, however, of the definition of ‘anger’ it is not so easy to find an objection.
Moreover, formulate your proposition as though you did so not for its own sake, but in order to get at something else: for people are shy of granting what an opponent’s case really requires. Speaking generally, a questioner should leave it as far as possible doubtful whether he wishes to secure an admission of his proposition or of its opposite: for if it be uncertain what their opponent’s argument requires, people are more ready to say what they themselves think.
Moreover, try to secure admissions by means of likeness: for such admissions are plausible, and the universal involved is less patent; e.g. make the other person admit that as knowledge and ignorance of contraries is the same, so too perception of contraries is the same; or vice versa, that since the perception is the same, so is the knowledge also. This argument resembles induction, but is not the same thing; for in induction it is the universal whose admission is secured from the particulars, whereas in arguments from likeness, what is secured is not the universal under which all the like cases fall.
It is a good rule also, occasionally to bring an objection against oneself: for answerers are put off their guard against those who appear to be arguing impartially. It is useful too, to add that ‘So and so is generally held or commonly said’; for people are shy of upsetting the received opinion unless they have some positive objection to urge: and at the same time they are cautious about upsetting such things because they themselves too find them useful. Moreover, do not be insistent, even though you really require the point: for insistence always arouses the more opposition. Further, formulate your premiss as though it were a mere illustration: for people admit the more readily a proposition made to serve some other purpose, and not required on its own account. Moreover, do not formulate the very proposition you need to secure, but rather something from which that necessarily follows: for people are more willing to admit the latter, because it is not so clear from this what the result will be, and if the one has been secured, the other has been secured also. Again, one should put last the point which one most wishes to have conceded; for people are specially inclined to deny the first questions put to them, because most people in asking questions put first the points which they are most eager to secure. On the other hand, in dealing with some people propositions of this sort should be put forward first: for ill-tempered men admit most readily what comes first, unless the conclusion that will result actually stares them in the face, while at the close of an argument they show their ill-temper. Likewise also with those who consider themselves smart at answering: for when they have admitted most of what you want they finally talk clap-trap to the effect that the conclusion does not follow from their admissions: yet they say ‘Yes’ readily, confident in their own character, and imagining that they cannot suffer any reverse. Moreover, it is well to expand the argument and insert things that it does not require at all, as do those who draw false geometrical figures: for in the multitude of details the whereabouts of the fallacy is obscured. For this reason also a questioner sometimes evades observation as he adds in a corner what, if he formulated it by itself, would not be granted.
For concealment, then, the rules which should be followed are the above. Ornament is attained by induction and distinction of things closely akin. What sort of process induction is is obvious: as for distinction, an instance of the kind of thing meant is the distinction of one form of knowledge as better than another by being either more accurate, or concerned with better objects; or the distinction of sciences into speculative, practical, and productive. For everything of this kind lends additional ornament to the argument, though there is no necessity to say them, so far as the conclusion goes.
For clearness, examples and comparisons should be adduced, and let the illustrations be relevant and drawn from things that we know, as in Homer and not as in Choerilus; for then the proposition is likely to become clearer.
Of all arguments that reason to a false conclusion the right solution is to demolish the point on which the fallacy that occurs depends: for the demolition of any random point is no solution, even though the point demolished be false. For the argument may contain many falsehoods, e.g. suppose some one to secure the premisses, ‘He who sits, writes’ and ‘Socrates is sitting’: for from these it follows that ‘Socrates is writing’. Now we may demolish the proposition ‘Socrates is sitting’, and still be no nearer a solution of the argument; it may be true that the point claimed is false; but it is not on that that fallacy of the argument depends: for supposing that any one should happen to be sitting and not writing, it would be impossible in such a case to apply the same solution. Accordingly, it is not this that needs to be demolished, but rather that ‘He who sits, writes’: for he who sits does not always write. He, then, who has demolished the point on which the fallacy depends, has given the solution of the argument completely. Any one who knows that it is on such and such a point that the argument depends, knows the solution of it, just as in the case of a figure falsely drawn. For it is not enough to object, even if the point demolished be a falsehood, but the reason of the fallacy should also be proved: for then it would be clear whether the man makes his objection with his eyes open or not.
There are four possible ways of preventing a man from working his argument to a conclusion. It can be done either by demolishing the point on which the falsehood that comes about depends, or by stating an objection directed against the questioner: for often when a solution has not as a matter of fact been brought, yet the questioner is rendered thereby unable to pursue the argument any farther. Thirdly, one may object to the questions asked: for it may happen that what the questioner wants does not follow from the questions he has asked because he has asked them badly, whereas if something additional be granted the conclusion comes about. If, then, the questioner be unable to pursue his argument farther, the objection would properly be directed against the questioner; if he can do so, then it would be against his questions. The fourth and worst kind of objection is that which is directed to the time allowed for discussion: for some people bring objections of a kind which would take longer to answer than the length of the discussion in hand.
There are then, as we said, four ways of making objections: but of them the first alone is a solution: the others are just hindrances and stumbling-blocks to prevent the conclusions.
Adverse criticism of an argument on its own merits, and of it when presented in the form of questions, are two different things. For often the failure to carry through the argument correctly in discussion is due to the person questioned, because he will not grant the steps of which a correct argument might have been made against his position: for it is not in the power of the one side only to effect properly a result that depends on both alike. Accordingly it sometimes becomes necessary to attack the speaker and not his position, when the answerer lies in wait for the points that are contrary to the questioner and becomes abusive as well: when people lose their tempers in this way, their argument becomes a contest, not a discussion. Moreover, since arguments of this kind are held not for the sake of instruction but for purposes of practice and examination, clearly one has to reason not only to true conclusions, but also to false ones, and not always through true premisses, but sometimes through false as well. For often, when a true proposition is put forward, the dialectician is compelled to demolish it: and then false propositions have to be formulated. Sometimes also when a false proposition is put forward, it has to be demolished by means of false propositions: for it is possible for a given man to believe what is not the fact more firmly than the truth. Accordingly, if the argument be made to depend on something that he holds, it will be easier to persuade or help him. He, however, who would rightly convert any one to a different opinion should do so in a dialectical and not in a contentious manner, just as a geometrician should reason geometrically, whether his conclusion be false or true: what kind of syllogisms are dialectical has already been said. The principle that a man who hinders the common business is a bad partner, clearly applies to an argument as well; for in arguments as well there is a common aim in view, except with mere contestants, for these cannot both reach the same goal; for more than one cannot possibly win. It makes no difference whether he effects this as answerer or as questioner: for both he who asks contentious questions is a bad dialectician, and also he who in answering fails to grant the obvious answer or to understand the point of the questioner’s inquiry. What has been said, then, makes it clear that adverse criticism is not to be passed in a like strain upon the argument on its own merits, and upon the questioner: for it may very well be that the argument is bad, but that the questioner has argued with the answerer in the best possible way: for when men lose their tempers, it may perhaps be impossible to make one’s inferences straight-forwardly as one would wish: we have to do as we can.
Inasmuch as it is indeterminate when people are claiming the admission of contrary things, and when they are claiming what originally they set out to prove-for often when they are talking by themselves they say contrary things, and admit afterwards what they have previously denied; for which reason they often assent, when questioned, to contrary things and to what originally had to be proved-the argument is sure to become vitiated. The responsibility, however, for this rests with the answerer, because while refusing to grant other points, he does grant points of that kind. It is, then, clear that adverse criticism is not to be passed in a like manner upon questioners and upon their arguments.
In itself an argument is liable to five kinds of adverse criticism:
(1) The first is when neither the proposed conclusion nor indeed any conclusion at all is drawn from the questions asked, and when most, if not all, of the premisses on which the conclusion rests are false or generally rejected, when, moreover, neither any withdrawals nor additions nor both together can bring the conclusions about.
(2) The second is, supposing the reasoning, though constructed from the premisses, and in the manner, described above, were to be irrelevant to the original position.
(3) The third is, supposing certain additions would bring an inference about but yet these additions were to be weaker than those that were put as questions and less generally held than the conclusion.
(4) Again, supposing certain withdrawals could effect the same: for sometimes people secure more premisses than are necessary, so that it is not through them that the inference comes about.
(5) Moreover, suppose the premisses be less generally held and less credible than the conclusion, or if, though true, they require more trouble to prove than the proposed view.
One must not claim that the reasoning to a proposed view shall in every case equally be a view generally accepted and convincing: for it is a direct result of the nature of things that some subjects of inquiry shall be easier and some harder, so that if a man brings people to accept his point from opinions that are as generally received as the case admits, he has argued his case correctly. Clearly, then, not even the argument itself is open to the same adverse criticism when taken in relation to the proposed conclusion and when taken by itself. For there is nothing to prevent the argument being open to reproach in itself, and yet commendable in relation to the proposed conclusion, or again, vice versa, being commendable in itself, and yet open to reproach in relation to the proposed conclusion, whenever there are many propositions both generally held and also true whereby it could easily be proved. It is possible also that an argument, even though brought to a conclusion, may sometimes be worse than one which is not so concluded, whenever the premisses of the former are silly, while its conclusion is not so; whereas the latter, though requiring certain additions, requires only such as are generally held and true, and moreover does not rest as an argument on these additions. With those which bring about a true conclusion by means of false premisses, it is not fair to find fault: for a false conclusion must of necessity always be reached from a false premiss, but a true conclusion may sometimes be drawn even from false premisses; as is clear from the Analytics.
Whenever by the argument stated something is demonstrated, but that something is other than what is wanted and has no bearing whatever on the conclusion, then no inference as to the latter can be drawn from it: and if there appears to be, it will be a sophism, not a proof. A philosopheme is a demonstrative inference: an epichireme is a dialectical inference: a sophism is a contentious inference: an aporeme is an inference that reasons dialectically to a contradiction.
If something were to be shown from premisses, both of which are views generally accepted, but not accepted with like conviction, it may very well be that the conclusion shown is something held more strongly than either. If, on the other hand, general opinion be for the one and neither for nor against the other, or if it be for the one and against the other, then, if the pro and con be alike in the case of the premisses, they will be alike for the conclusion also: if, on the other hand, the one preponderates, the conclusion too will follow suit.
It is also a fault in reasoning when a man shows something through a long chain of steps, when he might employ fewer steps and those already included in his argument: suppose him to be showing (e.g.) that one opinion is more properly so called than another, and suppose him to make his postulates as follows: ‘x-in-itself is more fully x than anything else’: ‘there genuinely exists an object of opinion in itself’: therefore ‘the object-of-opinion-in-itself is more fully an object of opinion than the particular objects of opinion’. Now ‘a relative term is more fully itself when its correlate is more fully itself’: and ‘there exists a genuine opinion-in-itself, which will be “opinion” in a more accurate sense than the particular opinions’: and it has been postulated both that ‘a genuine opinion-in-itself exists’, and that ‘x-in-itself is more fully x than anything else’: therefore ‘this will be opinion in a more accurate sense’. Wherein lies the viciousness of the reasoning? Simply in that it conceals the ground on which the argument depends.
An argument is clear in one, and that the most ordinary, sense, if it be so brought to a conclusion as to make no further questions necessary: in another sense, and this is the type most usually advanced, when the propositions secured are such as compel the conclusion, and the argument is concluded through premisses that are themselves conclusions: moreover, it is so also if some step is omitted that generally is firmly accepted.
An argument is called fallacious in four senses: (1) when it appears to be brought to a conclusion, and is not really so-what is called ‘contentious’ reasoning: (2) when it comes to a conclusion but not to the conclusion proposed-which happens principally in the case of reductiones ad impossibile: (3) when it comes to the proposed conclusion but not according to the mode of inquiry appropriate to the case, as happens when a non-medical argument is taken to be a medical one, or one which is not geometrical for a geometrical argument, or one which is not dialectical for dialectical, whether the result reached be true or false: (4) if the conclusion be reached through false premisses: of this type the conclusion is sometimes false, sometimes true: for while a false conclusion is always the result of false premisses, a true conclusion may be drawn even from premisses that are not true, as was said above as well.
Fallacy in argument is due to a mistake of the arguer rather than of the argument: yet it is not always the fault of the arguer either, but only when he is not aware of it: for we often accept on its merits in preference to many true ones an argument which demolishes some true proposition if it does so from premisses as far as possible generally accepted. For an argument of that kind does demonstrate other things that are true: for one of the premisses laid down ought never to be there at all, and this will then be demonstrated. If, however, a true conclusion were to be reached through premisses that are false and utterly childish, the argument is worse than many arguments that lead to a false conclusion, though an argument which leads to a false conclusion may also be of this type. Clearly then the first thing to ask in regard to the argument in itself is, ‘Has it a conclusion?’; the second, ‘Is the conclusion true or false?’; the third, ‘Of what kind of premisses does it consist?’: for if the latter, though false, be generally accepted, the argument is dialectical, whereas if, though true, they be generally rejected, it is bad: if they be both false and also entirely contrary to general opinion, clearly it is bad, either altogether or else in relation to the particular matter in hand.
Of the ways in which a questioner may beg the original question and also beg contraries the true account has been given in the Analytics:’ but an account on the level of general opinion must be given now.
People appear to beg their original question in five ways: the first and most obvious being if any one begs the actual point requiring to be shown: this is easily detected when put in so many words; but it is more apt to escape detection in the case of different terms, or a term and an expression, that mean the same thing. A second way occurs whenever any one begs universally something which he has to demonstrate in a particular case: suppose (e.g.) he were trying to prove that the knowledge of contraries is one and were to claim that the knowledge of opposites in general is one: for then he is generally thought to be begging, along with a number of other things, that which he ought to have shown by itself. A third way is if any one were to beg in particular cases what he undertakes to show universally: e.g. if he undertook to show that the knowledge of contraries is always one, and begged it of certain pairs of contraries: for he also is generally considered to be begging independently and by itself what, together with a number of other things, he ought to have shown. Again, a man begs the question if he begs his conclusion piecemeal: supposing e.g. that he had to show that medicine is a science of what leads to health and to disease, and were to claim first the one, then the other; or, fifthly, if he were to beg the one or the other of a pair of statements that necessarily involve one other; e.g. if he had to show that the diagonal is incommensurable with the side, and were to beg that the side is incommensurable with the diagonal.
The ways in which people assume contraries are equal in number to those in which they beg their original question. For it would happen, firstly, if any one were to beg an opposite affirmation and negation; secondly, if he were to beg the contrary terms of an antithesis, e.g. that the same thing is good and evil; thirdly, suppose any one were to claim something universally and then proceed to beg its contradictory in some particular case, e.g. if having secured that the knowledge of contraries is one, he were to claim that the knowledge of what makes for health or for disease is different; or, fourthly, suppose him, after postulating the latter view, to try to secure universally the contradictory statement. Again, fifthly, suppose a man begs the contrary of the conclusion which necessarily comes about through the premisses laid down; and this would happen suppose, even without begging the opposites in so many words, he were to beg two premisses such that this contradictory statement that is opposite to the first conclusion will follow from them. The securing of contraries differs from begging the original question in this way: in the latter case the mistake lies in regard to the conclusion; for it is by a glance at the conclusion that we tell that the original question has been begged: whereas contrary views lie in the premisses, viz. in a certain relation which they bear to one another.
The best way to secure training and practice in arguments of this kind is in the first place to get into the habit of converting the arguments. For in this way we shall be better equipped for dealing with the proposition stated, and after a few attempts we shall know several arguments by heart. For by ‘conversion’ of an argument is meant the taking the reverse of the conclusion together with the remaining propositions asked and so demolishing one of those that were conceded: for it follows necessarily that if the conclusion be untrue, some one of the premisses is demolished, seeing that, given all the premisses, the conclusion was bound to follow. Always, in dealing with any proposition, be on the look-out for a line of argument both pro and con: and on discovering it at once set about looking for the solution of it: for in this way you will soon find that you have trained yourself at the same time in both asking questions and answering them. If we cannot find any one else to argue with, we should argue with ourselves. Select, moreover, arguments relating to the same thesis and range them side by side: for this produces a plentiful supply of arguments for carrying a point by sheer force, and in refutation also it is of great service, whenever one is well stocked with arguments pro and con: for then you find yourself on your guard against contrary statements to the one you wish to secure. Moreover, as contributing to knowledge and to philosophic wisdom the power of discerning and holding in one view the results of either of two hypotheses is no mean instrument; for it then only remains to make a right choice of one of them. For a task of this kind a certain natural ability is required: in fact real natural ability just is the power right to choose the true and shun the false. Men of natural ability can do this; for by a right liking or disliking for whatever is proposed to them they rightly select what is best.
It is best to know by heart arguments upon those questions which are of most frequent occurrence, and particularly in regard to those propositions which are ultimate: for in discussing these answerers frequently give up in despair. Moreover, get a good stock of definitions: and have those of familiar and primary ideas at your fingers’ ends: for it is through these that reasonings are effected. You should try, moreover, to master the heads under which other arguments mostly tend to fall. For just as in geometry it is useful to be practised in the elements, and in arithmetic to have the multiplication table up to ten at one’s fingers’ ends-and indeed it makes a great difference in one’s knowledge of the multiples of other numbers too-likewise also in arguments it is a great advantage to be well up in regard to first principles, and to have a thorough knowledge of premisses at the tip of one’s tongue. For just as in a person with a trained memory, a memory of things themselves is immediately caused by the mere mention of their loci, so these habits too will make a man readier in reasoning, because he has his premisses classified before his mind’s eye, each under its number. It is better to commit to memory a premiss of general application than an argument: for it is difficult to be even moderately ready with a first principle, or hypothesis.
Moreover, you should get into the habit of turning one argument into several, and conceal your procedure as darkly as you can: this kind of effect is best produced by keeping as far as possible away from topics akin to the subject of the argument. This can be done with arguments that are entirely universal, e.g. the statement that ‘there cannot be one knowledge of more than one thing’: for that is the case with both relative terms and contraries and co-ordinates.
Records of discussions should be made in a universal form, even though one has argued only some particular case: for this will enable one to turn a single rule into several. A like rule applies in Rhetoric as well to enthymemes. For yourself, however, you should as far as possible avoid universalizing your reasonings. You should, moreover, always examine arguments to see whether they rest on principles of general application: for all particular arguments really reason universally, as well, i.e. a particular demonstration always contains a universal demonstration, because it is impossible to reason at all without using universals.
You should display your training in inductive reasoning against a young man, in deductive against an expert. You should try, moreover, to secure from those skilled in deduction their premisses, from inductive reasoners their parallel cases; for this is the thing in which they are respectively trained. In general, too, from your exercises in argumentation you should try to carry away either a syllogism on some subject or a refutation or a proposition or an objection, or whether some one put his question properly or improperly (whether it was yourself or some one else) and the point which made it the one or the other. For this is what gives one ability, and the whole object of training is to acquire ability, especially in regard to propositions and objections. For it is the skilled propounder and objector who is, speaking generally, a dialectician. To formulate a proposition is to form a number of things into one-for the conclusion to which the argument leads must be taken generally, as a single thing-whereas to formulate an objection is to make one thing into many; for the objector either distinguishes or demolishes, partly granting, partly denying the statements proposed.
Do not argue with every one, nor practise upon the man in the street: for there are some people with whom any argument is bound to degenerate. For against any one who is ready to try all means in order to seem not to be beaten, it is indeed fair to try all means of bringing about one’s conclusion: but it is not good form. Wherefore the best rule is, not lightly to engage with casual acquaintances, or bad argument is sure to result. For you see how in practising together people cannot refrain from contentious argument.
It is best also to have ready-made arguments relating to those questions in which a very small stock will furnish us with arguments serviceable on a very large number of occasions. These are those that are universal, and those in regard to which it is rather difficult to produce points for ourselves from matters of everyday experience.
In dialectics, syllogism should be employed in reasoning against dialecticians rather than against the crowd: induction, on the other hand, is most useful against the crowd. This point has been treated previously as well.’ In induction, it is possible in some cases to ask the question in its universal form, but in others this is not easy, because there is no established general term that covers all the resemblances: in this case, when people need to secure the universal, they use the phrase ‘in all cases of this sort’. But it is one of the very hardest things to distinguish which of the things adduced are ‘of this sort’, and which are not: and in this connexion people often throw dust in each others’ eyes in their discussion, the one party asserting the likeness of things that are not alike, and the other disputing the likeness of things that are. One ought, therefore, to try oneself to coin a word to cover all things of the given sort, so as to leave no opportunity either to the answerer to dispute, and say that the thing advanced does not answer to a like description, or to the questioner to suggest falsely that it does answer to a like description, for many things appear to answer to like descriptions that do not really do so.
If one has made an induction on the strength of several cases and yet the answerer refuses to grant the universal proposition, then it is fair to demand his objection. But until one has oneself stated in what cases it is so, it is not fair to demand that he shall say in what cases it is not so: for one should make the induction first, and then demand the objection. One ought, moreover, to claim that the objections should not be brought in reference to the actual subject of the proposition, unless that subject happen to be the one and only thing of the kind, as for instance two is the one prime number among the even numbers: for, unless he can say that this subject is unique of its kind, the objector ought to make his objection in regard to some other. People sometimes object to a universal proposition, and bring their objection not in regard to the thing itself, but in regard to some homonym of it: thus they argue that a man can very well have a colour or a foot or a hand other than his own, for a painter may have a colour that is not his own, and a cook may have a foot that is not his own. To meet them, therefore, you should draw the distinction before putting your question in such cases: for so long as the ambiguity remains undetected, so long will the objection to the proposition be deemed valid. If, however, he checks the series of questions by an objection in regard not to some homonym, but to the actual thing asserted, the questioner should withdraw the point objected to, and form the remainder into a universal proposition, until he secures what he requires; e.g. in the case of forgetfulness and having forgotten: for people refuse to admit that the man who has lost his knowledge of a thing has forgotten it, because if the thing alters, he has lost knowledge of it, but he has not forgotten it. Accordingly the thing to do is to withdraw the part objected to, and assert the remainder, e.g. that if a person have lost knowledge of a thing while it still remains, he then has forgotten it. One should similarly treat those who object to the statement that ‘the greater the good, the greater the evil that is its opposite’: for they allege that health, which is a less good thing than vigour, has a greater evil as its opposite: for disease is a greater evil than debility. In this case too, therefore, we have to withdraw the point objected to; for when it has been withdrawn, the man is more likely to admit the proposition, e.g. that ‘the greater good has the greater evil as its opposite, unless the one good involves the other as well’, as vigour involves health. This should be done not only when he formulates an objection, but also if, without so doing, he refuses to admit the point because he foresees something of the kind: for if the point objected to be withdrawn, he will be forced to admit the proposition because he cannot foresee in the rest of it any case where it does not hold true: if he refuse to admit it, then when asked for an objection he certainly will be unable to render one. Propositions that are partly false and partly true are of this type: for in the case of these it is possible by withdrawing a part to leave the rest true. If, however, you formulate the proposition on the strength of many cases and he has no objection to bring, you may claim that he shall admit it: for a premiss is valid in dialectics which thus holds in several instances and to which no objection is forthcoming.
Whenever it is possible to reason to the same conclusion either through or without a reduction per impossibile, if one is demonstrating and not arguing dialectically it makes no difference which method of reasoning be adopted, but in argument with another reasoning per impossibile should be avoided. For where one has reasoned without the reduction per impossibile, no dispute can arise; if, on the other hand, one does reason to an impossible conclusion, unless its falsehood is too plainly manifest, people deny that it is impossible, so that the questioners do not get what they want.
One should put forward all propositions that hold true of several cases, and to which either no objection whatever appears or at least not any on the surface: for when people cannot see any case in which it is not so, they admit it for true.
The conclusion should not be put in the form of a question; if it be, and the man shakes his head, it looks as if the reasoning had failed. For often, even if it be not put as a question but advanced as a consequence, people deny it, and then those who do not see that it follows upon the previous admissions do not realize that those who deny it have been refuted: when, then, the one man merely asks it as a question without even saying that it so follows, and the other denies it, it looks altogether as if the reasoning had failed.
Not every universal question can form a dialectical proposition as ordinarily understood, e.g. ‘What is man?’ or ‘How many meanings has “the good”?’ For a dialectical premiss must be of a form to which it is possible to reply ‘Yes’ or ‘No’, whereas to the aforesaid it is not possible. For this reason questions of this kind are not dialectical unless the questioner himself draws distinctions or divisions before expressing them, e.g. ‘Good means this, or this, does it not?’ For questions of this sort are easily answered by a Yes or a No. Hence one should endeavour to formulate propositions of this kind in this form. It is at the same time also perhaps fair to ask the other man how many meanings of ‘the good’ there are, whenever you have yourself distinguished and formulated them, and he will not admit them at all.
Any one who keeps on asking one thing for a long time is a bad inquirer. For if he does so though the person questioned keeps on answering the questions, clearly he asks a large number of questions, or else asks the same question a large number of times: in the one case he merely babbles, in the other he fails to reason: for reasoning always consists of a small number of premisses. If, on the other hand, he does it because the person questioned does not answer the questions, he is at fault in not taking him to task or breaking off the discussion.
There are certain hypotheses upon which it is at once difficult to bring, and easy to stand up to, an argument. Such (e.g.) are those things which stand first and those which stand last in the order of nature. For the former require definition, while the latter have to be arrived at through many steps if one wishes to secure a continuous proof from first principles, or else all discussion about them wears the air of mere sophistry: for to prove anything is impossible unless one begins with the appropriate principles, and connects inference with inference till the last are reached. Now to define first principles is just what answerers do not care to do, nor do they pay any attention if the questioner makes a definition: and yet until it is clear what it is that is proposed, it is not easy to discuss it. This sort of thing happens particularly in the case of the first principles: for while the other propositions are shown through these, these cannot be shown through anything else: we are obliged to understand every item of that sort by a definition. The inferences, too, that lie too close to the first principle are hard to treat in argument: for it is not possible to bring many arguments in regard to them, because of the small number of those steps, between the conclusion and the principle, whereby the succeeding propositions have to be shown. The hardest, however, of all definitions to treat in argument are those that employ terms about which, in the first place, it is uncertain whether they are used in one sense or several, and, further, whether they are used literally or metaphorically by the definer. For because of their obscurity, it is impossible to argue upon such terms; and because of the impossibility of saying whether this obscurity is due to their being used metaphorically, it is impossible to refute them.
In general, it is safe to suppose that, whenever any problem proves intractable, it either needs definition or else bears either several senses, or a metaphorical sense, or it is not far removed from the first principles; or else the reason is that we have yet to discover in the first place just this-in which of the aforesaid directions the source of our difficulty lies: when we have made this clear, then obviously our business must be either to define or to distinguish, or to supply the intermediate premisses: for it is through these that the final conclusions are shown.
It often happens that a difficulty is found in discussing or arguing a given position because the definition has not been correctly rendered: e.g. ‘Has one thing one contrary or many?’: here when the term ‘contraries’ has been properly defined, it is easy to bring people to see whether it is possible for the same thing to have several contraries or not: in the same way also with other terms requiring definition. It appears also in mathematics that the difficulty in using a figure is sometimes due to a defect in definition; e.g. in proving that the line which cuts the plane parallel to one side divides similarly both the line which it cuts and the area; whereas if the definition be given, the fact asserted becomes immediately clear: for the areas have the same fraction subtracted from them as have the sides: and this is the definition of ‘the same ratio’. The most primary of the elementary principles are without exception very easy to show, if the definitions involved, e.g. the nature of a line or of a circle, be laid down; only the arguments that can be brought in regard to each of them are not many, because there are not many intermediate steps. If, on the other hand, the definition of the starting-points be not laid down, to show them is difficult and may even prove quite impossible. The case of the significance of verbal expressions is like that of these mathematical conceptions.
One may be sure then, whenever a position is hard to discuss, that one or other of the aforesaid things has happened to it. Whenever, on the other hand, it is a harder task to argue to the point claimed, i.e. the premiss, than to the resulting position, a doubt may arise whether such claims should be admitted or not: for if a man is going to refuse to admit it and claim that you shall argue to it as well, he will be giving the signal for a harder undertaking than was originally proposed: if, on the other hand, he grants it, he will be giving the original thesis credence on the strength of what is less credible than itself. If, then, it is essential not to enhance the difficulty of the problem, he had better grant it; if, on the other hand, it be essential to reason through premisses that are better assured, he had better refuse. In other words, in serious inquiry he ought not to grant it, unless he be more sure about it than about the conclusion; whereas in a dialectical exercise he may do so if he is merely satisfied of its truth. Clearly, then, the circumstances under which such admissions should be claimed are different for a mere questioner and for a serious teacher.
As to the formulation, then, and arrangement of one’s questions, about enough has been said.
With regard to the giving of answers, we must first define what is the business of a good answerer, as of a good questioner. The business of the questioner is so to develop the argument as to make the answerer utter the most extrvagant paradoxes that necessarily follow because of his position: while that of the answerer is to make it appear that it is not he who is responsible for the absurdity or paradox, but only his position: for one may, perhaps, distinguish between the mistake of taking up a wrong position to start with, and that of not maintaining it properly, when once taken up.
Inasmuch as no rules are laid down for those who argue for the sake of training and of examination:-and the aim of those engaged in teaching or learning is quite different from that of those engaged in a competition; as is the latter from that of those who discuss things together in the spirit of inquiry: for a learner should always state what he thinks: for no one is even trying to teach him what is false; whereas in a competition the business of the questioner is to appear by all means to produce an effect upon the other, while that of the answerer is to appear unaffected by him; on the other hand, in an assembly of disputants discussing in the spirit not of a competition but of an examination and inquiry, there are as yet no articulate rules about what the answerer should aim at, and what kind of things he should and should not grant for the correct or incorrect defence of his position:-inasmuch, then, as we have no tradition bequeathed to us by others, let us try to say something upon the matter for ourselves.
The thesis laid down by the answerer before facing the questioner’s argument is bound of necessity to be one that is either generally accepted or generally rejected or else is neither: and moreover is so accepted or rejected either absolutely or else with a restriction, e.g. by some given person, by the speaker or by some one else. The manner, however, of its acceptance or rejection, whatever it be, makes no difference: for the right way to answer, i.e. to admit or to refuse to admit what has been asked, will be the same in either case. If, then, the statement laid down by the answerer be generally rejected, the conclusion aimed at by the questioner is bound to be one generally accepted, whereas if the former be generally accepted, the latter is generally rejected: for the conclusion which the questioner tries to draw is always the opposite of the statement laid down. If, on the other hand, what is laid down is generally neither rejected nor accepted, the conclusion will be of the same type as well. Now since a man who reasons correctly demonstrates his proposed conclusion from premisses that are more generally accepted, and more familiar, it is clear that (1) where the view laid down by him is one that generally is absolutely rejected, the answerer ought not to grant either what is thus absolutely not accepted at all, or what is accepted indeed, but accepted less generally than the questioner’s conclusion. For if the statement laid down by the answerer be generally rejected, the conclusion aimed at by the questioner will be one that is generally accepted, so that the premisses secured by the questioner should all be views generally accepted, and more generally accepted than his proposed conclusion, if the less familiar is to be inferred through the more familiar. Consequently, if any of the questions put to him be not of this character, the answerer should not grant them. (2) If, on the other hand, the statement laid down by the answerer be generally accepted without qualification, clearly the conclusion sought by the questioner will be one generally rejected without qualification. Accordingly, the answerer should admit all views that are generally accepted and, of those that are not generally accepted, all that are less generally rejected than the conclusion sought by the questioner. For then he will probably be thought to have argued sufficiently well. (3) Likewise, too, if the statement laid down by the answerer be neither rejected generally nor generally accepted; for then, too, anything that appears to be true should be granted, and, of the views not generally accepted, any that are more generally accepted than the questioner’s conclusion; for in that case the result will be that the arguments will be more generally accepted. If, then, the view laid down by the answerer be one that is generally accepted or rejected without qualification, then the views that are accepted absolutely must be taken as the standard of comparison: whereas if the view laid down be one that is not generally accepted or rejected, but only by the answerer, then the standard whereby the latter must judge what is generally accepted or not, and must grant or refuse to grant the point asked, is himself. If, again, the answerer be defending some one else’s opinion, then clearly it will be the latter’s judgement to which he must have regard in granting or denying the various points. This is why those, too, who introduce other’s opinions, e.g. that ‘good and evil are the same thing, as Heraclitus says,’ refuse to admit the impossibility of contraries belonging at the same time to the same thing; not because they do not themselves believe this, but because on Heraclitus’ principles one has to say so. The same thing is done also by those who take on the defence of one another’s positions; their aim being to speak as would the man who stated the position.
It is clear, then, what the aims of the answerer should be, whether the position he lays down be a view generally accepted without qualification or accepted by some definite person. Now every question asked is bound to involve some view that is either generally held or generally rejected or neither, and is also bound to be either relevant to the argument or irrelevant: if then it be a view generally accepted and irrelevant, the answerer should grant it and remark that it is the accepted view: if it be a view not generally accepted and irrelevant, he should grant it but add a comment that it is not generally accepted, in order to avoid the appearance of being a simpleton. If it be relevant and also be generally accepted, he should admit that it is the view generally accepted but say that it lies too close to the original proposition, and that if it be granted the problem proposed collapses. If what is claimed by the questioner be relevant but too generally rejected, the answerer, while admitting that if it be granted the conclusion sought follows, should yet protest that the proposition is too absurd to be admitted. Suppose, again, it be a view that is neither rejected generally nor generally accepted, then, if it be irrelevant to the argument, it may be granted without restriction; if, however, it be relevant, the answerer should add the comment that, if it be granted, the original problem collapses. For then the answerer will not be held to be personally accountable for what happens to him, if he grants the several points with his eyes open, and also the questioner will be able to draw his inference, seeing that all the premisses that are more generally accepted than the conclusion are granted him. Those who try to draw an inference from premisses more generally rejected than the conclusion clearly do not reason correctly: hence, when men ask these things, they ought not to be granted.
The questioner should be met in a like manner also in the case of terms used obscurely, i.e. in several senses. For the answerer, if he does not understand, is always permitted to say ‘I do not understand’: he is not compelled to reply ‘Yes’ or ‘No’ to a question which may mean different things. Clearly, then, in the first place, if what is said be not clear, he ought not to hesitate to say that he does not understand it; for often people encounter some difficulty from assenting to questions that are not clearly put. If he understands the question and yet it covers many senses, then supposing what it says to be universally true or false, he should give it an unqualified assent or denial: if, on the other hand, it be partly true and partly false, he should add a comment that it bears different senses, and also that in one it is true, in the other false: for if he leave this distinction till later, it becomes uncertain whether originally as well he perceived the ambiguity or not. If he does not foresee the ambiguity, but assents to the question having in view the one sense of the words, then, if the questioner takes it in the other sense, he should say, ‘That was not what I had in view when I admitted it; I meant the other sense’: for if a term or expression covers more than one thing, it is easy to disagree. If, however, the question is both clear and simple, he should answer either ‘Yes’ or ‘No’.
A premiss in reasoning always either is one of the constituent elements in the reasoning, or else goes to establish one of these: (and you can always tell when it is secured in order to establish something else by the fact of a number of similar questions being put: for as a rule people secure their universal by means either of induction or of likeness):-accordingly the particular propositions should all be admitted, if they are true and generally held. On the other hand, against the universal one should try to bring some negative instance; for to bring the argument to a standstill without a negative instance, either real or apparent, shows ill-temper. If, then, a man refuses to grant the universal when supported by many instances, although he has no negative instance to show, he obviously shows ill-temper. If, moreover, he cannot even attempt a counter-proof that it is not true, far more likely is he to be thought ill-tempered-although even counter-proof is not enough: for we often hear arguments that are contrary to common opinions, whose solution is yet difficult, e.g. the argument of Zeno that it is impossible to move or to traverse the stadium;-but still, this is no reason for omitting to assert the opposites of these views. If, then, a man refuses to admit the proposition without having either a negative instance or some counter-argument to bring against it, clearly he is ill-tempered: for ill-temper in argument consists in answering in ways other than the above, so as to wreck the reasoning.
Before maintaining either a thesis or a definition the answerer should try his hand at attacking it by himself; for clearly his business is to oppose those positions from which questioners demolish what he has laid down.
He should beware of maintaining a hypothesis that is generally rejected: and this it may be in two ways: for it may be one which results in absurd statements, e.g. suppose any one were to say that everything is in motion or that nothing is; and also there are all those which only a bad character would choose, and which are implicitly opposed to men’s wishes, e.g. that pleasure is the good, and that to do injustice is better than to suffer it. For people then hate him, supposing him to maintain them not for the sake of argument but because he really thinks them.