%% %% This is file `richtext.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% richtext.dtx (with options: `copyright,package') %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% richtext package, %% %% Copyright (C) 2016--2020 %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% %% the terms of the LaTeX Project Public License %% %% Distributed from CTAN archives in directory %% %% macros/latex/base/lppl.txt; either version 1 of the %% %% License, or (at your option) any later version. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e}[1997/12/01] \ProvidesPackage{richtext} [2020/07/02 v1.1.1 richtext: create rich text strings (dps)] \RequirePackage{xkeyval} \RequirePackage{ifpdf} \RequirePackage{ifxetex}[2006/08/21] \RequirePackage{eforms} \@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse \ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi \newif\ifrt@formfield \rt@formfieldtrue \newif\ifrt@needsbody\rt@needsbodyfalse \@ifpackageloaded{eforms}% {\ifxetex\let\@eqV\@eqnuV\fi}{\rt@needsbodytrue} \ifxetex\else\hypersetup{pdfencoding=pdfdoc}\fi \providecommand\eq@RV@Body{
} \providecommand\eq@RV@endBody{} \def\rt@bBody{\ifrt@needsbody\eq@RV@Body\fi} \def\rt@eBody{\ifrt@needsbody\eq@RV@endBody\fi} \newif\ifrtfontstyle\rtfontstylefalse \define@key{rtFont}{font}[]{\def\rt@argi{#1}\ifx\rt@argi\@empty \let\rf@font\@empty\else\rtfontstyletrue \def\rf@font{font-family:#1}\fi} \define@key{rtFont}{size}[]{\def\rt@argi{#1}\ifx\rt@argi\@empty \let\rf@size\@empty\else\rtfontstyletrue\def\rf@size@num{#1}% \def\rf@size@pt{#1pt}\def\rf@size{font-size:#1pt}\fi} \def\rf@size@num{12}\def\rf@size@pt{12pt} \define@key{rtFont}{raise}[]{\def\rt@argi{#1}\ifx\rt@argi\@empty \let\rf@raise\@empty\else\rtfontstyletrue \def\rf@raise{vertical-align:#1pt}\fi} \define@choicekey+{rtFont}{ulstyle}[\val\nr]% {none,ul,2ul,wul,2wul}[none]{% \ifcase\nr\relax \def\rf@ul{none}\or \def\rf@ul{underline}\or \def\rf@ul{double}\or \def\rf@ul{word}\or \def\rf@ul{double word}\fi \rtfontstyletrue }{} \def\rt@r{r}\let\rt@One=1 \let\rt@Zero=0 \def\rt@parseColor#1(#2\@nil{\def\rt@argi{#2}\ifx\rt@argi\@empty \let\rt@rgbdec\rt@Zero\else\let\rt@rgbdec\rt@One\fi} \def\rt@gobbletonil#1\@nil{} \bgroup\@makeother\#\@makeother\&% \gdef\rt@hashtag{#}\gdef\rt@amp{&}\egroup \define@key{rtFont}{color}[]{\def\rt@argi{#1}\ifx\rt@argi\@empty \let\rf@color\@empty\else\rtfontstyletrue \rt@parseColor#1(\@nil \if\rt@rgbdec\rt@One \def\rf@color{color:#1}\else \def\rf@color{color:\rt@hashtag#1}\fi \fi} \let\rf@color\@empty \define@key{rtFont}{url}[]{\def\rt@argi{#1}\ifx\rt@argi\@empty \let\rt@url\@empty\else\rtfontstyletrue\def\rt@url{#1}\fi} \define@choicekey+{rtFontStyle}{bold}[\val\nr]{normal,bold}[bold]% {\edef\rfS@bold{\val}}{} \define@choicekey+{rtFontStyle}{italic}[\val\nr]{normal,italic}[italic]% {\edef\rfS@italic{\val}}{} \define@key{rtFontStyle}{strikeit}[]{\def\rfS@strikeit{line-through}} \let\rfS@normal\@empty\let\rfS@bold\@empty \let\rfS@italic\@empty\let\rfS@strikeit\@empty \define@key{rtFont}{style}[]{\def\rt@argi{#1}\ifx\rt@argi\@empty \let\rf@style\@empty\else\rtfontstyletrue\def\rf@style{#1}\fi} \define@key{rtFont}{raw}[]{\def\rt@argi{#1}\ifx\rt@argi\@empty \let\rf@raw\@empty\else\rtfontstyletrue\def\rf@raw{#1}\fi} \def\resetRtFontKeys{% rtFont family \let\rf@font\@empty\let\rf@size\@empty \let\rf@raise\@empty\let\rf@ul\@empty \let\rf@color\@empty\let\rf@style\@empty\let\rt@url\@empty \let\rf@raw\@empty \let\rfS@normal\@empty\let\rfS@bold\@empty \let\rfS@italic\@empty\let\rfS@strikeit\@empty \rtfontstylefalse} \resetRtFontKeys \newcommand{\@AddToRichText}{\g@addto@macro\rt@RichText} \newcommand{\@AddToPlainText}{\g@addto@macro\rt@PlainText} \def\rt@excl{!} \def\rt@csarg#1#2{\expandafter#1\csname#2\endcsname} \newcommand{\useRV}[1]{\@nameuse{#1-ri}} \newcommand{\useV}[1]{\@nameuse{#1-pl}} \newif\if@rvstring \@rvstringfalse \def\rvorvstring{\if@rvstring \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi } \def\rt@sub#1{\rvorvstring{#1}{#1}} \def\rt@sup#1{\rvorvstring{#1}{#1}} \def\rt@br{\rvorvstring{\rt@RichText
% }% \rt@csarg\xdef{\rt@ctrlName-pl}{\rt@PlainText}% \let\rt@next\relax \else \def\rt@next{\rtpara@ii#2;}% \fi \rt@next} \def\rtpara@ii#1#2#3;{\def\argii{#2}% \ifx\argii\rt@excl \let\rt@next\relax \else \let\span\rt@span \let\br\rt@br\let\bf\rt@bf\let\it\rt@it \@rvstringtrue \span{#1}{#2}\edef\rt@tmp{\noexpand \@AddToRichText{\x}}\rt@tmp \rt@csarg\xdef{\rt@ctrlName-ri}% {%\rt@RichText
% }% \rt@csarg\xdef{\rt@ctrlName-pl}{\rt@PlainText}% \let\span\relax \def\rt@next{\rtpara@i#3;}% \fi\rt@next} \rt@csarg\def{par-ri}{}\rt@csarg\def{par-pl}{\string\r} \rt@csarg\def{skipline-ri}% {\rt@amp \rt@hashtag160;
} \rt@csarg\def{skipline-pl}{\string\r\space} \def\rt@skipline{skipline} \rt@csarg\def{br-ri}{}\rt@csarg\def{br-pl}{\string\r} \def\rt@DSAttr{\ifx\rf@font\@empty\else\rf@font\rt@SC\fi \ifx\rf@size\@empty\else\rf@size\rt@SC\fi \ifx\rf@raise\@empty\else\rf@raise\rt@SC\fi \ifx\rf@ul\@empty\ifx\rfS@strikeit\@empty\else \rt@td\rt@CN\rfS@strikeit\rt@SC\fi \else\rt@td\rt@CN\rf@ul\ifx\rfS@strikeit\@empty\else\space \rfS@strikeit\fi\rt@SC\fi \ifx\rfS@bold\@empty\else\rt@fw\rt@CN\rfS@bold\rt@SC\fi \ifx\rfS@italic\@empty\else\rt@fs\rt@CN\rfS@italic\rt@SC\fi \ifx\rf@color\@empty\else\rf@color\rt@SC\fi} \newcommand\useDefaultDS{font-family:Helvetica,sans-serif;% font-size:12.0pt;font-style:normal;font-weight:normal;% text-align:left;color:\rt@hashtag000000} \newcommand{\setDefaultStyle}[2]{\begingroup \edef\x{\noexpand\setkeys{rtFont}{#2}}\x \edef\x{\noexpand\setkeys{rtFontStyle}{\rf@style}}\x \ifx\rf@ul\@empty\else \let\rt@ul\@empty\PackageWarning{richtext}{% The ul key is not supported within\MessageBreak \string\setDefaultStyle. Ignoring it}\fi \ifx\rf@raise\@empty\else \let\rt@raise\@empty\PackageWarning{richtext}{% The raise key is not supported within\MessageBreak \string\setDefaultStyle. Ignoring it}\fi \ifx\rt@url\@empty\else\let\rf@url\@empty \PackageWarning{richtext}{% The url key is not supported within\MessageBreak \string\setDefaultStyle. Ignoring it}\fi \ifx\rf@font\@empty \def\rf@font{font-family:Helvetica,sans-serif}\fi \ifx\rf@size\@empty\def\rf@size{font-size:\rf@size@pt}\fi \ifx\rf@color\@empty\def\rf@color{color:\rt@hashtag000000}\fi \rt@csarg\xdef{#1-DS}{\rt@DSAttr}% \endgroup} \newcommand{\useDS}[1]{\@nameuse{#1-DS}} \newif\ifrt@firsttok \rt@firsttoktrue \newif\ifrt@itsskipline \rt@itsskiplinefalse \def\rt@addtoRVV#1{% \toks4={\useRV{#1}}\edef\rt@tmpRV{\the\toks0\the\toks4}% \toks4={\useV{#1}}\edef\rt@tmpV{\the\toks2\the\toks4}% \toks0=\expandafter{\rt@tmpRV}\toks2=\expandafter{\rt@tmpV}% } \def\rt@testifbgroup{\@ifnextchar\bgroup {\let\rt@nultiargs=1\rt@gobbletonil} {\let\rt@nultiargs=0\rt@gobbletonil}} \newcommand{\setRVVContent}[2]{\begingroup \rt@firsttoktrue \rt@itsskiplinefalse \rt@testifbgroup#2\@nil \def\contName{#1}\toks0={}\toks2={}\toks4={}% \if\rt@nultiargs1\def\rt@next{\setRVVContent@i#2;}\else \def\rt@next{\setRVVContent@i{#2};}\fi\rt@next} \def\setRVVContent@i#1{\def\rt@argi{#1}% \ifx\rt@argi\rt@SC \rt@csarg\xdef{\contName-vcont}{\the\toks0}% \rt@csarg\xdef{\contName-pcont}{\the\toks2}% \let\rt@next\endgroup \else \expandafter\ifx\csname #1-ri\endcsname\relax \PackageWarning{richtext} {The name '#1' is not declared,\MessageBreak will ignore it. Check the spelling}% \def\rt@next{\setRVVContent@i}% \else \ifrt@firsttok\rt@firsttokfalse\else \ifx\rt@argi\rt@skipline \rt@itsskiplinetrue \else \ifrt@itsskipline \rt@addtoRVV{br}\rt@itsskiplinefalse \else \rt@addtoRVV{par}% \fi \fi \fi \rt@addtoRVV{#1}% \def\rt@next{\setRVVContent@i}% \fi \fi\rt@next } \def\useRVContent#1{\@nameuse{#1-vcont}} \def\useVContent#1{\@nameuse{#1-pcont}} \newenvironment{displayRtPara}[1]{% \gdef\displayRtParaName{#1}\let\rtpdfSPDef\rt@sp@ce \let\makePDFSp\makeTeXSp\let\rt@spc\rt@sp@ce \def\rt@SC{;\allowbreak}\def\rt@CN{:\allowbreak}% }{% \rt@csarg\xdef{displayRV\displayRtParaName}% {\useRV{\displayRtParaName}} \rt@csarg\xdef{displayV\displayRtParaName}% {\useV{\displayRtParaName}} } \newenvironment{displayRtPara*}[1]{% \gdef\displayRtParaName{#1}\let\rtpdfSPDef\rtpdfSPDefPrnt \let\makePDFSp\makeTeXSpPrnt\let\rt@spc\rtpdfSPDefPrnt \def\rt@SC{;\allowbreak}\def\rt@CN{:\allowbreak}% }{% \rt@csarg\xdef{displayRV\displayRtParaName}% {\useRV{\displayRtParaName}} \rt@csarg\xdef{displayV\displayRtParaName}% {\useV{\displayRtParaName}} } \def\displayRV#1{\csname displayRV#1\endcsname} \def\displayV#1{\csname displayV#1\endcsname} \endinput %% %% End of file `richtext.sty'.