diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/philex/philex.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/philex/philex.sty | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/philex/philex.sty b/Master/texmf-dist/tex/latex/philex/philex.sty index 1269fd9195e..596907e6977 100644 --- a/Master/texmf-dist/tex/latex/philex/philex.sty +++ b/Master/texmf-dist/tex/latex/philex/philex.sty @@ -1,13 +1,10 @@ %This is a small package with additions to Wolfgang Sternefeld's linguex package. It provides extended functions for cross-referencing and repeating numbered and named sentences and some additional formatting options. -%Author: Peter Pagin -%Date: 2007.07.09 -%Version: 0.3.1 +%Author: Peter Pagin (with contributions by Robin Fairbairns). +%email: peter.pagin@philosophy.su.se +%Date: 2007.10.25 +%Version: 0.5 \RequirePackage{linguex,calc} -\AtBeginDocument{\include{\jobname-px}} -\AtBeginDocument{\immediate\openout7=\jobname-px} - -%\renewcommand{\refdash}{} %Controlling brackets,lowercase and full stop. \newcommand{\p}{.} @@ -37,34 +34,34 @@ \newcommand{\hcentro}{\textwidth-(\Exindent+\Exlabelsep+\Exlabelwidth)} %Top-level numbered sentence: -\newcommand{\lb}[3][n]{\immediate\write7{\unexpanded{\expandafter\providecommand\expandafter{\csname#2r\endcsname}{#3}\expandafter\providecommand\expandafter{\csname#2\endcsname}{\ref{#2}}\expandafter\providecommand\expandafter{\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}\ex. \label{#2} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #3\p} \else #3\p\fi\par} +\newcommand{\lb}[3][n]{\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}\ex. \label{#2} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #3\p} \else #3\p\fi\par} %Top-level named sentence: -\newcommand{\lbp}[4][n]{\label{#2}\immediate\write7{\unexpanded{\expandafter\providecommand\expandafter{\csname#2p\endcsname}{\MakeLowercase#4}\expandafter\providecommand\expandafter{\csname #2\endcsname}{#3} \expandafter\providecommand\expandafter{\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}\ex.[\lebrack#3\ribrack\hspace{-1em}]\renewcommand{\theSubExNo}{\csname#2\endcsname\alph{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #4\p} \else #4\p\fi\par} +\newcommand{\lbp}[4][n]{\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}\ex.[\lebrack#3\ribrack\hspace{-1em}]\renewcommand{\theSubExNo}{\csname#2\endcsname\alph{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #4\p} \else #4\p\fi\par} %Stand-alone sub-level initial sentence, sequence a: -\newcommand{\lbpa}[3][n]{\ifdim\lastskip=.66\baselineskip\vspace{-1.2\baselineskip}\fi \refstepcounter{bpa}\label{#2}\immediate\write7{\unexpanded{\expandafter\providecommand\expandafter{\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} \expandafter\providecommand\expandafter{\csname #2r\endcsname}{#3}\expandafter\providecommand\expandafter{\csname #2\endcsname}{\ref{#2}}\ex.[\lebrack\thebpa\ribrack\hspace{-1em}]\renewcommand{\theSubExNo}{\csname#2\endcsname\alph{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #3} \else #3\fi\par} +\newcommand{\lbpa}[3][n]{\ifdim\lastskip=.66\baselineskip\vspace{-1.2\baselineskip}\fi \refstepcounter{bpa}\label{#2}\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\expandafter{\csname#2p\endcsname}{\MakeLowercase#3} \expandafter\providecommand\expandafter{\csname #2r\endcsname}{#3}\expandafter\providecommand\expandafter{\csname #2\endcsname}{\ref{#2}}\ex.[\lebrack\thebpa\ribrack\hspace{-1em}]\renewcommand{\theSubExNo}{\csname#2\endcsname\alph{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #3} \else #3\fi\par} %Stand-alone sub-level initial sentence, sequence b: -\newcommand{\lbpb}[3][n]{\ifdim\lastskip=.66\baselineskip\vspace{-1.2\baselineskip}\fi \refstepcounter{bpb}\label{#2} \immediate\write7{\unexpanded{\expandafter\providecommand\expandafter{\csname#2p\endcsname}{\MakeLowercase#3}\expandafter\providecommand\expandafter{\csname #2\endcsname}{\ref{#2}} \expandafter\providecommand\expandafter{\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}\ex.[\lebrack\thebpb\ribrack\hspace{-1em}]\label{#2}\renewcommand{\theSubExNo}{\csname#2\endcsname\alph{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #3} \else #3\fi\par} +\newcommand{\lbpb}[3][n]{\ifdim\lastskip=.66\baselineskip\vspace{-1.2\baselineskip}\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}\ex.[\lebrack\thebpb\ribrack\hspace{-1em}]\label{#2}\renewcommand{\theSubExNo}{\csname#2\endcsname\alph{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #3} \else #3\fi\par} %Stand-alone sub-level initial sentence, sequence c: -\newcommand{\lbpc}[3][n]{\ifdim\lastskip=.66\baselineskip\vspace{-1.2\baselineskip}\fi \refstepcounter{bpc}\label{#2} \immediate\write7{\unexpanded{\expandafter\providecommand\expandafter{\csname#2p\endcsname}{\MakeLowercase#3}\expandafter\providecommand\expandafter{\csname #2\endcsname}{\ref{#2}} \expandafter\providecommand\expandafter{\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}\ex.[\lebrack\thebpc\ribrack\hspace{-1em}]\renewcommand{\theSubExNo}{\csname#2\endcsname\alph{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #3} \else #3\fi\par} +\newcommand{\lbpc}[3][n]{\ifdim\lastskip=.66\baselineskip\vspace{-1.2\baselineskip}\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}\ex.[\lebrack\thebpc\ribrack\hspace{-1em}]\renewcommand{\theSubExNo}{\csname#2\endcsname\alph{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #3} \else #3\fi\par} %Stand-alone sub-level initial sentence, sequence d: -\newcommand{\lbpd}[3][n]{\ifdim\lastskip=.66\baselineskip\vspace{-1.2\baselineskip}\fi \refstepcounter{bpd}\label{#2} \immediate\write7{\unexpanded{\expandafter\providecommand\expandafter{\csname#2p\endcsname}{\MakeLowercase#3}\expandafter\providecommand\expandafter{\csname #2\endcsname}{\ref{#2}} \expandafter\providecommand\expandafter{\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}\ex.[\lebrack\thebpd\ribrack\hspace{-1em}]\renewcommand{\theSubExNo}{\csname#2\endcsname\alph{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #3} \else #3\fi\par} +\newcommand{\lbpd}[3][n]{\ifdim\lastskip=.66\baselineskip\vspace{-1.2\baselineskip}\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}\ex.[\lebrack\thebpd\ribrack\hspace{-1em}]\renewcommand{\theSubExNo}{\csname#2\endcsname\alph{SubExNo}} \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #3} \else #3\fi\par} %Top-level sentence with repeated and suffixed name or number: -\newcommand{\lbu}[5][n]{\label{#2}\immediate\write7{\unexpanded{\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}}}\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}\ex.[(\csname#3\endcsname#4)\hspace{-1em}] \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #5\p} \else #5\p\fi\par} +\newcommand{\lbu}[5][n]{\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}\ex.[(\csname#3\endcsname#4)\hspace{-1em}] \if#1c \setlength{\abovedisplayskip}{1ex}\setlength{\belowdisplayskip}{1ex}\parbox{\centro}{\centering #5\p} \else #5\p\fi\par} %First sub-level sentence: -\newcommand{\lba}[2]{\q\immediate\write7{\unexpanded{\expandafter\providecommand\csname#1p\endcsname{\MakeLowercase#2}\expandafter\providecommand\csname#1r\endcsname{#2} \expandafter\providecommand\csname#1\endcsname{\ref{#1}}}} \expandafter\providecommand\csname#1p\endcsname{\MakeLowercase#2}\expandafter\providecommand\csname#1r\endcsname{#2} \expandafter\providecommand\csname#1\endcsname{\ref{#1}}\a.\label{#1}#2\pt} +\newcommand{\lba}[2]{\q\immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#1p\endcsname{\MakeLowercase#2}\expandafter\gdef\csname#1r\endcsname{#2} \expandafter\gdef\csname#1\endcsname{\ref{#1}}}} \expandafter\providecommand\csname#1p\endcsname{\MakeLowercase#2}\expandafter\providecommand\csname#1r\endcsname{#2} \expandafter\providecommand\csname#1\endcsname{\ref{#1}}\a.\label{#1}#2\pt} %Following sub-level sentence: -\newcommand{\lbb}[2]{\immediate\write7{\unexpanded{\expandafter\gdef\csname #1p\endcsname{\MakeLowercase#2}\expandafter\gdef\csname #1r\endcsname{#2} \expandafter\gdef\csname #1\endcsname{\ref{#1}}}} \expandafter\gdef\csname #1p\endcsname{\MakeLowercase#2}\expandafter\gdef\csname #1r\endcsname{#2} \expandafter\gdef\csname #1\endcsname{\ref{#1}}\b. \label{#1}#2\pt} +\newcommand{\lbb}[2]{\immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname #1p\endcsname{\MakeLowercase#2}\expandafter\gdef\csname #1r\endcsname{#2} \expandafter\gdef\csname #1\endcsname{\ref{#1}}}} \expandafter\gdef\csname #1p\endcsname{\MakeLowercase#2}\expandafter\gdef\csname #1r\endcsname{#2} \expandafter\gdef\csname #1\endcsname{\ref{#1}}\b. \label{#1}#2\pt} %Concluding sub-level sentence: -\newcommand{\lbz}[2]{\immediate\write7{\unexpanded{\expandafter\gdef\csname #1p\endcsname{\MakeLowercase#2}\expandafter\gdef\csname #1r\endcsname{#2} \expandafter\gdef\csname #1\endcsname{\ref{#1}}}} \expandafter\gdef\csname #1p\endcsname{\MakeLowercase#2}\expandafter\gdef\csname #1r\endcsname{#2} \expandafter\gdef\csname #1\endcsname{\ref{#1}}\b. \label{#1}#2\pt\z.} +\newcommand{\lbz}[2]{\immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname #1p\endcsname{\MakeLowercase#2}\expandafter\gdef\csname #1r\endcsname{#2} \expandafter\gdef\csname #1\endcsname{\ref{#1}}}} \expandafter\gdef\csname #1p\endcsname{\MakeLowercase#2}\expandafter\gdef\csname #1r\endcsname{#2} \expandafter\gdef\csname #1\endcsname{\ref{#1}}\b. \label{#1}#2\pt\z.} %Cross-reference \newcommand{\rf}[2][]{(\csname#2\endcsname#1)} |