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

Question regarding katex frac rendering #952

Closed
goyalyashpal opened this issue May 25, 2020 · 16 comments
Closed

Question regarding katex frac rendering #952

goyalyashpal opened this issue May 25, 2020 · 16 comments

Comments

@goyalyashpal
Copy link

goyalyashpal commented May 25, 2020

General information

  • App version: Version v2.2.10 (113) F-Droid
  • System: AOSP 6.0 M

Description

The \frac function family is rendered without the horizontal dividing bar. The above link contains how it should look.

Input: $ I = \frac V R $

Frac rendering

Relevant comments:
#952 (comment)
#952 (comment)
#952 (comment)

@gsantner
Copy link
Owner

gsantner commented May 25, 2020

Is it due colors? Can you see the line with light mode? Otherwise, please ask at KaTex how to correctly use it.

@goyalyashpal
Copy link
Author

goyalyashpal commented May 25, 2020

Nope, not visible in light mode either.

Otherwise, please ask at KaTex how to correctly use it.

I dont understand this last sentence.
Edit: Added the screenshot from the reference template, and with light theme applied.

@gsantner
Copy link
Owner

Try other projects/katex website with frac, or ask at katex bugtracker.

@goyalyashpal
Copy link
Author

goyalyashpal commented May 25, 2020

I have used it in Gitlab (click me) which uses KaTeX and it is rendered with no problems/issues.

update 2020.06.05: #952 (comment)

@gsantner
Copy link
Owner

I cannot reproduce your issue, works fine for me...

Maybe try to wrap it with a div.

<div markdown="0">
math
</div>

1

Screenshot_20200525-222647_Markor

@goyalyashpal
Copy link
Author

goyalyashpal commented May 25, 2020

Glad to see it working. Okay, i will try.

Update: tried with <div markdown="0"> $ I = \frac V R $ </div> and didnt work, same as before.

@gsantner
Copy link
Owner

Then reset Markor app settings. I tried it on two devices now and it always worked for me.

Also, check if theres maybe another syntax error somewhere maybe?

@goyalyashpal
Copy link
Author

goyalyashpal commented May 25, 2020

From where can I reset?

Edit1: Which OS version did du check on?? Maybe it is related with font!!? as my phone doesnt show new emojis and some latest fancy fonts as well - oh, and it was/is set to default - Roboto Regular.

Edit2: Cleared Markor's data+cache > Opened it again > enabled Math > view > still same

@gsantner
Copy link
Owner

Android systemsettings.

As you say, you have some font issues, so don't really looks like it's a markor specific issue.

Markor also comes bundled with some other fonts, you can try them as well. Set them via Markor settings.

@gsantner gsantner changed the title frac rendering Question regarding katex frac rendering May 25, 2020
@goyalyashpal
Copy link
Author

goyalyashpal commented May 26, 2020

This issue shouldnt be closed. As it is NOT solved yet. I get that it might be some problem with my phone, but going by the comments here, no info is given on:

  • if it is tested on other phones running AOSP 6.0 or earlier
  • how can it be tested further, for e.g. if it is really the problem with my phone, or what can be other similar things (apps, websites, local html etc) where it can be tested.
    update 2020.06.05: Question regarding katex frac rendering #952 (comment)
  • which fonts can be used to test
    i am assuming that u suggested to change the font in view mode > inject head . But there's no list for fonts in that, so how would i know. I am not saying that there should be a list in app, but it should have been suggested here.

With that said, i will propose to reopen this issue.


P.S. : ofc I am not forcing you to do anything. I am saying the above as thats how i have seen issues move ahead in the past. And i totally get that it may not be the case everywhere. If u dont feel like it, no worries. I wont bother u again :) Have a nice day.

@goyalyashpal
Copy link
Author

goyalyashpal commented May 26, 2020

I tried sharing as HTML, and pasting the output to a .html file saved in the same directory (/Documents/markor/) and i was shown plain text on opening that file with any browser - inbuilt Browser , inbuilt HTML Viewer , and MiXplorer's HTML Viewer as well, no go.

@gsantner
Copy link
Owner

gsantner commented May 26, 2020

KaTex is rendered at runtime by javascript and requires like 10 other files. That only comes with with Markor bundled.
For exported html, thats not there hence mah not rendered.

There you need pdf export or alike instead.

@goyalyashpal
Copy link
Author

goyalyashpal commented May 26, 2020

... exported html, thats not there hence math not rendered.

Okay, thanks for the info. Just clarifying: my intent was not to point out error here. I was trying to troubleshoot and see if i somehow can check the rendering in other things. Do u know any other android app or any other way in which i can test if it works or not??

@goyalyashpal
Copy link
Author

goyalyashpal commented May 26, 2020

In further investigation,

  1. Finally I turned online. I tested with input a = \dfrac b c on following sites on following browsers : Vivaldi 3.0 browser

Update 2020.06.05: I tried via the inbuilt browser com.android.browser and the render is same as the Markor app, that is the dividing bar is not shown.

-- Inbuilt Vivaldi
KaTeX official
Arachnoid LaTeX
markdown KaTeX

I found the 3rd link (markdown KaTeX) from from md reference file in app > examples > try in ur browser

Takeaway/conclusion:

  • [Important] For checking compatibility of the system, test only with KaTeX official only on inbuilt browser.
  • The issue is with my system (i.e. confirmed for sure).
  • Since Vivaldi browser can show correct render, it mean there IS a way to overcome this issue.
Old irrelevant investigation + screenshots hidden
  1. i couldnt find any other app on F-droid which renders TeX or any if its variation. So, I went over to ApkPure.com to search for apps. It contains many apps. I tried this one: LaTeX equation editor: Unicode Math Symbols and it is rendering fine as well. It was crashing for some reason after 10-30s and i couldnt select the output.
  1. The other apps which support equation input like μMath+ or Equation Editor perform editing via GUI so i didnt test with those and the like.

  2. This app mentioned LaTeX: arXiv eXplorer but i couldnt find any article which contains any fractions in the app. On clicking download, the pdf downloaded rendered fraction just fine (and the pdf is not raster, i.e. i am able to select the fraction text). If u could find an article which contains fraction in the description in app, please let me know. I will check it.

Throwing in some further links which i am searching on surface. If u think they can be helpful in investigation, I will try to look into them: Radical Expressions

@goyalyashpal
Copy link
Author

goyalyashpal commented May 26, 2020

I input this: $ \dfrac a a $ and copy pasted the output in https://t.me/UnicodeInfoBot and this is what i got:

U+0061 LATIN SMALL LETTER A
U+000A LINE FEED (LF)
U+200B ZERO WIDTH SPACE
U+000A LINE FEED (LF)
U+200B ZERO WIDTH SPACE
U+0061 LATIN SMALL LETTER A

The next step would be to check if my the app can render the combination of middle 4 letters in my phone i think. Okay, i will pause here.

@gsantner
Copy link
Owner

OK so:

  • I cannot reproduce the issue.
  • I don't know the exact reason why its missing for you.
  • Its not missing on others devices and users, otherwise it would have been reported already ( frac is fairly common). Also got some emails with questions and screenshots where I do see other people having used fracs and they do render.

Thus:

  • I close the issue as cannot reproduce and I cannot help you.
  • You need to install android sdk/studio on your PC and debug Markor on your own, when you want to get it fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants