Comments (4)
Math mode is always on. There's nothing to enable.
When in quotes, backslashes \
must be escaped so the "\\
" should be "\\\\
".
That's why all the commands appear to have double backslashes (in reality they're all being "escaped").
from swiftmath.
You can manually force line breaks using math mode commands (e.g., \\ as in \text{Quadratic roots: }x = \\ \frac{-b \pm \sqrt{b^2-4ac}}{2a} to give
from swiftmath.
How do I enable math mode?
Here's a screenshot of my MathView configuration
![Screenshot 2023-09-12 at 14 23 09](https://private-user-images.githubusercontent.com/90724319/267327151-27521f1d-7605-42e8-a52a-6ed3b0b9c5e6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5ODk0NDAsIm5iZiI6MTcxOTk4OTE0MCwicGF0aCI6Ii85MDcyNDMxOS8yNjczMjcxNTEtMjc1MjFmMWQtNzYwNS00MmU4LWE1MmEtNmVkM2IwYjljNWU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAzVDA2NDU0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4N2VjYzdhMWEyYjZiNmQ3NmY2ZjM4ZTAyYjk4MWMyMDdmNDY0MDllMGM1NjRhODBiZjJiMzBjMWQ2YTJmMjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.cZ3GyveXkEt8JSGH-sUulRSvZkZhdEfFHe9GfbW-zRg)
Here's a screenshot of the Quadratic roots sample you provided used in my API
![Screenshot 2023-09-12 at 14 23 46](https://private-user-images.githubusercontent.com/90724319/267327407-ac02933e-7211-4228-9804-7ea700cdfb33.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5ODk0NDAsIm5iZiI6MTcxOTk4OTE0MCwicGF0aCI6Ii85MDcyNDMxOS8yNjczMjc0MDctYWMwMjkzM2UtNzIxMS00MjI4LTk4MDQtN2VhNzAwY2RmYjMzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAzVDA2NDU0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVkOGIyZWY3YzRjNmNiY2MxZDc3M2NkNDc4ZmFkMzQ1YjgxZDA4YWY1ZTk0MmQ5ZDE1MWE2ZWVmMmRkOGVkMTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.r_ErdvbstlLd5BLb1v3rNRu21bma-igFRdztdkry9E0)
However the result does not create a new line as illustrated by your example..
![Screenshot 2023-09-12 at 14 24 05](https://private-user-images.githubusercontent.com/90724319/267327597-b5a37ec5-d190-40b2-8d3b-40c770d6abaa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5ODk0NDAsIm5iZiI6MTcxOTk4OTE0MCwicGF0aCI6Ii85MDcyNDMxOS8yNjczMjc1OTctYjVhMzdlYzUtZDE5MC00MGIyLThkM2ItNDBjNzcwZDZhYmFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAzVDA2NDU0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFhMWY4MDhlNGU2ODA1N2JkZmI1NGFjNTEwYjBhZGVjZjg5YmY2OGE0OTE2MDVlNjFjNDRjMWI2ODdmN2ZmNmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.c9UQMemLg-oV3x0tCVACXxqrExwBW7Ky9uz_mzP9CyY)
Unless I am missing something or doing something incorrectly...
from swiftmath.
I managed to figure it out... instead of double slashes \\
which only creates a space in between for whatever reason
we need to use 4 slashes \\\\
to get a new line break.
Here's a gif of it in action:
from swiftmath.
Related Issues (13)
- \\newline Command not working on swiftUI IOS HOT 1
- Thread-safe exception HOT 2
- Swedish characters not rendering in \text{} HOT 3
- Colored text gets misaligned
- begin{align*} Cannot display HOT 1
- Curly-brace-enclosed comma does not remove unwanted space after comma
- How can i use other fonts ? HOT 2
- Support for MathJax Font HOT 2
- great performance! but how to render inline latex without losing plain text? HOT 1
- No difference between 'display' and 'text' HOT 2
- Crash!!! can you please check logs and fix it HOT 4
- MTFontManager manager is nil HOT 2
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 swiftmath.