mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-15 07:48:29 -04:00
adds some more LaTeX symbol commands; see #844
This commit is contained in:
parent
f09f119eed
commit
c323593651
@ -22,6 +22,14 @@ public class Parser {
|
||||
COMMANDS.put("wedge", '∧');
|
||||
COMMANDS.put("vee", '∨');
|
||||
COMMANDS.put("neg", '¬');
|
||||
COMMANDS.put("oplus", '⊕');
|
||||
COMMANDS.put("odot", '⊙');
|
||||
COMMANDS.put("pm", '±');
|
||||
COMMANDS.put("mp", '∓');
|
||||
COMMANDS.put("div", '÷');
|
||||
COMMANDS.put("cdot", '·');
|
||||
COMMANDS.put("times", '×');
|
||||
COMMANDS.put("otimes", '⊗');
|
||||
}
|
||||
|
||||
private final String text;
|
||||
|
@ -48,6 +48,8 @@ public class ParserTest extends TestCase {
|
||||
|
||||
assertEquals("A=∑ b", new Parser("A=\\sum b").parse().toString());
|
||||
assertEquals("A=∑^{m}_{n=0}", new Parser("A=\\sum_{n=0}^m").parse().toString());
|
||||
assertEquals("Y=A⊕B", new Parser("Y=A\\oplus{}B").parse().toString());
|
||||
assertEquals("Y=A⊙B", new Parser("Y=A\\odot{}B").parse().toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user