summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty
blob: ccb306c2d0a451a076f02c5de7484b3c87a7dec3 (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
%%
%% 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}[2010/06/25 v1.0 OMDoc Text Fragments]
\newif\ifindex\indextrue
\DeclareOption{noindex}{\indexfalse}
\ProcessOptions
\ifindex\makeindex\fi
\RequirePackage{sref}
\RequirePackage{comment}
\srefaddidkey{omtext}
\omdaddkey[]{omtext}{functions}
\omdaddkey{omtext}{display}
\omdaddkey{omtext}{for}
\omdaddkey{omtext}{from}
\omdaddkey{omtext}{type}
\omdaddkey{omtext}{title}
\omdaddkey{omtext}{theory}
\omdaddkey{omtext}{continues}
\omdaddkey{omtext}{verbalizes}
\def\st@flow{flow}
\def\omtext@pre@skip{\smallskip}
\def\omtext@post@skip{}
\providecommand{\stDMemph}[1]{\textbf{#1}}
\newenvironment{omtext}[1][]{\bgroup\omdsetkeys{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}
\omdaddkey{phrase}{style}
\omdaddkey{phrase}{class}
\omdaddkey{phrase}{index}
\omdaddkey{phrase}{verbalizes}
\omdaddkey{phrase}{type}
\newenvironment{phrase}[1][]{\omdsetkeys{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][]{\def\@test{#1}%
\ifindex\ifx\@test\@empty\index{#2}\else\index{#1@#2}\fi\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][]{\def\@test{#1}%
\ifindex\ifx\@test\@empty\index{#2!#3}\else\index{#1@#2!#3}\fi\index{#3!#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][]{\def\@test{#1}%
\ifindex\ifx\@test\@empty\index{#2!#3!#4}\else\index{#1@#2!#3!#4}\fi\index{#3!#2 (#1)}\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\printindex{\IfFileExists{\jobname.ind}{\input{\jobname.ind}}{}}
\def\omspace#1{\hspace*{#1}}
\endinput
%%
%% End of file `omtext.sty'.