Hello,
I would like to display the less than or equal to sign using LaTex notation. Currently, I am using @"\leq" which is not working. Other commands such as @"\geq" displays the correct greater than or equal sign and @\"ngtr" and @"\nleq" also work as expected.
is there a way to display the less than or equal to sign?
Thanks.
Hi Natalie,
To achieve your requirement of displaying less than and greater than related
symbols, you can refer to the LaTeX syntax tabulated below.
|
Symbol Name |
Character |
LaTeX syntax |
|
Greater |
> |
> |
|
Lesser |
< |
< |
|
Greater than or equal to |
≥ |
\geq |
|
Lesser than or equal to |
≤ |
\le |
|
Much greater than |
≫ |
\gg |
|
Much lesser than |
≪ |
\ll |
|
Not greater than or equal to |
|
\ngeq |
|
Not lesser than or equal to |
|
\nleq |
You can also refer to the following code snippet for appending the above
symbols.
|
WordDocument document = new WordDocument(); document.EnsureMinimal(); document.LastParagraph.AppendMath(@"a>b"); document.LastSection.AddParagraph().AppendMath(@"a<b"); document.LastSection.AddParagraph().AppendMath(@"a\geq b"); document.LastSection.AddParagraph().AppendMath(@"a\le b"); document.LastSection.AddParagraph().AppendMath(@"a\gg b"); document.LastSection.AddParagraph().AppendMath(@"a\ll b"); document.LastSection.AddParagraph().AppendMath(@"a\ngeq b"); document.LastSection.AddParagraph().AppendMath(@"a\nleq b"); document.Save("Output.docx"); |
We have also attached the output document for the above code snippet.
Regards,
Sneha.
Please see attached for the word file that is created when I copied and pasted your code and ran it.
The "ageq b" and "aleq b" code is not working. However, using "a\ngeq b" and "a \nleq b" displays the desired result.
Natalie, sorry for
the inconvenience. Please find the valid LaTeX syntax for displaying the lesser
than and greater than related symbols to use in DocIO from the below image.
Also please find the proper code snippet for the above mentioned LaTeX syntax.
Can you confirm the latex for the not greater than symbol?
According to this editor (https://editor.codecogs.com), \ngtr should produce the desired symbol but this is not the case, as seen in the attached program.
Natalie, please find the LaTeX for not greater than symbol below.
paragraph.AppendMath(@"-16.75 \ngt 0");
Refer to the below UG documentations for the LaTeX for the common
relational operators in DocIO.
https://help.syncfusion.com/file-formats/docio/supported-latex#common-relational-operators
Kindly refer to the below UG documentation for the supported symbols using
LaTeX in .NET Word library.
https://help.syncfusion.com/file-formats/docio/supported-latex