Alignment of equations with multiple fonts in table

Hello,

I am creating a table which contains equations in the cells. For example, I am using the following code to create an equation which is then populated into the table cell. 

var math = paragraph.AppendMath("\mathrm{Windward Coefficient}, ");

ReportFormatExtensions.ApplyCharacterFormat(math, "Arial", format.FontSize, format.TextColor, format.Bold);

math.MathParagraph.Justification = MathJustification.Left

math = paragraph.AppendMath("C_{x}");

ReportFormatExtensions.ApplyCharacterFormat(math, "Cambria Math", format.FontSize, format.TextColor, format.Bold);

math.MathParagraph.Justification = MathJustification.Left


Ideally, I would like both parts of the equation string to use Arial font, however when I apply it this way: 

var math = paragraph.AppendMath("\mathrm{Windward Coefficient}, C_{x}");

ReportFormatExtensions.ApplyCharacterFormat(math, "Arial", format.FontSize, format.TextColor, format.Bold);

math.MathParagraph.Justification = MathJustification.Left

the Cx does not show at all in the table. 


As a work around, I would like part of the equation string that is within \mathrm{ } to be formatted with Arial font, and then the rest of the equation to be Cambria Math. However, when i do this, the font is applied correctly, but the equation justification is not applied and the equation is shown at the center of the table cell. Is there a solution for this? 


Thanks. 


4 Replies

SR Sindhu Ramesh Syncfusion Team March 5, 2025 11:29 AM UTC

Hi Natalie,
We have reproduced the reported problem “MathJustification not preserved properly while appending continuous Math equation” in our end. We will validate this issue and update you with more details within two days.

Regards,
Sindhu Ramesh.



SR Sindhu Ramesh Syncfusion Team March 7, 2025 12:09 PM UTC

Natalie,
We have confirmed that the reported issue with “Justification is not preserved for math while continuously calling the 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 last week of March 2025.

The status of this bug can be tracked through the below link: 
Justification is not preserved for math while continuously calling the AppendMath API in ASP.NET Core | Feedback Portal

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.”



SA Sivakumar Alagusundharam Syncfusion Team March 26, 2025 05:46 PM UTC

Natalie, we regret not including the fix for the issue "Justification is not preserved for math while continuously calling the AppendMath API" as promised in the main release published on last week of March 2025. This fix will be included in the next weekly release which will be available on first week of April 2025 without further delay.

We apologize for any inconvenience this may have caused and appreciate your understanding.

The status of this bug can be tracked through the below link:
Justification is not preserved for math while continuously calling the AppendMath API in ASP.NET Core | Feedback Portal




SA Sivakumar Alagusundharam Syncfusion Team March 26, 2025 05:49 PM UTC

Natalie, we have prepared a custom NuGet with our fix. Kindly refer the attachment.


Attachment: syncfusion.docio.net.core.29.1.33_f7c05add.zip

Loader.
Up arrow icon