Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffreymaomao committed Aug 6, 2024
1 parent 4f9a8d8 commit 5257846
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 3 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2024 Chang-Mao Yang

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# <img src="src/img/TexField.light.png" width="40px" style="vertical-align:text-top"> TexField

**TexField** is a web application designed for creating and managing LaTeX notes on an infinitely large canvas. By leveraging [KaTeX](https://katex.org/) for LaTeX rendering, TexField enables fast and efficient display of mathematical formulas directly in your browser.


## Getting Started

**TexField** is an online application. To start using it, simply visit [![play](https://img.shields.io/badge/play-start-red.svg?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48cGF0aCBkPSJNMTI5IDExMWMtNTUgNC05MyA2Ni05MyA3OEwwIDM5OGMtMiA3MCAzNiA5MiA2OSA5MWgxYzc5IDAgODctNTcgMTMwLTEyOGgyMDFjNDMgNzEgNTAgMTI4IDEyOSAxMjhoMWMzMyAxIDcxLTIxIDY5LTkxbC0zNi0yMDljMC0xMi00MC03OC05OC03OGgtMTBjLTYzIDAtOTIgMzUtOTIgNDJIMjM2YzAtNy0yOS00Mi05Mi00MmgtMTV6IiBmaWxsPSIjZmZmIi8+PC9zdmc+)](https://jeffreymaomao.github.io/TexField/dist/)

## Usage / Shortcuts

| MathEditor Action | Shortcuts (mac OS) | Shortcuts (Windows) |
| :--------------------------- | :--------------------------: | :------------------------------------------: |
| Toggle Block Editing mode | <kbd>⌘</kbd> + <kbd>/</kbd> | <kbd>Ctrl</kbd> + <kbd>/</kbd> |
| Create New Block | <kbd>⌘</kbd> + <kbd>⏎</kbd> | <kbd>Ctrl</kbd> + <kbd>Enter</kbd> |
| Delete Foucs Block | <kbd>⌘</kbd> + <kbd>⌫</kbd> | <kbd>Ctrl</kbd> + <kbd>Backspace</kbd> |
| Change Focus Block Up / Down | <kbd>↑</kbd> or <kbd>↓</kbd> | <kbd>Up Arrow</kbd> or <kbd>Down Arrow</kbd> |
| Focus Block | Click | Click |

## Features

- **Infinite Canvas**: Interact with a canvas that expands indefinitely to manage and organize your LaTeX notes and diagrams.
- **KaTeX Integration**: Utilize KaTeX for efficient and accurate LaTeX rendering, supporting a wide range of mathematical notation.

## Technology Stack

![JavaScript](https://img.shields.io/badge/JavaScript-gray?style=plastic&logo=javascript) ![CSS](https://img.shields.io/badge/CSS-gray?style=plastic&logo=css3&logoColor=rgb(100,160,250)) ![HTML](https://img.shields.io/badge/HTML-gray?style=plastic&logo=html5&logoColor=rgb(250,150,100)) ![LaTeX](https://img.shields.io/badge/LaTeX-gray?style=plastic&logo=LaTeX)

## License

**TexField** is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.

## Contact

For any questions or feedback, feel free to reach out to us at [jeffrey0613mao@gmail.com](jeffrey0613mao@gmail.com).
2 changes: 1 addition & 1 deletion src/js/MathEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class MathEditor {
// ------------------------------------------------------------------------
} else if (e.key==='ArrowUp' || e.key==='ArrowDown') {
this.moveFocusUpDown(e, mathBlock);
} else if ((e.ctrlKey || e.metaKey) && e.key==='Enter') {
} else if ((e.ctrlKey || e.metaKey) && e.key==='Enter' && !e.shiftKey && !e.altKey) {
this.createEquationDom();
} else if ((e.ctrlKey || e.metaKey) && e.key==='Backspace' && !e.shiftKey && !e.altKey){
this.deleteFocus();
Expand Down
2 changes: 0 additions & 2 deletions src/js/TexField.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ class TexField {
const targetIsNote = targetClassList.contains('note')
const targetIsPath = targetClassList.contains('path');
const parentNoteDom = findParentWithSelector(e.target, '.note');


if (!parentNoteDom) {
// if not inside note => dragging canvas
Expand All @@ -250,7 +249,6 @@ class TexField {
if(!targetIsPath) this.focusNote = null;
return;
}


if (e.shiftKey && !this.drawingPath && !this.dom.drawingPath) {
// start to draw path
Expand Down

0 comments on commit 5257846

Please sign in to comment.