Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSharpMath not Showing LaTex text #202

Closed
kmpundu opened this issue Nov 6, 2021 · 3 comments
Closed

CSharpMath not Showing LaTex text #202

kmpundu opened this issue Nov 6, 2021 · 3 comments
Labels
Status/0. New This issue is new and is awaiting confirmation from the maintainers. Type/Question

Comments

@kmpundu
Copy link

kmpundu commented Nov 6, 2021

I am trying to render LaTex in xamarin forms using CSharpMath.forms. However, the LaTex text is not showing. I have observed that in the Android emulator's screen the Mathview/Textview is occupying space when the app is run ( Mathview/Textview is with beige background in attached image) but the content is not showing. I even tried using Code behind to programmatically display it but the result is the same. I am using Visual Studio 2019 Community Version.
emulator screenshot
The code is as below

`

<StackLayout VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand" x:Name="LatexView">
<math:MathView x:Name="View" Opacity="1"
               HorizontalOptions="FillAndExpand"
               VerticalOptions="FillAndExpand">
    Using integration by parts, solve: $\int\left(x\ln x\right)dx$
</math:MathView>
    <math:TextView LaTeX="Text $3+4+5+6\cdot7^{5x^2}+a_n$ More text $$\int^5_2x^3+x^2-x-3dx$$ Text" 
                   FontSize="14" BackgroundColor="Beige"/>
    <Label Text="I can't see Latex math above"/>
    <Button Text="latex view" x:Name="latexButton" Clicked="latexButton_Clicked"/>
</StackLayout>

`

I have included the namespace in the ContentPage:
xmlns:math="clr-namespace:CSharpMath.Forms;assembly=CSharpMath.Forms"
Dependacies as in picture below

Dependancies
I have also observed the following warnings. If they have anything to do with it how do I resolve them?

Warning Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved.
There was a conflict between "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
"System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
References which depend on "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll].
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll
Project file item includes which caused reference "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll".
System.Numerics.Vectors
References which depend on "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
C:\Users\User.nuget\packages\csharpmath.rendering\0.5.1\lib\netstandard2.0\CSharpMath.Rendering.dll
Project file item includes which caused reference "C:\Users\User.nuget\packages\csharpmath.rendering\0.5.1\lib\netstandard2.0\CSharpMath.Rendering.dll".
C:\Users\User.nuget\packages\csharpmath.rendering\0.5.1\lib\netstandard2.0\CSharpMath.Rendering.dll
C:\Users\User\Documents\HighSchoolScienceApp\HighSchoolScienceApp\HighSchoolScienceApp\bin\Debug\netstandard2.0\HighSchoolScienceApp.dll
C:\Users\User.nuget\packages\csharpmath.forms\0.5.1\lib\netstandard2.0\CSharpMath.Forms.dll
C:\Users\User.nuget\packages\csharpmath.skiasharp\0.5.1\lib\netstandard2.0\CSharpMath.SkiaSharp.dll MathApp.Android

Kindly assist

@Happypig375
Copy link
Collaborator

I'd suggest starting from our samples and modifying them, because Xamarin tooling sometimes is quirky.

@Happypig375 Happypig375 added Status/0. New This issue is new and is awaiting confirmation from the maintainers. Type/Question labels Nov 6, 2021
@FoggyFinder
Copy link
Collaborator

It's probably the same as #198

@kmpundu
Copy link
Author

kmpundu commented Nov 11, 2021

I've come to discover that the issue is coming from the version of CSharpMath. When I downgraded to version 0.3.0, the LaTeX symbols started showing. If only there can be a solution to work with later versions

@kmpundu kmpundu closed this as completed Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status/0. New This issue is new and is awaiting confirmation from the maintainers. Type/Question
Projects
None yet
Development

No branches or pull requests

3 participants