Skip to content

Commit

Permalink
Added front matter to docs files
Browse files Browse the repository at this point in the history
  • Loading branch information
hrushikeshrv committed Jan 26, 2024
1 parent 4436b70 commit 1309600
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
16 changes: 15 additions & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,18 @@ theme: just-the-docs
url: https://hrushikeshrv.github.io/mjxgui

aux_links:
Repository: https://github.com/hrushikeshrv/mjxgui
"MJXGUI on GitHub": https://github.com/hrushikeshrv/mjxgui

enable_copy_code_button: true

callouts:
warning:
title: Warning
color: red
note:
title: Note
color: purple

ga_tracking: G-TGM5F6WJNV

favicon_ico: "media/favicon.png"
File renamed without changes.
6 changes: 6 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: default
title: API | MJXGUI Documentation
---

# API
10 changes: 9 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
layout: default
title: MJXGUI Documentation
---

# What is MJXGUI?
MJXGUI is a widget style application meant to give users a graphical interface for creating equations to use on the web. It uses MathJax as a core dependency and as an external renderer to show users a preview of their equation as they write it. Once users have created their equation, it generates corresponding LaTeX for it for you to handle however you would like, the most common use case being to store it as plain text, so you can use it later with MathJax.

Expand Down Expand Up @@ -49,7 +54,10 @@ Also include the stylesheet for MJXGUI. Make sure you include the stylesheet bef
# Usage
MJXGUI works by showing your users a button/element prompting them to insert an equation. MJXGUI attaches event listeners to these elements and shows the editor UI when they are clicked.

Once the user is done entering the equation/expression, the editor UI disappears and a callback function that you supply is run. This callback function has access to the full internal API, from which you can access the generated LaTeX for the expression the user just entered. Make sure the callback function you supply is not an arrow function but a regular function.
Once the user is done entering the equation/expression, the editor UI disappears and a callback function that you supply is run. This callback function is where you can access the generated LaTeX for the expression the user just entered and handle however you need. The most common use case is to store it as LaTeX and/or render it on your page using MathJax.

{: .note}
Make sure the callback function you supply is not an arrow function but a regular function.

Initialize MJXGUI by creating a new MJXGUI instance, which takes 3 parameters - a CSS selector, a callback function, and an options object.

Expand Down
Binary file added docs/media/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1309600

Please sign in to comment.