Compare commits
No commits in common. "7ee84470e93a374996776aa4cd75c5cfdc006afa" and "17920077daa97889f8c47fdce0523ace2a99865c" have entirely different histories.
7ee84470e9
...
17920077da
2 changed files with 4 additions and 9 deletions
|
@ -7,10 +7,6 @@
|
||||||
\it{}#1%
|
\it{}#1%
|
||||||
}}
|
}}
|
||||||
|
|
||||||
\def\textasciitilde{$\sim$}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\def\N{{\bb N}}
|
\def\N{{\bb N}}
|
||||||
\def\R{{\bb R}}
|
\def\R{{\bb R}}
|
||||||
\def\E{{\bb E}}
|
\def\E{{\bb E}}
|
||||||
|
@ -24,10 +20,9 @@
|
||||||
\fncount=1
|
\fncount=1
|
||||||
\def\fnmark{$^{\the\fncount}$}
|
\def\fnmark{$^{\the\fncount}$}
|
||||||
\def\fn#1{\footnote\fnmark{#1}\advance\fncount by 1}
|
\def\fn#1{\footnote\fnmark{#1}\advance\fncount by 1}
|
||||||
\def\sectioneject{\vfil\supereject}
|
|
||||||
\def\section#1#2{
|
\def\section#1#2{
|
||||||
\sectioneject
|
\vfil\supereject
|
||||||
\vskip 16pt\vbox{\settextsize{20}\bf #1\kern 1em\relax#2%
|
\vbox{\settextsize{20}\bf #1\kern 1em\relax#2%
|
||||||
\addtoc\tocsection{#1}{}{#2}%
|
\addtoc\tocsection{#1}{}{#2}%
|
||||||
}\nobreak\vskip 12pt
|
}\nobreak\vskip 12pt
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,12 +228,12 @@ class TransformProcessor(NOPProcessor):
|
||||||
importedDoc = import_md(open(filename, "r").read())
|
importedDoc = import_md(open(filename, "r").read())
|
||||||
self.transform(importedDoc.content)
|
self.transform(importedDoc.content)
|
||||||
elif e.attributes["type"] == "module":
|
elif e.attributes["type"] == "module":
|
||||||
matches = re.match(r"^([\w\.]+)(?: as (\w+))?$", e.content[0].text[1:])
|
matches = re.match(r"^(\w+)(?: as (\w+))?$", e.content[0].text[1:])
|
||||||
if not matches:
|
if not matches:
|
||||||
raise SyntaxError(f"`{e.content[0].text[1:]}`: invalid syntax")
|
raise SyntaxError(f"`{e.content[0].text[1:]}`: invalid syntax")
|
||||||
module = importlib.import_module(matches.group(1))
|
module = importlib.import_module(matches.group(1))
|
||||||
module_name = matches.group(1) if matches.group(2) is None else matches.group(2)
|
module_name = matches.group(1) if matches.group(2) is None else matches.group(2)
|
||||||
self.context.add_commands_from_module(module, "")
|
self.context.add_commands_from_module(module, module_name)
|
||||||
elif e.attributes["type"] == "metadata":
|
elif e.attributes["type"] == "metadata":
|
||||||
filename = self.context.dir + "/" + e.content[0].text[1:]
|
filename = self.context.dir + "/" + e.content[0].text[1:]
|
||||||
self.context.add_dep(filename)
|
self.context.add_dep(filename)
|
||||||
|
|
Loading…
Reference in a new issue