A package that defines a new label class for Kivy to display text with LaTeX equations.
Project description
Kivy LaTeX Label
This is a simple package that provides a special LatexLabel class to display text containing equations with kivy. No LaTeX installation is required, the rendering is performed using matplotlib.
Installation
To use this widget, you can simply copy and paste the "kivy_latex_label" folder in your code and import the widget. A pip installation will possible in the future.
How to use it
You can use the LatexLabel as any other Label in kivy (although all options may not be available), your equations just need to be delimited by dollar symbols ($) like in any LaTeX document.
Here is a short demo with a python and kv files. To run it, the python should be pasted in a file called "demo.py" and the kv in "demo.kv".
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.core.window import Window
from kivy_latex_label import LatexLabel
class DemoApp(App, Widget):
def build(self):
Window.clearcolor = (1, 1, 1, 1)
if __name__ == "__main__":
DemoApp().run()
#:kivy 2.0.0
FloatLayout:
size_hint: (1,1)
LatexLabel:
pos_hint: {"top":1,"x":0.05}
size_hint:(0.9,1)
text: r"The SINDy method is a recently developed technique that leverages sparse regression to identify the governing equations from a given time series (Figure 1). We consider a system with state $\boldsymbol{x}(t)=\left[x_{1}(t), x_{2}(t), \ldots x_{d}(t)\right]^{\top} \in$ $\mathbb{R}^{d}$ governed by the differential equation: $\dot{\boldsymbol{x}}=\boldsymbol{f}(\boldsymbol{x})$."
color: (0,0,0,1)
text_size: root.size
valign: "top"
font_size: 20
Here is how it looks like:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kivy_latex_label-1.0.5.tar.gz.
File metadata
- Download URL: kivy_latex_label-1.0.5.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd13e45083a20737a638e11e55b2c3e056042e5d49c9c221578411166ad98b80
|
|
| MD5 |
7d207e00f7461b3d5c4923b1e1dd1519
|
|
| BLAKE2b-256 |
ab52caebce80ccba2bc0af11cf516a2ccc0199914871ae64f8d54aa2c36a52a2
|
Provenance
The following attestation bundles were made for kivy_latex_label-1.0.5.tar.gz:
Publisher:
python-publish.yml on PaulCreusy/kivy-latex-label
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kivy_latex_label-1.0.5.tar.gz -
Subject digest:
fd13e45083a20737a638e11e55b2c3e056042e5d49c9c221578411166ad98b80 - Sigstore transparency entry: 661502111
- Sigstore integration time:
-
Permalink:
PaulCreusy/kivy-latex-label@ab9b0bec21d79b2f8b8579a4fa82e324e5bacd73 -
Branch / Tag:
refs/tags/v1.0.5 - Owner: https://github.com/PaulCreusy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ab9b0bec21d79b2f8b8579a4fa82e324e5bacd73 -
Trigger Event:
release
-
Statement type:
File details
Details for the file kivy_latex_label-1.0.5-py3-none-any.whl.
File metadata
- Download URL: kivy_latex_label-1.0.5-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
130ff918ae5299acf0114915ffb42fde50137787800b0bfc7168a6471ab4bda0
|
|
| MD5 |
29d790a60b1c2670c9896051d3b69656
|
|
| BLAKE2b-256 |
a23b840dc4141a72be05066d74c45523feda227b7aae1c732a29f2e67169c6ab
|
Provenance
The following attestation bundles were made for kivy_latex_label-1.0.5-py3-none-any.whl:
Publisher:
python-publish.yml on PaulCreusy/kivy-latex-label
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kivy_latex_label-1.0.5-py3-none-any.whl -
Subject digest:
130ff918ae5299acf0114915ffb42fde50137787800b0bfc7168a6471ab4bda0 - Sigstore transparency entry: 661502115
- Sigstore integration time:
-
Permalink:
PaulCreusy/kivy-latex-label@ab9b0bec21d79b2f8b8579a4fa82e324e5bacd73 -
Branch / Tag:
refs/tags/v1.0.5 - Owner: https://github.com/PaulCreusy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ab9b0bec21d79b2f8b8579a4fa82e324e5bacd73 -
Trigger Event:
release
-
Statement type: