10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-24 13:23:40 +01:00

Continue to try fix

This commit is contained in:
Mickaël Véril 2020-02-07 11:08:19 +01:00
parent 024b89a49c
commit 4c72f4ff5d

View File

@ -51,19 +51,17 @@ class newCommand(commandBase):
if str(tex)==str(cmd):
tex.expr=fres.expr
else:
def tryRun():
cmds=list(tex.find_all(self.commandName))
if len(cmds)!=0:
for cmd in cmds:
if self.argNum==0:
res=self.result
else:
res=re.sub('#[1-{}]'.format(self.argNum),lambda m: cmd.args[int(m.group(1))-1],self.result)
soup=TexSoup(res)
tex.replace(cmd,soup)
tex.replace(cmd,fres)
def tryRun(self,tex):
cmds=list(tex.find_all(self.commandName))
if len(cmds)!=0:
for cmd in cmds:
if self.argNum==0:
res=self.result
else:
res=re.sub('#[1-{}]'.format(self.argNum),lambda m: cmd.args[int(m.group(1))-1],self.result)
soup=TexSoup(res)
tex.replace(cmd,soup)
@staticmethod
def runAll(tex,collection):
@ -109,6 +107,7 @@ def tabularToData(table,commands=None):
mcolel=child[0]
mcol=multiColumn(mcolel)
el=mcol.contents
el=desarg(el)
if commands!=None:
newCommand.runAll(el,commands)
for i in range(int(mcol.cols)):