erwanp / pytexit

Convert a Python expression to a LaTeX formula
https://pytexit.readthedocs.io/
Other
114 stars 31 forks source link

Unicode character documentation #66

Closed WesDH closed 1 year ago

WesDH commented 1 year ago

Noticed while working on previous issue that perhaps a table listing supported Unicode characters would be useful to add to the Read the Docs. Maybe with a few additional examples? Example:

Supported Unicode Characters --
Character | Name | As chr() -- | -- | -- α | alpha | chr(945) β | beta | chr(946)

And so on...

Please let me know if this is OK and I will create the table documentation. It looks as if docs/userguide.rst would need to be edited.

WesDH commented 1 year ago

I was unable to build the documentation source on ReadTheDocs to test my changes. As a workaround, I am posting some code I believe can be reconciled into userguide.srt. Feel free to use this documentation if deemed useful. I created two versions of the same table, as there are apparently two ways to create tables and I wasn't sure if one way was beneficial over the other:

First option:

.. list-table:: Supported Unicode Characters
   :widths: 25 25 50
   :header-rows: 1

   * - Character
     - Name
     - As chr()
   * - α
     - alpha
     - chr(945)
   * - β
     - beta
     - chr(946)
   * - χ
     - chi
     - chr(967)
   * - δ
     - delta
     - chr(916)
   * - ÷
     - division
     - chr(247)
   * - ε
     - epsilon
     - chr(949)
   * - γ
     - gamma
     - chr(947)
   * - ψ
     - psi
     - chr(968)
   * - θ
     - theta
     - chr(952)
   * - κ
     - kappa
     - chr(954)
   * - λ
     - lambda
     - chr(955)
   * - lambda
     - lambda
     - chr(955)
   * - η
     - eta
     - chr(951)
   * - ν
     - nu
     - chr(957)
   * - π
     - pi
     - chr(960)
   * - ϕ
     - phi
     - chr(981)
   * - σ
     - omega
     - chr(963)
   * - τ
     - tau
     - chr(964)
   * - ω
     - omega
     - chr(969)
   * - ξ
     - xi
     - chr(958)
   * - Δ
     - Delta
     - chr(916)
   * - φ
     - Phi
     - chr(966)
   * - Γ
     - Gamma
     - chr(915)
   * - Ψ
     - Psi
     - chr(936)
   * - α
     - alpha
     - chr(945)
   * - Λ
     - Lambda
     - chr(923)
   * - Σ
     - Sigma
     - chr(931)
   * - Ξ
     - Xi
     - chr(926)

Second option:

+------------+------------+-----------+
| Supported Unicode Characters        |
+------------+------------+-----------+
| Character  |  Name      |  As chr() |
+============+============+===========+
| α          | alpha      | chr(945)  |
+------------+------------+-----------+
| β          | beta       | chr(946)  |
+------------+------------+-----------+
| χ          | chi        | chr(967)  |
+------------+------------+-----------+
| δ          | delta      | chr(916)  |
+------------+------------+-----------+
| ÷          | division   | chr(247)  |
+------------+------------+-----------+
| ε          | epsilon    | chr(949)  |
+------------+------------+-----------+
| γ          | gamma      | chr(947)  |
+------------+------------+-----------+
| ψ          | psi        | chr(968)  |
+------------+------------+-----------+
| θ          | theta      | chr(952)  |
+------------+------------+-----------+
| κ          | kappa      | chr(954)  |
+------------+------------+-----------+
| λ          | lambda     | chr(955)  |
+------------+------------+-----------+
| lambda     | lambda     | chr(955)  |
+------------+------------+-----------+
| η          | eta        | chr(951)  |
+------------+------------+-----------+
| ν          | nu         | chr(957)  |
+------------+------------+-----------+
| π          | pi         | chr(960)  |
+------------+------------+-----------+
| ϕ          | phi        | chr(981)  |
+------------+------------+-----------+
| σ          | sigma      | chr(963)  |
+------------+------------+-----------+
| τ          | tau        | chr(964)  |
+------------+------------+-----------+
| ω          | omega      | chr(969)  |
+------------+------------+-----------+
| ξ          | xi         | chr(958)  |
+------------+------------+-----------+
| Δ          | Delta      | chr(916)  |
+------------+------------+-----------+
| φ          | Phi        | chr(966)  |
+------------+------------+-----------+
| Γ          | Gamma      | chr(915)  |
+------------+------------+-----------+
| Ψ          | Psi        | chr(936)  |
+------------+------------+-----------+
| Λ          | Lambda     | chr(923)  |
+------------+------------+-----------+
| Σ          | Sigma      | chr(931)  |
+------------+------------+-----------+
| Ξ          | Xi         | chr(926)  |
+------------+------------+-----------+
erwanp commented 1 year ago

First option looks easier to maintain. Let's push the changes and see how it renders on Readthedocs

erwanp commented 1 year ago

Docs passed following #67 , are you ok with the results ?