Free Support Forum - aspose.com

LatexFragment not able to embed symbol in cell

I am using 18.7 version Aspose.PDF
I want to embed the symbol ‘F_max’ in the cell of the table.
When the symbol is “n_1,n_2” it works as ecxpected.
My observation is : If the subscript length is more than 1 then the latexFragment cannot handle it.
The sample I tried does not work as expected.

Latex_Script_Issue.zip (553 Bytes)

@PriyankaShelke

Thank you for contacting support.

We have been able to reproduce the issue in our environment. A ticket with ID PDFNET-45088 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

@PriyankaShelke

We have closed PDFNET-45088 because this does not appear to be a problem related to Aspose.PDF for .NET API. As mentioned over this link, we have tried to use curly braces as under and the subscript is rendered fine.

List<string> scripts = new List<string>()
{   @" n_1",
    @" n_{max}"
};

Generated PDF file has been attached for your kind reference LatexTest_18.8.pdf. Please feel free to contact us if you need any further assistance.

Hello,

I have used latest version - 18.8 and verified for the following program.

List scripts = new List()
{
@" n_1",
@" b_{max}",
@" j_{max}",
@" p_{min}",
@" A_{abs}"
};

        var doc1 = new Document();
        var page1 = doc1.Pages.Add();
        {
            Table table = new Table();
            int i = 1;
            foreach (var script in scripts)
            {
                if (script.Contains("_") || script.Contains("{"))
                {
                    var latexScript = "$" + script + "$";
                    LatexFragment lf = new LatexFragment(latexScript);
                    page1.Paragraphs.Add(lf);
                }
                else
                {
                    TextFragment lf = new TextFragment(script);

                    var row = table.Rows.Add();

                    var cel1 = row.Cells.Add();
                    cel1.Paragraphs.Add(new TextFragment("Row " + i));

                    var cel2 = row.Cells.Add();
                    cel2.Paragraphs.Add(lf);
                }
                i++;
            }
            page1.Paragraphs.Add(table);
        }
        doc1.ProcessParagraphs();
        doc1.Save(@"Result11.pdf");
    }

The issue still exists.

Please reopen PDFNET-45088

Aspose Latext issue 18.8.png (32.5 KB)

Please find the resultant pdf screenshot

The framework provided by Aspose for handling Latex symbols is good rather than converting whole .tex files(having latex symbol) to pdf and then merging to main PDF for getting the latex symbols. But this solution is not so reliable as, it is not handling all the symbols eg. please refer my earlier comment.

Please move to the paid support and provide a solution as soon as possible

Our client has raised concerns regarding this issue as it is pending with Aspose since 1.5 years now and it is critical because the project delivery is hampered. If the solution is not provided withing this month we will have to consider some other 3rd party reliable tool and discontinue with Aspose.

@PriyankaShelke

Thank you for getting back to us.

We have logged your comments under respective ticket and will review these details to reopen the ticket. Moreover, if you are already subscribed to Paid Support then please request at Paid Support Helpdesk to raise the priority of PDFNET-45088. This will speed up the process and we will take care of your concerns.

The issues you have found earlier (filed as PDFNET-45088) have been fixed in Aspose.PDF for .NET 18.10.