summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-09-21 21:37:26 +0000
committerKarl Berry <karl@freefriends.org>2013-09-21 21:37:26 +0000
commit74e7c8b0e6d77f0d143fac7754168b84747ef59b (patch)
treecc584c69e26f78cc49c3ff3c4bc761d99d37969c /Master
parent1dea1e19a1e5863c4874cd5fdb37c2bc20eadd2d (diff)
philex (21sep13)
git-svn-id: svn://tug.org/texlive/trunk@31717 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/philex/README13
-rw-r--r--Master/texmf-dist/doc/latex/philex/philexmanual.pdfbin188739 -> 206222 bytes
-rw-r--r--Master/texmf-dist/doc/latex/philex/philexmanual.tex142
-rw-r--r--Master/texmf-dist/tex/latex/philex/philex.sty233
4 files changed, 308 insertions, 80 deletions
diff --git a/Master/texmf-dist/doc/latex/philex/README b/Master/texmf-dist/doc/latex/philex/README
index af200b24abc..c773ac3de72 100644
--- a/Master/texmf-dist/doc/latex/philex/README
+++ b/Master/texmf-dist/doc/latex/philex/README
@@ -1,5 +1,12 @@
-Philex 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.
+Philex 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.
+
Version: 1.01
+
Author: Peter Pagin (with a contribution by Robin Fairbairns).
-email: peter.pagin@philosophy.su.se
-Date: 2012.09.22
+email: peter.pagin@philosophy.su.se
+Date: 2013.09.09
diff --git a/Master/texmf-dist/doc/latex/philex/philexmanual.pdf b/Master/texmf-dist/doc/latex/philex/philexmanual.pdf
index 2d3c38ac3ba..7f14b8da6a0 100644
--- a/Master/texmf-dist/doc/latex/philex/philexmanual.pdf
+++ b/Master/texmf-dist/doc/latex/philex/philexmanual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/philex/philexmanual.tex b/Master/texmf-dist/doc/latex/philex/philexmanual.tex
index a6ed67d69ae..aeee089300a 100644
--- a/Master/texmf-dist/doc/latex/philex/philexmanual.tex
+++ b/Master/texmf-dist/doc/latex/philex/philexmanual.tex
@@ -1,16 +1,16 @@
\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
-
-\usepackage{linguex,eqparbox}
+\usepackage{eqparbox}
\usepackage[oldpunct,hyper]{philex}
+
\usepackage[left=6cm,right=4cm,top=4cm,bottom=5cm]{geometry}
\usepackage[colorlinks,linkcolor=black,bookmarksnumbered]{hyperref}
\newcommand{\qut}[1]{`#1'}
\usepackage[english]{babel}
-\usepackage{latexsym,amssymb,amsmath,amsthm,wasysym}
+\usepackage{latexsym,amssymb,amsmath,amsthm,wasysym,fixltx2e}
\usepackage{calc}
\newcounter{hour}
@@ -35,35 +35,20 @@
\begin{document}
\tracingassigns=3
-\title{The \tt philex \rm Package \\ version 1.01}
+\title{The \tt philex \rm Package \\ version 1.1}
\author{\aut}
\date{\today, \now}
\maketitle
\reversemarginpar
\setlength{\marginparwidth}{3cm}
-\subsection*{Changes since version 1.0}
--- Bugfix: eliminated unwanted space after \verb+\rn{}+ cross-references.
-
-\subsection*{Changes since version 0.9 (internal version)}
--- \quad Adapted the package to version 4.1 of \verb+linguex+.\\
--- \quad Added two commands for label separation.
-
-\subsection*{Changes since version 0.6}
--- \quad Added support for \verb+hyperref+ for named environments.\\
-\noindent -- \quad Added naming options for sub-environments (\verb+\lba+, \verb+\lbb+, \verb+\lbz+).\\
-\noindent -- \quad Added customizing of brackets and numbering-style for second-level sub-environments.\\
-\noindent -- \quad Corrected errors in vertical spacing for \verb+\lbu+ and \verb+\rff+.\\
-\noindent -- \quad Corrected an error in the centering option, and added an alternative for centering.\\
-\noindent -- \quad Replaced earlier (overly short) punctuation commands, and added a package option for using the old commands.\\
-\noindent -- Added customizing of vertical spacing and horizontal spacing as well as label length.\\
-\noindent -- \quad Made the \verb+\lbpx+ environments labels more customizable.\\
-\noindent -- \quad Rewrote and reorganized the manual.
-
-\subsection*{Changes since version 0.5}
-Corrected vertical spacing between adjacent \verb+\lb+ and \verb+\lbp+ environments.
-
-\subsection*{Changes since version 0.3}
-In version 0.3, forward cross-reference was effected by means of writing command definitions to a separate file, \emp{myfile}-px.tex, which was subsequently read-in at the beginning of the following run of typesetting. In version 0.5 the information is instead written to the .aux file and then read from the .aux file in the subsequent run. This method is more elegant and eliminates problems with the implementation of the old method. The improvement is due to Robin Fairbairns.
+\subsection*{Changes since version 1.01}
+-- Local cross-references added.\\
+-- Possibility of repeating a sentence without its associated footnote.\\
+-- \verb+\bpxformat+ now resets \verb+bpx+ counters.\\
+-- Extra counter \verb+bnp+ and associated commands.\\
+-- Manual: labelled brackets.\\
+-- Manual: glosses.\\
+-- Bugfix: cross-references to sub-sentences did not work properly in connection with unusual combinations of using and not using optional arguments. Now fixed.
@@ -74,7 +59,7 @@ As of version 0.5 \verb+philex+ writes cross-ref information to the .aux file an
in analogy to the label-reference system of LaTeX itself. As of version 0.9 hyperlinks produced by \verb+hyperref+ are created also for named environments with the \verb+<hyper>+ package option.
\section{Calling the package}
-\verb+philex+ is \marginpar{\tt philex} called by adding \verb+\usepackage[<package options>]{philex}+ in the preamble. This will also automatically load the \verb+linguex+ package. If \verb+linguex+ is called separately, it should be called \emp{before} \verb+philex+, since \verb+philex+ (marginally) redefines some commands in \verb+linguex+.
+\verb+philex+ is \marginpar{\tt philex} called by adding \verb+\usepackage[<package options>]{philex}+ in the preamble. This will also automatically load the \verb+linguex+ package, as well as \verb+xspace+ and \verb+cgloww4e+, which are used by \verb+linguex+. If \verb+linguex+ is called separately, it should be called \emp{before} \verb+philex+, since \verb+philex+ (marginally) redefines some commands in \verb+linguex+.
\section{Package options}
With \marginpar{\tt <hyper>} the \verb+<hyper>+ option hyperlinks will be created by cross-references to named environments (such as \verb+\lbp+). This requires that the \verb+hyperref+ package is called (should be called last). If \verb+hyperref+ is called without the \verb+<hyper>+ option, hyperlinks will anyway be created from the usual \verb+philex+ cross-references that make use of the basic label- and cross-reference function in LaTeX.
@@ -122,10 +107,14 @@ produces
\lbpa{kno}{John is in the know.}
\lbpa{hu}{Elsa is, too.}
\lbpa{kne}{Alfred agrees.}
-These enumerations are independent of \verb+ExNO+ and of each other, and the counters (\verb+bpx+) are reset with the relevant \verb+\bpxformat+. They still work with sub-clauses, cross-references and the rest of the apparatus. Note that these enumerations do not have to be contiguous:
+These enumerations are independent of \verb+ExNO+ and of each other, and the counters (\verb+bpx+) are reset with the relevant \verb+\bpxformat+.\footnote
+ {This is actually a bug-fix, since in the resetting was documented but not implemented before.}
+ They still work with sub-clauses, cross-references and the rest of the apparatus. Note that these enumerations do not have to be contiguous:
\lbpa{glufs}{But he shouldn't.}
+There \marginpar{Simple counter} is also an additional counter, \verb+bna+, with associated commands: the \verb+\bns+ command resets the counter; the \verb+\bn+ command steps the counter, prints its current value, and produces a \verb+\quad+ space. Useful for listing a number of comments.
+
All the top-level \marginpar{Centering} environments take an optional argument \verb+[c]+ for centering the text. \verb+\lb[c]{compo}{\[\mu(\sigma(t_{1},\ldots, t_{n}))=+ \verb+r_{\sigma}(\mu(t_{1}), \ldots, \mu(t_{n}))\]}+ produces
\lb[c]{compo}{\[\mu(\sigma(t_{1},\ldots, t_{n}))=r_{\sigma}(\mu(t_{1}), \ldots, \mu(t_{n}))\]}
@@ -134,7 +123,7 @@ All the top-level \marginpar{Centering} environments take an optional argument \
The default for \verb+philex+ is centering in the entire column, i.e. along \verb+\columnwidth+. As an alternative, you can make \verb+philex+ center the text within the \verb+philex+ text area itself. This puts the text slightly more to the right. To achieve this, give the command \verb+\narrowcenter+ before the relevant environment. To later revert to the default option, give the command \verb+\widecenter+.
-Horizontal alignment \marginpar{Alignment} can be easily achieved by means of Scott Pakin's recent elegant \verb+eqparbox+ package. The code
+Horizontal alignment \marginpar{Alignment} can be easily achieved by means of Scott Pakin's elegant \verb+eqparbox+ package. The code
\begin{verbatim}
\lb{alignthis}{\eqmakebox[hit][l]{\(2+3\)} \quad = \quad \(5\) \\
@@ -145,8 +134,29 @@ Horizontal alignment \marginpar{Alignment} can be easily achieved by means of Sc
\lb{alignthis}{\eqmakebox[hit][l]{\(2+3\)} \quad = \quad \(5\) \\
\eqmakebox[hit][l]{\(2+3+4\)} \quad = \quad \(9\)}
+\verb+linguex+ provides the \verb+\exi.+ \marginpar{Labelled brackets} command for generating labelled brackets that display linguistic structure. This command can be used in \verb+philex+ but can not be integrated into proper \verb+philex+ commands without loss of \verb+philex+ features, such as hyperlinks. However, it is easy to add labels manually, especially by means of the \verb+\textsubscript+ command provided by the \verb+fixltx2e+ package, by Frank Mittelbach, David Carlisle, Chris Rowley, and Walter Schmidt. The result will be the same. The following example is from the \verb+linguex+ manual but implemented with \verb+\textsubscript+:
-By means of \verb+philex+ commands, the brackets can be \marginpar{Top-level brackets} removed or replaced for all the top-level environments except \verb+\lb+ itself. However, as of version 4.0 of \verb+linguex+, the brackets for the \verb+\lb+ command can be customized. By means of
+\begin{verbatim}
+\lb{braclabel}{[[\textsubscript{NP} Fritz ][ snores ]]%
+\textsubscript{S}}
+\end{verbatim}
+
+\lb{braclabel}{[[\textsubscript{NP} Fritz ][ snores ]]%
+\textsubscript{S}}
+
+\verb+linguex+ also \marginpar{Glosses} provides the the \verb+exg.+ command, and associated sub-sentence commands, for generating glosses. As above, these commands are available when \verb+philex+ is used, but cannot be integrated in \verb+philex+ environments without loss of features. However, \verb+linguex+ here builds on the \verb+cgloss4e+ package by Hans-Peter Kolb and Craig Thiersch. This package is called by \verb+philex+ and the commands of \verb+cgloss4e+ can be directly applied in \verb+philex+ environments. The \verb+\gll+ command introduces the sentence-gloss pair, and the \verb+\glt+ or \verb+\trans+ command introduces free translation. The following example, here embedded in \verb+\lb+, is taken from the manual for \verb+cgloss4e+ (which is also the manual for \verb+gb4e+):
+
+\begin{verbatim}
+\lb{gloss}{\gll Wenn jemand in die W\"uste zieht ... \\
+If someone in the desert draws and lives ... \\
+\trans ‘if one retreats to the desert and ... ’}
+\end{verbatim}
+
+\lb{gloss}{\gll Wenn jemand in die W\"uste zieht ... \\
+If someone in the desert draws and lives ... \\
+\trans ‘if one retreats to the desert and ... ’}
+
+By means of \verb+philex+ commands, the brackets can be \marginpar{Top-level brackets} removed or replaced for all the top-level environments except \verb+\lb+ itself. However, as of version 4.0 of \verb+linguex+, the brackets for the \verb+\lb+ command can be customized.
\begin{verbatim}
\renewcommand{\ExLBr}{]}
@@ -255,7 +265,7 @@ Punctuation for sub-environments \marginpar{Punctuation for \\ sub-environments}
\section{Cross-references}
The first argument of all environment commands are used by \verb+philex+ to give a \verb+\label+ command. If the environment is numbered by a counter, the label makes the environment accessible for cross-reference by the standard cross-reference mechanism of LaTeX. For instance, \verb+\ref{nice}+ produces the cross-reference `\ref{nice}' to the first \verb+\lb+ environment on page \pageref{nice}.\note
- {The reason for the fuss about brackets is that in order to modify the material within the brackets, e.g. with {\tt lbu}, the brackets cannot be hard-coded into the cross-reference command, but must be put in afterwords.}
+ {The reason for the fuss about brackets is that in order to modify the material within the brackets, e.g. with {\tt \(\backslash\)lbu}, the brackets cannot be hard-coded into the cross-reference command, but must be put in afterwords.}
However, \verb+philex+ provides \marginpar{\tt \(\backslash\)rf, \(\backslash\)rn} its own cross-reference command, \verb+\rf+, which has a wider function. It provides ordinary cross-references in accordance with the numbering style of the antecedent, and keeps track of the embedding. It also provides cross-references to \emp{named} environments, where there is no counter value to pick up. The difference between \verb+\rf+ and \verb+\rn+ is that the latter leaves out the brackets. So we will have the productions
\begin{trivlist}
@@ -268,6 +278,13 @@ However, \verb+philex+ provides \marginpar{\tt \(\backslash\)rf, \(\backslash\)r
\end{trivlist}
Both \verb+\rf+ and \verb+\rn+ have an optional argument which produces an optional suffix. \verb+\rf[*]{nice}+ produces \rf[*]{nice}.
+When cross-references to \marginpar{\tt \(\backslash\)rfx, \(\backslash\)rnx} subsentences are local, i.e. appear shortly after the top-level sentence, you might find it inelegant to include the main name or number. In such cases, context disambiguates an abbreviated cross-reference. The commands \verb+\rfx+ and \verb+\rnx+ allow you leave out its head. Compare with the last two lines of the list above:
+
+\begin{trivlist}
+\item \verb+\rfx{lastnew}+ \(\longrightarrow\) \rfx{lastnew}\hfill (target on page \pageref{lastnew})
+\item \verb+\rnx{lastnewb}+ \(\longrightarrow\) \rnx{lastnewb} \hfill (target on page \pageref{lastnewb})
+\end{trivlist}
+
Both \verb+linguex+ and \verb+philex+ \marginpar{Inner delimiters} provide customizing of inner delimiters in complex cross-references. \verb+linguex+ has changed in version 4.0 (see its manual). With \verb+philex+, use the \verb+\phildashes{}{}+ \marginpar{\tt \(\backslash\)phildashes} command. This works together with the \verb+\subformat+ and the \verb+\subsubformat+ commands. The first argument sets the delimiter between the top-level reference and the reference to the first sub-environment, while the second argument sets the delimiter between references to the first and the second sub-level environments. To illustrate. We use the input
\begin{verbatim}
\lb{cool}{We would like a colon
@@ -331,7 +348,20 @@ In case you want a full stop at the end of an earlier environment and want to em
\lb{ifstop}{If \ml{stop}, you should put on a cap}
\philempty
-Finally, one can repeat an entire environment with label by means of the \verb+\rff+ command. \verb+\rff{nice}+ produces \rff{nice}
+One can repeat an entire environment with label by means of the \verb+\rff+ command. \verb+\rff{nice}+ produces \rff{nice}
+
+Occasionally, a named or \marginpar{\tt \(\backslash\)rffnot} numbered sentence carries a footnote reference, and when repeating the sentence later, you may not also want to repeat the footnote reference, nor the note itself. The alternative command \verb+\rffnot+ allows you to leave them out:
+
+\begin{verbatim}
+\lb{norepeat}{This ends with a footnote reference.\footnote
+ {You don't want to repeat this note.}}
+\end{verbatim}
+
+\lb{norepeat}{This ends with a footnote reference.\footnote
+ {You don't want to repeat this note.}}%
+%
+Now you can repeat the sentence without the note by
+\verb+\rffnot{norepeat}+, which delivers: \rffnot{norepeat}
\section{Lengths and spaces}
\verb+linguex+ provides a number length and spacing commands that can be used to customize the appearance of \verb+philex+ environments. Below are given the length name, brief explanation, and the default value set by \verb+linguex+. \qut{hspace} is short for \qut{horizontal space} and \qut{vspace} analogously:
@@ -412,12 +442,56 @@ A further possible problem derives from \marginpar{Clash between \\ \texttt {hyp
The remedy has been provided by Heiko Oberdiek, who has added a workaround in \verb+hyperref+. To make use of this, make sure that your version of \verb+hyperref+ is 6.78o (from 2009.02.02) or later.
-There is also \marginpar{Clash between \\ \texttt{setspace} and \\ \tt linguex} a conflict between the \verb+setspace+ package and \verb+linguex+. The problem seems to be that \verb+setspace+ redefines \verb+\@footnotetext+ in a way that interferes with the way \verb+linguex+ is meant to work in footnotes.
+There is \marginpar{Clash between \\ \texttt{setspace} and \\ \tt linguex} a conflict between the \verb+setspace+ package and \verb+linguex+. The problem seems to be that \verb+setspace+ redefines \verb+\@footnotetext+ in a way that interferes with the way \verb+linguex+ is meant to work in footnotes.
To avoid this problem, load \verb+philex+ (and \verb+linguex+ too, if called) \emp{after} \verb+setspace+. Also, don't use the \verb+\setstretch+ command in the preamble for setting line spacing. Rather set a \verb+spacing+ environment in the main body, after \verb+\begin{document}+. This environment may span the entire main document.
+There is a clash \marginpar{Clash between \\ \texttt{SIUnitx} and \\ \tt linguex} between \verb+linguex+ and the \verb+SIUnitx+ package. Thanks to Tom Hodgson and Alan Munn for the following description and solution:
+
+
+``\verb+linguex+ defines a command \verb+\bg.+ to introduce glosses. It also creates aliases to this command \verb+\cg.+, \verb+\dg.+, \verb+\eg.+ and \verb+\fg.+. The \verb+\fg.+ command conflicts with \verb+SIUnitx+, which defines \verb+\fg+ as femtogram. The simple solution is to load linguex and then redefine \verb+\fg.+ to nothing, and then load \verb+SIUnitx+. Since the \verb+\fg.+ command isn't necessary in linguex (and isn't even really documented), it's an easily worked around problem, and not really a bug, since both are end user commands.
+
+\begin{verbatim}
+\documentclass{article}
+
+\usepackage{linguex}
+\def\fg{}
+\usepackage{siunitx}
+
+\begin{document}
+Foo
+\end{document}''
+\end{verbatim}
+
+There is also a \marginpar{Clash with \texttt{tipa}} clash between \verb+linguex+ and the \verb+tipa+ font/symbol package, as well as between \verb+tipa+ and \verb+philex+ with the \verb+oldpunct+ package option. Call \verb+tipa+ before calling \verb+linguex+ or \verb+philex+ (thanks to J. \qut{mach} wust). This does not, however, completely remove the conflict with the \verb+oldpunct+ package option. To avoid this, use current \verb+philex+ commands, which makes the option dispensable.
+
Finally, \marginpar{Comments} bug reports, comments or suggestions are welcome and should be directed to Peter Pagin at \hyperref{mailto:peter.pagin@philosophy.su.se}{}{}{peter.pagin@philosophy.su.se}.
+\section{Version history}
+\subsection*{Changes in version 1.01}
+-- Bugfix: eliminated unwanted space after \verb+\rn{}+ cross-references.
+
+\subsection*{Changes in version in version 1.0}
+-- \quad Adapted the package to version 4.1 of \verb+linguex+.\\
+-- \quad Added two commands for label separation.
+
+\subsection*{Changes in version 0.9 (internal version)}
+-- \quad Added support for \verb+hyperref+ for named environments.\\
+\noindent -- \quad Added naming options for sub-environments (\verb+\lba+, \verb+\lbb+, \verb+\lbz+).\\
+\noindent -- \quad Added customizing of brackets and numbering-style for second-level sub-environments.\\
+\noindent -- \quad Corrected errors in vertical spacing for \verb+\lbu+ and \verb+\rff+.\\
+\noindent -- \quad Corrected an error in the centering option, and added an alternative for centering.\\
+\noindent -- \quad Replaced earlier (overly short) punctuation commands, and added a package option for using the old commands.\\
+\noindent -- Added customizing of vertical spacing and horizontal spacing as well as label length.\\
+\noindent -- \quad Made the \verb+\lbpx+ environments labels more customizable.\\
+\noindent -- \quad Rewrote and reorganized the manual.
+
+\subsection*{Changes in version 0.6}
+Corrected vertical spacing between adjacent \verb+\lb+ and \verb+\lbp+ environments.
+
+\subsection*{Changes in version 0.5}
+In version 0.3, forward cross-reference was effected by means of writing command definitions to a separate file, \emp{myfile}-px.tex, which was subsequently read-in at the beginning of the following run of typesetting. In version 0.5 the information is instead written to the .aux file and then read from the .aux file in the subsequent run. This method is more elegant and eliminates problems with the implementation of the old method. The improvement is due to Robin Fairbairns.
+
diff --git a/Master/texmf-dist/tex/latex/philex/philex.sty b/Master/texmf-dist/tex/latex/philex/philex.sty
index 9da8c792932..608d6ed988a 100644
--- a/Master/texmf-dist/tex/latex/philex/philex.sty
+++ b/Master/texmf-dist/tex/latex/philex/philex.sty
@@ -1,8 +1,8 @@
-%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.
+%This is a small package with additions to Wolfgang Sternefeld's linguex package (adapted to version 4.3). 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: 2012.09.22
-%Version: 1.01
+%Date: 2013.09.09
+%Version: 1.1
\NeedsTeXFormat{LaTeX2e}
@@ -20,6 +20,13 @@
\DeclareOption{hyper}{\hyperreftrue}
\ProcessOptions
+\newcounter{altsub}
+\newcounter{altsubsub}
+\renewcommand{\thealtsub}{\subettan{altsub}}
+%\renewcommand{\thealtsubsub}{\thealtsub\refdash\Exroman{altsubsub}}
+\renewcommand{\Exroman}{\roman}
+\newcommand{\refdash}{-}
+
%Spacing and formatting commands
\setlength{\Exredux}{-\baselineskip}
\renewcommand{\philarge}{3em}
@@ -76,7 +83,7 @@
%Removing brackets from ExNo and SubExNo
\renewcommand{\theExNo}{\arabic{ExNo}}
-\renewcommand{\theSubExNo}{\theExNo\alph{SubExNo}}
+\renewcommand{\theSubExNo}{\theExNo\firstphildash\alph{SubExNo}}
\renewcommand{\theSubSubExNo}{\theSubExNo\roman{SubSubExNo}}
\newcommand{\ncentro}{\columnwidth-(\Exindent+\Exlabelsep+\Exlabelwidth)}
\newcommand{\wcentro}{\columnwidth-(\Exindent*2+\Exlabelsep*2+\Exlabelwidth*2)}
@@ -101,6 +108,7 @@
\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
@@ -230,81 +238,185 @@
%----------------- Sub-environments -------------------------------
-\newcommand{\philsemi}{;}
-
-\newcommand{\lba}[3][;]{\philempty
+\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}}}}
+\ifnum\theExDepth=1\def\tempc{\tempa}
+\setcounter{altsub}{0}
+\refstepcounter{altsub}\label{#2q}
+\renewcommand{\thealtsubsub}{\thealtsub\secondphildash\Exroman{altsubsub}}
+\else \ifnum \theExDepth=2\def\tempc{\tempb}
+\setcounter{altsubsub}{0}
+\refstepcounter{altsubsub}\label{#2q}
+\else\fi\fi
+\if \tempc\philsemi
+\immediate\write\@auxout{\unexpanded{%
+\expandafter\gdef\csname#2p\endcsname{\MakeLowercase#3}
+\expandafter\gdef\csname#2r\endcsname{#3}
+\expandafter\global\expandafter\def\csname#2\endcsname{\ref{#2}}
+\expandafter\global\expandafter\def\csname#2q\endcsname{\ref{#2q}}
+}}
\expandafter\providecommand\csname#2p\endcsname{\MakeLowercase#3}
\expandafter\providecommand\csname#2r\endcsname{#3}
-\expandafter\providecommand\csname#2\endcsname{\ref{#3}}
+\expandafter\providecommand\csname#2\endcsname{\ref{#2}}
+\expandafter\providecommand\csname#2q\endcsname{\ref{#2q}}
\a. \label{#2}#3\philsubpunct
-\else
+\else
+\ifnum\theExDepth=1
+\renewcommand{\thealtsub}{#1}
+\renewcommand{\theSubExNo}{\theExNo\firstphildash#1}
+\refstepcounter{SubExNo}
\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}
+\expandafter\gdef\csname#2\endcsname{\ref{#2}}
+\expandafter\global\expandafter\def\csname#2q\endcsname{#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
+\ifnum\theExDepth=2
+\renewcommand{\thealtsubsub}{\thealtsub\secondphildash#1}
+\refstepcounter{altsubsub}\label{#2q}
+\renewcommand{\theSubSubExNo}{\theSubExNo\secondphildash#1}
+\refstepcounter{SubSubExNo}
+\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\global\expandafter\def\csname#2q\endcsname{\ref{#2q}}
+}}
+ \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}
+\a.[\lebrack#1\ribrack]\label{#2}#3\philsubpunct
+\fi
+\ifnum\theExDepth=2
+\renewcommand{\theSubExNo}{\theExNo\firstphildash\subettan{SubExNo}}
+\renewcommand{\theSubSubExNo}{\theSubExNo\secondphildash\Exroman{SubSubExNo}}
+\setcounter{altsub}{0}
+\renewcommand{\thealtsub}{\subettan{altsub}}
+\fi
+\ifnum\theExDepth=3
+\renewcommand{\thealtsubsub}{\thealtsub\secondphildash\Exroman{altsubsub}}
+\setcounter{altsubsub}{0}
+\setcounter{SubSubExNo}{0}
+\fi
+\fi
+}
-\newcommand{\lbb}[3][;]{\philempty
+\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}}}}
+\if \tempc\philsemi
+\ifnum\theExDepth=1
+\def\tempc{\tempa}\fi
+\ifnum\theExDepth=2
+\def\tempc{\tempb}
+\renewcommand{\thealtsub}{\subettan{altsub}}
+\renewcommand{\thealtsubsub}{\thealtsub\secondphildash\Exroman{altsubsub}}
+\refstepcounter{altsub}\label{#2q}
+\else
+\refstepcounter{altsubsub}\label{#2q}
+\renewcommand{\theSubSubExNo}{\theSubExNo\secondphildash\Exroman{SubSubExNo}}
+\def\tempc{\tempb}
+\fi
+\immediate\write\@auxout{\unexpanded{\expandafter\gdef\csname#2p \endcsname{\MakeLowercase#3}\expandafter\gdef\csname#2r\endcsname{#3} \expandafter\global\expandafter\def\csname#2\endcsname{\ref{#2}}
+\expandafter\global\expandafter\def\csname#2q\endcsname{\ref{#2q}}
+}}
\expandafter\providecommand\csname#2p\endcsname{\MakeLowercase#3}
\expandafter\providecommand\csname#2r\endcsname{#3}
-\expandafter\providecommand\csname#2\endcsname{\ref{#3}}
+\expandafter\providecommand\csname#2\endcsname{\ref{#2}}
+\expandafter\providecommand\csname#2q\endcsname{\ref{#2q}}
\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\gdef\csname#2\endcsname{ref{#2}}
+\expandafter\global\expandafter\def\csname#2q\endcsname{#1}
+}}
+\ifnum\theExDepth=1 \renewcommand{\theSubExNo}{\theExNo\firstphildash#1}
+\refstepcounter{SubExNo}
+\renewcommand{\thealtsub}{#1}
+\renewcommand{\thealtsubsub}{#1\Exroman{altsubsub}}
+\else
+\ifnum\theExDepth=2
+\renewcommand{\thealtsub}{#1}
+\renewcommand{\theSubExNo}{\theExNo\firstphildash#1}
+\refstepcounter{altsub}\label{#2q}
+\else
+\renewcommand{\thealtsubsub}{\thealtsub\secondphildash#1}
+\refstepcounter{altsubsub}\label{#2q}
+\renewcommand{\theSubSubExNo}{\theSubExNo\secondphildash#1}
+\refstepcounter{SubSubExNo}
+\fi\fi
\expandafter\providecommand\csname#2p\endcsname{\MakeLowercase#3}
\expandafter\providecommand\csname#2r\endcsname{#3}
-\expandafter\providecommand\csname#2\endcsname{\theExNo#1}
+\expandafter\providecommand\csname#2\endcsname{\ref{#2}}
+\expandafter\providecommand\csname#2q\endcsname{\ref{#2q}}
\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
+\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}}}}
+\renewcommand{\thealtsub}{\subettan{altsub}}
+\renewcommand{\thealtsubsub}{\thealtsub\secondphildash\Exroman{altsubsub}}
+\ifnum\theExDepth=1
+\def\tempc{\tempa}\fi
+\ifnum\theExDepth=2
+\def\tempc{\tempb}
+\refstepcounter{altsub}\label{#2q}
+\else
+\renewcommand{\thealtsub}{\subettan{altsub}}
+\renewcommand{\thealtsubsub}{\thealtsub\secondphildash\Exroman{altsubsub}}
+\refstepcounter{altsubsub}\label{#2q}
+\renewcommand{\theSubSubExNo}{\theSubExNo\secondphildash\Exroman{SubSubExNo}}
+\def\tempc{\tempb}\fi
+\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\global\expandafter\def\csname#2q\endcsname{\ref{#2q}}}}
\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}
+ \else
+\ifnum\theExDepth=1
+\renewcommand{\theSubExNo}{\theExNo\firstphildash#1}
+\refstepcounter{SubExNo}
+\renewcommand{\thealtsub}{#1}
+\renewcommand{\thealtsubsub}{\thealtsub\secondphildash#1}
+\else
+\ifnum\theExDepth=2
+\renewcommand{\theSubExNo}{\theExNo\firstphildash#1}
+\refstepcounter{SubExNo}
+\renewcommand{\thealtsub}{#1}
+\refstepcounter{altsub}\label{#2q}
+\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\global\expandafter\def\csname#2q\endcsname{\ref{#2q}}
+}}
+\else
+\ifnum\theExDepth=3
+\renewcommand{\thealtsubsub}{\thealtsub\secondphildash#1}
+\refstepcounter{altsubsub}\label{#2q}
+\renewcommand{\theSubSubExNo}{\theSubExNo\secondphildash#1}
+\refstepcounter{SubSubExNo}\label{#2}
+\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\gdef\csname#2\endcsname{\ref{#2}}
+\expandafter\global\expandafter\def\csname#2q\endcsname{\ref{#2q}}
+}}
+\fi\fi\fi
\expandafter\providecommand\csname#2p\endcsname{\MakeLowercase#3}
\expandafter\providecommand\csname#2r\endcsname{#3}
-\expandafter\providecommand\csname#2\endcsname{\theExNo#1}
+\expandafter\providecommand\csname#2\endcsname{\ref{#2}}
+\expandafter\providecommand\csname#2q\endcsname{\ref{#2q}}
\ifhyperref
\b.[\hypertarget{#2}\lebrack#1\ribrack] \label{#2}#3\philsubpunct
\else
@@ -321,6 +433,14 @@
(\csname#2\endcsname#1)%
\fi}
+%Cross-reference to subsentence without main number:
+\newcommand{\rfx}[2][]{%
+\ifhyperref%
+(\hyperlink{#2}{\csname#2q\endcsname}#1)%
+\else%
+(\csname#2q\endcsname#1)%
+\fi}
+
%Cross-reference without brackets
\newcommand{\rn}[2][]{
\ifhyperref
@@ -329,6 +449,14 @@
\csname#2\endcsname#1%
\fi}
+%Cross-reference to subsentence without brackets and main number:
+\newcommand{\rnx}[2][]{%
+\ifhyperref%
+\hyperlink{#2}{\csname#2q\endcsname}#1%
+\else%
+\csname#2q\endcsname#1%
+\fi}
+
%Repeating the sentence
\newcommand{\rp}[1]{\csname#1r\endcsname}
@@ -347,6 +475,21 @@
\else \csname#2r\endcsname\philpunct\fi\fi
\par}
+%Repeating the sentence with name or number but without footnote:
+\newcommand{\rffnot}[2][n]{
+\ifdim\lastskip=\Extopsep\vspace{\Exredux}\fi
+\ifhyperref
+\ex.[(\hyperlink{#2}{\csname#2\endcsname})]
+\renewcommand{\footnote}[1]{}
+\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)]
+\renewcommand{\footnote}[1]{}
+\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}
@@ -362,19 +505,23 @@
%Ditto for stand-alone sequences, a-d:
\newcommand{\bota}{\alph}
-\newcommand{\bpaformat}[3]{\if#1a \else
+\newcommand{\bpaformat}[3]{\setcounter{bpa}{0}%
+\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
+\newcommand{\bpbformat}[3]{\setcounter{bpb}{0}%
+\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
+\newcommand{\bpcformat}[3]{\setcounter{bpc}{0}%
+\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
+\newcommand{\bpdformat}[3]{\setcounter{bpd}{0}%
+\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