Closed HowardCohl closed 8 years ago
:+1: Yes. But please make that an optional feature that can be switched on or off via config It should perform replacements based on the AST
Ha. An optional parameter for the main feature the program is specifically designed to perform. Isn't that like "print -print x", saying we should print x but only if the -print option is specified. :)
What's an AST?
AST is abstract syntax tree.
parameter:To keep the program compatible to the wikimedia texvcjs program this would be nice to follow a modular design here. I would not pass the parameter as commandline argument but define that in a config file
print -print reminds me to git clean
You said that
\Biggl(a)\Biggr)_n
should return \pochhammer{a}{n}, but there seems to be an extra right parenthesis there (both a ")" and "\Biggr)", is this intentional?
You're right Claude. It should be \Biggl(a\Biggr)_n
. I will correct the original comment.
But of course these are just examples of ways to insert parentheses. There are many more such as:
\big(...\big) \Big(...\Big) \bigg(...\bigg) \Bigg(...\Bigg)
\bigl(...\bigr) \Bigl(...\Bigr) \biggl(...\biggr) \Biggl(...\Biggr)
\left(...\right)
(...)
I have tried doing this but with limited success. I was able to make it perform the replacement if it was a single character as a and n but the parsing does not work if it is a LaTeX command or multiple characters due to the way that the program handles parentheses and underscores normally. I eventually got pretty frustrated and started working on issue #18, and will probably come back to it after I completely solve issues #15, #18, and #16.
Can the command inside the parenthesis be a string of more than one character? For example, could it be like this:
(abcd)_{\commandname}
Also, if the second argument was like this:
(a)_abcd
should I return \pochhammer{a}{abcd} or \pochhammer{a}{a}?
Yes you could have (abcd)_{\commandname}
for instance you could have (abcd)_{\alpha}
or you could have (abcd)_\alpha
. This works also.
If you have (a)_abcd
then you should return \pochhammer{a}{a}bcd
. Does this make sense?
Once you finish this, it should be easy for you to implement \qPochhammer.
This will be, 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
.
Github has new (simplified way of tracking the status) You can create lists of the sub-issues that need to be resolved.
This issue was moved to DRMF/texer#9
If you have some math in LaTeX such as
(a)_n this string should be replaced by \pochhammer{a}{n}.
Similarly
as well as
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.