mathpix-markdown-it 1.0.83 → 1.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/vcs.xml +1 -0
- package/.idea/workspace.xml +588 -455
- package/README.md +2 -2
- package/doc/images/sections/section_01.png +0 -0
- package/doc/images/sections/section_02.png +0 -0
- package/doc/images/sections/section_03.png +0 -0
- package/doc/images/sections/section_04.png +0 -0
- package/doc/sections.md +103 -0
- package/es5/bundle.js +1 -1
- package/es5/context-menu.js +1 -1
- package/es5/index.js +1 -1
- package/lib/contex-menu/index.js +8 -8
- package/lib/contex-menu/index.js.map +1 -1
- package/lib/contex-menu/menu/consts.d.ts +6 -1
- package/lib/contex-menu/menu/consts.js +15 -2
- package/lib/contex-menu/menu/consts.js.map +1 -1
- package/lib/contex-menu/menu/helper.d.ts +2 -1
- package/lib/contex-menu/menu/helper.js +25 -7
- package/lib/contex-menu/menu/helper.js.map +1 -1
- package/lib/contex-menu/menu/menu-item-actions.js +1 -1
- package/lib/contex-menu/menu/menu-item-actions.js.map +1 -1
- package/lib/contex-menu/menu/menu-item.js +12 -0
- package/lib/contex-menu/menu/menu-item.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/markdown/common/consts.d.ts +11 -0
- package/lib/markdown/common/consts.js +12 -1
- package/lib/markdown/common/consts.js.map +1 -1
- package/lib/markdown/common/tsv.js +4 -2
- package/lib/markdown/common/tsv.js.map +1 -1
- package/lib/markdown/common.d.ts +30 -0
- package/lib/markdown/common.js +76 -1
- package/lib/markdown/common.js.map +1 -1
- package/lib/markdown/md-block-rule/begin-tabular/index.d.ts +1 -0
- package/lib/markdown/md-block-rule/begin-tabular/index.js +1 -0
- package/lib/markdown/md-block-rule/begin-tabular/index.js.map +1 -1
- package/lib/markdown/md-block-rule/begin-tabular/multi-column-row.js +23 -4
- package/lib/markdown/md-block-rule/begin-tabular/multi-column-row.js.map +1 -1
- package/lib/markdown/md-block-rule/begin-tabular/sub-math.d.ts +1 -1
- package/lib/markdown/md-block-rule/begin-tabular/sub-math.js +16 -7
- package/lib/markdown/md-block-rule/begin-tabular/sub-math.js.map +1 -1
- package/lib/markdown/md-block-rule/begin-tabular/tabular-td.js +2 -1
- package/lib/markdown/md-block-rule/begin-tabular/tabular-td.js.map +1 -1
- package/lib/markdown/md-inline-rule/setcounter-section.d.ts +6 -0
- package/lib/markdown/md-inline-rule/setcounter-section.js +47 -0
- package/lib/markdown/md-inline-rule/setcounter-section.js.map +1 -0
- package/lib/markdown/md-renderer-rules/render-tabular.js +1 -1
- package/lib/markdown/md-renderer-rules/render-tabular.js.map +1 -1
- package/lib/markdown/md-theorem/block-rule.js +23 -8
- package/lib/markdown/md-theorem/block-rule.js.map +1 -1
- package/lib/markdown/md-theorem/index.js +6 -2
- package/lib/markdown/md-theorem/index.js.map +1 -1
- package/lib/markdown/md-theorem/inline-rule.js +106 -53
- package/lib/markdown/md-theorem/inline-rule.js.map +1 -1
- package/lib/markdown/mdPluginRaw.js +42 -1
- package/lib/markdown/mdPluginRaw.js.map +1 -1
- package/lib/markdown/mdPluginTOC.d.ts +14 -0
- package/lib/markdown/mdPluginTOC.js +105 -96
- package/lib/markdown/mdPluginTOC.js.map +1 -1
- package/lib/markdown/mdPluginText.d.ts +7 -1
- package/lib/markdown/mdPluginText.js +248 -105
- package/lib/markdown/mdPluginText.js.map +1 -1
- package/lib/markdown/rules.js +6 -5
- package/lib/markdown/rules.js.map +1 -1
- package/lib/markdown/test.d.ts +0 -0
- package/lib/markdown/test.js +399 -0
- package/lib/markdown/test.js.map +1 -0
- package/lib/mathjax/helpers/array/ArrayConfiguration.d.ts +6 -0
- package/lib/mathjax/helpers/array/ArrayConfiguration.js +14 -0
- package/lib/mathjax/helpers/array/ArrayConfiguration.js.map +1 -0
- package/lib/mathjax/helpers/array/ArrayMappings.d.ts +1 -0
- package/lib/mathjax/helpers/array/ArrayMappings.js +12 -0
- package/lib/mathjax/helpers/array/ArrayMappings.js.map +1 -0
- package/lib/mathjax/helpers/array/ArrayMethods.d.ts +6 -0
- package/lib/mathjax/helpers/array/ArrayMethods.js +28 -0
- package/lib/mathjax/helpers/array/ArrayMethods.js.map +1 -0
- package/lib/mathjax/index.d.ts +2 -0
- package/lib/mathjax/index.js +45 -8
- package/lib/mathjax/index.js.map +1 -1
- package/lib/mathjax/mathjax.d.ts +4 -0
- package/lib/mathjax/mathjax.js +12 -0
- package/lib/mathjax/mathjax.js.map +1 -1
- package/lib/mathjax/serialized-ascii/handlers.d.ts +2 -0
- package/lib/mathjax/serialized-ascii/handlers.js +246 -48
- package/lib/mathjax/serialized-ascii/handlers.js.map +1 -1
- package/lib/mathjax/serialized-ascii/helperA.d.ts +46 -0
- package/lib/mathjax/serialized-ascii/helperA.js +135 -124
- package/lib/mathjax/serialized-ascii/helperA.js.map +1 -1
- package/lib/mathjax/serialized-ascii/index.d.ts +3 -0
- package/lib/mathjax/serialized-ascii/index.js +43 -5
- package/lib/mathjax/serialized-ascii/index.js.map +1 -1
- package/lib/mathpix-markdown-model/index.d.ts +2 -1
- package/lib/mathpix-markdown-model/index.js +6 -1
- package/lib/mathpix-markdown-model/index.js.map +1 -1
- package/lib/styles/index.js +1 -1
- package/lib/styles/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ Mathpix Markdown addresses these limitations by adding support for the following
|
|
|
41
41
|
- lists: unordered lists via `\begin{itemize} ... \end{itemize}` and ordered lists via `\begin{enumerate} ... \end{enumerate}`
|
|
42
42
|
- numbered and unnumbered equation enviornments `\begin{elem} ... \end{elem}` and `\begin{elem*} ... \end{elem*}` where elem=`equation|align|split|gather`
|
|
43
43
|
- equation, table, and figure references via `\label`, `\ref`, `\eqref`, `\tag`
|
|
44
|
-
- text formatting options `\title{...}`, `\author{...}`, `\begin{abstract}...\end{abstract}`, `\section{Section Title}`, `\subsection{Section Title}`, `\subsubsection{Section Title}`, `\textit{italicized text}`, `\textbf{bold text}`, `\url{link}`
|
|
44
|
+
- [text formatting options](doc/sections.md) `\title{...}`, `\author{...}`, `\begin{abstract}...\end{abstract}`, `\section{Section Title}`, `\subsection{Section Title}`, `\subsubsection{Section Title}`, `\textit{italicized text}`, `\textbf{bold text}`, `\url{link}`
|
|
45
45
|
- chemistry equation via `<smiles>OC(=O)c1cc(Cl)cs1</smiles>` or
|
|
46
46
|
~~~
|
|
47
47
|
```smiles
|
|
@@ -443,7 +443,7 @@ const parsed = MathpixMarkdownModel.parseMarkdownByHTML(html, false);
|
|
|
443
443
|
```js
|
|
444
444
|
[
|
|
445
445
|
{
|
|
446
|
-
type: '
|
|
446
|
+
type: 'html',
|
|
447
447
|
value: '<table>..</table>'
|
|
448
448
|
},
|
|
449
449
|
{
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/doc/sections.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Sections
|
|
2
|
+
|
|
3
|
+
## Basic example
|
|
4
|
+
|
|
5
|
+
Let’s begin with a basic example to demonstrate the `\section{section title}` command, which marks the beginning of a new section called section title. Section numbering is automatic and can be customized, or disabled.
|
|
6
|
+
|
|
7
|
+
```tex
|
|
8
|
+
\title{Sections and Chapters}
|
|
9
|
+
|
|
10
|
+
\section{Introduction}
|
|
11
|
+
|
|
12
|
+
This is the first section.
|
|
13
|
+
|
|
14
|
+
\section{Second Section}
|
|
15
|
+
This is the second section
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
This example produces the following output:
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
## Document sectioning
|
|
23
|
+
|
|
24
|
+
| levels | |
|
|
25
|
+
| :----: |:------------------------------|
|
|
26
|
+
|1 |`\section{section}` |
|
|
27
|
+
|2 |`\subsection{subsection}` |
|
|
28
|
+
|3 |`\subsubsection{subsubsection}`|
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## Numbered and unnumbered sections
|
|
32
|
+
|
|
33
|
+
To get an unnumbered chapter, section, subsection, etc. add an asterisk `(*)` at the end of the command, before the opening curly brace. These will not go into the table of contents. Here is our first example (above) but this time using `\section*` instead of `\section`:
|
|
34
|
+
|
|
35
|
+
```tex
|
|
36
|
+
\title{Sections and Chapters}
|
|
37
|
+
|
|
38
|
+
\section*{Introduction}
|
|
39
|
+
|
|
40
|
+
This is the first section.
|
|
41
|
+
|
|
42
|
+
\section*{Second Section}
|
|
43
|
+
This is the second section
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This example produces the following output:
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## Start section counter from specific number
|
|
52
|
+
|
|
53
|
+
`\setcounter{section}{number}`
|
|
54
|
+
Sets count for `section` to contain the value number.
|
|
55
|
+
|
|
56
|
+
- *Note:* number can be positive or negative.
|
|
57
|
+
|
|
58
|
+
```tex
|
|
59
|
+
\title{Sections and Chapters}
|
|
60
|
+
|
|
61
|
+
\setcounter{section}{7}
|
|
62
|
+
|
|
63
|
+
\section{Introduction}
|
|
64
|
+
|
|
65
|
+
This is the first section.
|
|
66
|
+
|
|
67
|
+
\setcounter{section}{0}
|
|
68
|
+
\section{Second Section}
|
|
69
|
+
This is the second section
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This example produces the following output:
|
|
73
|
+
|
|
74
|
+

|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
## Unnumbered sections in the table of contents
|
|
78
|
+
|
|
79
|
+
To add an unnumbered section to the table of contents, use the `\addcontentsline` command like this:
|
|
80
|
+
|
|
81
|
+
`\addcontentsline{toc}{section}{Title of the section}`
|
|
82
|
+
Here is an example using `\addcontentsline`:
|
|
83
|
+
|
|
84
|
+
```tex
|
|
85
|
+
[[toc]]
|
|
86
|
+
|
|
87
|
+
\title{Sections and Chapters}
|
|
88
|
+
|
|
89
|
+
\section{Introduction}
|
|
90
|
+
This is the first section (numbered).
|
|
91
|
+
|
|
92
|
+
\addcontentsline{toc}{section}{Unnumbered Section}
|
|
93
|
+
\section*{Unnumbered Section}
|
|
94
|
+
An unnumbered section
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
\section{Second section}
|
|
98
|
+
The second numbered section.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
This example produces the following output:
|
|
102
|
+
|
|
103
|
+

|