Skip to content

Commit

Permalink
Add \charge command to show the special-sheen char (U+069B)
Browse files Browse the repository at this point in the history
Bump version to 1.2.1
  • Loading branch information
OmarIthawi committed Apr 28, 2018
1 parent c932bff commit 3f72d38
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
6 changes: 6 additions & 0 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ The extension provides the following additional TeX commands to be typeset an Ar
* **Area of circle:** (and other stuff) `\Area` Translates to `A` and `م`
* **Arabic Zero:** `\zero` Renders the `صفر`in Arabic while printing normal `0` in English.
The former is usually preferred by the Arabic Math textbooks.
* **Charge Sheen Character:** `\charge` Renders the
[`ڛ` (Unicode U+069B)](https://www.compart.com/en/unicode/U+069B)
character in Arabic while printing `C` in English.

This sheen character is then replaced by a more appropriate Ruqa (رقعة) character, when using
the [modified Amiri font](https://github.com/OmarIthawi/amiri/releases).

- Bilingual commands, which prints the first argument on English pages and the second argument on Arabic pages.
Useful to to build bilingual equations for strings that the extension provides no explicit support to.
Expand Down
2 changes: 1 addition & 1 deletion dist/arabic.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions dist/unpacked/arabic.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,18 @@ MathJax.Hub.Register.StartupHook('HTML-CSS Jax Ready', function () {
});

MathJax.Extension.Arabic = {
version: '1.0.0',
version: '1.2.1',
config: MathJax.Hub.CombineConfig("Arabic", {
dict: {
// A macros to force English zero in both languages
'Zero': ['zero', 'Text', ['0', '\u0635\u0641\u0631']], // Better localized Zero
'Radius': ['radius', 'Text', ['r', '\u0646\u0642']], // Circle radius
'Area': ['Area', 'Text', ['A', '\u0645']] // Area of circles and other stuff
'Area': ['Area', 'Text', ['A', '\u0645']], // Area of circles and other stuff

// Used for special charge character in the modified Amiri font:
// - https://github.com/OmarIthawi/amiri/releases
// This only will work when activating that font.
'Charge': ['charge', 'TeX', ['C', '\\fliph{\\text{\u069b}}']],
},
identifiersMap: {
// Variable names
Expand Down
9 changes: 7 additions & 2 deletions src/tex.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
MathJax.Extension.Arabic = {
version: '1.0.0',
version: '1.2.1',
config: MathJax.Hub.CombineConfig("Arabic", {
dict: {
// A macros to force English zero in both languages
'Zero': ['zero', 'Text', ['0', 'صفر']], // Better localized Zero
'Radius': ['radius', 'Text', ['r', 'نق']], // Circle radius
'Area': ['Area', 'Text', ['A', 'م']] // Area of circles and other stuff
'Area': ['Area', 'Text', ['A', 'م']], // Area of circles and other stuff

// Used for special charge character in the modified Amiri font:
// - https://github.com/OmarIthawi/amiri/releases
// This only will work when activating that font.
'Charge': ['charge', 'TeX', ['C', '\\fliph{\\text{ڛ}}']],
},
identifiersMap: {
// Variable names
Expand Down
6 changes: 6 additions & 0 deletions testcases/testcases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,9 @@ equations:
hide_arabic: True
equation: >
\alwaysar{x=1} \, x=1
- id: "86"
name: "Charge Character"
note: "Renders the special-sheen character in Arabic"
equation: >
\charge = 1

0 comments on commit 3f72d38

Please sign in to comment.