├── LICENSE.md ├── README.md ├── fonts.css ├── gulpfile.js ├── package.json ├── src ├── TikZJax.js ├── filesystem.json ├── index.js └── library.js └── webpack.config.js /LICENSE.md: -------------------------------------------------------------------------------- 1 | # The LaTeX Project Public License 2 | 3 | LPPL Version 1.3c 2008-05-04 4 | 5 | Copyright 1999 2002-2008 LaTeX3 Project 6 | Everyone is allowed to distribute verbatim copies of this 7 | license document, but modification of it is not allowed. 8 | 9 | 10 | ## PREAMBLE 11 | 12 | The LaTeX Project Public License (LPPL) is the primary license under 13 | which the LaTeX kernel and the base LaTeX packages are distributed. 14 | 15 | You may use this license for any work of which you hold the copyright 16 | and which you wish to distribute. This license may be particularly 17 | suitable if your work is TeX-related (such as a LaTeX package), but 18 | it is written in such a way that you can use it even if your work is 19 | unrelated to TeX. 20 | 21 | The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', 22 | below, gives instructions, examples, and recommendations for authors 23 | who are considering distributing their works under this license. 24 | 25 | This license gives conditions under which a work may be distributed 26 | and modified, as well as conditions under which modified versions of 27 | that work may be distributed. 28 | 29 | We, the LaTeX3 Project, believe that the conditions below give you 30 | the freedom to make and distribute modified versions of your work 31 | that conform with whatever technical specifications you wish while 32 | maintaining the availability, integrity, and reliability of 33 | that work. If you do not see how to achieve your goal while 34 | meeting these conditions, then read the document `cfgguide.tex' 35 | and `modguide.tex' in the base LaTeX distribution for suggestions. 36 | 37 | 38 | ## DEFINITIONS 39 | 40 | 41 | In this license document the following terms are used: 42 | 43 | `Work' 44 | Any work being distributed under this License. 45 | 46 | `Derived Work' 47 | Any work that under any applicable law is derived from the Work. 48 | 49 | `Modification' 50 | Any procedure that produces a Derived Work under any applicable 51 | law -- for example, the production of a file containing an 52 | original file associated with the Work or a significant portion of 53 | such a file, either verbatim or with modifications and/or 54 | translated into another language. 55 | 56 | `Modify' 57 | To apply any procedure that produces a Derived Work under any 58 | applicable law. 59 | 60 | `Distribution' 61 | Making copies of the Work available from one person to another, in 62 | whole or in part. Distribution includes (but is not limited to) 63 | making any electronic components of the Work accessible by 64 | file transfer protocols such as FTP or HTTP or by shared file 65 | systems such as Sun's Network File System (NFS). 66 | 67 | `Compiled Work' 68 | A version of the Work that has been processed into a form where it 69 | is directly usable on a computer system. This processing may 70 | include using installation facilities provided by the Work, 71 | transformations of the Work, copying of components of the Work, or 72 | other activities. Note that modification of any installation 73 | facilities provided by the Work constitutes modification of the Work. 74 | 75 | `Current Maintainer' 76 | A person or persons nominated as such within the Work. If there is 77 | no such explicit nomination then it is the `Copyright Holder' under 78 | any applicable law. 79 | 80 | `Base Interpreter' 81 | A program or process that is normally needed for running or 82 | interpreting a part or the whole of the Work. 83 | 84 | A Base Interpreter may depend on external components but these 85 | are not considered part of the Base Interpreter provided that each 86 | external component clearly identifies itself whenever it is used 87 | interactively. Unless explicitly specified when applying the 88 | license to the Work, the only applicable Base Interpreter is a 89 | `LaTeX-Format' or in the case of files belonging to the 90 | `LaTeX-format' a program implementing the `TeX language'. 91 | 92 | 93 | 94 | ## CONDITIONS ON DISTRIBUTION AND MODIFICATION 95 | 96 | 97 | 1. Activities other than distribution and/or modification of the Work 98 | are not covered by this license; they are outside its scope. In 99 | particular, the act of running the Work is not restricted and no 100 | requirements are made concerning any offers of support for the Work. 101 | 102 | 2. You may distribute a complete, unmodified copy of the Work as you 103 | received it. Distribution of only part of the Work is considered 104 | modification of the Work, and no right to distribute such a Derived 105 | Work may be assumed under the terms of this clause. 106 | 107 | 3. You may distribute a Compiled Work that has been generated from a 108 | complete, unmodified copy of the Work as distributed under Clause 2 109 | above, as long as that Compiled Work is distributed in such a way that 110 | the recipients may install the Compiled Work on their system exactly 111 | as it would have been installed if they generated a Compiled Work 112 | directly from the Work. 113 | 114 | 4. If you are the Current Maintainer of the Work, you may, without 115 | restriction, modify the Work, thus creating a Derived Work. You may 116 | also distribute the Derived Work without restriction, including 117 | Compiled Works generated from the Derived Work. Derived Works 118 | distributed in this manner by the Current Maintainer are considered to 119 | be updated versions of the Work. 120 | 121 | 5. If you are not the Current Maintainer of the Work, you may modify 122 | your copy of the Work, thus creating a Derived Work based on the Work, 123 | and compile this Derived Work, thus creating a Compiled Work based on 124 | the Derived Work. 125 | 126 | 6. If you are not the Current Maintainer of the Work, you may 127 | distribute a Derived Work provided the following conditions are met 128 | for every component of the Work unless that component clearly states 129 | in the copyright notice that it is exempt from that condition. Only 130 | the Current Maintainer is allowed to add such statements of exemption 131 | to a component of the Work. 132 | 133 | a. If a component of this Derived Work can be a direct replacement 134 | for a component of the Work when that component is used with the 135 | Base Interpreter, then, wherever this component of the Work 136 | identifies itself to the user when used interactively with that 137 | Base Interpreter, the replacement component of this Derived Work 138 | clearly and unambiguously identifies itself as a modified version 139 | of this component to the user when used interactively with that 140 | Base Interpreter. 141 | 142 | b. Every component of the Derived Work contains prominent notices 143 | detailing the nature of the changes to that component, or a 144 | prominent reference to another file that is distributed as part 145 | of the Derived Work and that contains a complete and accurate log 146 | of the changes. 147 | 148 | c. No information in the Derived Work implies that any persons, 149 | including (but not limited to) the authors of the original version 150 | of the Work, provide any support, including (but not limited to) 151 | the reporting and handling of errors, to recipients of the 152 | Derived Work unless those persons have stated explicitly that 153 | they do provide such support for the Derived Work. 154 | 155 | d. You distribute at least one of the following with the Derived Work: 156 | 157 | 1. A complete, unmodified copy of the Work; 158 | if your distribution of a modified component is made by 159 | offering access to copy the modified component from a 160 | designated place, then offering equivalent access to copy 161 | the Work from the same or some similar place meets this 162 | condition, even though third parties are not compelled to 163 | copy the Work along with the modified component; 164 | 165 | 2. Information that is sufficient to obtain a complete, 166 | unmodified copy of the Work. 167 | 168 | 7. If you are not the Current Maintainer of the Work, you may 169 | distribute a Compiled Work generated from a Derived Work, as long as 170 | the Derived Work is distributed to all recipients of the Compiled 171 | Work, and as long as the conditions of Clause 6, above, are met with 172 | regard to the Derived Work. 173 | 174 | 8. The conditions above are not intended to prohibit, and hence do not 175 | apply to, the modification, by any method, of any component so that it 176 | becomes identical to an updated version of that component of the Work as 177 | it is distributed by the Current Maintainer under Clause 4, above. 178 | 179 | 9. Distribution of the Work or any Derived Work in an alternative 180 | format, where the Work or that Derived Work (in whole or in part) is 181 | then produced by applying some process to that format, does not relax or 182 | nullify any sections of this license as they pertain to the results of 183 | applying that process. 184 | 185 | 10. a. A Derived Work may be distributed under a different license 186 | provided that license itself honors the conditions listed in 187 | Clause 6 above, in regard to the Work, though it does not have 188 | to honor the rest of the conditions in this license. 189 | 190 | b. If a Derived Work is distributed under a different license, that 191 | Derived Work must provide sufficient documentation as part of 192 | itself to allow each recipient of that Derived Work to honor the 193 | restrictions in Clause 6 above, concerning changes from the Work. 194 | 195 | 11. This license places no restrictions on works that are unrelated to 196 | the Work, nor does this license place any restrictions on aggregating 197 | such works with the Work by any means. 198 | 199 | 12. Nothing in this license is intended to, or may be used to, prevent 200 | complete compliance by all parties with all applicable laws. 201 | 202 | 203 | ## NO WARRANTY 204 | 205 | 206 | There is no warranty for the Work. Except when otherwise stated in 207 | writing, the Copyright Holder provides the Work `as is', without 208 | warranty of any kind, either expressed or implied, including, but not 209 | limited to, the implied warranties of merchantability and fitness for a 210 | particular purpose. The entire risk as to the quality and performance 211 | of the Work is with you. Should the Work prove defective, you assume 212 | the cost of all necessary servicing, repair, or correction. 213 | 214 | In no event unless required by applicable law or agreed to in writing 215 | will The Copyright Holder, or any author named in the components of the 216 | Work, or any other party who may distribute and/or modify the Work as 217 | permitted above, be liable to you for damages, including any general, 218 | special, incidental or consequential damages arising out of any use of 219 | the Work or out of inability to use the Work (including, but not limited 220 | to, loss of data, data being rendered inaccurate, or losses sustained by 221 | anyone as a result of any failure of the Work to operate with any other 222 | programs), even if the Copyright Holder or said author or said other 223 | party has been advised of the possibility of such damages. 224 | 225 | 226 | ## MAINTENANCE OF THE WORK 227 | 228 | 229 | The Work has the status `author-maintained' if the Copyright Holder 230 | explicitly and prominently states near the primary copyright notice in 231 | the Work that the Work can only be maintained by the Copyright Holder 232 | or simply that it is `author-maintained'. 233 | 234 | The Work has the status `maintained' if there is a Current Maintainer 235 | who has indicated in the Work that they are willing to receive error 236 | reports for the Work (for example, by supplying a valid e-mail 237 | address). It is not required for the Current Maintainer to acknowledge 238 | or act upon these error reports. 239 | 240 | The Work changes from status `maintained' to `unmaintained' if there 241 | is no Current Maintainer, or the person stated to be Current 242 | Maintainer of the work cannot be reached through the indicated means 243 | of communication for a period of six months, and there are no other 244 | significant signs of active maintenance. 245 | 246 | You can become the Current Maintainer of the Work by agreement with 247 | any existing Current Maintainer to take over this role. 248 | 249 | If the Work is unmaintained, you can become the Current Maintainer of 250 | the Work through the following steps: 251 | 252 | 1. Make a reasonable attempt to trace the Current Maintainer (and 253 | the Copyright Holder, if the two differ) through the means of 254 | an Internet or similar search. 255 | 256 | 2. If this search is successful, then enquire whether the Work 257 | is still maintained. 258 | 259 | a. If it is being maintained, then ask the Current Maintainer 260 | to update their communication data within one month. 261 | 262 | b. If the search is unsuccessful or no action to resume active 263 | maintenance is taken by the Current Maintainer, then announce 264 | within the pertinent community your intention to take over 265 | maintenance. (If the Work is a LaTeX work, this could be 266 | done, for example, by posting to comp.text.tex.) 267 | 268 | 3a. If the Current Maintainer is reachable and agrees to pass 269 | maintenance of the Work to you, then this takes effect 270 | immediately upon announcement. 271 | 272 | b. If the Current Maintainer is not reachable and the Copyright 273 | Holder agrees that maintenance of the Work be passed to you, 274 | then this takes effect immediately upon announcement. 275 | 276 | 4. If you make an `intention announcement' as described in 2b. above 277 | and after three months your intention is challenged neither by 278 | the Current Maintainer nor by the Copyright Holder nor by other 279 | people, then you may arrange for the Work to be changed so as 280 | to name you as the (new) Current Maintainer. 281 | 282 | 5. If the previously unreachable Current Maintainer becomes 283 | reachable once more within three months of a change completed 284 | under the terms of 3b) or 4), then that Current Maintainer must 285 | become or remain the Current Maintainer upon request provided 286 | they then update their communication data within one month. 287 | 288 | A change in the Current Maintainer does not, of itself, alter the fact 289 | that the Work is distributed under the LPPL license. 290 | 291 | If you become the Current Maintainer of the Work, you should 292 | immediately provide, within the Work, a prominent and unambiguous 293 | statement of your status as Current Maintainer. You should also 294 | announce your new status to the same pertinent community as 295 | in 2b) above. 296 | 297 | 298 | ## WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE 299 | 300 | 301 | This section contains important instructions, examples, and 302 | recommendations for authors who are considering distributing their 303 | works under this license. These authors are addressed as `you' in 304 | this section. 305 | 306 | ### Choosing This License or Another License 307 | 308 | If for any part of your work you want or need to use *distribution* 309 | conditions that differ significantly from those in this license, then 310 | do not refer to this license anywhere in your work but, instead, 311 | distribute your work under a different license. You may use the text 312 | of this license as a model for your own license, but your license 313 | should not refer to the LPPL or otherwise give the impression that 314 | your work is distributed under the LPPL. 315 | 316 | The document `modguide.tex' in the base LaTeX distribution explains 317 | the motivation behind the conditions of this license. It explains, 318 | for example, why distributing LaTeX under the GNU General Public 319 | License (GPL) was considered inappropriate. Even if your work is 320 | unrelated to LaTeX, the discussion in `modguide.tex' may still be 321 | relevant, and authors intending to distribute their works under any 322 | license are encouraged to read it. 323 | 324 | ### A Recommendation on Modification Without Distribution 325 | 326 | It is wise never to modify a component of the Work, even for your own 327 | personal use, without also meeting the above conditions for 328 | distributing the modified component. While you might intend that such 329 | modifications will never be distributed, often this will happen by 330 | accident -- you may forget that you have modified that component; or 331 | it may not occur to you when allowing others to access the modified 332 | version that you are thus distributing it and violating the conditions 333 | of this license in ways that could have legal implications and, worse, 334 | cause problems for the community. It is therefore usually in your 335 | best interest to keep your copy of the Work identical with the public 336 | one. Many works provide ways to control the behavior of that work 337 | without altering any of its licensed components. 338 | 339 | ### How to Use This License 340 | 341 | To use this license, place in each of the components of your work both 342 | an explicit copyright notice including your name and the year the work 343 | was authored and/or last substantially modified. Include also a 344 | statement that the distribution and/or modification of that 345 | component is constrained by the conditions in this license. 346 | 347 | Here is an example of such a notice and statement: 348 | 349 | %% pig.dtx 350 | %% Copyright 2005 M. Y. Name 351 | % 352 | % This work may be distributed and/or modified under the 353 | % conditions of the LaTeX Project Public License, either version 1.3 354 | % of this license or (at your option) any later version. 355 | % The latest version of this license is in 356 | % http://www.latex-project.org/lppl.txt 357 | % and version 1.3 or later is part of all distributions of LaTeX 358 | % version 2005/12/01 or later. 359 | % 360 | % This work has the LPPL maintenance status `maintained'. 361 | % 362 | % The Current Maintainer of this work is M. Y. Name. 363 | % 364 | % This work consists of the files pig.dtx and pig.ins 365 | % and the derived file pig.sty. 366 | 367 | Given such a notice and statement in a file, the conditions 368 | given in this license document would apply, with the `Work' referring 369 | to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being 370 | generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' 371 | referring to any `LaTeX-Format', and both `Copyright Holder' and 372 | `Current Maintainer' referring to the person `M. Y. Name'. 373 | 374 | If you do not want the Maintenance section of LPPL to apply to your 375 | Work, change `maintained' above into `author-maintained'. 376 | However, we recommend that you use `maintained', as the Maintenance 377 | section was added in order to ensure that your Work remains useful to 378 | the community even when you can no longer maintain and support it 379 | yourself. 380 | 381 | ### Derived Works That Are Not Replacements 382 | 383 | Several clauses of the LPPL specify means to provide reliability and 384 | stability for the user community. They therefore concern themselves 385 | with the case that a Derived Work is intended to be used as a 386 | (compatible or incompatible) replacement of the original Work. If 387 | this is not the case (e.g., if a few lines of code are reused for a 388 | completely different task), then clauses 6b and 6d shall not apply. 389 | 390 | 391 | ### Important Recommendations 392 | 393 | Defining What Constitutes the Work 394 | 395 | The LPPL requires that distributions of the Work contain all the 396 | files of the Work. It is therefore important that you provide a 397 | way for the licensee to determine which files constitute the Work. 398 | This could, for example, be achieved by explicitly listing all the 399 | files of the Work near the copyright notice of each file or by 400 | using a line such as: 401 | 402 | % This work consists of all files listed in manifest.txt. 403 | 404 | in that place. In the absence of an unequivocal list it might be 405 | impossible for the licensee to determine what is considered by you 406 | to comprise the Work and, in such a case, the licensee would be 407 | entitled to make reasonable conjectures as to which files comprise 408 | the Work. 409 | 410 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TikZJax 2 | 3 | TikZJax converts `script` tags (containing TikZ code) into SVGs. 4 | 5 | See a static demo at http://tikzjax.com/ 6 | 7 | There is a live demo at https://tikzjax-demo.glitch.me/ thanks to [@christianp](https://github.com/christianp). 8 | 9 | ## Example 10 | 11 | In the `
` of your HTML, include 12 | ```html 13 | 14 | 15 | ``` 16 | Then in the ``, include TikZ code such as 17 | ```html 18 | 23 | ``` 24 | 25 | Your TikZ will be compiled into SVGs; the `