mathlifier
Advanced tools
Comparing version
{ | ||
"name": "mathlifier", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"type": "module", | ||
@@ -34,3 +34,11 @@ "files": [ | ||
"temml": "^0.10.29" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/kelvinsjk/mathlifier.git", | ||
"directory": "packages/mathlifier" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/kelvinsjk/mathlifier/issues" | ||
} | ||
} |
@@ -8,3 +8,3 @@ # Mathlifier | ||
> Simpler way to render math | ||
> A simpler way to render math on the web | ||
@@ -46,9 +46,9 @@ A collection of tools to help render mathematics in HTML and MathML | ||
### Dynamic mathematical content via mathlifier | ||
### Mixing prose and math via mathlifier | ||
When working with dynamically generated mathematical content, we find ourselves | ||
calling the previous functions over and over. Markdown-like notation is also | ||
easier to handle vs HTML. Because of the potential ambiguity of Markdown leading | ||
to bugs, we use [Djot](https://djot.net/) syntax (which is very similar to | ||
markdown). | ||
When working with dynamically generated mathematical content interspersed with | ||
prose, we find ourselves calling the previous functions over and over. | ||
Markdown-like notation is also easier to handle vs HTML. Because of the | ||
potential ambiguity of Markdown leading to bugs, we use | ||
[Djot](https://djot.net/) syntax (which is very similar to markdown). | ||
@@ -65,7 +65,9 @@ Mathlifier provides the `mathlifier` tagged template function, which takes Djot | ||
Interpolation starts _math mode_ so ${x} = ${xVal} | ||
render "x=2" in math mode. | ||
renders "x=2" in math mode. | ||
_Display_ and _amsmath environment_ modes start with a $ before interpolation, | ||
spans multiple lines and ends with an empty line. | ||
Amsmath environments are automatically closed after they end. | ||
_Display_ and _amsmath environment_ modes start with | ||
an additional $ before interpolation. | ||
It spans multiple lines and ends with an empty line. | ||
Amsmath environments are automatically closed | ||
after they end. | ||
@@ -78,6 +80,10 @@ $${xVal}x^2 + x - 3 | ||
If we want to *prevent* math mode and do regular interpolation (ie text), prefix with an @ symbol, like this e@${x}cellent example. | ||
If we want to *prevent* math mode and do regular | ||
interpolation (ie text), prefix with an @ symbol, | ||
like this e@${x}cellent example. | ||
Regular static math will also be converted. For example, $x=2$ and $$y=3.$$ | ||
This means that regular dollar signs must be escaped, like \\$5. | ||
Regular static math will also be converted. | ||
For example, $x=2$ and $$y=3.$$ | ||
This means that regular dollar signs | ||
must be escaped, like \\$5. | ||
`; | ||
@@ -144,4 +150,4 @@ ``` | ||
The following functions, that were available but not documented, are removed in | ||
V2. | ||
The following functions, that were available in V1 but not documented, are | ||
removed in V2. | ||
@@ -154,4 +160,5 @@ - linebreak, newline, newParagraph | ||
attempt to have a single source code output to web and LaTeX. We have since | ||
achieved this goal by using Djot markup along with the new `mathlifier` tagged | ||
template function, so they are no longer necessary. | ||
achieved this goal by using Djot markup along with the new `mathlifier`, | ||
`mathlifierDj` and `mathlifierTex` tagged template functions, so they are no | ||
longer necessary. | ||
@@ -201,3 +208,3 @@ ### Upgrading to V2 | ||
more mobile-friendly. However, our original approach of using an inline-style | ||
makes it hard for the css Cascade to override for power users. | ||
makes it hard for css cascade overrides for power users. | ||
@@ -204,0 +211,0 @@ We recommend adding the following css rule to replicate the previous behavior. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
699108
0.05%14240
0.02%1
-50%221
3.27%0
-100%