blob: d57be46a147a52ad58bde93ba7c58d917f965a21 (
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
%%
%% This is file `omtext.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% omtext.dtx (with options: `package')
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{omtext}[2012/01/28 v1.0 OMDoc Text Fragments]
\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}}
\newif\ifindex\indextrue
\DeclareOption{noindex}{\indexfalse}
\ProcessOptions
\ifindex\makeindex\fi
\RequirePackage{sref}
\RequirePackage{comment}
\srefaddidkey{omtext}
\addmetakey[]{omtext}{functions}
\addmetakey*{omtext}{display}
\addmetakey{omtext}{for}
\addmetakey{omtext}{from}
\addmetakey{omtext}{type}
\addmetakey*{omtext}{title}
\addmetakey*{omtext}{start}
\addmetakey{omtext}{theory}
\addmetakey{omtext}{continues}
\addmetakey{omtext}{verbalizes}
\addmetakey{omtext}{subject}
\def\st@flow{flow}
\def\omtext@pre@skip{\smallskip}
\def\omtext@post@skip{}
\providecommand{\stDMemph}[1]{\textbf{#1}}
\newenvironment{omtext}[1][]{\bgroup\metasetkeys{omtext}{#1}\sref@label@id{this paragraph}%
\def\lec##1{\@lec{##1}}
\ifx\omtext@display\st@flow\else\omtext@pre@skip\par\noindent%
\ifx\omtext@title\@empty\else\stDMemph{\omtext@title}: \fi\fi\ignorespaces}
{\egroup\omtext@post@skip}
\srefaddidkey{phrase}
\addmetakey{phrase}{style}
\addmetakey{phrase}{class}
\addmetakey{phrase}{index}
\addmetakey{phrase}{verbalizes}
\addmetakey{phrase}{type}
\newenvironment{phrase}[1][]{\metasetkeys{phrase}{#1}}{}
\def\nlex#1{\green{\sl{#1}}}
\def\nlcex#1{*\green{\sl{#1}}}
\def\@sinlinequote#1{``{\sl{#1}}''}
\def\@@sinlinequote#1#2{\@sinlinequote{#2}~#1}
\newcommand{\sinlinequote}[2][]
{\def\@opt{#1}\ifx\@opt\@empty\@sinlinequote{#2}\else\@@sinlinequote\@opt{#2}\fi}
\def\begin@sblockquote{\begin{quote}\sl}
\def\end@sblockquote{\end{quote}}
\def\begin@@sblockquote#1{\begin@sblockquote}
\def\end@@sblockquote#1{\def\@@lec##1{{\rm ##1}}\@lec{#1}\end@sblockquote}
\newenvironment{sblockquote}[1][]
{\def\@opt{#1}\ifx\@opt\@empty\begin@sblockquote\else\begin@@sblockquote\@opt\fi}
{\ifx\@opt\@empty\end@sblockquote\else\end@@sblockquote\@opt\fi}
\providecommand{\@@lec}[1]{(#1)}
\def\@lec#1{\strut\hfil\strut\null\nobreak\hfill\hbox{\@@lec{#1}}}
\def\lec#1{\@lec{#1}\par}
\newcommand\mygraphics[2][]{\includegraphics[#1]{#2}}
\newcommand\mycgraphics[2][]{\begin{center}\includegraphics[#1]{#2}\end{center}}
\newcommand\mybgraphics[2][]{\fbox{\includegraphics[#1]{#2}\end{center}}}
\newcommand{\omdoc@index}[2][]{\ifindex\def\@test{#1}%%
\ifx\@test\@empty\def\@@idx{#2}\else\def\@@idx{#1}\fi%
\@ifundefined{mod@id}{\index{\@@idx @#2}}%
{\index{\@@idx @{\importmodule{\mod@id} #2}}\fi}}
\newcommand{\indexalt}[3][]{{#2}\omdoc@index[#1]{#3}} % word in text and index
\newcommand{\indextoo}[2][]{{#2}\omdoc@index[#1]{#2}} % word in text and index
\newcommand{\@twin}[3][]{\ifindex\def\@test{#1}%%
\ifx\@test\@empty\def\@@idx{#2}\else\def\@@idx{#1}\fi%
\@ifundefined{mod@id}
{\index{\@@idx @#2!#3}%
\ifx\@test\@empty\def\@@idx{#3}\else\def\@@idx{#1}\fi%
\index{\@@idx @#2!#3}}%
{\index{\@@idx @{\importmodule{\mod@id} #2}!{\importmodule{\mod@id} #3}}%
\ifx\@test\@empty\def\@@idx{#3}\else\def\@@idx{#1}\fi%
\index{\@@idx @{\importmodule{\mod@id} #3}!{\importmodule{\mod@id} #2}}\fi}}
\newcommand{\twinalt}[4][]{#2\@twin[#1]{#3}{#4}}
\newcommand{\twintoo}[3][]{{#2 #3}\@twin[#1]{#2}{#3}} % and use the word compound too
\newcommand{\@atwin}[4][]{\ifindex\def\@test{#1}%%
\ifx\@test\@empty\def\@@idx{#2}\else\def\@@idx{#1}\fi%
\@ifundefined{mod@id}%
{\index{\@@idx @#2!#3!#4}%
\ifx\@test\@empty\def\@@idx{#3}\else\def\@@idx{#1}\fi
\index{\@@idx @#3!#2 (#4)}}%
{\index{\@@idx @{\importmodule{\mod@id} #2}!{\importmodule{\mod@id} #3}!{\importmodule{\mod@id} #4}}
\ifx\@test\@empty\def\@@idx{#3}\else\def\@@idx{#1}\fi%
\index{\@@idx @{\importmodule{\mod@id} #3}!{\importmodule{\mod@id} #2} ({\importmodule{\mod@id} #4})}\fi}}
\newcommand{\atwinalt}[5][]{#2\@atwin[#1]{#3}{#4}{#4}}
\newcommand{\atwintoo}[4][]{{#2 #3 #4}\@atwin[#1]{#2}{#3}{#4}} % and use it too
\def\omspace#1{\hspace*{#1}}
\endinput
%%
%% End of file `omtext.sty'.
|