summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stex/smultiling/smultiling.sty
blob: 582fe5dbd4deb4e0b7cbf22e655b191beb981e77 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
%%
%% This is file `smultiling.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% smultiling.dtx  (with options: `sty')
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{smultiling}[2016/04/06 v0.1 Multilingual Support for sTeX]
\newif\if@smultiling@mh@\@smultiling@mh@false
\DeclareOption{mh}{\@smultiling@mh@true}
\newif\if@langfiles\@langfilesfalse
\DeclareOption{langfiles}{\@langfilestrue}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{modules}}
\ProcessOptions
\if@smultiling@mh@\RequirePackage{smultiling-mh}\fi
\RequirePackage{etoolbox}
\RequirePackage{structview}
\newenvironment{modsig}[2][]{%
\def\@test{#1}\ifx\@test\@empty\begin{module}[id=#2]\else\begin{module}[id=#2,#1]\fi\ignorespacesandpars}
{\end{module}\ignorespacesandparsafterend}
\newenvironment{viewsig}[4][]{\def\@test{#1}\ifx\@test\@empty%
  \begin{view}[id=#2,ext=tex]{#3}{#4}\else\begin{view}[id=#2,#1,ext=tex]{#3}{#4}\fi%
  \ignorespacesandpars}
  {\end{view}\ignorespacesandparsafterend}
\newcommand\symi{\@ifstar\@symi@star\@symi}
\newcommand\@symi[1]{\if@importing\else Symbol: \textsf{#1}\fi\ignorespacesandpars}
\newcommand\@symi@star[1]{\if@importing\else Primary Symbol: \textsf{#1}\fi\ignorespacesandpars}
\newcommand\symii{\@ifstar\@symii@star\@symii}
\newcommand\@symii[2]{\if@importing\else Symbol: \textsf{#1-#2}\fi\ignorespacesandpars}
\newcommand\@symii@star[2]{\if@importing\else Primary Symbol: \textsf{#1-#2}\fi\ignorespacesandpars}
\newcommand\symiii{\@ifstar\@symiii@star\@symiii}
\newcommand\@symiii[3]{\if@importing\else Symbol: \textsf{#1-#2-#3}\fi\ignorespacesandpars}
\newcommand\@symiii@star[3]{\if@importing\else Primary Symbol: \textsf{#1-#2-#3}\fi\ignorespacesandpars}
\addmetakey{modnl}{load}
\addmetakey*{modnl}{title}
\addmetakey*{modnl}{creators}
\addmetakey*{modnl}{contributors}
\addmetakey{modnl}{srccite}
\addmetakey{modnl}{primary}[yes]
\newenvironment{modnl}[3][]{\metasetkeys{modnl}{#1}%
  \def\@test{#1}\ifx\@test\@empty\begin{module}[id=#2.#3]\else\begin{module}[id=#2.#3,#1]\fi%
  \if@langfiles\importmodule[load=#2,ext=tex]{#2}\else
  \ifx\modnl@load\@empty\importmodule{#2}\else\importmodule[ext=tex,load=\modnl@load]{#2}\fi%
  \fi%
  \ignorespacesandpars}
{\end{module}\ignorespacesandparsafterend}
\newenvironment{viewnl}[5][]{\def\@test{#1}\ifx\@test\@empty%
  \begin{viewsketch}[id=#2.#3,ext=tex]{#4}{#5}\else%
  \begin{viewsketch}[id=#2.#3,#1,ext=tex]{#4}{#5}\fi%
  \ignorespacesandpars}
  {\end{viewsketch}\ignorespacesandparsafterend}
\def\@instring#1#2{TT\fi\begingroup\edef\x{\endgroup\noexpand\in@{#1}{#2}}\x\ifin@}
\newcommand\mtrefi[2][]{\if\@instring{?}{#1}\@mtref #1\relax{#2}\else\termref[cd=#1]{#2}\fi}
\def\@mtref#1?#2\relax{\termref[cd=#1,name=#2]}
\newcommand\mtrefis[2][]{\mtrefi[#1]{#2s}}
\newcommand\mtrefii[3][]{\mtrefi[#1]{#2 #3}}
\newcommand\mtrefiis[3][]{\mtrefi[#1]{#2 #3s}}
\newcommand\mtrefiii[4][]{\mtrefi[#1]{#2 #3 #4}}
\newcommand\mtrefiiis[4][]{\mtrefi[#1]{#2 #3 #4s}}
\newcommand\ttl[1]{\red{TTL: #1}}
\endinput
%%
%% End of file `smultiling.sty'.