Replaces macros in .tex files based on a set of rules you define
To run the tests run
npm test
for coverage tests use
npm run-script coverage
Replaces macros in .tex files
From @physikerwelt on June 24, 2015 21:22
Copied from original issue: DRMF/texvcjs#4
From @ClaudeZou on March 30, 2016 20:11
texvcjs removes spaces that are necessary for the LaTeX to work.
Copied from original issue: DRMF/texvcjs#35
From @ClaudeZou on August 14, 2015 18:51
P_n^{(\alpha,\beta)}(x) -> \Jacobi{n}{\alpha}{\beta}@{x}
Copied from original issue: DRMF/texvcjs#19
From @ClaudeZou on August 14, 2015 18:53
L_n(x) -> \Laguerre{n}@{x}
L_n^{(\alpha)}(x) -> \Laguerre{n}[\alpha]@{x}
This is an example of a macro with an optional parameter.
Copied from original issue: DRMF/texvcjs#20
From @HowardCohl on July 15, 2015 18:22
If you have some math in LaTeX such as
(a)_n this string should be replaced by \pochhammer{a}{n}.
Similarly
\left(a\right)_n
\Biggl(a\Biggr)_n
(a)_{n}
(a)_{{n}}
(\mu)_\alpha
as well as
(\;a)_{\ n}
should also be replaced by \pochhammer{a}{n}
\left( and \Biggl( are all ways to represent parentheses.
; and \ are space delimiters and should be ignored.
Copied from original issue: DRMF/texvcjs#10
From @HowardCohl on August 11, 2015 20:3
There are also equivalents such as:
\sinh\alpha -> \sinh@@{\alpha}
\sinh\,x -> \sinh@@{x}
\sinh\!x ->\sinh@@{x}
(Claude is currently working on this, so we felt we should create an issue.)
Copied from original issue: DRMF/texvcjs#18
From @ClaudeZou on September 30, 2015 20:52
Add the replacements for \sinh to the functions needed.
Copied from original issue: DRMF/texvcjs#24
From @physikerwelt on October 7, 2015 7:47
Add a CLI option to control if @ -symbols are used in the output
Constraint: One should not need to recompile to switch the behaiviour.
PS:
This would be also helpful to solve wikimedia/mediawiki-services-texvcjs#7 which is somehow stalled because I don't know how to implement a --MathJax switch
Copied from original issue: DRMF/texvcjs#26
From @HowardCohl on April 1, 2016 19:58
For instance,
(a;q)_n
to be replaced with \qPochhammer{a}{q}{n}
It has to look for a semicolon to separate the a
and the q
.
Copied from original issue: DRMF/texvcjs#39
We need to generate test cases for texer @notjagan
@physikerwelt could you clarify how this could be formatted/inputted in to the program (if that matters) and how we might implement this?
From @ClaudeZou on August 14, 2015 18:51
P_n^{(\alpha,\beta)}(x) -> \Jacobi{n}{\alpha}{\beta}@{x}
Copied from original issue: DRMF/texvcjs#19
From @ClaudeZou on August 14, 2015 18:54
{\rm sn}(x,k) -> \Jacobisn@{x}{k}
This is an example with more than one argument.
Copied from original issue: DRMF/texvcjs#21
Create a test like that
{
input: 'This is a test $a$ and $b$',
options: {},
out: ['$a$','$b$']
}
At the moment, we have macros that use lists of elements surrounded by parentheses and delimited by semicolons/commas. These elements are sometimes not covered by lit
; for example, \cos\tha
is not matched since it is two literals chained together.
As such, using lit
in the auto-generated rule doesn't find occurrences of the macro when a case like this appears.
We attempted to create a new rule that accepted such lists and added it as an option to lit
but the return types were radically different and the program was unable to handle the lists properly.
As of now, we aren't sure of how we should approach a fix to this problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.