Rst document

83 views
Skip to first unread message

Degenerate Tech

unread,
Jun 4, 2024, 11:58:51 AMJun 4
to Kivy users support
Is it possible to write math expression using rst document kivy Widget 
I need an example.

Tomek CEDRO

unread,
Jun 4, 2024, 12:05:14 PMJun 4
to kivy-...@googlegroups.com
this will probably require LaTeX anyway to pre-render the images with equations.

there was a thread about that not long ago please check at mailing list archive.

there is an application made with kivy that can generate equations and it seems it included LaTeX somehow and i am not sure if its open source check the archives too.

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/909158e9-9c7a-413c-993b-4fc3c6cd59d2n%40googlegroups.com.

Degenerate Tech

unread,
Jun 4, 2024, 12:27:25 PMJun 4
to Kivy users support
latex like support in kivy needed

Tomek CEDRO

unread,
Jun 4, 2024, 12:28:38 PMJun 4
to kivy-...@googlegroups.com
patches welcome :-)
> To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/b7e1274a-5390-4793-9f58-46d91da66c5en%40googlegroups.com.

Juan Sanchez

unread,
Jun 4, 2024, 12:29:26 PMJun 4
to kivy-...@googlegroups.com
I speculate that you could use pandoc to convert rst to an html document using mathjax to render equations for use in some kind of web viewer.  I'm sure pandoc has many types of equation rendering support.

Regards,

Juan

Degenerate Tech

unread,
Jun 4, 2024, 1:24:32 PMJun 4
to Kivy users support
kivy has no its own  webview widget . that is main problem . Webview is support is needed . but this is main disadvantage .

Degenerate Tech

unread,
Jun 4, 2024, 1:26:50 PMJun 4
to Kivy users support
latex , katex or mathjax support very much needed in kivy.

Juan Sanchez

unread,
Jun 4, 2024, 1:37:22 PMJun 4
to kivy-...@googlegroups.com
This seems like a reasonable approach here for a WebView, but I have not tried it:

Degenerate Tech

unread,
Jun 4, 2024, 2:37:48 PMJun 4
to kivy-...@googlegroups.com

This webview is not kivy Widget . You can't add this webview widget into kivy's layout or scroll view etc . It will open in the entire screen . It is Android widget. We need kivy its own webview .


You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/lmFuuIdWfcE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAEHOsR19z436C6k59m_sCMQp2eMZ5N7vWAm_xq-JWS%3Dz-KjwgQ%40mail.gmail.com.

Juan Sanchez

unread,
Jun 4, 2024, 2:44:16 PMJun 4
to kivy-...@googlegroups.com
Depending on its complexity.  I think you may be able to find a way to use the math equation rendering in matplotlib to present something in a widget.

Regards,

Juan

Degenerate Tech

unread,
Jun 4, 2024, 3:00:54 PMJun 4
to kivy-...@googlegroups.com

Yes . That is one option..I was Also thinking.  But . Kivy should have a dedicated widget for that
Things which make kivy more powerful .
1) Kivy's own Webview
2) Math Expression or Katex , Mathjax support
3) For Android Kivy's own admob support

As Flutter doing .


Degenerate Tech

unread,
Jun 4, 2024, 3:15:36 PMJun 4
to Kivy users support

Degenerate Tech

unread,
Jun 4, 2024, 3:21:53 PMJun 4
to kivy-...@googlegroups.com

See how Camera4kivy implement . For Android
. For Android Webview something work needed. So we can use that webview widget in Kivy's layout .
https://github.com/Android-for-Python/Camera4Kivy/tree/main


Charles longwe

unread,
Jun 4, 2024, 3:34:16 PMJun 4
to kivy-...@googlegroups.com
Rst document work so with math formulars...... No need webview.... Use the pdf shared... 

Degenerate Tech

unread,
Jun 4, 2024, 3:51:14 PMJun 4
to Kivy users support
Could you please show an example with kivy ? To load math expression?

Charles longwe

unread,
Jun 4, 2024, 4:00:12 PMJun 4
to kivy-...@googlegroups.com
Do you need an equation 

Degenerate Tech

unread,
Jun 4, 2024, 4:13:49 PMJun 4
to Kivy users support
I want simple kivy application which loads math expression integration differentiation etc . 
In kivy There is widget Rst Document .but i don't think it support math equations
.
If you have solution please put an example with kivy app .

ELLIOT GARBUS

unread,
Jun 4, 2024, 5:13:26 PMJun 4
to kivy-...@googlegroups.com
Select a font that supports the desired glyphs.  I did a quick search and found the font, NotoSansMath-Regular.ttf is recommended for math symbols.  see: https://fonts.google.com/noto/specimen/Noto+Sans+Math

Noto is a global font collection for writing in all modern and ancient languages. Noto Sans Math is a font that contains symbols for mathematical notation. It h
You can  use a Label, or RST doc...  you can specify the characters as literals using the hex code or name.  
Here is an example using a Label:

from kivy.app import App
from kivy.lang import Builder

kv = """
BoxLayout:
    Label:
        text: 'Test Math Symbols: ∫ ∑ ∛ \N{PARTIAL DIFFERENTIAL} \u222F'
        font_name: 'NotoSansMath-Regular.ttf'
        font_size: 40
"""


class MathSymbolsApp(App):
    def build(self):
        return Builder.load_string(kv)


MathSymbolsApp().run()




From: kivy-...@googlegroups.com <kivy-...@googlegroups.com> on behalf of Degenerate Tech <sksah...@gmail.com>
Sent: Tuesday, June 4, 2024 1:13 PM
To: Kivy users support <kivy-...@googlegroups.com>
Subject: Re: [kivy-users] Rst document
 

Charles longwe

unread,
Jun 4, 2024, 10:18:28 PMJun 4
to kivy-...@googlegroups.com
Yes you can 

--
rst.pdf

Degenerate Tech

unread,
Jun 4, 2024, 11:53:07 PMJun 4
to Kivy users support
Then show me an example with kivy app ??

Degenerate Tech

unread,
Jun 5, 2024, 2:12:26 AMJun 5
to Kivy users support
it is ok for small math equations . for large math or physics documents what i will do ?

ELLIOT GARBUS

unread,
Jun 5, 2024, 11:57:08 AMJun 5
to Kivy users support
The RSTDocument supports the kivy Label markup.  You can use that to change the font and display the symbols. 
You can also test the current RSTDocument to see if it supports the native math symbols as another user pointed out.  My experience with RST doc is that it has a limited capability, and a supports a minimal set of markup.  I recommend you test it for your use case.

You could also put a series of Labels into a RecycleView. 

Share more about your use case.  

Sent: Tuesday, June 4, 2024 11:12 PM
Reply all
Reply to author
Forward
0 new messages