Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

merge from original repo (master) #3

Merged
merged 2 commits into from
Aug 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

patreon: arnog
custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CCB2LY5M6SM5W&source=url
26 changes: 19 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,35 @@ assignees: ''

---

**Funding**
> If you're using MathLive consider donating to project development via [Patreon](https://patreon.com/arnog) (recurring donation) or [PayPal](https://www.paypal.me/arnogourdol) (one time donation).

> Issues submitted by funding partners are given higher priority.

> We welcome both individual and corporate sponsors. In addition to Patreon and PayPal, we can also accept short-term development contracts for specific features or maintenance of the project.


**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
[Steps to reproduce the behavior, for example:]
1. [Go to '...']
2. [Click on '....']
3. [Scroll down to '....']
4. [See error]

**Expected behavior**
A clear and concise description of what you expected to happen.
[A clear and concise description of what you expected to happen.]

[Is this a regression: did it use to work in a previous version?]

**Screenshots**
If applicable, add screenshots to help explain your problem.
[If applicable, add screenshots to help explain your problem.]

**Source Code**
[If applicable, provide a code sample demonstrating the issue. Use JSFiddle, CodePen or similar to provide a relevant snippet.]


**Environment**
- Device: [pc, mac, iPhone, Android...]
Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
loglevel="silent"
loglevel="warn"
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
language: node_js
node_js:
- lts/*
before_install:
- '[[ $(node -v) =~ ^v9.*$ ]] || npm install -g npm@latest' # skipped when using node 9
- npm install -g greenkeeper-lockfile
install:
- npm ci
- npm install
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload
cache:
directories:
- node_modules
Expand Down
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
## 0.30.1 (July 30, 2019)

### Features / Improvements
- Added Typescript type definition

## 0.30 (July 18, 2019)

### Non-backward compatible changes

- #157: Public APIs that don't start with `$` have been removed. If your code
used any of these APIs, add a `$` in front of their name. See #157 for the
complete list.

### Features / Improvements

- #231: `smartMode` now supports Greek (the language). Also, Greek localization.
- Don't display i-beam cursor over non-interactive content
- Use CSS class `.ML__smart-fence__close` to style closing smart fence
- Added speech support for text mode and units (contributed by @NSoiffer)

### Bug Fixes
- Fixed an issue where clicking past the end of the equation would select the
numerator or denominator if the last element was a fraction, instead of place
the cursor after the fraction (regression)
- Removed dependency on open-cli
- #220 Fixed an issue where tabbing out of a mathfield would break command mode and some functions
- #209, #214, #211 et. al. Improvements to SSML support and karaoke mode contributed by @NSoiffer
- #217 Fixed an issue with parentheses in numerator of fractions
- #212: Fix round-tripping of `\mathbb`
- #194: When using the virtual keyboard, interpolate `#@`
- Fixed an issue where "(" was incorrectly gobbled as argument to a fraction
- Fixed an issue where smartFence off was ignored
- #202: use numeric character references instead of named entities in MathML output



## 0.29.1 (May 19, 2019)

### Bug fixes
Expand Down
14 changes: 12 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# Contributing to MathLive

There are many ways you can get involved with MathLive. Contributing to
an open source project is fun and rewarding.
There are many ways you can get involved with MathLive. Contributing to an open source project is fun and rewarding.

## Funding

If you're using MathLive consider donating to project development via [Patreon](https://patreon.com/arnog) (recurring donation) or [PayPal](https://www.paypal.me/arnogourdol) (one time donation).

If you are using MathLive in your project, encourage the business partners in your organization to provide financial support of open source projects.

Funds go to general development, support, and infrastructure costs.

We welcome both individual and corporate sponsors. In addition to Patreon and PayPal, we can also accept short-term development contracts for specific features or maintenance of the project.


## Contributing Issues

Expand Down
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ Global changes :

MathLive is a JavaScript library to render and edit math.

- [x] Tex-quality typesetting
- [x] TeX-quality typesetting
- [x] Easy to use interface for math editing
- [x] Fast and small
- [x] Works great on desktop and on mobile devices thanks to an extensive set of virtual keyboards
- [x] Outputs **LaTeX**, **MathML** and **JSON** (Abstract Syntax Tree, MASTON)**
- [x] Outputs **LaTeX**, **MathML** and **JSON** (Abstract Syntax Tree, MASTON)
- [x] And it is easy to customize to your needs!

Try it at [mathlive.io](https://mathlive.io)
Expand Down Expand Up @@ -90,31 +90,31 @@ Try it at [mathlive.io](https://mathlive.io)
## How To Use MathLive


### To display math
You can use MathLive to simply render math equations by
### Displaying Math
Render math equations by
[adding a few lines to your web page](tutorials/USAGE_GUIDE.md).

```html
<!doctype html><html lang="en-US">
<head>
...
<link rel="stylesheet" href="https://unpkg.com/mathlive/dist/mathlive.core.css">
<link rel="stylesheet" href="https://unpkg.com/mathlive/dist/mathlive.css">
<script src="https://unpkg.com/mathlive"></script>
<link href="https://unpkg.com/mathlive/dist/mathlive.core.css" rel="stylesheet" >
<link href="https://unpkg.com/mathlive/dist/mathlive.css" rel="stylesheet" >
</head>
<body>
<h1>Euler's Identity</h1>
<p>$$e^{i\pi} + 1 = 0$$</p>

<script>
<script type='module'>
import MathLive from 'https://unpkg.com/mathlive/dist/mathlive.mjs';
MathLive.renderMathInDocument();
</script>
</body>
</html>
```


### To edit math
### Editing Math
You can also incorporate a “math field” to edit math just like you would edit
text. The MathLive APIs allow you to interact with the math field,
including extracting its content, inserting placeholders and more.
Expand All @@ -137,7 +137,7 @@ including extracting its content, inserting placeholders and more.
</html>
```

### More examples
### More Examples

More examples are available at https://mathlive.io/deploy/examples/

Expand All @@ -160,6 +160,9 @@ This will make a local build of MathLive, run a local HTTP server and open a pag

## How You Can Help

* Using MathLive in your project? Want to support the project ongoing maintenance?
Consider becoming a patron on [Patreon](https://patreon.com/arnog) or making a
donation with [PayPal](https://www.paypal.me/arnogourdol)
* Something wrong? Got ideas for new features? Write up an issue. Read about
[Contributing](CONTRIBUTING.md) and follow our [Code of Conduct](CODE_OF_CONDUCT.md)
* Want to use MathLive in your web page? The [Usage Guide](tutorials/USAGE_GUIDE.md)
Expand Down
2 changes: 1 addition & 1 deletion WELCOME.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 align="center">
<a href="https://mathlive.io">
<img style="max-width:100%" src="https://github.com/arnog/mathlive/blob/master/assets/logo-1024.jpg?raw=true">
<img style="max-width:100%" src="https://github.com/arnog/mathlive/blob/master/assets/logo.png?raw=true">
</a>
</h1>

Expand Down
Binary file removed assets/logo-1024.jpg
Binary file not shown.
Binary file removed assets/logo-240.jpg
Binary file not shown.
Binary file removed assets/logo-240.png
Binary file not shown.
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion css/mathlive.core.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
.ML__base {
display: inline-block;
position: relative;
cursor: text;
}

.ML__strut, .ML__strut--bottom {
Expand Down Expand Up @@ -171,7 +172,6 @@ body[theme="dark"] .ML__fieldcontainer {
line-height: 0;
padding: 2px;
width: 100%;
cursor: text;
}


Expand Down
6 changes: 6 additions & 0 deletions css/mathlive.less
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,12 @@
}


/* When using smartFence, the anticipated closing fence is displayed
with this style */
.ML__smart-fence__close {
opacity: .5;
}

/* The element that displays the keys as the user type them */
.ML__keystroke-caption {
visibility: hidden;
Expand Down
4 changes: 2 additions & 2 deletions dist/addons/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function spanToString(span, indent) {

if (span.style) {
for (var s in span.style) {
if (span.style.hasOwnProperty(s)) {
if (Object.prototype.hasOwnProperty.call(span.style, s)) {
result += indent + s + ':"';
result += span.style[s] + '",\n';
}
Expand Down Expand Up @@ -304,7 +304,7 @@ function spanToMarkup(span, indent) {

if (span.style) {
for (var s in span.style) {
if (span.style.hasOwnProperty(s)) {
if (Object.prototype.hasOwnProperty.call(span.style, s)) {
result += '&nbsp;<span class="styleprop">' + s + ':</span>';
result += '<span class="stylevalue"> ' + span.style[s] + '</span>;&nbsp;';
}
Expand Down
Loading