Align LaTex equation at equals sign or other specified character

Hello,

Is there a way to:

  1. determine the break point of a LaTex equation such that it is only broken if the whole equation cannot fit on one line? For instance, in standard LaTex formatting an "@" sign can be used to determine this break point. 
  2. align equations on multiple lines at the equals sign? 

something like this: 
x = 2y
   = 4

7 Replies 1 reply marked as answer

AA Akash Arul Syncfusion Team January 4, 2024 12:21 PM UTC

Hi Natalie,

The Word document is a flow document in which the contents will be preserved in a sequential manner. Each equation may be extended to various lines based on its content.

Word viewer/editor renders the contents of the equation line by line dynamically when opened for viewing or editing and this line wise rendered information will not be preserved in the document level as per the Word file format specification.

Whereas Essential DocIO is a non-UI component that provides a full-fledged document object model to manipulate the Word document contents.

Regarding: determine the break point of a LaTeX equation such that it is only broken if the whole equation cannot fit on one line?
Due to the above reason, it is not feasible to determine the break in the LaTeX equation.


Regarding: align equations on multiple lines at the equals sign?
Due to the above reason, it is not feasible to align the equation with “=” sign when creating using DocIO. For this, it is need to adjust the equation content manually in Word viewer (Microsoft Word application) as per desired format.

Regards,
Akash.



NW Natalie Westphal January 4, 2024 10:16 PM UTC

Hello,

I tried the Word viewer/editor via SFRichTextBoxAdv and using the SfRichTextRibbon and didn't see support for equations either directly or by opening a Word document. If that really is the case, then I am curious why that dictates the ability to programmatically generate equations with capability that Word already supports.


Thanks. 



AA Akash Arul Syncfusion Team January 5, 2024 01:06 PM UTC

Natalie, LaTeX equation is not supported in Syncfusion SFRichTextBoxAdv. In the previous update, we meant Word viewer as Microsoft Word application.



NW Natalie Westphal January 5, 2024 05:06 PM UTC

Understood. 

In word, if I add the following command into an equation box:

\eqarray{F_n&=a \cdot b@&=20 \cdot 2@&=20} 


the equation is broken into a new line at the "@" symbol and aligned at the "$" symbol, so the functionality does exist programatically in Word. Will you ever include this functionality when generating a word file via Essential DocIO? 


Please see attached word document for the example. 


Attachment: EquationAlign_b843f7b7.zip


AA Akash Arul Syncfusion Team January 8, 2024 10:19 AM UTC

Natalie, we have reproduced the reported problem “LaTeX equation with "@" symbol is not preserved properly in Word document” on our end. We will validate this issue and update you with more details on middle of this week.



SB Sneha Biju Syncfusion Team January 10, 2024 03:52 PM UTC

As of now Syncfusion DocIO do not have support for LaTeX to Math conversion of Equation Array. But we are considering this reported issue particularly “Equation Array is not preserved while creating equation using LaTeX by calling AppendMath API is a defect and we have logged a defect report. We will include the fix for this defect in our weekly NuGet release, which is estimated to be available on 23rd January 2024.

The status of this bug can be tracked through the below link:
https://www.syncfusion.com/feedback/49880/equation-array-is-not-preserved-while-creating-equation-using-latex-by-calling

Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.



SB Sneha Biju Syncfusion Team January 23, 2024 02:02 PM UTC

Natalie, as promised earlier, we have included the fix for the reported issue with “Equation Array is not preserved while creating equation using LaTeX by calling AppendMath API” in our latest weekly NuGet release (v24.1.47).

Please use the below link to download our latest weekly NuGet:
https://www.nuget.org/packages/Syncfusion.DocIO.Wpf/24.1.47

The status of this bug task can be tracked through the below link:
https://www.syncfusion.com/feedback/49880/equation-array-is-not-preserved-while-creating-equation-using-latex-by-calling

Note: We will include this fix in our 2023 Volume 4 SP release, which will be available in the end of January 2024.


Marked as answer
Loader.
Up arrow icon