mathpix-markdown-it 1.0.78 → 1.0.80

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.
Files changed (38) hide show
  1. package/.idea/workspace.xml +412 -383
  2. package/README.md +18 -0
  3. package/assets/mmd-image-properties.webp +0 -0
  4. package/es5/bundle.js +1 -1
  5. package/es5/index.js +1 -1
  6. package/lib/components/mathpix-markdown/index.js +6 -2
  7. package/lib/components/mathpix-markdown/index.js.map +1 -1
  8. package/lib/markdown/index.js +6 -2
  9. package/lib/markdown/index.js.map +1 -1
  10. package/lib/markdown/mathpix-markdown-plugins.js +9 -4
  11. package/lib/markdown/mathpix-markdown-plugins.js.map +1 -1
  12. package/lib/markdown/md-block-rule/begin-table.js +55 -10
  13. package/lib/markdown/md-block-rule/begin-table.js.map +1 -1
  14. package/lib/markdown/md-block-rule/begin-tabular/index.d.ts +1 -1
  15. package/lib/markdown/md-block-rule/begin-tabular/index.js +22 -5
  16. package/lib/markdown/md-block-rule/begin-tabular/index.js.map +1 -1
  17. package/lib/markdown/md-inline-rule/image.d.ts +11 -0
  18. package/lib/markdown/md-inline-rule/image.js +337 -0
  19. package/lib/markdown/md-inline-rule/image.js.map +1 -0
  20. package/lib/markdown/md-inline-rule/includegraphics.js +6 -0
  21. package/lib/markdown/md-inline-rule/includegraphics.js.map +1 -1
  22. package/lib/markdown/md-inline-rule/tabular.js +4 -0
  23. package/lib/markdown/md-inline-rule/tabular.js.map +1 -1
  24. package/lib/markdown/md-renderer-rules/index.d.ts +1 -1
  25. package/lib/markdown/md-renderer-rules/index.js +8 -5
  26. package/lib/markdown/md-renderer-rules/index.js.map +1 -1
  27. package/lib/markdown/mdPluginRaw.js +7 -1
  28. package/lib/markdown/mdPluginRaw.js.map +1 -1
  29. package/lib/markdown/mdPluginTableTabular.js +1 -1
  30. package/lib/markdown/mdPluginTableTabular.js.map +1 -1
  31. package/lib/markdown/rules.js +11 -1
  32. package/lib/markdown/rules.js.map +1 -1
  33. package/lib/mathpix-markdown-model/index.d.ts +8 -0
  34. package/lib/mathpix-markdown-model/index.js +6 -2
  35. package/lib/mathpix-markdown-model/index.js.map +1 -1
  36. package/lib/styles/index.js +1 -1
  37. package/lib/styles/index.js.map +1 -1
  38. package/package.json +1 -1
package/README.md CHANGED
@@ -48,6 +48,16 @@ Mathpix Markdown addresses these limitations by adding support for the following
48
48
  OC(=O)c1cc(Cl)cs1
49
49
  ```
50
50
  ~~~
51
+ - images (Markdown). Parse and render additional parameters such as width, height, alignment:
52
+ ~~~
53
+ ![foo](foo.png){ width=50% }
54
+ ![foo](foo.png){ width="36px" }
55
+ ![image](<src> "title"){width="20px",height="20px"}
56
+ ![image](<src> "title"){width="20px",height="20px",right}
57
+ ![image](<src> "title"){width="20px",height="20px", align="left"}
58
+ ~~~
59
+ ![Image properties](assets/mmd-image-properties.webp)
60
+
51
61
 
52
62
  # What is mathpix-markdown-it?
53
63
 
@@ -676,6 +686,10 @@ The `MathpixMarkdown` React element accepts the following props:
676
686
  | `accessibility` | [TAccessibility](https://github.com/Mathpix/mathpix-markdown-it#taccessibility);*`{}`* | Sets options to accessibility |
677
687
  | `nonumbers` | boolean;*`false`* | Sets options to prevent equations, tables, figure from being numbered |
678
688
  | `showPageBreaks` | boolean;*`false`* | Hidden tags will be shown in html like page break |
689
+ | `centerImages` | boolean;*`true`* | Center align images by default |
690
+ | `centerTables` | boolean;*`true`* | Center align tables by default |
691
+ | `validateLink` | function;*`null`* | The function `(url: string) => void` to override md link validator |
692
+ | `enableCodeBlockRuleForLatexCommands`| boolean;*`false`* | By default, if latex commands are indented (4 spaces / 1 tab) they do not become `Code Blocks`. |
679
693
 
680
694
  ### optionsMathpixMarkdown
681
695
 
@@ -700,6 +714,10 @@ The `MathpixMarkdown` React element accepts the following props:
700
714
  | `smiles` | [ISmilesOptions](https://github.com/Mathpix/mathpix-markdown-it#ismilesoptions);*`{}`* | Sets options to output chemistry equation |
701
715
  | `nonumbers` | boolean;*`false`* | Sets options to prevent equations, tables, figure from being numbered |
702
716
  | `showPageBreaks` | boolean;*`false`* | Hidden tags will be shown in html like page break |
717
+ | `centerImages` | boolean;*`true`* | Center align images by default |
718
+ | `centerTables` | boolean;*`true`* | Center align tables by default |
719
+ | `validateLink` | function;*`null`* | The function `(url: string) => void` to override md link validator |
720
+ | `enableCodeBlockRuleForLatexCommands`| boolean;*`false`* | By default, if latex commands are indented (4 spaces / 1 tab) they do not become `Code Blocks`. |
703
721
 
704
722
  ### TOutputMath
705
723
 
Binary file