Comments (5)
Short answer - no. AsciiMath doesn't attempt to handle layout issues in general - those are better handled by the surrounding HTML.
from asciimathml.
Short answer - no. AsciiMath doesn't attempt to handle layout issues in general - those are better handled by the surrounding HTML.
No matter what we might think of where this is better handled, it is unfortunately academic for a user that must deal with long equations that will be clipped without an alternative. MathJax does not automatically reflow equations by breaking them, as you suggest they should. But it does accommodate manual breaks when issued say using Tex syntax instead of AsciiMath.
So question restated; why would AsciiMath at least not offer a similar line breaking support to help users in absence of any other solution?
Pretending such support could/should/might exist elsewhere has not shown to be that productive 4 years on...
from asciimathml.
from asciimathml.
If there was going to be a separate delimiter that invoked an equivalent of tex's display mode, that would probably need to be in Mathjax, not Asciimath. Asciimath just handles the generation of MathML.
from asciimathml.
If you are using MathJax to manage the input and output, then you can configure MathJax to allow two different delimiters for AsciiMath, one for in-line and one for display mode. I provided this anwser to a similar question in the MathJax User's Forum some years ago:
<!DOCTYPE html>
<html>
<head>
<title>Add Inline/Display Control to AsciiMath</title>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
asciimath2jax: {delimiters: [['`','`'],['``','``']]},
AsciiMath: {displaystyle: false}
});
MathJax.Hub.Register.LoadHook("[MathJax]/extensions/asciimath2jax.js",function () {
var AM = MathJax.Extension.asciimath2jax,
CREATEPATTERNS = AM.createPatterns;
AM.createPatterns = function () {
var result = CREATEPATTERNS.call(this);
this.match['``'].mode = ";mode=display";
return result;
};
});
MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready",function () {
var AM = MathJax.InputJax.AsciiMath;
AM.postfilterHooks.Add(function (data) {
if (data.script.type.match(/;mode=display/))
{data.math.root.display = "block"}
return data;
});
});
</script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=AM_HTMLorMML"></script>
</head>
<body>
<p>Inline AsciiMath: `sum_{n=1}^10 n^2 = 55`</p>
<p>Display AsciiMath: ``sum_{n=1}^10 n^2 = 55``</p>
</body>
</html>
The result is:
from asciimathml.
Related Issues (20)
- Inconsistent whitespace sensitivity with numbers HOT 3
- Test environment 'collapses' multiple kinds of whitespace into one HOT 1
- Support more geometry symbols HOT 1
- Support physical units HOT 2
- Vec() crashes updater HOT 1
- An exception occurs when using parseMath!The attribute "mathvariant" is incorrect! HOT 1
- TextMate grammar
- Add ≢ HOT 2
- Support for \mathscr.
- Formal grammar is incomplete
- Add support for ⊈
- support for mathjax 3 HOT 1
- Make comma `,` escapable without making it a text `","` HOT 2
- Please add `∼` (tilde operator) and `≁` (not tilde) HOT 2
- Thousands separator not documented HOT 2
- AsciiMath render intermittently not triggering in dropdown menu on iOS Safari HOT 1
- MathML-Core support shipped by default in chromium 109 HOT 2
- Convert asciimath JavaScript output to PDF
- Fraction bars aren't rendered as text HOT 2
- hyperlinks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciimathml.