Trên GitHub, jgm/texmath đã đạt 403 sao, ngôn ngữ Haskell. A Haskell library for converting LaTeX math to MathML.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
texmath is a Haskell library for converting between formats used to
represent mathematics. Currently it provides functions to read and
write TeX math, presentation MathML, and OMML (Office Math Markup
Language, used in Microsoft Office), and to write Gnu eqn, typst,
StarMath (used by LibreOffice), and pandoc's native format
(allowing conversion, using pandoc, to a variety of different
markup formats). The TeX reader and writer supports basic LaTeX
and AMS extensions, and it can parse and apply LaTeX macros. The
package also includes several utility modules which may be useful
for anyone looking to manipulate either TeX math or MathML. For
example, a copy of the MathML operator dictionary is included.
You can try it out online here.
By default, only the Haskell library is installed. To install a
test program, texmath, use the executable Cabal flag:
cabal install -fexecutable
By default, the executable will be installed in ~/.cabal/bin.
The texmath binary will be put in ~/.local/bin.
Macro definitions may be included before a LaTeX formula.
Running texmath as a server
texmath will behave as a CGI script when called under the name
texmath-cgi (e.g. through a symbolic link).
But it is also possible to compile a full webserver with a JSON
API. To do this, set the server cabal flag, e.g.
Possible values for from are tex, mathml, and omml.
Possible values for to are tex, mathml, omml, eqn,
typst and pandoc (JSON-encoded Pandoc).
Alternatively, you can use the /batch endpoint, passing
in in a JSON-encoded list of conversions and getting back a
JSON-encoded list of results.
If you rename pandoc-server to pandoc-server.cgi, it will
function as a CGI program that accepts POST requests.
Generating lookup tables
There are three main lookup tables which are built form externally compiled lists.
This section contains information about how to modify and regenerate these tables.
In the lib direction there are two sub-directories which contain the
necessary files.
MMLDict.hs
The utility program xsltproc is required.
You can find these files in lib/mmldict/
If desired replace unicode.xml with and updated version (you can download a copy from here
Replace the operator table at the bottom of src/Text/TeXMath/Readers/MathML/MMLDict.hs with the contents of mmldict.hs
ToTeXMath.hs
You can find these files in lib/totexmath/
If desired, replace unimathsymbols.txt with an updated version from here
runghc unicodetotex.hs
Replace the record table at the bottom of src/Text/TeXMath/Unicode/ToTeXMath.hs with the contents of UnicodeToLaTeX.hs
ToUnicode.hs
You can find these files in lib/tounicode/.
If desired, replace UnicodeData.txt with an updated verson from
here.
runghc mkUnicodeTable.hs
Replace the table at the bottom of
src/Text/TeXMath/Unicode/ToUnicode.hs with the output.
Editing the tables
It is not necessary to edit the source files to add records to
the tables. To add to or modify a table it is easier to add
modify either unicodetotex.hs or generateMMLDict.hs. This is
easily achieved by adding an item to the corresponding updates
lists. After making the changes, follow the above steps to
regenerate the table.
The test suite
To run the test suite, do cabal test.
In its standard mode, the test suite will run golden tests of
the individual readers and writers. Reader tests can be found
in test/reader/{mml,omml,tex}, and writer tests in
test/writer/{eqn,mml,omml,tex}. Regression tests linked
to specific issues are in test/regression.
Each test file consists of an input and an expected output.
The input begins after a line <<< FORMAT and the output
begins after a line >>> FORMAT.
If many tests fail as a result of changes, but the test
failures are all because of improvements in the output,
you can pass --accept to the test suite (e.g., with
--test-option=--accept on cabal test), and the existing
golden files will be overwritten. If you do this, inspect
the outputs very carefully to make sure they are correct.
If you pass the --roundtrip option into the test suite
(e.g., using --test-option=--roundtrip with cabal test),
round-trip tests will be run instead. Many of these will
fail. In these tests, the native inputs in test/roundtrip/*.native
will be converted to (respectively) mml, omml, or tex,
then converted back, and the result will be compared with the
starting point. Although we don't guarantee that this kind
of round-trip transformation will be the identity, looking
at cases where it fails can be a guide to improvements.
Authors
John MacFarlane wrote the original TeX reader, MathML writer, Eq
writer, and OMML writer. Matthew Pickering contributed the
MathML reader, the TeX writer, and many of the auxiliary
modules. Jesse Rosenthal contributed the OMML reader. Thanks
also to John Lenz for many contributions.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/jgm/texmath là nguồn chính thức.
jgm/texmath có bao nhiêu sao?
jgm/texmath có 403 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/jgm/texmath. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
jgm/texmath có phải mã nguồn mở không?
Có — jgm/texmath phát hành theo license GPL-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/jgm/texmath.
jgm/texmath còn đang phát triển không?
Commit gần nhất trên jgm/texmath là 9 ngày trước (theo timestamp GitHub). Repo có 84 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
jgm/texmath là gì?
jgm/texmath (jgm/texmath) là dự án Haskell trên GitHub. Theo mô tả gốc: A Haskell library for converting LaTeX math to MathML.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về texmath?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về texmath.