KSS plugin package “kss.plugin.jsmath”
Installation and Setup
Read INSTALL.txt
Documentation
kss.plugin.jsmath enables the use of the jsMath library with KSS.
jsMath has its own markers for marking the beginning and end of the formulas in your text content. In addition, this component provides a KSS action, that needs to be executed on the nodes, within which you want the conversion to be enabled. This action will activate the conversion on the selected areas only.
For example the following rule activates conversion inside all nodes that are marked with the “mathcontent” CSS class:
.mathcontent:load {
action-client: jsmath-activate;
}
You can use this, for example, to enable seamless conversion of the view of any of your widgets. In Zope, you can activate this for certain fields of certain or all content types, with a properly choosen selector.
Since the conversion only affects the view results, the mechanism works all the same, independently if the field is edited as a text area input, or with an editor (like kupu). In the editor, you are able to edit the LaTeX markup directly.
Markup
jsMath offers more variants for marking your content, these are controllable by parameters on the action. According to defaults, putting the formula between the markers \( and \) works out of the box:
\( \textstyle \sqrt{x+2}\quad \underline 4\quad \overline{x+y}\quad x^{\underline n}\quad x^{\overline{m+n}} \quad \sqrt{x^2+\sqrt{\alpha}} \)
The markers only become active in the areas that you select with KSS.
Dynamic loading
jsMath has a mechanism for loading its large javascript dynamically, on demand. The package uses this mechanism combined with custom code that helps dynamic loading integrate with KSS.
The following javascript files:
/++resource++jsmath/jsMath.js /++resource++jsmath/plugins/tex2math.js
will be loaded dynamically, if you selected any conversion with KSS in your page. This will cause a little delay before the first conversion takes place but makes sure that the large javascript is only loaded when needed. The works seamlessly in practice, because the loading and the conversion takes place asynchronously and it does not block access to the page from the browser.
However, it is also possible to include these resources statically in the page header, as well. In this case the resources will be used at once and will not be loaded dynamically. You may choose this method, if you find it increases overall performance on your site.
Browser compatibility
jsMath is famous for working on all browsers including all the ones that are supported by KSS. However if you find that the plugin fails in your browser, please report the bug so that we can attempt to fix it.
Caveats
Since the conversion happens on client side, you will not be able to use the same mechanism to convert your pages to PDF, on the server side.
Download
Metadata
Release files for kss.plugin.jsmath 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kss.plugin.jsmath-1.0.2.tar.gz | 3.9 MB | Without provenance | Details for kss.plugin.jsmath-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kss.plugin.jsmath-1.0.2-py2.4.egg | Legacy Egg format | - | - | Details for kss.plugin.jsmath-1.0.2-py2.4.egg |
Total release size: 13.1 MB
Release files / kss.plugin.jsmath-1.0.2.tar.gz
| Download URL | kss.plugin.jsmath-1.0.2.tar.gz |
|---|---|
| Size | 3.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb99ac6526d0631a67eb0d6a6693c7be42b08a999a23cd68fa973f2f3e587242
|
|
BLAKE2b-256 checksum How to use checksums |
c450899693e665465867302efff13839c1563d602154ed99cce7da6e2c60258f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / kss.plugin.jsmath-1.0.2-py2.4.egg
| Download URL | kss.plugin.jsmath-1.0.2-py2.4.egg |
|---|---|
| Size | 9.2 MB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
1ce17785aa399654e78a04911aeeb8586cdfd3c9b7b11df4b3d5757c11f07cb8
|
|
BLAKE2b-256 checksum How to use checksums |
2a800d6b1dab40d171e2459f3fbba76683c475367eff9440e53e99193a9ae35f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for kss.plugin.jsmath 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.