From f6d12e1de2869816f6fb6bb59f3266544bee5588 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 22 Oct 2007 00:36:57 +0000 Subject: new latex package philex (20oct07) git-svn-id: svn://tug.org/texlive/trunk@5252 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/philex/README | 8 ++ Master/texmf-dist/doc/latex/philex/philex.pdf | Bin 0 -> 86464 bytes Master/texmf-dist/doc/latex/philex/philex.tex | 153 +++++++++++++++++++++++ Master/texmf-dist/tex/latex/philex/philex.sty | 129 +++++++++++++++++++ Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 + Master/tlpkg/tlpsrc/philex.tlpsrc | 2 + 6 files changed, 293 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/philex/README create mode 100644 Master/texmf-dist/doc/latex/philex/philex.pdf create mode 100644 Master/texmf-dist/doc/latex/philex/philex.tex create mode 100644 Master/texmf-dist/tex/latex/philex/philex.sty create mode 100644 Master/tlpkg/tlpsrc/philex.tlpsrc (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/philex/README b/Master/texmf-dist/doc/latex/philex/README new file mode 100644 index 00000000000..ecfa21a7152 --- /dev/null +++ b/Master/texmf-dist/doc/latex/philex/README @@ -0,0 +1,8 @@ +Readme +philex is a package for creating and cross-referencing named or numbered environments, such as equations, example sentences as in linguistics or philosophy, and named principles. philex offers dynamic cross-references not only the numbers of labeled environments, but also to short names of environments, and to the contents of those environment. Cross-referencing works forward as well as backward in the text. + +philex builds upon Wolfgang Sternefelds linguex package, designed for example sentences in linguistics (as well as for adding phrase structure brackets and glosses). linguex provides the basic formatting, numbering in several levels, and naming capacity. + +philex adds some extra formatting and numbering options to linguex, over and above the cross-referencing features. + +philex.sty is to be placed in the LaTeX-folder of the texmf-tree. A five-page manual is provided, together with its .tex source. It requires the linguex package as well as the calc package. \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/philex/philex.pdf b/Master/texmf-dist/doc/latex/philex/philex.pdf new file mode 100644 index 00000000000..3feb38ddd10 Binary files /dev/null and b/Master/texmf-dist/doc/latex/philex/philex.pdf differ diff --git a/Master/texmf-dist/doc/latex/philex/philex.tex b/Master/texmf-dist/doc/latex/philex/philex.tex new file mode 100644 index 00000000000..572420e2020 --- /dev/null +++ b/Master/texmf-dist/doc/latex/philex/philex.tex @@ -0,0 +1,153 @@ +\documentclass[10pt]{article} +\usepackage[utf8]{inputenc} + + + +\usepackage{linguex,philex} + + + +\newcommand{\qut}[1]{`#1'} +\usepackage[english]{babel} + +\usepackage{latexsym,amssymb,amsmath,amsthm,wasysym} +\usepackage{calc} + +\newcounter{hour} +\newcounter{minute} + + + +\newcommand{\emp}{\emph} +\newcommand{\note}{\footnote} +\setcounter{hour}{\time/60} +\setcounter{minute}{\time-60*\thehour} +\ifnum\thehour<10 \def\nowh{0\thehour} \else \def\nowh{\thehour}\fi +\ifnum\theminute<10\def\nowm{0\theminute} \else \def\nowm{\theminute}\fi +\def\now{\nowh:\nowm} +\def\aut{Peter Pagin} +\def\home{\begin{flushright} +\item Department of Philosophy +\item Stockholm University +\end{flushright}} +\usepackage{paralist} +\usepackage{hyperref} + +\begin{document} +\title{The \tt philex \rm Package \\ version 0.3} +\author{\aut} +\date{\today, \now} +\maketitle +\setlength{\pltopsep}{3mm} +\setlength{\plitemsep}{2mm} +\setlength{\plparsep}{1mm} +\settowidth{\Exlabelwidth}{(110)} + +The \verb+philex+ package is a small addition to Wolfgang Sternefeld's \verb+linguex+ package and requires \verb+linguex+. As of version 0.2 it also requires \verb+calc+. \verb+philex+ will load \verb+linguex+ if it is installed. The purpose of \verb+philex+ is to add functions for more flexible cross-referencing, for repeating and embedding named or numbered sentences and also a little bit for formatting. + +As of version 0.3 \verb+philex+ creates a separate file in the same directory as the main file. If the typeset document is \emp{myfile}.tex, the file created by \verb+philex+ will be \emp{myfile}-px.tex. \verb+philex+ writes its command definitions to this file at typesetting, and reads from the created file at the beginning (AtBeginDocument) of the next round of typesetting. The purpose of this device is to allow forward cross-referencing to named sentences, in analogy to the label-reference system of LaTeX itself. + +\verb+philex+ is called by \verb+\usepackage{philex}+. Its basic command is \verb+\lb{}{}+, which takes two obligatory arguments. The first argument is the label of the sentence, and the second is the sentence itself. \verb+lb+ uses the \verb+\ex.+ formatting of \verb+linguex+, and thereby the \verb+ExNo+ counter. Type + +\begin{verbatim} +\lb{nice}{This is a nice day} +\end{verbatim} +and the result will be + +\lb{nice}{This is a nice day} +in case it is numbered sentence no \rn{nice} in your document (we will return in a second to the full stop issue). + +In \verb+linguex+ you leave a blank line after sentence to close the environment. The blank line gives a \verb+\par+-command to TeX. In \verb+philex+ the \verb+\par+-command is built into the top-level environments. So you leave a blank line after an \verb+\lb{}{}+-environment only if you want to start a new paragraph. The reason for this change, is that only this way will the \verb+philex+ package work together with the \verb+extract+ package by Hendri Adriaens, which can be used for extracting material, e.g. for generating a handout, from documents making use of \verb+philex+. \verb+linguex+ comes together with Sternefeld's \verb+linguho+ package, which has the function of generating a handout from documents using \verb+linguex+. \verb+linguho+ does not work with \verb+philex+, since the \verb+linguex+ environments are not explicit in the document. The corresponding function, only more flexible, can be served with the \verb+extract+ package. + +For cross-referencing a numbered sentence you can use to ordinary \verb+\ref{}+-command, or the command \verb+\rf{}+ provided by \verb+philex+. Thus \verb+\rf{nice}+ produces the \verb+ExNo+ number of \rf{nice}. The command takes an optional argument. In case you want to add a suffix in the cross-reference, you provide it as the optional argument. \verb+\rf[a]{nice}+ produces \qut{\rf[a]{nice}}. This is normally not needed, since the usual reasons for doing this are accommodated by other means (see below). + +A cross-reference with \verb+\rn{}+ will remove the brackets. \verb+\rn{nice}+ gives \qut{\rn{nice}}. This is equivalent to using the label itself as a command name: \verb+\nice+ gives \qut{\nice}. + +You might want to repeat the sentence later. This can be done with the \verb+\rp{}+-command. Thus \verb+\rp{nice}+ produces \qut{\rp{nice}}. With the \verb+\ml{}+-command you can repeat the sentence with the initial letter made lowercase: \verb+\ml{nice}+ produces \qut{\ml{nice}}. This is useful in case you want to embed the sentence in a larger sentence, such as + +\lb{great}{Elsa thinks that \ml{nice}, but Alfred does not} +This also illustrates the insertion of the full stop. You do not normally type in a full stop a the end of the named sentence, but let it be put in by the \verb+\lb+-command. This makes the call by means of the \verb+\ml+-command fully embeddable. The full-stop insertion can be turned off with \verb+\q+ and turned on again with \verb+\s+, and also transformed into a comma with \verb+\km+. These commands shall go before the relevant \verb+philex+ environment. The analogous functions for the first subordinate level are served by \verb+\qt+ (changing to nothing), \verb+\stp+ (changing to full stop), and \verb+\kmt+ (changing to comma). + +In case you want to repeat the sentence with its name or number you can use \verb+\rff{}+. \verb+\rff{nice}+ produces \rff{nice} + +In many cases you will want to produce a variant of the original sentence, which will have the same name or number as the original, but with an added suffix, like a letter or a prime symbol. This is achieved with the \verb+\lbu{}{}{}{}+-command. It takes four obligatory arguments. The first is the label of the new sentence, the second is the label of the sentence you are giving a variant of, the third is the suffix you want to add, and the fourth is the new sentence itself. +\begin{verbatim} +\lbu{nicy}{nice}{\('\)}{But that was even nicer} +\end{verbatim} +produces \lbu{nicy}{nice}{\('\)}{But that was even nicer} +And a cross-reference will preserve the name: \verb+\rf{nicy}+ produces \qut{\rf{nicy}}. + +You will also want to have named principles, such as +\lbp{life}{W}{Life is wonderful!} +These are produced with the \verb+\lbp{}{}{}+-command which makes use of the optional argument to \verb+\ex.[]+ in \verb+linguex+. Cross-references with \verb+\rf+, like to \rf{life}, and updates with \verb+\lbu+, like + +\lbu{newlife}{life}{\textsuperscript{+}}{\q Life is terrific!} work as before. If you later change the name of the principle, or the formulation, the changes are reflected in the cross-references and repetitions after the next typesetting, as long as you do not change the labels. In the last example, the full stop function was turned off by means of \verb+\q+ inside the last argument, so as not to produce an extra full stop after the exclamation mark. + +In case you don't want the brackets in the principle name, turn them off with \verb+\broff+, as in \rn{offer} (exemplifying forward cross-reference):\broff +\lbp{offer}{L}{Has a lot to offer!} +To turn them on again, type \verb+\bron+. \bron It is also possible to change the brackets with \verb+\renewcommand{\lebrack}{}+ and \verb+\renewcommand{\ribrack}{}+ (put in what you want), for the left and right bracket, respectively. + +The cross-reference and repeat and update functions also work for subordinate clauses, corresponding to \verb+\a.+ and \verb+\b.+ of \verb+linguex+. For these purposes, \verb+philex+ has \verb+\lba{}{}+, \verb+\lbb{}{}+ and \verb+\lbz{}{}+. To illustrate, the code + +\begin{verbatim} +\lbp{clauses}{PP}{Some main words, followed by +\lba{first}{Time flies} \lbb{second}{Like an arrow} +\lbz{last}{And much too fast}} +\end{verbatim} +produces + +\lbp{clauses}{PP}{Some main words, followed by +\lba{first}{Time flies} \lbb{second}{Like an arrow} \lbz{last}{And much too fast}} +It is in general not necessary to to switch from \verb+\lbb+ to \verb+\lbz+ for the last subordinate clause. + +Notice that the subordinate environments are put \emp{into} the main \verb+\lbp+ environment. This is necessary, since the main environment has a \verb+\par+ command built in, which ends the \verb+\ex.+ environment of \verb+linguex+. Also, there are no line-breaks in the code (even though that cannot be seen above), and that is again for the sake of the \verb+extract+ package, which extracts given command environments by command line. In these subordinate environments the full stop is put in. The closing one, \verb+\lbz+, turns off the the full stop that may come from the the main environment, so as not to produce doubles. + +We can now cross-reference a subordinate clause, as with \verb+\rf{second}+, to produce \qut{\rf{second}}. We can also repeat, as with \verb+\rff{last}+: \rff{last} +Similarly update. + +There are some formatting options. The command \verb+\subformat{}{}{}+ takes three arguments. With the first argument you can control the numbering format. Default is lowercase alphabetic. Setting the first argument to \qut{A} gives uppercase alphabetic, to \qut{r} gives lowercase roman, to \qut{R} gives uppercase roman, and to \qut{1} gives arabic. Other argument values have no effect. The second argument controls the prefix. For instance, inserting a left bracket will produce left-bracket enumeration. The last argument produces the suffix. So, \verb+\sub{1}{}{)}+ will produce arabic enumeration with a closing bracket after the numeral. The \verb+\subformat+-command should be put in before the first \verb+\lba+-command. + +There are some shorter fast-switching commands for this purpose: \verb+\sa+ produces lowercase alphabetic with dot (which is \verb+linguex+ default), \verb+\sab+ produces lowercase alphabetic followed by right bracket, and \verb+\sr+ produces lowercase roman followed by right bracket. If these commands, just as the -verb+\subformat+-command, are put within the main\verb+philex+ environment (before the first subordinate clause), the changes are only local to that environment. Note that the longer command works by \emp{redefining} the \verb+\alph+-command which normally gives lowercase alphabetic, while the fast switching commands redefine \verb+\theSubExNO+ without redefining \verb+\alph+. So if \verb+\alph+ is locally redefined to mean \verb+\roman+, the command \verb+\sa+ will produce a roman numeral with dot in that local context. + +Repeating an \verb+\lba+ command after a subordinate clause produces a new subordinate level, as designed in \verb+linguex+. We can have + +\lb{numclauses}{Much to do \subformat{a}{}{)}\lba{more}{So little time}\lba{late}{And one is always late}} +Clause \rf{late} is worth thinking about. Produced with the following code: +\begin{verbatim} +\lb{numclauses}{Much to do \subformat{a}{}{)} +\lba{more}{So little time} +\lba{late}{And one is always late}} +Clause \rf{late} is worth thinking about. +\end{verbatim} +Some formatting of the second subordinate level can be done by means of \verb+\subsubformat{}{}{}+. At present, however, only the second and third argument, controlling prefix and suffix, are operative. The enumeration style is not affected. + +In case you wish a list of independently numbered principles with a shared name stem, use one of the \verb+\lbpx+-commands, where \verb+x+ is one of \verb+a,b,c,d+. It takes two arguments, for label and content sentence. You first set the enumeration style and and the stem with \verb+\bpxformat{}{}+, where again \verb+x+ has the corresponding value. The first argument sets the numbering style, as above, and the second the stem. Then the \verb+\lbpx+-command picks it up: \bpaformat{1}{T} + +\begin{verbatim} +\bpaformat{1}{T} +\lbpa{kno}{Alfred is in the know.} +\lbpa{hu}{Elsa is, too.} +\lbpa{kne}{John agrees.} +\end{verbatim} +produces +\lbpa{kno}{Alfred is in the know.} \lbpa{hu}{Elsa is, too.} \lbpa{kne}{John 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: \lbpa{glufs}{But he shouldn't.} + +The top-level commands, \verb+\lb+, \verb+\lbp+, \verb+\lbpx+, and \verb+\lbu+, take an optional argument. If that argument is set to \qut{c}, as in \verb+\lb[c]{xx}{yy}+, the content sentence will be centered, as in + +\lb[c]{PoC}{\[P(\gamma (t)\geq\delta)|\textbf{A})=(0.5)^{\alpha (t)}\sum_{i=0}^{\epsilon(t)}\binom{\alpha(t)}{i}\]} +This is designed for equations and figures. It works both with \verb+\(\)+ and, as here, with \verb+\[\]+, which produces more space above and below. + +Positioning text (left, center or right) on lower lines in a \verb+philex+-environment can be done by means of line-break and a \verb+\makebox[][]{}+-command on the new line. The first optional argument sets the width of the box. With the command \verb+\hcentro+, provided by \verb+philex+, the length is set to \verb+\textwidth+ (the current width of the entire text column) minus the \verb+linguex+ inset (width of the label + with of the separation between label and text). The length command \verb+\centro+ deducts that quantity twice. This second alternative is used for centering with respect to the entire text column (exemplifed in \rf{PoC} above), while the \verb+\hcentro+ command is used for left-, center- or right positioning within the interior text column of \verb+philex/linguex+. The positioning is chosen by the \LaTeX values \verb+l+, \verb+c+ and \verb+r+ in the second optional argument. + +Finally, \verb+philex+ provides an additional counter, \verb+bna+, for informal enumerations in the main text. The command \verb+\bn+ advances the counter and puts in a number with a quad space. The command \verb+\bns+ resets the counter to zero. + +\bn The result is exemplified with first with this sentence. + +\bn And then it is followed up here. + +There are more possibilities in \verb+linguex+, described in its manual. + + +\bibliography{peter3} +\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/philex/philex.sty b/Master/texmf-dist/tex/latex/philex/philex.sty new file mode 100644 index 00000000000..1269fd9195e --- /dev/null +++ b/Master/texmf-dist/tex/latex/philex/philex.sty @@ -0,0 +1,129 @@ +%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 + +\RequirePackage{linguex,calc} +\AtBeginDocument{\include{\jobname-px}} +\AtBeginDocument{\immediate\openout7=\jobname-px} + +%\renewcommand{\refdash}{} + +%Controlling brackets,lowercase and full stop. +\newcommand{\p}{.} +\newcommand{\q}{\renewcommand{\p}{}} +\newcommand{\s}{\renewcommand{\p}{.}} +\newcommand{\km}{\renewcommand{\p}{,}} +\newcommand{\qt}{\renewcommand{\pt}{}} +\newcommand{\pt}{.} +\newcommand{\stp}{\renewcommand{\pt}{.}} +\newcommand{\kmt}{\renewcommand{\pt}{,}} +\newcommand{\lebrack}{(} +\newcommand{\ribrack}{)}\def\broff{\def\lebrack{}\def\ribrack{}} +\def\bron{\def\lebrack{(}\def\ribrack{)}} +\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{\centro}{\textwidth-(\Exindent*2+\Exlabelsep*2+\Exlabelwidth*2)} +\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} + +%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} + +%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} + +%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} + +%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} + +%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} + +%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} + +%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} + +%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} + +%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.} + +%Cross-reference +\newcommand{\rf}[2][]{(\csname#2\endcsname#1)} + +%Cross-reference without brackets +\newcommand{\rn}[1]{\csname#1\endcsname} + +%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}[1]{\ex.[(\csname#1\endcsname)]\csname#1r\endcsname\p\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 \else +\if#1A \renewcommand{\alph}{\Alph} \else \if#11 \renewcommand{\alph}{\arabic} \else \if#1r \renewcommand{\alph}{\roman} \else \if#1R \renewcommand{\alph}{\Roman} \else \fi \fi \fi \fi \fi \renewcommand{\SubExLeftBracket}{#2} \renewcommand{\SubExRightBracket}{#3}} + +%Ditto for stand-alone sequences, a-d: +\newcommand{\bota}{\alph} +\newcommand{\bpaformat}[2]{\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}}} + +\newcommand{\botb}{\alph} +\newcommand{\bpbformat}[2]{\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}}} + +\newcommand{\botc}{\alph} +\newcommand{\bpcformat}[2]{\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}}} + +\newcommand{\botd}{\alph} +\newcommand{\bpdformat}[2]{\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\bota{bpd}}} + +%Controlling prefix and suffix for SubSubExNo (not numbering for now) +\newcommand{\bett}{\roman} +\newcommand{\subsubformat}[3]{\if#1r \else +\if#1A\renewcommand{\bett}{\Alph} \else \if#11 \renewcommand{\bett}{\arabic} \else \if#1a \renewcommand{\bett}{\alph} \else \if#1R \renewcommand{\bett}{\Roman} \else \fi \fi \fi \fi \fi \renewcommand{\theSubSubExNo}{\Alph{SubSubExNo}}\renewcommand{\SubSubExLeftBracket}{#2} \renewcommand{\SubSubExRightBracket}{#3}} + +%Fast changing between alphabetic. and roman) for SubEx +\newcommand{\sa}{\renewcommand{\SubExRightBracket}{.}\renewcommand{\SubExlabel}{\SubExLeftBracket\alph{SubExNo}\SubExRightBracket}\renewcommand{\theSubExNo}{\arabic{ExNo}\refdash\alph{SubExNo}}} + +\newcommand{\sr}{\renewcommand{\SubExRightBracket}{)}\renewcommand{\SubExlabel}{\SubExLeftBracket\roman{SubExNo}\SubExRightBracket}\renewcommand{\theSubExNo}{\arabic{ExNo}\refdash\roman{SubExNo}}} + +\newcommand{\sab}{\renewcommand{\SubExRightBracket}{)}\renewcommand{\SubExlabel}{\SubExLeftBracket\alph{SubExNo}\SubExRightBracket}\renewcommand{\theSubExNo}{\arabic{ExNo}\refdash\alph{SubExNo}}} + + + + + + + + + + + diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index 13e154876bc..a420c790957 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -348,6 +348,7 @@ depend pdfwin depend pecha depend perltex depend permute +depend philex depend photo depend pittetd depend placeins diff --git a/Master/tlpkg/tlpsrc/philex.tlpsrc b/Master/tlpkg/tlpsrc/philex.tlpsrc new file mode 100644 index 00000000000..1ad619a60f4 --- /dev/null +++ b/Master/tlpkg/tlpsrc/philex.tlpsrc @@ -0,0 +1,2 @@ +name philex +category Package -- cgit v1.2.3