%This is a small package with additions to Wolfgang Sternefeld's linguex package (adapted to version 4.1). It provides extended functions for cross-referencing and repeating numbered and named sentences, additional formatting options and hyperref support. %Author: Peter Pagin (with a contribution by Robin Fairbairns). %email: peter.pagin@philosophy.su.se %Date: 2010.04.14 %Version: 1.0 \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{philex} \RequirePackage{xspace,calc,cgloss4e,linguex} \newif\ifhyperref \hyperreffalse \newif\ifoldpunct \oldpunctfalse \DeclareOption{oldpunct}{\oldpuncttrue} \DeclareOption{hyper}{\hyperreftrue} \ProcessOptions %Spacing and formatting commands \setlength{\Exredux}{-\baselineskip} \renewcommand{\philarge}{3em} \renewcommand{\philmiddle}{2em} \renewcommand{\philsmall}{1em} \renewcommand{\phlabelwidth}[1]{\renewcommand{\philarge}{#1} \renewcommand{\philmiddle}{#1} \renewcommand{\philsmall}{#1}} \renewcommand{\phlabeldefault}{\renewcommand{\philarge}{3em} \renewcommand{\philmiddle}{3em} \renewcommand{\philsmall}{3em}} \newcommand{\phlabelsep}[1]{\setlength{\Exlabelsep}{#1}} \newcommand{\phlabelsepdefault}{\setlength{\Exlabelsep}{1.3em}} \newcommand{\firstphildash}{} \newcommand{\secondphildash}{} \newcommand{\phildashes}[2]{\renewcommand{\firstphildash}{#1}\renewcommand{\secondphildash}{#2}} \newcommand{\subettan}{\alph} %Controlling brackets,lowercase and full stop. \newcommand{\philpunct}{} \newcommand{\philempty}{\renewcommand{\philpunct}{}} \newcommand{\philfullstop}{\renewcommand{\philpunct}{.}} \newcommand{\philcomma}{\renewcommand{\philpunct}{,}} \newcommand{\philexclaim}{\renewcommand{\philpunct}{!}} \newcommand{\philquestion}{\renewcommand{\philpunct}{?}} \newcommand{\philsubpunct}{} \newcommand{\philsubempty}{\renewcommand{\philsubpunct}{}} \newcommand{\philsubstop}{\renewcommand{\philsubpunct}{.}} \newcommand{\philsubcomma}{\renewcommand{\philsubpunct}{,}} \newcommand{\philsubexclaim}{\renewcommand{\philsubpunct}{!}} \newcommand{\philsubquestion}{\renewcommand{\philsubpunct}{?}} \ifoldpunct% \newcommand{\p}{\philpunct}% \newcommand{\q}{\philempty}% \newcommand{\s}{\philfullstop}% \newcommand{\km}{\philcomma}% \newcommand{\pt}{\philsubpunct}% \newcommand{\qt}{\philsubempty}% \newcommand{\stp}{\philsubstop}% \newcommand{\kmt}{\philsubcomma}\fi \newcommand{\lebrack}{(} \newcommand{\ribrack}{)} \def\broff{\def\lebrack{}\def\ribrack{}} \def\bron{\def\lebrack{(}\def\ribrack{)}} \newcommand{\philbrackets}[2]{\renewcommand{\lebrack}{#1}\renewcommand{\ribrack}{#2}} \newcounter{bpa} \newcounter{bpb} \newcounter{bpc} \newcounter{bpd} \newcounter{bna} \newcommand{\bn}{\refstepcounter{bna}\thebna.\quad} \newcommand{\bns}{\setcounter{bna}{0}} %Removing brackets from ExNo and SubExNo \renewcommand{\theExNo}{\arabic{ExNo}} \renewcommand{\theSubExNo}{\theExNo\alph{SubExNo}} \renewcommand{\theSubSubExNo}{\theSubExNo\roman{SubSubExNo}} \newcommand{\ncentro}{\columnwidth-(\Exindent+\Exlabelsep+\Exlabelwidth)} \newcommand{\wcentro}{\columnwidth-(\Exindent*2+\Exlabelsep*2+\Exlabelwidth*2)} \newcommand{\centro}{\wcentro} \newcommand{\narrowcenter}{\renewcommand{\centro}{\ncentro}} \newcommand{\widecenter}{\renewcommand{\centro}{\wcentro}} %Top-level numbered sentence: \newcommand{\lb}[3][n]{ \ifdim\lastskip=\Extopsep\vspace\Exredux\else \fi \immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2r\endcsname{#3}\expandafter\gdef\csname#2\endcsname{\ref{#2}} \expandafter\gdef\csname#2p\endcsname{\MakeLowercase#3}}} \expandafter\providecommand\expandafter{\csname#2r\endcsname}{#3} \expandafter\providecommand\expandafter{\csname#2\endcsname}{\ref{#2}}\expandafter\providecommand\expandafter{\csname#2p\endcsname}{\MakeLowercase#3} \ifhyperref% \renewcommand{\theFnExNo}{\roman{FnExNo}} \ex. \label{#2} \if#1c \setlength{\abovedisplayskip}{1ex} \setlength{\belowdisplayskip}{2ex}% \parbox{\centro}{\centering \hypertarget{#2}{#3}\philpunct}\else \hypertarget{#2}{#3}\philpunct\fi\par \else \ex. \label{#2} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}% \parbox{\centro}{\centering #3\philpunct}\else #3\philpunct\fi\par% \fi} %Top-level named sentence: \newcommand{\lbp}[4][n]{ \ifdim\lastskip=\Extopsep\vspace{\Exredux}\fi \label{#2} \immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2p\endcsname{\MakeLowercase#4}\expandafter\gdef\csname#2\endcsname{#3} \expandafter\gdef\csname#2r\endcsname{#4}}} \expandafter\providecommand\expandafter{\csname#2p\endcsname}{\MakeLowercase#4} \expandafter\providecommand\expandafter{\csname #2\endcsname}{#3} \expandafter\providecommand\expandafter{\csname#2r\endcsname}{#4} \ifhyperref \ex.[\hypertarget{#2}{\lebrack#3\ribrack}\hspace{-1em}] \renewcommand{\theExNo}{\csname#2\endcsname} \renewcommand{\theFnExNo}{\csname#2\endcsname} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}\parbox{\centro}{\centering #4\philpunct} \else #4\philpunct\fi\par \else% \ex.[\lebrack#3\ribrack\hspace{-1em}] \renewcommand{\theExNo}{\csname#2\endcsname} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}\parbox{\centro}{\centering #4\philpunct} \else #4\philpunct\fi\par \fi } %Stand-alone sub-level initial sentence, sequence a: \newcommand{\lbpa}[3][n]{ \ifdim\lastskip=\Extopsep\vspace{\Exredux}\fi \refstepcounter{bpa}\label{#2} \immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2p\endcsname{\MakeLowercase#3} \expandafter\gdef\csname#2\endcsname{\ref{#2}} \expandafter\gdef\csname#2r\endcsname{#3}}} \expandafter\providecommand\expandafter{\csname#2p\endcsname}{\MakeLowercase#3} \expandafter\providecommand\expandafter{\csname#2\endcsname}{\ref{#2}} \expandafter\providecommand\expandafter{\csname#2r\endcsname}{#3} \ifhyperref \ex.[\hypertarget{#2}{\thebpa}\hspace{-1em}] \renewcommand{\theExNo}{\csname#2\endcsname} \renewcommand{\theFnExNo}{\csname#2\endcsname} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}\parbox{\centro}{\centering #3\philpunct} \else #3\fi\philpunct\par \else \ex.[\thebpa\hspace{-1em}] \renewcommand{\theSubExNo}{\csname#2\endcsname\subettan{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}\parbox{\centro}{\centering #3\philpunct} \else #3\fi\philpunct\par \fi } %Stand-alone sub-level initial sentence, sequence b: \newcommand{\lbpb}[3][n]{ \ifdim\lastskip=\Extopsep\vspace{\Exredux}\fi \refstepcounter{bpb}\label{#2} \immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2p\endcsname{\MakeLowercase#3}\expandafter\gdef\csname#2\endcsname{\ref{#2}} \expandafter\gdef\csname#2r\endcsname{#3}}} \expandafter\providecommand\expandafter{\csname#2p\endcsname}{\MakeLowercase#3} \expandafter\providecommand\expandafter{\csname #2\endcsname}{\ref{#2}} \expandafter\providecommand\expandafter{\csname#2r\endcsname}{#3} \ifhyperref \ex.[\hypertarget{#2}{\thebpb}\hspace{-1em}] \renewcommand{\theExNo}{\csname#2\endcsname} \renewcommand{\theFnExNo}{\csname#2\endcsname} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}\parbox{\centro}{\centering #3\philpunct} \else #3\fi\philpunct\par \else \ex.[\thebpb\hspace{-1em}] \renewcommand{\theSubExNo}{\csname#2\endcsname\subettan{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}\parbox{\centro}{\centering #3\philpunct} \else #3\fi\philpunct\par \fi } %Stand-alone sub-level initial sentence, sequence c: \newcommand{\lbpc}[3][n]{ \ifdim\lastskip=\Extopsep\vspace{\Exredux}\fi \refstepcounter{bpc}\label{#2} \immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2p\endcsname{\MakeLowercase#3}\expandafter\gdef\csname#2\endcsname{\ref{#2}} \expandafter\gdef\csname#2r\endcsname{#3}}} \expandafter\providecommand\expandafter{\csname#2p\endcsname}{\MakeLowercase#3} \expandafter\providecommand\expandafter{\csname #2\endcsname}{\ref{#2}} \expandafter\providecommand\expandafter{\csname#2r\endcsname}{#3} \ifhyperref \ex.[\hypertarget{#2}{\thebpc}\hspace{-1em}] \renewcommand{\theExNo}{\csname#2\endcsname} \renewcommand{\theFnExNo}{\csname#2\endcsname} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}\parbox{\centro}{\centering #3\philpunct} \else #3\fi \philpunct\par \else \ex.[\thebpc\hspace{-1em}] \renewcommand{\theSubExNo}{\csname#2\endcsname\subettan{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}\parbox{\centro}{\centering #3\philpunct} \else #3\fi\philpunct\par \fi } %Stand-alone sub-level initial sentence, sequence d: \newcommand{\lbpd}[3][n]{ \ifdim\lastskip=\Extopsep\vspace{\Exredux}\fi \refstepcounter{bpd}\label{#2} \immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2p\endcsname{\MakeLowercase#3}\expandafter\gdef\csname#2\endcsname{\ref{#2}} \expandafter\gdef\csname#2r\endcsname{#3}}} \expandafter\providecommand\expandafter{\csname#2p\endcsname}{\MakeLowercase#3} \expandafter\providecommand\expandafter{\csname #2\endcsname}{\ref{#2}} \expandafter\providecommand\expandafter{\csname#2r\endcsname}{#3} \ifhyperref \ex.[\hypertarget{#2}{\thebpd}\hspace{-1em}] \renewcommand{\theExNo}{\csname#2\endcsname} \renewcommand{\theFnExNo}{\csname#2\endcsname} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}\parbox{\centro}{\centering #3\philpunct} \else #3\fi\philpunct\par \else \ex.[\thebpd\hspace{-1em}] \renewcommand{\theSubExNo}{\csname#2\endcsname\subettan{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}\parbox{\centro}{\centering #3\philpunct} \else #3\fi\philpunct\par \fi } %Top-level sentence with repeated and suffixed name or number: \newcommand{\lbu}[5][n]{\ifdim\lastskip=\Extopsep\vspace{\Exredux}\fi \label{#2} \immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2p\endcsname{\MakeLowercase#5} \expandafter\gdef\csname #2\endcsname{\csname#3\endcsname#4} \expandafter\gdef\csname #2r\endcsname{#5}}} \expandafter\providecommand\expandafter{\csname#2p\endcsname}{\MakeLowercase#5} \expandafter\providecommand\expandafter{\csname #2\endcsname}{\csname#3\endcsname#4} \expandafter\providecommand\expandafter{\csname #2r\endcsname}{#5} \ifhyperref \ex.[\lebrack\hypertarget{#2}{\csname#3\endcsname#4}\ribrack\hspace{-1em}] \renewcommand{\theExNo}{\csname#2\endcsname} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}\parbox{\centro}{\centering #5\philpunct} \else #5\philpunct\fi\par \else \ex.[\lebrack\csname#3\endcsname#4\ribrack\hspace{-1em}] \renewcommand{\theExNo}{\csname#2\endcsname} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{2ex}\parbox{\centro}{\centering #5\philpunct} \else #5\philpunct\fi\par \fi } %----------------- Sub-environments ------------------------------- \newcommand{\philsemi}{;} \newcommand{\lba}[3][;]{\philempty \def\tempa{#1} \def\tempb{#1} \ifnum\theExDepth=0\def\tempc{\tempa}\fi \ifnum\theExDepth=1\def\tempc{\tempa} \else \ifnum \theExDepth=2\def\tempc{\tempb}\else\fi\fi \if \tempc\philsemi \immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2p \endcsname{\MakeLowercase#3}\expandafter\gdef\csname#2r\endcsname{#3} \expandafter\gdef\csname#2\endcsname{\ref{#2}}}} \expandafter\providecommand\csname#2p\endcsname{\MakeLowercase#3} \expandafter\providecommand\csname#2r\endcsname{#3} \expandafter\providecommand\csname#2\endcsname{\ref{#3}} \a. \label{#2}#3\philsubpunct \else \immediate\write\@auxout{% \unexpanded{\expandafter\gdef\csname#2p\endcsname{\MakeLowercase#3} \expandafter\gdef\csname#2r\endcsname{#3} \expandafter\gdef\csname#2\endcsname{\theExNo#1}}} \ifnum\theExDepth=1 \renewcommand{\theSubExNo}{\theExNo#1} \else \ifnum\theExDepth=2 \renewcommand{\theSubSubExNo}{\theSubExNo\refdash#1} \else \fi\fi \expandafter\providecommand\csname#2p\endcsname{\MakeLowercase#3} \expandafter\providecommand\csname#2r\endcsname{#3} \expandafter\providecommand\csname#2\endcsname{\theExNo#1} \ifnum\theExDepth=1 \renewcommand{\theSubExNo}{\theExNo#1}\else \ifnum\theExDepth=2 \renewcommand{\theSubSubExNo}{\theSubExNo#1} \else \fi\fi \ifhyperref \a.[\hypertarget{#2}\lebrack#1\ribrack]\label{#2}#3\philsubpunct \else \a.[\lebrack#1\ribrack]\label{#2}#3\philsubpunct\fi \fi} \newcommand{\lbb}[3][;]{\philempty \def\tempa{#1} \def\tempb{#1} \ifnum\theExDepth=1\def\tempc{\tempa} \else \def\tempc{\tempb}\fi \if \tempc\philsemi \immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2p \endcsname{\MakeLowercase#3}\expandafter\gdef\csname#2r\endcsname{#3} \expandafter\gdef\csname#2\endcsname{\ref{#2}}}} \expandafter\providecommand\csname#2p\endcsname{\MakeLowercase#3} \expandafter\providecommand\csname#2r\endcsname{#3} \expandafter\providecommand\csname#2\endcsname{\ref{#3}} \b. \label{#2}#3\philsubpunct \else \immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2p \endcsname{\MakeLowercase#3} \expandafter\gdef\csname#2r\endcsname{#3} \expandafter\gdef\csname#2\endcsname{\theExNo#1}}} \ifnum\theExDepth=1 \renewcommand{\theSubExNo}{\theExNo#1}\else \ifnum\theExDepth=2 \renewcommand{\theSubSubExNo}{\theSubExNo#1} \else \fi\fi \expandafter\providecommand\csname#2p\endcsname{\MakeLowercase#3} \expandafter\providecommand\csname#2r\endcsname{#3} \expandafter\providecommand\csname#2\endcsname{\theExNo#1} \ifhyperref \b.[\hypertarget{#2}\lebrack#1\ribrack] \label{#2}#3\philsubpunct \else \b.[\lebrack#1\ribrack] \label{#2}#3\philsubpunct \fi \fi} \newcommand{\lbz}[3][;]{\philempty \def\tempa{#1} \def\tempb{#1} \ifnum\theExDepth=1\def\tempc{\tempa} \else \def\tempc{\tempb}\fi \if \tempc\philsemi \immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2p \endcsname{\MakeLowercase#3}\expandafter\gdef\csname#2r\endcsname{#3} \expandafter\gdef\csname#2\endcsname{\ref{#2}}}} \expandafter\providecommand\csname#2p\endcsname{\MakeLowercase#3} \expandafter\providecommand\csname#2r\endcsname{#3} \expandafter\providecommand\csname#2\endcsname{\ref{#3}} \b. \label{#2}#3\philsubpunct \else \immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2p \endcsname{\MakeLowercase#3} \expandafter\gdef\csname#2r\endcsname{#3} \expandafter\gdef\csname#2\endcsname{\theExNo-#1}}} \ifnum\theExDepth=1 \renewcommand{\theSubExNo}{\theExNo#1}\else \ifnum\theExDepth=2 \renewcommand{\theSubSubExNo}{\theSubExNo#1} \else \fi\fi \expandafter\providecommand\csname#2p\endcsname{\MakeLowercase#3} \expandafter\providecommand\csname#2r\endcsname{#3} \expandafter\providecommand\csname#2\endcsname{\theExNo#1} \ifhyperref \b.[\hypertarget{#2}\lebrack#1\ribrack] \label{#2}#3\philsubpunct \else \b.[\lebrack#1\ribrack] \label{#2}#3\philsubpunct \fi \fi \end{list}\addtocounter{ExDepth}{-1}\philsubempty} %Cross-reference \newcommand{\rf}[2][]{% \ifhyperref% (\hyperlink{#2}{\csname#2\endcsname}#1)% \else% (\csname#2\endcsname#1)% \fi} %Cross-reference without brackets \newcommand{\rn}[2][]{ \ifhyperref \hyperlink{#2}{\csname#2\endcsname}#1% \else \csname#2\endcsname#1 \fi} %Repeating the sentence \newcommand{\rp}[1]{\csname#1r\endcsname} %Repeating the sentence with lowercase initial letter \newcommand{\ml}[1]{\csname#1p\endcsname} %Repeating the sentence with name or number: \newcommand{\rff}[2][n]{\ifdim\lastskip=\Extopsep\vspace{\Exredux}\fi \ifhyperref \ex.[(\hyperlink{#2}{\csname#2\endcsname})] \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering \csname#2r\endcsname\philpunct} \else \csname#2r\endcsname\philpunct\fi \else \ex.[(\csname#2\endcsname)] \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering \csname#2r\endcsname\philpunct} \else \csname#2r\endcsname\philpunct\fi\fi \par} %Repeating the sentence with name or number and bracket control: \newcommand{\rfp}[1]{\ex.[\lebrack\csname#1\endcsname\ribrack\hspace{-1em}] \csname #1r\endcsname\par} %Controlling numbering, prefix and suffix for SubExNo \newcommand{\subformat}[3]{\if#1a \renewcommand{\subettan}{\alph} \else \if#1A \renewcommand{\subettan}{\Alph} \else \if#11 \renewcommand{\subettan}{\arabic} \else \if#1r \renewcommand{\subettan}{\roman} \else \if#1R \renewcommand{\subettan}{\Roman} \else \fi \fi \fi \fi \fi \renewcommand{\SubExLBr}{#2} \renewcommand{\SubExRBr}{#3} \renewcommand{\SubExlabel}{\SubExLBr\subettan{SubExNo}\SubExRBr} \if@noftnote \renewcommand{\theSubExNo}{\theExNo\firstphildash\subettan{SubExNo}} \else \renewcommand{\theSubExNo}{\theFnExNo\firstphildash\subettan{SubExNo}} \fi \renewcommand{\theSubSubExNo}{\theSubExNo\secondphildash\Exroman{SubSubExNo}} } %Ditto for stand-alone sequences, a-d: \newcommand{\bota}{\alph} \newcommand{\bpaformat}[3]{\if#1a \else \if#1A \renewcommand{\bota}{\Alph} \else \if#11 \renewcommand{\bota}{\arabic} \else \if#1r \renewcommand{\bota}{\roman} \else \if#1R \renewcommand{\bota}{\Roman} \else \fi \fi \fi \fi \fi \renewcommand{\thebpa}{#2\bota{bpa}#3}} \newcommand{\botb}{\alph} \newcommand{\bpbformat}[3]{\if#1a \else \if#1A \renewcommand{\botb}{\Alph} \else \if#11 \renewcommand{\botb}{\arabic} \else \if#1r \renewcommand{\botb}{\roman} \else \if#1R \renewcommand{\botb}{\Roman} \else \fi \fi \fi \fi \fi \renewcommand{\thebpb}{#2\botb{bpb}#3}} \newcommand{\botc}{\alph} \newcommand{\bpcformat}[3]{\if#1a \else \if#1A \renewcommand{\botc}{\Alph} \else \if#11 \renewcommand{\botc}{\arabic} \else \if#1r \renewcommand{\botc}{\roman} \else \if#1R \renewcommand{\botc}{\Roman} \else \fi \fi \fi \fi \fi \renewcommand{\thebpc}{#2\botc{bpc}#3}} \newcommand{\botd}{\alph} \newcommand{\bpdformat}[3]{\if#1a \else \if#1A \renewcommand{\botd}{\Alph} \else \if#11 \renewcommand{\botd}{\arabic} \else \if#1r \renewcommand{\botd}{\roman} \else \if#1R \renewcommand{\botd}{\Roman} \else \fi \fi \fi \fi \fi \renewcommand{\thebpd}{#2\botd{bpd}#3}} %Controlling numbering, prefix and suffix for SubSubExNo \newcommand{\subsubformat}[3]{\if#1r \renewcommand{\Exroman}{\roman} \else \if#1A\renewcommand{\Exroman}{\Alph} \else \if#11 \renewcommand{\Exroman}{\arabic} \else \if#1a \renewcommand{\Exroman}{\alph} \else \if#1R \renewcommand{\Exroman}{\Roman} \else \fi \fi \fi \fi \fi \renewcommand{\SubSubExLBr}{#2} \renewcommand{\SubSubExRBr}{#3} \renewcommand{\theSubSubExNo}{\theSubExNo\secondphildash\Exroman{SubSubExNo}}} %Fast changing between alphabetic, arabic and roman) for SubEx \newcommand{\sa}{\renewcommand{\SubExRBr}{.}\renewcommand{\SubExlabel}{\SubExLBr\alph{SubExNo}\SubExRBr}\renewcommand{\theSubExNo}{\arabic{ExNo}\alph{SubExNo}}} \newcommand{\sr}{\renewcommand{\SubExRBr}{)}\renewcommand{\SubExlabel}{\SubExLBr\roman{SubExNo}\SubExRBr}\renewcommand{\theSubExNo}{\arabic{ExNo}\roman{SubExNo}}} \newcommand{\sab}{\renewcommand{\SubExRBr}{)}\renewcommand{\SubExlabel}{\SubExLBr\alph{SubExNo}\SubExRBr}\renewcommand{\theSubExNo}{\arabic{ExNo}\alph{SubExNo}}}