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