File: import.hva

package info (click to toggle)
hevea 2.18-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,588 kB
  • ctags: 2,364
  • sloc: ml: 18,965; sh: 370; makefile: 131
file content (30 lines) | stat: -rw-r--r-- 670 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
\ProvidesPackage{import}
\@primitives{import}
\newcommand{\@imp@dir}{}
\hva@newstack{@imp}
\newcommand{\@imp@import}[3]
{%
\@imp@set{#2}%
\@push@imp{\@imp@dir}%
\renewcommand{\@imp@dir}{#2}%
#1{#3}%
\@pop@imp{\@imp@dir}%
\@imp@set{\@imp@dir}%
}
\newcommand{\import}[2]{\@imp@import{\input}{#1}{#2}}
\newcommand{\includefrom}[2]{\@imp@import{\include}{#1}{#2}}
%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\@imp@sub}[3]
{%
\@push@imp{\@imp@dir}%
\prim@def\@imp@dir{\@imp@dir{}#2}%
\@imp@set{\@imp@dir}%
#1{#3}%
\@pop@imp{\@imp@dir}%
\@imp@set{\@imp@dir}%
}
\newcommand{\subimport}[2]{\@imp@sub{\input}{#1}{#2}}
\newcommand{\subincludefrom}[2]{\@imp@sub{\include}{#1}{#2}}
%%%%