diff options
author | Karl Berry <karl@freefriends.org> | 2010-11-12 00:31:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-11-12 00:31:31 +0000 |
commit | 70e387eb63ce4723858c48592208e193dec294f3 (patch) | |
tree | 61ec42df871a70687151ed4a6d1bc6a5c81dc53c /Master/texmf-dist/tex/latex/stex/omtext | |
parent | 2cee8f6dcf8e9596b5cfe9d1f3e55c61b261a320 (diff) |
stex 0.9.3 (11nov10)
git-svn-id: svn://tug.org/texlive/trunk@20410 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/omtext')
-rw-r--r-- | Master/texmf-dist/tex/latex/stex/omtext/omtext.sty | 35 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/stex/omtext/omtext.sty.ltxml | 29 |
2 files changed, 37 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty b/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty index ccb306c2d0a..6896df9177b 100644 --- a/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty +++ b/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty @@ -8,6 +8,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{omtext}[2010/06/25 v1.0 OMDoc Text Fragments] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} \newif\ifindex\indextrue \DeclareOption{noindex}{\indexfalse} \ProcessOptions @@ -15,31 +16,32 @@ \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} +\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} \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}% +\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} -\omdaddkey{phrase}{style} -\omdaddkey{phrase}{class} -\omdaddkey{phrase}{index} -\omdaddkey{phrase}{verbalizes} -\omdaddkey{phrase}{type} -\newenvironment{phrase}[1][]{\omdsetkeys{phrase}{#1}}{} +\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}}''} @@ -71,7 +73,6 @@ \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 %% diff --git a/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty.ltxml b/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty.ltxml index b29c789eafd..92d9f75f5bc 100644 --- a/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty.ltxml +++ b/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty.ltxml @@ -53,6 +53,7 @@ DefKeyVal('omtext','for','Semiverbatim'); DefKeyVal('omtext','from','Semiverbatim'); DefKeyVal('omtext','type','Semiverbatim'); DefKeyVal('omtext','title','Plain'); #Math mode in titles. +DefKeyVal('omtext','start','Plain'); #Math mode in start phrases DefKeyVal('omtext','theory','Semiverbatim'); DefKeyVal('omtext','continues','Semiverbatim'); DefKeyVal('omtext','verbalizes','Semiverbatim'); @@ -65,7 +66,8 @@ DefCMPEnvironment('{omtext} OptionalKeyVals:omtext', . "?&KeyVal(#1,'title')(<dc:title>&KeyVal(#1,'title')</dc:title>)()" . "<omdoc:CMP>" . "<omdoc:p>" - . "#body"); + . "?&KeyVal(#1,'start')(<omdoc:phrase type='startemph'>&KeyVal(#1,'start')</omdoc:phrase>)()" + . "#body"); sub DefCMPEnvironment { my ($proto, $replacement, %options) = @_; my @before = $options{beforeDigest} ? ($options{beforeDigest}) : (); @@ -82,7 +84,7 @@ sub DefCMPConstructor { push(@before, \&useCMPItemizations); $options{beforeDigest} = \@before; DefConstructor($proto, $replacement, %options); -} +}#$ DefKeyVal('phrase','id','Semiverbatim'); DefKeyVal('phrase','style','Semiverbatim'); DefKeyVal('phrase','class','Semiverbatim'); @@ -101,10 +103,11 @@ DefConstructor('\sinlinequote [] {}', . "#2" . "</omdoc:phrase>"); DefEnvironment('{sblockquote} []', - "<omdoc:omgroup type='quote'" - . "?#1(<dc:source>#1</dc:source>\n)()" - . "#body" - . "</omdoc:omgroup>"); + "?#1(<omdoc:omtext type='quote'>" + . "<dc:source>#1</dc:source>" + . "#body" + . " </omdoc:omtext>)" + . "(<omdoc:p class='quote'>#body</omdoc:p>)"); DefConstructor('\lec{}', "\n<omdoc:note type='line-end-comment'>#1</omdoc:note>"); RawTeX(' @@ -161,9 +164,7 @@ DefConstructor('\atwinalt[]{}{}{}{}', . "<omdoc:idp>#4</omdoc:idp>" . "</omdoc:ide>" ."</omdoc:idx>"); -DefConstructor('\printindex','<omdoc:index/>'); -DefConstructor('\par',sub { $_[0]->maybeCloseElement('omdoc:p'); }, - alias=>"\\par\n"); +DefConstructor('\par',sub { $_[0]->maybeCloseElement('omdoc:p'); },alias=>"\\par\n"); Tag('omdoc:p', autoClose=>1, autoOpen=>1); Tag('omdoc:CMP', autoClose=>1, autoOpen=>1); Tag('omdoc:omtext', autoClose=>1, autoOpen=>1); @@ -171,7 +172,15 @@ DefConstructor('\omspace{}',''); DefConstructor('\emph{}',"<omdoc:phrase class='emphasis'>#1</omdoc:phrase>"); DefConstructor('\em',"<omdoc:phrase class='emphasis'>"); DefConstructor('\texttt{}',"<omdoc:phrase class='code'>#1</omdoc:phrase>"); +DefConstructor('\tt',"<omdoc:phrase class='code'>"); DefConstructor('\textbf{}',"<omdoc:phrase class='bold'>#1</omdoc:phrase>"); +DefConstructor('\bf',"<omdoc:phrase class='bold'>"); +DefConstructor('\textsf{}',"<omdoc:phrase class='sans-serif'>#1</omdoc:phrase>"); +DefConstructor('\sf',"<omdoc:phrase class='sans-serif'>"); +DefConstructor('\textsl{}',"<omdoc:phrase class='slanted'>#1</omdoc:phrase>"); +DefConstructor('\sl',"<omdoc:phrase class='slanted'>"); +DefConstructor('\textit{}',"<omdoc:phrase class='italic'>#1</omdoc:phrase>"); +DefConstructor('\it',"<omdoc:phrase class='italic'>"); Tag('omdoc:phrase', autoClose=>1); DefEnvironment('{center}','#body'); DefEnvironment('{flushleft}','#body'); @@ -201,7 +210,7 @@ DefConstructor('\scriptsize',''); DefConstructor('\tiny',''); DefConstructor('\fbox{}','#1'); DefConstructor('\footnote[]{}', - "<omdoc:note class='foot' ?#1(mark='#1')>#2</omdoc:note>"); + "<omdoc:note type='foot' ?#1(mark='#1')>#2</omdoc:note>"); DefConstructor('\footnotemark[]',""); DefConstructor('\footnotetext[]{}', "<omdoc:note class='foot' ?#1(mark='#1')>#2</omdoc:note>"); |