summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/covington/README16
-rw-r--r--macros/latex/contrib/covington/covington.pdfbin520384 -> 533391 bytes
-rw-r--r--macros/latex/contrib/covington/covington.sty723
-rw-r--r--macros/latex/contrib/covington/covington.tex770
-rw-r--r--macros/latex/contrib/movement-arrows/README.md6
-rw-r--r--macros/latex/contrib/movement-arrows/movement-arrows.pdfbin53891 -> 63601 bytes
-rw-r--r--macros/latex/contrib/movement-arrows/movement-arrows.sty82
-rw-r--r--macros/latex/contrib/movement-arrows/movement-arrows.tex182
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdfbin1026834 -> 1053310 bytes
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex232
-rw-r--r--macros/latex/contrib/proflycee/tex/ProfLycee.sty3
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-graphiques.tex6
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-stats.tex254
-rw-r--r--macros/latex/contrib/revtex/aip/aipguide4-2.pdf (renamed from macros/latex/contrib/revtex/doc/aip/aipguide4-2.pdf)bin270691 -> 270691 bytes
-rw-r--r--macros/latex/contrib/revtex/aip/aipguide4-2.tex (renamed from macros/latex/contrib/revtex/doc/aip/aipguide4-2.tex)0
-rw-r--r--macros/latex/contrib/revtex/aip4-2.dtx (renamed from macros/latex/contrib/revtex/source/aip4-2.dtx)0
-rw-r--r--macros/latex/contrib/revtex/aip4-2.pdfbin0 -> 517321 bytes
-rw-r--r--macros/latex/contrib/revtex/aps/apsguide4-2.pdf (renamed from macros/latex/contrib/revtex/doc/aps/apsguide4-2.pdf)bin232285 -> 232285 bytes
-rw-r--r--macros/latex/contrib/revtex/aps/apsguide4-2.tex (renamed from macros/latex/contrib/revtex/doc/aps/apsguide4-2.tex)0
-rw-r--r--macros/latex/contrib/revtex/auguide/auguide4-2.pdf (renamed from macros/latex/contrib/revtex/doc/auguide/auguide4-2.pdf)bin452319 -> 452319 bytes
-rw-r--r--macros/latex/contrib/revtex/auguide/auguide4-2.tex (renamed from macros/latex/contrib/revtex/doc/auguide/auguide4-2.tex)0
-rw-r--r--macros/latex/contrib/revtex/auguide/docs.sty (renamed from macros/latex/contrib/revtex/doc/auguide/docs.sty)0
-rw-r--r--macros/latex/contrib/revtex/auguide/summary4-2.pdf (renamed from macros/latex/contrib/revtex/doc/auguide/summary4-2.pdf)bin230858 -> 230858 bytes
-rw-r--r--macros/latex/contrib/revtex/auguide/summary4-2.tex (renamed from macros/latex/contrib/revtex/doc/auguide/summary4-2.tex)0
-rw-r--r--macros/latex/contrib/revtex/ltxdocext.dtx (renamed from macros/latex/contrib/revtex/source/ltxdocext.dtx)0
-rw-r--r--macros/latex/contrib/revtex/ltxdocext.pdfbin0 -> 324579 bytes
-rw-r--r--macros/latex/contrib/revtex/ltxfront.dtx (renamed from macros/latex/contrib/revtex/source/ltxfront.dtx)0
-rw-r--r--macros/latex/contrib/revtex/ltxfront.pdfbin0 -> 546693 bytes
-rw-r--r--macros/latex/contrib/revtex/ltxgrid.dtx (renamed from macros/latex/contrib/revtex/source/ltxgrid.dtx)0
-rw-r--r--macros/latex/contrib/revtex/ltxgrid.pdfbin0 -> 801858 bytes
-rw-r--r--macros/latex/contrib/revtex/ltxutil.dtx (renamed from macros/latex/contrib/revtex/source/ltxutil.dtx)0
-rw-r--r--macros/latex/contrib/revtex/ltxutil.pdfbin0 -> 623128 bytes
-rw-r--r--macros/latex/contrib/revtex/revtex-bst.dtx (renamed from macros/latex/contrib/revtex/source/revtex-bst.dtx)0
-rw-r--r--macros/latex/contrib/revtex/revtex4-2.dtx (renamed from macros/latex/contrib/revtex/source/revtex4-2.dtx)0
-rw-r--r--macros/latex/contrib/revtex/revtex4-2.pdfbin0 -> 839993 bytes
-rw-r--r--macros/latex/contrib/revtex/sample/aapm/aapmsamp.bib (renamed from macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.bib)0
-rw-r--r--macros/latex/contrib/revtex/sample/aapm/aapmsamp.pdf (renamed from macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.pdf)bin352536 -> 352536 bytes
-rw-r--r--macros/latex/contrib/revtex/sample/aapm/aapmsamp.tex (renamed from macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/aapm/aapmtemplate.tex (renamed from macros/latex/contrib/revtex/doc/sample/aapm/aapmtemplate.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/aapm/fig_1.eps (renamed from macros/latex/contrib/revtex/doc/sample/aapm/fig_1.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aapm/fig_2.eps (renamed from macros/latex/contrib/revtex/doc/sample/aapm/fig_2.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aip/aipsamp.bib (renamed from macros/latex/contrib/revtex/doc/sample/aip/aipsamp.bib)0
-rw-r--r--macros/latex/contrib/revtex/sample/aip/aipsamp.pdf (renamed from macros/latex/contrib/revtex/doc/sample/aip/aipsamp.pdf)bin377909 -> 377909 bytes
-rw-r--r--macros/latex/contrib/revtex/sample/aip/aipsamp.tex (renamed from macros/latex/contrib/revtex/doc/sample/aip/aipsamp.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/aip/aiptemplate.tex (renamed from macros/latex/contrib/revtex/doc/sample/aip/aiptemplate.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/aip/fig_1.eps (renamed from macros/latex/contrib/revtex/doc/sample/aip/fig_1.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aip/fig_2.eps (renamed from macros/latex/contrib/revtex/doc/sample/aip/fig_2.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/apssamp.bib (renamed from macros/latex/contrib/revtex/doc/sample/aps/apssamp.bib)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/apssamp.pdf (renamed from macros/latex/contrib/revtex/doc/sample/aps/apssamp.pdf)bin356378 -> 356378 bytes
-rw-r--r--macros/latex/contrib/revtex/sample/aps/apssamp.tex (renamed from macros/latex/contrib/revtex/doc/sample/aps/apssamp.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/apstemplate.tex (renamed from macros/latex/contrib/revtex/doc/sample/aps/apstemplate.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/fig_1.eps (renamed from macros/latex/contrib/revtex/doc/sample/aps/fig_1.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/fig_2.eps (renamed from macros/latex/contrib/revtex/doc/sample/aps/fig_2.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/vid_1a.eps (renamed from macros/latex/contrib/revtex/doc/sample/aps/vid_1a.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/aps/vid_1b.eps (renamed from macros/latex/contrib/revtex/doc/sample/aps/vid_1b.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/sor/fig_1.eps (renamed from macros/latex/contrib/revtex/doc/sample/sor/fig_1.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/sor/fig_2.eps (renamed from macros/latex/contrib/revtex/doc/sample/sor/fig_2.eps)0
-rw-r--r--macros/latex/contrib/revtex/sample/sor/sorsamp.bib (renamed from macros/latex/contrib/revtex/doc/sample/sor/sorsamp.bib)0
-rw-r--r--macros/latex/contrib/revtex/sample/sor/sorsamp.pdf (renamed from macros/latex/contrib/revtex/doc/sample/sor/sorsamp.pdf)bin396057 -> 396057 bytes
-rw-r--r--macros/latex/contrib/revtex/sample/sor/sorsamp.tex (renamed from macros/latex/contrib/revtex/doc/sample/sor/sorsamp.tex)0
-rw-r--r--macros/latex/contrib/revtex/sample/sor/sortemplate.tex (renamed from macros/latex/contrib/revtex/doc/sample/sor/sortemplate.tex)0
61 files changed, 1640 insertions, 634 deletions
diff --git a/macros/latex/contrib/covington/README b/macros/latex/contrib/covington/README
index 4d1636aa59..4587e8f7b4 100644
--- a/macros/latex/contrib/covington/README
+++ b/macros/latex/contrib/covington/README
@@ -31,6 +31,22 @@ The package consists of the following files:
== CHANGES ==
+* Version 2.10 (2023-06-02)
+ - Use LaTeX's own keyval mechanism rather than xkeyval.
+ - Introduce a better interface to customize the appearance of examples. Now everything can
+ be easily adjusted globally and locally via key-val options. This entails the following changes:
+ * Allow to globally set example options via the new macro \setexampleoptions.
+ * Add way to customize example and subexample number format.
+ * Add new example options: fs, fsno, fspreamble, fspostamble, leftmargin, addnumbersep,
+ addsubnumbersep, numberformat, subnumberformat, and fnnumberformat.
+ - Add new gloss options: fspreamble, fspostamble, fstl, and enquotetl.
+ This allows for full customization of glosses via options, both locally and globally.
+ - Package options now all have a key-value format as well.
+ - Introduce new package choice-option fnexamplecounter that supersedes the two boolean,
+ mutually exclusive options ownfncounter and ownfncounter* (which are still supported
+ for backwards compatibility reasons).
+ - Major documentation revisions.
+
* Version 2.9 (2023-05-26):
- Add postamble and postamble* options to example and subexamples environment.
- Add \expreamble, \subexpreamble, \expostamble and \subexpostamble macros.
diff --git a/macros/latex/contrib/covington/covington.pdf b/macros/latex/contrib/covington/covington.pdf
index a802c03ff1..d76ea95e7d 100644
--- a/macros/latex/contrib/covington/covington.pdf
+++ b/macros/latex/contrib/covington/covington.pdf
Binary files differ
diff --git a/macros/latex/contrib/covington/covington.sty b/macros/latex/contrib/covington/covington.sty
index 5218249db1..06792446c4 100644
--- a/macros/latex/contrib/covington/covington.sty
+++ b/macros/latex/contrib/covington/covington.sty
@@ -42,10 +42,15 @@
%%% Metadata
%%%
-\def\filedate{2023/05/26}
-\def\fileversion{2.9}
+\def\filedate{2023/06/02}
+\def\fileversion{2.10}
\def\filename{covington.sty}
+% Macro to issue warnings
+\newcommand\cov@warning[1]{%
+ \PackageWarning{covington}{#1}%
+}
+
% Force redefinition of environments?
\newif\ifforceredef\forceredeffalse
% Tweak text layout?
@@ -59,43 +64,61 @@
% Reset separate counter in footnote
\newif\ifresetownfnexcounter\resetownfnexcounterfalse
-\@ifundefined{ProvidesPackage}{%
-\typeout{* covington.sty -- Macros for Linguistics, \fileversion\ \filedate *}
-}{%
\ProvidesPackage{covington}
[\filedate\space v\fileversion\space Macros for Linguistics]
-\DeclareOption{force}{\forceredeftrue}
-\DeclareOption{keeplayout}{\tweaklayoutfalse}
-\DeclareOption{noglossbreaks}{\noglossbreakstrue}
-\DeclareOption{owncounter}{\ownexcountertrue}
-\DeclareOption{ownfncounter}{\ownfnexcountertrue}
-\DeclareOption{ownfncounter*}{\ownfnexcountertrue\resetownfnexcountertrue}
-\ProcessOptions
+
+\DeclareKeys[covington]
+{
+ % 1. force=<true|false>
+ force.if = forceredef,
+ % 2. keeplayout=<true|false>
+ keeplayout.ifnot = tweaklayout,
+ % 3. noglossbreaks=<true|false>
+ noglossbreaks.if = noglossbreaks,
+ % 4. owncounter=<true|false>
+ owncounter.if = ownexcounter,
+ % 5. fnexamplecounter=<main|own|own-reset>
+ fnexamplecounter.choice:,
+ % a. main
+ fnexamplecounter / main.code:n = { \ownfnexcounterfalse\resetownfnexcounterfalse },
+ % b. own
+ fnexamplecounter / own.code:n = { \ownfnexcountertrue\resetownfnexcounterfalse },
+ % c. own-reset
+ fnexamplecounter / own-reset.code:n = { \ownfnexcountertrue\resetownfnexcountertrue },
+ fnexamplecounter.default:n = { main },
+ % DEPRECATED OPTONS
+ % force=<true|false>
+ ownfncounter.code:n =
+ { \ownfnexcountertrue
+ \resetownfnexcounterfalse
+ \cov@warning{Option 'ownfncounter' is deprecated!\MessageBreak
+ Please use fnexamplecounter=own instead.}
+ },
+ % force=<true|false>
+ ownfncounter*.code =
+ { \ownfnexcountertrue
+ \resetownfnexcountertrue
+ \cov@warning{Option 'ownfncounter*' is deprecated!\MessageBreak
+ Please use fnexamplecounter=own-reset instead.}
+ }
}
+% Process package options
+\ProcessKeyOptions[covington]
+
%
% Required packages
%
-\RequirePackage{xkeyval}
\RequirePackage{iftex}
-% Macro to issue warnings
-\newcommand\cov@warning[1]{%
- \@ifundefined{PackageWarning}{%
- \typeout{* covington warning : #1 *}
- }{%
- \PackageWarning{covington}{#1}%
- }
-}
-
%%%
%%% Preferences about how text is laid out
%%%
% New 2018-08-24: Option to opt-out these layout tweaks
\iftweaklayout
-\setlength{\textfloatsep}{0.7in}
-\raggedbottom
+ \setlength{\textfloatsep}{0.7in}
+ \raggedbottom
\fi
%%%
@@ -172,6 +195,8 @@
\newcommand*\@@exampleno{\ifownexcounter\thecovex\else\theequation\fi}
\newcommand*\exampleno{\@ifstar{\@@exampleno}{\@exampleno}}
+\let\fnexfmt\roman
+
\newif\ifcov@infootnote\cov@infootnotefalse
\ifownfnexcounter
% Check whether we are in a footnote
@@ -182,7 +207,7 @@
\else
\newcounter{covfnex}
\fi
- \renewcommand{\thecovfnex}{\roman{covfnex}}
+ \renewcommand{\thecovfnex}{\fnexfmt{covfnex}}
\fi
%%%
@@ -190,8 +215,8 @@
%%%
% Font setting possibility for example sentences
-\newcommand*\covexamplefs{}
-\newcommand*\covexamplenofs{\normalfont}
+\newcommand*\covexamplefs{\normalfont\upshape}
+\newcommand*\covexamplenofs{\normalfont\upshape}
% example is an environment for displaying a single numbered
% example, preceded by its number. Example of use:
@@ -219,20 +244,106 @@
% with packages/classes that roll their own example environment
% (such as beamer).
+% Helper function for numbering templates
+\newif\ifcov@have@exno\cov@have@exnofalse
+
+\def\cov@parse@number@loop#1{%
+ \ifx\relax#1\else%
+ \cov@parse@number@loop@body{#1}\expandafter\cov@parse@number@loop%
+ \fi%
+}
+
+\newcommand\cov@parse@number@loop@body[1]{%
+ \ifcov@have@exno%
+ \let\cov@@tmpfmtright\cov@tmpfmtright%
+ \edef\cov@tmpfmtright{\cov@@tmpfmtright#1}%
+ \else%
+ \ifx 1#1%
+ \cov@have@exnotrue%
+ \let\cov@tmpfmt\arabic%
+ \else%
+ \ifx i#1%
+ \cov@have@exnotrue%
+ \let\cov@tmpfmt\roman%
+ \else%
+ \ifx I#1%
+ \cov@have@exnotrue%
+ \let\cov@tmpfmt\Roman%
+ \else%
+ \ifx a#1%
+ \cov@have@exnotrue%
+ \let\cov@tmpfmt\alph%
+ \else%
+ \ifx A#1%
+ \cov@have@exnotrue%
+ \let\cov@tmpfmt\Alph%
+ \else%
+ \let\cov@@tmpfmtleft\cov@tmpfmtleft%
+ \edef\cov@tmpfmtleft{\cov@@tmpfmtleft#1}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+}%
+
+\newcommand\cov@parse@number@template[3]{%
+ \cov@have@exnofalse%
+ \let\cov@tmpfmt\roman%
+ \def\cov@tmpfmtleft{}%
+ \def\cov@tmpfmtright{}%
+ \cov@parse@number@loop#1\relax%
+ \expandafter\let\csname#2\endcsname\cov@tmpfmt%
+ \expandafter\let\csname cov@tmpfmtleft#3\endcsname\cov@tmpfmtleft%
+ \expandafter\let\csname cov@tmpfmtright#3\endcsname\cov@tmpfmtright%
+ \ifcov@have@exno%
+ \expandafter\renewcommand\csname#3\endcsname[1]{%
+ \csname cov@tmpfmtleft#3\endcsname##1\csname cov@tmpfmtright#3\endcsname}%
+ \else%
+ \expandafter\renewcommand\csname#3\endcsname[1]{%
+ \csname cov@tmpfmtleft#3\endcsname\csname cov@tmpfmtright#3\endcsname}%
+ \fi%
+}
+
+\newif\if@cov@expst@star\@cov@expst@starfalse
+
% 2022-08-20 (v. 2.8): optional preceding example text
-\define@key{cov@ex}{preamble}{\def\cov@xp{#1}}
\newcommand*\expreamblefs{\normalfont}
\newcommand\expreamble[1]{\bgroup\expreamblefs#1\egroup\par}
-\newif\if@cov@expst@star\@cov@expst@starfalse
-\define@key{cov@ex}{postamble}{\def\cov@xpst{#1}\@cov@expst@starfalse}
-\define@key{cov@ex}{postamble*}{\def\cov@xpst{#1}\@cov@expst@startrue}
% 2023.05.26 (v. 2.9): optional trailung subexample text
\newcommand*\expostamblefs{\normalfont}
\newcommand*\expostamble[1]{\bgroup\expostamblefs#1\egroup}
+\DeclareKeys[covexpl]
+{
+ % font settings
+ fs.store = \covexamplefs,
+ % font settings of the ex. number
+ fsno.store = \covexamplenofs,
+ % preamble
+ preamble.store = \cov@xp,
+ % postamble
+ postamble.code = { \def\cov@xpst{#1}\@cov@expst@starfalse },
+ % postamble* (no space)
+ postamble*.code = { \def\cov@xpst{#1}\@cov@expst@startrue },
+ % preamble font settings
+ fspreamble.store = \expreamblefs,
+ % postamble font settings
+ fspostamble.store = \expostamblefs,
+ % leftmargin
+ leftmargin.code = { \setlength{\exampleind}{#1} },
+ % addnumbersep
+ addnumbersep.code = { \setlength{\examplenumbersep}{#1} },
+ % numberformat={template}
+ numberformat.code = { \cov@parse@number@template{#1}{exfmt}{covexnumber} },
+ % fnnumberformat={template}
+ fnumberformat.code = { \cov@parse@number@template{#1}{fnexfmt}{covexnumberfn} }
+}
+
\newenvironment{covexample}[1][]{%
- \ifx#1\empty\else\setkeys{cov@ex}{#1}\fi%
+ \ifx#1\empty\else\SetKeys[covexpl]{#1}\fi%
\begin{covexamples}
\item\@ifundefined{cov@xp}{}{\expreamble{\cov@xp}}% insert preamble if given
}{%
@@ -289,39 +400,43 @@
\newcommand*\covexnumber[1]{(#1)}
\newcommand*\covexnumberfn[1]{\covexnumber{#1}}
-\newenvironment{covexamples}% % define "example" environment
-{%
-\begin{list}%
-{%
- \covexamplenofs% font
- \ifcov@infootnote
- \covexnumberfn{\thecovfnex}%
- \else
- \covexnumber{\@@exampleno}%
- \fi
-}%
-{%
- \addtolength{\labelwidth}{\examplenumbersep}%
- \addtolength{\leftmargin}{\examplenumbersep}%
- \addtolength{\leftmargin}{\exampleind}%
- \ifcov@infootnote
- \setcounter{covexsave}{\arabic{covfnex}}%
- \usecounter{covfnex}%
- \setcounter{covfnex}{\arabic{covexsave}}%
- \else
- \ifownexcounter
- \setcounter{covexsave}{\arabic{covex}}%
- \usecounter{covex}% % sets it to zero, unwantedly
- \setcounter{covex}{\arabic{covexsave}}% % restores previous value
+\let\exfmt\arabic
+
+\newenvironment{covexamples}[1][]{% % define "examples" environment
+ \ifx#1\empty\else\SetKeys[covexpl]{#1}\fi%
+ \begin{list}%
+ {%
+ \covexamplenofs% font
+ \ifcov@infootnote
+ \covexnumberfn{\thecovfnex}%
\else
- \setcounter{covexsave}{\arabic{equation}}%
- \usecounter{equation}% % sets it to zero, unwantedly
- \setcounter{equation}{\arabic{covexsave}}% % restores previous value
+ \covexnumber{\@@exampleno}%
\fi
- \fi
- \setlength{\listparindent}{0pt}%
- \def\makelabel##1{##1\hfil}% % put labels flushleft in space available
-}%
+ }%
+ {%
+ \addtolength{\labelwidth}{\examplenumbersep}%
+ \addtolength{\leftmargin}{\examplenumbersep}%
+ \addtolength{\leftmargin}{\exampleind}%
+ \ifcov@infootnote
+ \setcounter{covexsave}{\arabic{covfnex}}%
+ \usecounter{covfnex}%
+ \setcounter{covfnex}{\arabic{covexsave}}%
+ \else
+ \ifownexcounter
+ \renewcommand{\thecovex}{\exfmt{covex}}%
+ \setcounter{covexsave}{\arabic{covex}}%
+ \usecounter{covex}% % sets it to zero, unwantedly
+ \setcounter{covex}{\arabic{covexsave}}% % restores previous value
+ \else
+ \renewcommand{\theequation}{\exfmt{equation}}%
+ \setcounter{covexsave}{\arabic{equation}}%
+ \usecounter{equation}% % sets it to zero, unwantedly
+ \setcounter{equation}{\arabic{covexsave}}% % restores previous value
+ \fi
+ \fi
+ \setlength{\listparindent}{0pt}%
+ \def\makelabel##1{##1\hfil}% % put labels flushleft in space available
+ }%
\raggedright% text is flushleft, not justified
\covexamplefs%
}%
@@ -356,29 +471,63 @@
% \item This is the second subexample.
% \end{subexamples}
-\newlength\subexamplenumbersep
-\setlength\subexamplenumbersep{0pt}
-
-\newcommand*\covsubexnumber[1]{(#1)}
-
% 2019-06-21 (v. 2.3): optional preceding subexample text
-\define@key{cov@subex}{preamble}{\def\cov@sxp{#1}}
\newcommand*\subexpreamblefs{\normalfont}
\newcommand\subexpreamble[1]{\bgroup\subexpreamblefs#1\egroup\par}
% 2023.05.26 (v. 2.9): optional trailung subexample text
-\define@key{cov@subex}{postamble}{\def\cov@sxpst{#1}}
\newcommand*\subexpostamblefs{\normalfont}
-\newcommand*\subexpostamble[1]{\bgroup\expostamblefs#1\egroup}
+\newcommand*\subexpostamble[1]{\bgroup\subexpostamblefs#1\egroup}
+
+\DeclareKeys[covsubexpl]
+{
+ % font settings
+ fs.store = \covexamplefs,
+ % font settings
+ fsno.store = \covexamplenofs,
+ % preamble text
+ preamble.store = \cov@sxp,
+ % postamble text
+ postamble.store = \cov@sxpst,
+ % preamble font settings
+ fspreamble.store = \subexpreamblefs,
+ % postamble font settings
+ fspostamble.store = \subexpostamblefs,
+ % preamble font settings (alias)
+ fssubpreamble.store = \subexpreamblefs,
+ % postamble font settings (alias)
+ fssubpostamble.store = \subexpostamblefs,
+ % leftmargin
+ leftmargin.code = { \setlength{\exampleind}{#1} },
+ % addnumbersep
+ addnumbersep.code = { \setlength{\examplenumbersep}{#1} },
+ % addnumbersep
+ addsubnumbersep.code = { \setlength{\subexamplenumbersep}{#1} },
+ % numberformat={template}
+ numberformat.code = { \cov@parse@number@template{#1}{exfmt}{covexnumber} },
+ % fnnumberformat={template}
+ fnumberformat.code = { \cov@parse@number@template{#1}{fnexfmt}{covexnumberfn} },
+ % subnumberformat={template}
+ subnumberformat.code = { \cov@parse@number@template{#1}{subexfmt}{covsubexnumber} }
+}
+
+\newlength\subexamplenumbersep
+\setlength\subexamplenumbersep{0pt}
+
+\newcommand*\covsubexnumber[1]{(#1)}
+
+\let\subexfmt\alph
\newenvironment{covsubexamples}[1][]% % define "subexamples" environment
{%
- \ifx#1\empty\else\setkeys{cov@subex}{#1}\fi%
+ \let\cov@xp\relax%
+ \let\cov@xpst\relax%
+ \ifx#1\empty\else\SetKeys[covsubexpl]{#1}\fi%
\begin{covexample}%
- \@ifundefined{cov@sxp}{}{\subexpreamblefs\cov@sxp}% insert preamble if given
+ \@ifundefined{cov@sxp}{}{\bgroup\subexpreamblefs\cov@sxp\egroup}% insert preamble if given
\begin{enumerate}
\addtolength{\labelsep}{\subexamplenumbersep}%
- \renewcommand\theenumi{\alph{enumi}}
+ \renewcommand\theenumi{\subexfmt{enumi}}
\renewcommand\labelenumi{\covexamplenofs\covsubexnumber{\theenumi}}
\renewcommand\p@enumi{\@@exampleno\,}%
\setlength{\listparindent}{0pt}%
@@ -395,17 +544,58 @@
\@ifundefined{subexamples}{%
\newenvironment{subexamples}[1][]{\begin{covsubexamples}[#1]}{\end{covsubexamples}}
}{%
-\ifforceredef
- \renewenvironment{subexamples}[1][]{\begin{covsubexamples}[#1]}{\end{covsubexamples}}
- \cov@warning{The subexamples environment was already defined. Redefining it.}
-\else
- \cov@warning{The subexamples environment was already defined.^^J
- Covington does not touch it.^^J
- Use covsubexamples if you want to access covington's^^J
- version, or use the force package option.}
-\fi
+ \ifforceredef
+ \renewenvironment{subexamples}[1][]{\begin{covsubexamples}[#1]}{\end{covsubexamples}}
+ \cov@warning{The subexamples environment was already defined. Redefining it.}
+ \else
+ \cov@warning{The subexamples environment was already defined.^^J
+ Covington does not touch it.^^J
+ Use covsubexamples if you want to access covington's^^J
+ version, or use the force package option.}
+ \fi
+}
+
+\DeclareKeys[gcovexamples]
+{
+ % font settings
+ fs.store = \covexamplefs,
+ % font settings
+ fsno.store = \covexamplenofs,
+ % preamble
+ preamble.store = \cov@xp,
+ % postamble
+ postamble.code = { \def\cov@xpst{#1}\@cov@expst@starfalse },
+ % postamble* (no space)
+ postamble*.code = { \def\cov@xpst{#1}\@cov@expst@startrue },
+ % preamble text
+ subpreamble.store = \cov@sxp,
+ % postamble text
+ subpostamble.store = \cov@sxpst,
+ % preamble font settings
+ fspreamble.store = \expreamblefs,
+ % postamble font settings
+ fspostamble.store = \expostamblefs,
+ % preamble font settings
+ fssubpreamble.store = \subexpreamblefs,
+ % postamble font settings
+ fssubpostamble.store = \subexpostamblefs,
+ % leftmargin
+ leftmargin.code = { \setlength{\exampleind}{#1} },
+ % addnumbersep
+ addnumbersep.code = { \setlength{\examplenumbersep}{#1} },
+ % addsubnumbersep
+ addsubnumbersep.code = { \setlength{\subexamplenumbersep}{#1} },
+ % numberformat={template}
+ numberformat.code = { \cov@parse@number@template{#1}{exfmt}{covexnumber} },
+ % fnnumberformat={template}
+ fnumberformat.code = { \cov@parse@number@template{#1}{fnexfmt}{covexnumberfn} },
+ % subnumberformat={template}
+ subnumberformat.code = { \cov@parse@number@template{#1}{subexfmt}{covsubexnumber} }
}
+% General setting option
+\newcommand*\setexampleoptions[1]{\SetKeys[gcovexamples]{#1}}
+
%%%
@@ -468,17 +658,26 @@
% Try to prevent page breaks in glosses if noglossbreaks option is set
\def\cov@nopagebreak{}
\ifnoglossbreaks
-\def\cov@nopagebreak{\let\reserved@e\vadjust\let\reserved@f\nobreak}
+ \def\cov@nopagebreak{\let\reserved@e\vadjust\let\reserved@f\nobreak}
\fi
+\def\cov@emphasized{\normalfont\itshape}%
+\def\cov@normalfont{\normalfont\upshape}%
+
+\def\cov@fsglpreamble@global{\cov@normalfont}
+\def\cov@fsglpostamble@global{\cov@normalfont}
+\def\cov@fstl@global{\cov@normalfont}
+
% 2019-05-07: optional preceding gloss text (non-interlinearized)
-\newcommand*\glosslinepreamble[1]{#1}
-\def\cov@glp{}
-\newcommand*\glosspreamble[1]{\def\cov@glp{#1}}
+\def\fsglpreamble{\cov@fsglpreamble@global}
+\newcommand*\glosslinepreamble[1]{\bgroup\fsglpreamble{}#1\egroup}
+\def\cov@gl@preamble@text{}
+\newcommand*\glosspreamble[1]{\def\cov@gl@preamble@text{#1}}
% 2021-09-01: optional trailing gloss text (non-interlinearized)
-\newcommand*\glosslinepostamble[1]{#1}
-\def\cov@glpst{}
+\def\fsglpostamble{\cov@fsglpostamble@global}
+\newcommand*\glosslinepostamble[1]{\bgroup\fsglpostamble{}#1\egroup}
+\def\cov@gl@postamble@text{}
\def\gll{% % Introduces 2-line text-and-gloss.
\begin{flushleft}
@@ -539,8 +738,8 @@
\def\glend{%
\end{flushleft}%
- \def\cov@glp{}%
- \def\cov@glpst{}%
+ \def\cov@gl@preamble@text{}%
+ \def\cov@gl@postamble@text{}%
} % Ends the gloss environment.
% The following TeX code is adapted, with permission, from:
@@ -563,19 +762,14 @@
\glossglue = 5pt plus 2pt minus 1pt % allow stretch/shrink between words
\newif\ifnotdone
-% Add semantic markup (with latex 2.09 backwards support)
-\@ifundefined{selectfont}{%
- \def\cov@emphasized{\it}%
- \def\cov@normalfont{\rm}%
-}{%
- \def\cov@emphasized{\normalfont\itshape}%
- \def\cov@normalfont{\normalfont\upshape}%
-}
-
% Font settings for gloss lines
-\newcommand*\glosslineone{\cov@emphasized}
-\newcommand*\glosslinetwo{\cov@normalfont}
-\newcommand*\glosslinethree{\cov@normalfont}
+\newcommand*\glosslineone@global{\cov@emphasized}
+\newcommand*\glosslinetwo@global{\cov@normalfont}
+\newcommand*\glosslinethree@global{\cov@normalfont}
+
+\let\glosslineone\glosslineone@global
+\let\glosslinetwo\glosslinetwo@global
+\let\glosslinethree\glosslinethree@global
\def\eachwordone{\glosslineone}
\def\eachwordtwo{\glosslinetwo}
@@ -615,7 +809,10 @@
\gdef\twosent#1^^M#2^^M% #1 = first line, #2 = second line
{\getwords(\lineone,\eachwordone)#1 ^^M%
\getwords(\linetwo,\eachwordtwo)#2 ^^M%
- \ifx\cov@glp\empty\else\glosslinepreamble{\cov@glp}\cov@nopagebreak\newline\fi%
+ \ifx\cov@gl@preamble@text\empty%
+ \else%
+ \glosslinepreamble{\cov@gl@preamble@text}\cov@nopagebreak\newline%
+ \fi%
\loop\lastword{\eachwordone}{\lineone}{\wordone}%
\lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
\global\setbox\gline=\hbox{\unhbox\gline
@@ -636,7 +833,10 @@
{\getwords(\lineone,\eachwordone)#1 ^^M%
\getwords(\linetwo,\eachwordtwo)#2 ^^M%
\getwords(\linethree,\eachwordthree)#3 ^^M%
- \ifx\cov@glp\empty\else\glosslinepreamble{\cov@glp}\cov@nopagebreak\newline\fi%
+ \ifx\cov@gl@preamble@text\empty%
+ \else%
+ \glosslinepreamble{\cov@gl@preamble@text}\cov@nopagebreak\newline%
+ \fi%
\loop\lastword{\eachwordone}{\lineone}{\wordone}%
\lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
\lastword{\eachwordthree}{\linethree}{\wordthree}%
@@ -677,7 +877,10 @@
\gdef\xtwosent#1\xgle#2\xgle% #1 = first line, #2 = second line
{\xgetwords(\lineone,\eachwordone)#1 \xgle%
\xgetwords(\linetwo,\eachwordtwo)#2 \xgle%
- \ifx\cov@glp\empty\else\glosslinepreamble{\cov@glp}\cov@nopagebreak\newline\fi%
+ \ifx\cov@gl@preamble@text\empty%
+ \else%
+ \glosslinepreamble{\cov@gl@preamble@text}\cov@nopagebreak\newline%
+ \fi%
\loop\lastword{\eachwordone}{\lineone}{\wordone}%
\lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
\global\setbox\gline=\hbox{\unhbox\gline%
@@ -698,7 +901,10 @@
{\xgetwords(\lineone,\eachwordone)#1 \xgle%
\xgetwords(\linetwo,\eachwordtwo)#2 \xgle%
\xgetwords(\linethree,\eachwordthree)#3 \xgle%
- \ifx\cov@glp\empty\else\glosslinepreamble{\cov@glp}\cov@nopagebreak\newline\fi%
+ \ifx\cov@gl@preamble@text\empty%
+ \else%
+ \glosslinepreamble{\cov@gl@preamble@text}\cov@nopagebreak\newline%
+ \fi%
\loop\lastword{\eachwordone}{\lineone}{\wordone}%
\lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
\lastword{\eachwordthree}{\linethree}{\wordthree}%
@@ -718,8 +924,10 @@
\egroup % matches \bgroup in \gloss
}
-% V. 2.0: enquotable translation line
-\newcommand*\glosslinetrans[1]{\covenquote{#1}}
+% V. 2.0: enquotable translation line
+\newif\ifcov@enquote@tl\cov@enquote@tltrue
+\def\cov@fstl{\cov@fstl@global}
+\newcommand*\glosslinetrans[1]{\bgroup\cov@fstl\ifcov@enquote@tl\covenquote{#1}\else#1\fi\egroup}
\newcommand*\glot[1]{%
\def\tempx{#1}%
\ifx\tempx\empty\gln
@@ -730,151 +938,202 @@
%
% Key-val options for the macros
%
-% 1. ex=<true|false>
-\newif\ifgexample\gexamplefalse
-\newif\ifggexample\ggexamplefalse
-\define@boolkey+{covington}{ex}[true]{%
- \ifKV@covington@ex
- \gexampletrue
- \else
- \gexamplefalse
- \fi
-}{%
- \cov@warning{unknown env value '#1' in gloss macro}%
-}
-\define@boolkey+{gcovington}{ex}[true]{%
- \ifKV@gcovington@ex
- \ggexampletrue
- \else
- \ggexamplefalse
- \fi
-}{%
- \cov@warning{unknown env value '#1' in setglossoptions}%
-}
-\newif\ifgtright\gtrightfalse
-\newif\ifggtright\ggtrightfalse
-%
-% 2. tlb=<true|false>
-\define@boolkey+{covington}{tlr}[true]{%
- \ifKV@covington@tlr
- \gtrighttrue
- \else
- \gtrightfalse
- \fi
-}{%
- \cov@warning{unknown tlr value '#1' in gloss macro}%
+\newif\ifcov@ex@gloss\cov@ex@glossfalse
+\newif\ifcov@ex@gloss@global\cov@ex@gloss@globalfalse
+\newif\ifcov@tlr\cov@tlrfalse
+\newif\ifcov@tlr@global\cov@tlr@globalfalse
+\newif\ifcov@enquote@tl@global\cov@enquote@tl@globaltrue
+\def\cov@gl@preamble@global{}
+\def\cov@gl@postamble@global{}
+
+\DeclareKeys[covgloss]
+{
+ % 1. ex=<true|false>
+ ex.if = cov@ex@gloss,
+ % 2. tlr=<true|false>
+ tlr.if = cov@tlr,
+ % 3. font settings for gloss line i, ii, iii
+ fsi.store = \lglosslineone,
+ fsii.store = \lglosslinetwo,
+ fsiii.store = \lglosslinethree,
+ % 4. Gloss preamble text
+ preamble.code = { \edef\cov@gl@preamble{#1} },
+ % 5. Gloss postamble text
+ postamble.store = \cov@gl@postamble,
+ % 6. Gloss preamble font settings
+ fspreamble.store = \cov@fsglpreamble@local,
+ % 7. Gloss postamble font settings
+ fspostamble.store = \cov@fsglpostamble@local,
+ % 8. Enquote translation line
+ enquotetl.if = cov@enquote@tl,
+ % 9. translation line font settings
+ fstl.store = \cov@fstl@local
}
-\define@boolkey+{gcovington}{tlr}[true]{%
- \ifKV@gcovington@tlr
- \ggtrighttrue
- \else
- \ggtrightfalse
- \fi
-}{%
- \cov@warning{unknown tlr value '#1' in setglossoptions}%
+
+\DeclareKeys[gcovgloss]
+{
+ % 1. ex=<true|false>
+ ex.if = cov@ex@gloss@global,
+ % 2. tlr=<true|false>
+ tlr.if = cov@tlr@global,
+ % 3. font settings for gloss line i, ii, iii
+ fsi.code = { \global\def\glosslineone@global{#1} },
+ fsii.code = { \global\def\glosslinetwo@global{#1} },
+ fsiii.code = { \global\def\glosslinethree@global{#1} },
+ % 4. Gloss preamble text
+ preamble.code = { \global\def\cov@gl@preamble@global{#1} },
+ % 5. Gloss postamble text
+ postamble.code = { \global\def\cov@gl@postamble@global{#1} },
+ % 6. Gloss preamble font settings
+ fspreamble.code = { \global\def\cov@fsglpreamble@global{#1} },
+ % 7. Gloss postamble font settings
+ fspostamble.code = { \global\def\cov@fsglpostamble@global{#1} },
+ % 8. Enquote translation line
+ enquotetl.if = cov@enquote@tl@global,
+ % 9. translation line font settings
+ fstl.code = { \global\def\cov@fstl@global{#1} }
}
-%
-% 3. font settings for gloss line i, ii, iii
-\define@key{covington}{fsi}{\def\lglosslineone{#1}}
-\define@key{covington}{fsii}{\def\lglosslinetwo{#1}}
-\define@key{covington}{fsiii}{\def\lglosslinethree{#1}}
-\define@key{gcovington}{fsi}{\def\glosslineone{#1}}
-\define@key{gcovington}{fsii}{\def\glosslinetwo{#1}}
-\define@key{gcovington}{fsiii}{\def\glosslinethree{#1}}
-%
-% 4. Gloss preamble text
-\def\cov@gglp{}
-\define@key{covington}{preamble}{\def\cov@lglp{#1}}
-\define@key{gcovington}{preamble}{\def\cov@gglp{#1}}
-%
-% 5. Gloss postamble text
-\def\cov@gglpst{}
-\define@key{covington}{postamble}{\def\cov@lglpst{#1}}
-\define@key{gcovington}{postamble}{\def\cov@gglpst{#1}}
+
+
+\let\cov@fsglpreamble@local\relax%
+\let\cov@fsglpostamble@local\relax%
+\let\cov@fstl@local\relax%
+
%
% General setting option
-\newcommand*\setglossoptions[1]{\setkeys{gcovington}{#1}}
+\newcommand*\setglossoptions[1]{\SetKeys[gcovgloss]{#1}}
%
% 1. \digloss[<opts>]{<line 1>}{<line 2>}{<translation>}
\newcommand*\digloss[4][\empty]{%
- \ifggexample
- \setkeys{covington}{ex=true}
+ \let\lglosslineone\relax%
+ \let\lglosslinetwo\relax%
+ \let\lglosslinethree\relax%
+ \let\glosslineone\glosslineone@global%
+ \let\glosslinetwo\glosslinetwo@global%
+ \let\glosslinethree\glosslinethree@global%
+ \ifcov@ex@gloss@global
+ \SetKeys[covgloss]{ex=true}
+ \else
+ \SetKeys[covgloss]{ex=false}
+ \fi%
+ \ifcov@tlr@global
+ \SetKeys[covgloss]{tlr=true}
\else
- \setkeys{covington}{ex=false}
+ \SetKeys[covgloss]{tlr=false}
\fi%
- \ifggtright
- \setkeys{covington}{tlr=true}
+ \ifcov@enquote@tl@global
+ \SetKeys[covgloss]{enquotetl=true}
\else
- \setkeys{covington}{tlr=false}
+ \SetKeys[covgloss]{enquotetl=false}
\fi%
- \ifx#1\empty\else\setkeys{covington}{#1}\fi%
- \ifgexample
- \begin{covexample}
+ \def\cov@gl@preamble{\cov@gl@preamble@global}%
+ \def\cov@gl@postamble{\cov@gl@postamble@global}%
+ \ifx#1\empty\else\SetKeys[covgloss]{#1}\fi%
+ \ifcov@ex@gloss
+ \begin{covexample}
\fi%
\@ifundefined{lglosslineone}{}{\def\glosslineone{\lglosslineone}}%
\@ifundefined{lglosslinetwo}{}{\def\glosslinetwo{\lglosslinetwo}}%
\@ifundefined{lglosslinethree}{}{\def\glosslinethree{\lglosslinethree}}%
- \@ifundefined{cov@lglp}{}{\def\cov@gglp{\cov@lglp}}%
- \ifx\cov@gglp\empty\else\def\cov@glp{\cov@gglp}\fi%
- \@ifundefined{cov@lglpst}{}{\def\cov@gglpst{\cov@lglpst}}%
- \ifx\cov@gglpst\empty\else\def\cov@glpst{\cov@gglpst}\fi%
+ \edef\cov@gl@preamble@text{\cov@gl@preamble}%
+ \def\cov@gl@postamble@text{\cov@gl@postamble}%
+ \@ifundefined{cov@fsglpreamble@local}%
+ {\let\fsglpreamble\cov@fsglpreamble@global}%
+ {\let\fsglpreamble\cov@fsglpreamble@local}%
+ \@ifundefined{cov@fsglpostamble@local}%
+ {\let\fsglpostamble\cov@fsglpostamble@global}%
+ {\let\fsglpostamble\cov@fsglpostamble@local}%
+ \@ifundefined{cov@fstl@local}%
+ {\let\cov@fstl\cov@fstl@global}%
+ {\let\cov@fstl\cov@fstl@local}%
\xgll #2\xgle
#3\xgle
- \ifgtright
+ \ifcov@tlr
\gln #4%
\else
\glot{#4}%
\fi
- \ifx\cov@glpst\empty\else\glosslinepostamble{\cov@glpst}\cov@nopagebreak\fi%
+ \ifx\cov@gl@postamble@text\empty%
+ \else%
+ \glosslinepostamble{\cov@gl@postamble@text}\cov@nopagebreak%
+ \fi%
\glend
- \ifgexample
- \end{covexample}
+ \ifcov@ex@gloss
+ \end{covexample}
\fi%
\let\lglosslineone\relax%
\let\lglosslinetwo\relax%
\let\lglosslinethree\relax%
- \let\cov@lglp\relax%
+ \let\cov@fsglpreamble@local\relax%
+ \let\cov@fsglpostamble@local\relax%
+ \let\cov@fstl@local\relax%
}
% 2. \trigloss[<opts>]{<line 1>}{<line 2>}{<line 3>}{<translation>}
\newcommand\trigloss[5][\empty]{%
- \ifggexample
- \setkeys{covington}{ex=true}
+ \let\lglosslineone\relax%
+ \let\lglosslinetwo\relax%
+ \let\lglosslinethree\relax%
+ \let\glosslineone\glosslineone@global%
+ \let\glosslinetwo\glosslinetwo@global%
+ \let\glosslinethree\glosslinethree@global%
+ \ifcov@ex@gloss@global
+ \SetKeys[covgloss]{ex=true}
+ \else
+ \SetKeys[covgloss]{ex=false}
+ \fi%
+ \ifcov@tlr@global
+ \SetKeys[covgloss]{tlr=true}
\else
- \setkeys{covington}{ex=false}
+ \SetKeys[covgloss]{tlr=false}
\fi%
- \ifggtright
- \setkeys{covington}{tlr=true}
+ \ifcov@enquote@tl@global
+ \SetKeys[covgloss]{enquotetl=true}
\else
- \setkeys{covington}{tlr=false}
+ \SetKeys[covgloss]{enquotetl=false}
\fi%
- \ifx#1\empty\else\setkeys{covington}{#1}\fi%
- \ifgexample
- \begin{covexample}
+ \def\cov@gl@preamble{\cov@gl@preamble@global}%
+ \def\cov@gl@postamble{\cov@gl@postamble@global}%
+ \ifx#1\empty\else\SetKeys[covgloss]{#1}\fi%
+ \ifcov@ex@gloss
+ \begin{covexample}
\fi%
\@ifundefined{lglosslineone}{}{\def\glosslineone{\lglosslineone}}%
\@ifundefined{lglosslinetwo}{}{\def\glosslinetwo{\lglosslinetwo}}%
\@ifundefined{lglosslinethree}{}{\def\glosslinethree{\lglosslinethree}}%
- \@ifundefined{cov@lglp}{}{\def\cov@gglp{\cov@lglp}}%
- \ifx\cov@gglp\empty\else\def\cov@glp{\cov@gglp}\fi%
- \@ifundefined{cov@lglpst}{}{\def\cov@gglpst{\cov@lglpst}}%
- \ifx\cov@gglpst\empty\else\def\cov@glpst{\cov@gglpst}\fi%
+ \edef\cov@gl@preamble@text{\cov@gl@preamble}%
+ \def\cov@gl@postamble@text{\cov@gl@postamble}%
+ \@ifundefined{cov@fsglpreamble@local}%
+ {\let\fsglpreamble\cov@fsglpreamble@global}%
+ {\let\fsglpreamble\cov@fsglpreamble@local}%
+ \@ifundefined{cov@fsglpostamble@local}%
+ {\let\fsglpostamble\cov@fsglpostamble@global}%
+ {\let\fsglpostamble\cov@fsglpostamble@local}%
+ \@ifundefined{cov@fstl@local}%
+ {\let\cov@fstl\cov@fstl@global}%
+ {\let\cov@fstl\cov@fstl@local}%
\xglll #2\xgle
#3\xgle
#4\xgle
- \ifgtright
+ \ifcov@tlr
\gln #5%
\else
\glot{#5}%
\fi
- \ifx\cov@glpst\empty\else\glosslinepostamble{\cov@glpst}\cov@nopagebreak\fi%
+ \ifx\cov@gl@postamble@text\empty%
+ \else%
+ \glosslinepostamble{\cov@gl@postamble@text}\cov@nopagebreak%
+ \fi%
\glend
- \ifgexample
- \end{covexample}
+ \ifcov@ex@gloss
+ \end{covexample}
\fi%
\let\lglosslineone\relax%
\let\lglosslinetwo\relax%
\let\lglosslinethree\relax%
+ \let\cov@fsglpreamble@local\relax%
+ \let\cov@fsglpostamble@local\relax%
+ \let\cov@fstl@local\relax%
}
@@ -1009,12 +1268,13 @@
}
}
-\providecommand{\sdrs}[3]
-{\begin{tabular}{l}
-\mbox{\cov@emphasized #1} \\
-~ \\
-\drs{#2}{#3}
-\end{tabular}}
+\providecommand{\sdrs}[3]{%
+ \begin{tabular}{l}
+ \mbox{\cov@emphasized #1} \\
+ ~ \\
+ \drs{#2}{#3}
+ \end{tabular}%
+}
\providecommand{\ifdrs}[4]
{
@@ -1077,15 +1337,15 @@
\@ifundefined{exercise}{%
\newenvironment{exercise}{\begin{covexercise}}{\end{covexercise}}
}{%
-\ifforceredef
- \renewenvironment{exercise}{\begin{covexercise}}{\end{covexercise}}
- \cov@warning{The exercise environment was already defined. Redefining it.}
-\else
- \cov@warning{The exercise environment was already defined.^^J
- Covington does not touch it.^^J
- Use covexercise if you want to access covington's^^J
- version, or use the force package option.}
-\fi
+ \ifforceredef
+ \renewenvironment{exercise}{\begin{covexercise}}{\end{covexercise}}
+ \cov@warning{The exercise environment was already defined. Redefining it.}
+ \else
+ \cov@warning{The exercise environment was already defined.^^J
+ Covington does not touch it.^^J
+ Use covexercise if you want to access covington's^^J
+ version, or use the force package option.}
+ \fi
}
\newlength\reflistindent
@@ -1095,14 +1355,16 @@
\newlength\reflistparsep
\setlength\reflistparsep{\parsep}
\@ifundefined{reflist}{
-\newenvironment{reflist}{\begin{list}{}%
-{\setlength{\labelwidth}{0pt}%
- \setlength{\labelsep}{0pt}%
- \setlength{\leftmargin}{\reflistindent}%
- \setlength{\itemindent}{-\reflistindent}%
- \setlength{\listparindent}{-\reflistindent}%
- \setlength{\itemsep}{\reflistitemsep}%
- \setlength{\parsep}{\reflistparsep}}\item}{\end{list}}
+ \newenvironment{reflist}{%
+ \begin{list}{}{%
+ \setlength{\labelwidth}{0pt}%
+ \setlength{\labelsep}{0pt}%
+ \setlength{\leftmargin}{\reflistindent}%
+ \setlength{\itemindent}{-\reflistindent}%
+ \setlength{\listparindent}{-\reflistindent}%
+ \setlength{\itemsep}{\reflistitemsep}%
+ \setlength{\parsep}{\reflistparsep}}\item%
+ }{\end{list}}%
}
% Modified 1992 Nov 8 to skip defining reflist if reflist is already
% defined. Permits using uga.sty with covingtn.sty.
@@ -1110,8 +1372,11 @@
% V. 2.0: Add macro for font settings customization
\newcommand*\sentencefs{\cov@emphasized}
-\newcommand{\sentence}[1]
- {\begin{flushleft}{\sentencefs #1}\end{flushleft}}
+\newcommand{\sentence}[1]{%
+ \begin{flushleft}%
+ {\sentencefs #1}%
+ \end{flushleft}%
+}
% V. 2.0: Further semantic markup
\providecommand*\lexp[1]{\textit{#1}}
diff --git a/macros/latex/contrib/covington/covington.tex b/macros/latex/contrib/covington/covington.tex
index 5dbc41c275..f8fe4ee94c 100644
--- a/macros/latex/contrib/covington/covington.tex
+++ b/macros/latex/contrib/covington/covington.tex
@@ -65,10 +65,13 @@
\usepackage{tocloft}
\setlength{\cftbeforesecskip}{0pt}
\renewcommand{\cfttoctitlefont}{\normalsize\bfseries}
-\renewcommand{\cftsecfont}{\footnotesize}
-\renewcommand{\cftsecpagefont}{\footnotesize}
-\renewcommand{\cftsubsecfont}{\footnotesize}
-\renewcommand{\cftsubsecpagefont}{\footnotesize}
+\renewcommand{\cftsecfont}{\small}
+\renewcommand{\cftsecpagefont}{\small}
+\renewcommand{\cftsubsecfont}{\small}
+\renewcommand{\cftsubsecpagefont}{\small}
+\renewcommand{\cftsubsubsecfont}{\footnotesize}
+\renewcommand{\cftsubsubsecpagefont}{\footnotesize}
+\tocloftpagestyle{empty}
\usepackage{babel}
@@ -94,8 +97,8 @@
%
% Titling
%
-\def\pversion{Version 2.9}
-\def\pdate{May 26, 2023}
+\def\pversion{Version 2.10}
+\def\pdate{June 2, 2023}
\title{\textbf{The \cvt\ Package\\\Large Macros for Linguistics}}
\author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer.
@@ -109,15 +112,15 @@
\begin{abstract}
\noindent This package, initially a collection of Michael A. Covington's private macros, provides
-numerous minor \LaTeX\ enhancements for linguistics, including multiple diacritics on the
-same letter, interlinear glosses (word-by-word translations), Discourse Representation Structures,
-example numbering, and semantic markup.
+numerous customizable \LaTeX\ macros that are helpful for linguists, including macros that allow
+for multiple diacritics on the same letter, numbered linguistic examples, interlinear glosses
+(word-by-word translations), Discourse Representation Structures, phrase structure rules and disjunctions,
+linguistic feature structures, and for semantic markup commonly used in linguistic notation.
\end{abstract}
+\enlargethispage{2\baselineskip}
\tableofcontents
-\clearpage
-
\section{Introduction}\label{sec:intro}
This is the documentation for \MakeLowercase{\pversion}
@@ -126,50 +129,53 @@ for typing some special notations common in linguistics.%
\footnote{The package has a long history. It started off as a collection of private macros back in the
\LaTeX\ 2.09 days and was initially released as \texttt{covingtn.sty} (following the old 8.3 \textsc{fat}
file name limit). In em\TeX\ under \textsc{ms-dos}, the file was distributed as \texttt{covingto.sty}.
-Eventually, it has been renamed to \cvt\ and adapted to \LaTeXe.}
+Eventually, it has been renamed to \cvt\ and adapted to \LaTeXe. The current version requires a resonably
+recent version of \LaTeXe, as it employs some newer kernel features.}
-To use \cvt\ with \LaTeXe, load the package as usual by adding the command
-\lstinline"\usepackage{covington}" to your document preamble.
-The package has the following options:
+To use \cvt, load the package as usual by adding the command
+\begin{lstlisting}
+\usepackage[<options>]{covington}
+\end{lstlisting}
+to your document preamble. The package has the following options to customize its behavior:
\begin{description}
- \item{\joption{force}:} Force the redefinition of environments that have already been
- defined by other packages or the class.
+ \item{\joption{force=\jparam{true|false}}} Default: \emph{false}.
+ Force the redefinition of environments that have already been defined by other packages or the class.
+
+ This applies to the \jenv{example}, \jenv{examples}, \jenv{subexamples} and \jenv{exercise} environments,
+ which are by default not touched if they are already defined before \cvt\ is loaded.
+ See sec.~\ref{sec:ex}, \ref{sec:exs}, \ref{sec:subexs} and \ref{sec:exercises} for details.
+ \item{\joption{keeplayout=\jparam{true|false}}} Default: \emph{false}. Do not tweak the layout.
- This applies to the \jenv{example}, \jenv{examples}, \jenv{subexamples} and \jenv{exercise} environments,
- which are by default not touched if they are already defined before \cvt\ is loaded.
- See sec.~\ref{sec:ex}, \ref{sec:exs}, \ref{sec:subexs} and \ref{sec:exercises} for details.
+ \Cvt\ sets \jfcsmacro{raggedbottom} and redefines the value of the \jfcsmacro{textfloatsep} length.
+ This just follows the preferences of the original package author and is not necessary
+ for the package's functionality. Yet for backwards compatibility reasons, we cannot change this.
+ Thus, we provide the option described here to opt out this presetting. And we actually encourage you to use it.
+ \item{\joption{noglossbreaks=\jparam{true|false}}} Default: \emph{false}.
+ If this option is set to \joption{true}, \cvt\ will try hard to prevent page breaks within glosses.
- \item{\joption{keeplayout}:} Do not tweak the layout.
+ If this option is not set, page breaks can occur between interlinearized text and free translation of a gloss, as
+ well as between gloss preamble and interlinearized text, which is usually not what you will want.
+ Nonetheless the option is not set by default. This is for backwards compatibility reasons (in order to not change
+ page breaking of existing documents). Note that page breaks might still occur in some cases even if the option is set.
+ In order to prevent them definitely, you can put the gloss in a parbox or minipage.
+ \item{\joption{owncounter=\jparam{true|false}}} Default: \emph{false}. Use an own counter for numbered examples.
+
+ By default, \cvt\ uses \LaTeX's equation counter for example numbering, so that if you use equations and numbered examples
+ in the same paper, you get a single continuous series of numbers. While some people (including the original author of this package)
+ consider this a feature, others might prefer to number equations and linguistic examples separately. If you count to the latter sort,
+ use this option.
+ \item{\joption{fnexamplecounter=\jparam{main|own|own-reset}}} Default: \emph{main}.
+ Specifics of the counter for numbered examples in footnotes.
- \Cvt\ sets \jfcsmacro{raggedbottom} and redefines the value of the \jfcsmacro{textfloatsep} length.
- This just follows the preferences of the original package author and is not necessary
- for the package's functionality. Yet for backwards compatibility reasons, we cannot change this.
- Thus, we provide the option described here to opt out this presetting.
-
-\item{\joption{noglossbreaks}:} If this option is set, \cvt\ will try hard to prevent page breaks within glosses.
-
- If this option is not set, page breaks can occur between interlinearized text and free translation of a gloss, as
- well as between gloss preamble and interlinearized text, which is usually not what you will want.
- Nonetheless the option is not set by default. This is for backwards compatibility reasons (in order to not change
- page breaking of existing documents). Note that page breaks might still occur in some cases even if the option is set.
- In order to prevent them definitely, you can put the gloss in a parbox or minipage.
-
-\item{\joption{owncounter}:} Use an own counter for numbered examples.
-
- By default, \cvt\ uses \LaTeX's equation counter for example numbering, so that if you use equations and numbered examples
- in the same paper, you get a single continuous series of numbers. While some people (including the original author of this package)
- consider this a feature, others might prefer to number equations and linguistic examples separately. If you count to the latter sort,
- use this option.
-
-\item{\joption{ownfncounter}:} Use a separate counter for numbered examples in footnotes.
-
- By default, \cvt\ numbers examples in footnotes in sequence with the numbering used in the main text. With this option,
- examples in footnotes get a different numbering. This uses by default lowercase Roman numbering (see sec.~\ref{sec:custno}
- on how to change this) and is incremented throughout the whole footnote apparatus.
-
-\item{\joption{ownfncounter*}:} Same as \joption{ownfncounter}, except that this variant resets the counter at each footnote
- (similar to \textsf{linguex} and \textsf{gb4e}).
-
+ By default, \cvt\ numbers examples in footnotes in sequence with the numbering used in the main text (this conforms to
+ the default value of this option, \joption{fnexamplecounter=main}). If you set \joption{fnexamplecounter=own},
+ examples in footnotes get a different numbering which is incremented throughout the whole footnote apparatus.%
+ \footnote{The previous option \joption{ownfncounter} is still supported,
+ but deprecated.}
+ If you set \joption{fnexamplecounter=own-reset}, examples in footnotes get an own counter as well, but this variant
+ resets the counter at each footnote (similar to \textsf{linguex} and \textsf{gb4e}).\footnote{The previous option
+ \joption{ownfncounter*} is still supported, but deprecated.}
+ Both own counters use lowercase Roman numbering by default (see sec.~\ref{sec:ex} on how to change this)
\end{description}
%
Please note the following package-related caveats:
@@ -234,8 +240,17 @@ Linguistic papers often include numbered examples. With \cvt, generating those i
In this section, we describe how you can typeset a self-stepping example number (see section~\ref{sec:exno}),
a single numbered example (sec.~\ref{sec:ex}), a consecutive range of numbered examples (sec.~\ref{sec:exs}),
and alpha-numerically labeled sub-examples (sec.~\ref{sec:subexs}).
-All numbered examples can be referred to in the text via \jfcsmacro{label} and \jfcsmacro{ref} as usual
-(see sec.~\ref{sec:ref} for details).
+
+\Cvt's numbered examples can be customized in many ways. For instance, you can make them by default be
+typeset in italics, as common in linguistics, you can adjust the way the numbers
+are displayed, and you can customize the spacing and indentation if the default
+settings do not suit you. This can be achieved via example options that can be set locally to a specific
+environment as optional arguments or globally via the \jcsmacro{setexampleoptions} macro (see sec.~\ref{sec:ex}
+for details).
+
+All numbered examples can be referred to in the text via \jfcsmacro{label} and \jfcsmacro{ref} as usual,
+or with a convenience macro \jcsmacro{pxref} that adds the parentheses that are usually used
+in example references (see sec.~\ref{sec:ref} for details).
\subsection{Example numbers}\label{sec:exno}
@@ -251,16 +266,24 @@ Here's what you get:
\begin{flushleft}
This is a sentence. \hfill (\exampleno)
\end{flushleft}
-If you want to output the (current) number without stepping it, the starred form \jcsmacro{exampleno*} will do that.
+If you want to output the (current) number without stepping it at the same time, the starred form
+\jcsmacro{exampleno*} will do that.
Normally, however, you do not need to manually place \jcsmacro{exampleno} yourselves,
as in the example above. For the common case where example numbers in parentheses are
placed left to the example, \cvt\ provides more convenient solutions. These are described in turn.
-\subsection[The \texttt{example} environment]{The \jenv{example} environment}\label{sec:ex}
+\subsection[The \jenv{example} environment]{The \jenv{example} environment}\label{sec:ex}
-The \jenv{example} environment (alias \jenv{covexample}) displays a single example
+The \jenv{example} environment (alias \jenv{covexample}\footnote{\label{fn:fallbacks}%
+ As of version 1.1, \cvt\ checks if there is already an \jfenv{example} environment defined (e.\,g., by the class).
+ If so, \cvt\ does not define its own one. The alias environment \jenv{covexample} which can be used in order to
+ produce \texttt{covington's} example, however, is always defined and can be used in such cases.
+ If you use the package option \joption{force}, \cvt\ will override existing \jfenv{example} environments.
+ In any case, the package will issue a warning if \jfenv{example} is already defined (this is the case,
+ for instance, if you use \cvt\ with the \texttt{beamer} class).}%
+) displays a single example
with a generated example number to the left of it.
If you type
\begin{lstlisting}
@@ -280,65 +303,78 @@ This is a sentence.\label{expl}
\end{example}
The example can be of any length; it can consist of many lines (separated by \verb"\\"), or even whole paragraphs.
-The \jenv{example} environment provides the following options:
+The \jenv{example} environment provides the following options which also allow for customization of their appearance:
\begin{description}
+ \item[\joption{fs=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the example text.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fsno=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the example number.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
\item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is inserted on an own line
- after the example number (preceding the actual example text). This might be useful, for instance,
+ after the example number (preceding the example text). This might be useful, for instance,
to give context information, to specify the language or the source in case of cited examples.
- The advantage over just adding a line manually in the example is that you can globally set the markup
- (see sec.~\ref{sec:custno}).
- \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended to example (on the
- same line after a space).
+ The advantage over just adding a line manually in the example is that you can globally or locally
+ set the markup with the \joption{fspreamble} option.
+ \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended to the example
+ (on the same line after a space).
This might be useful to add a reference or an explanation to the translation.
- The advantage over just adding text manually in the example is that this uses its own markup
- (see sec.~\ref{sec:custno}).
+ The advantage over just adding text manually in the example is that that you can globally or locally
+ set the markup with the \joption{fspostamble} option.
\item[\joption{postamble*=\{\jparam{arbitrary text}\}}] A variant of \joption{postamble} that does not add
a space. This might be preferred if you want to add a footnote.
Note that \joption{postamble} and \joption{postamble*} are mutually exclusive.
+
+ If you want the postamble text to be on a line of its own, simply add a line break
+ (i.\,e., \verb|postamble={\\Text}| or, to the same effect, \verb|postamble*={\\Text}|).
+ \item[\joption{fspreamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the preamble text.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fspostamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the postamble text.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{leftmargin=\{\jparam{length}\}}] Default: \verb|{0pt}|.
+ Lets you change the indentation of examples (including number). Positive values will increase,
+ negative values will decrease the indentation of the example.
+ \item[\joption{addnumbersep=\{\jparam{length}\}}] Default: \verb|{0pt}|.
+ Increases or (with negative values) decreases the spacing between example number and example.
+ \item[\joption{numberformat=\{\jparam{template}\}}] Default: \verb|{(1)}|.
+ The format of the example number. The option takes templates as known from the \textsf{enumerate}
+ package \cite{enumerate}.
+ Arabic numbering is represented by \jparam{1}, Roman by \jparam{i} and \jparam{I}, alphabetic by
+ \jparam{a} and \jparam{A}. Any text before and after the number are inserted as is.
+
+ For instance, \verb|numberformat={[a.]}| results in lower alphabetic numbering followed by a dot,
+ embraced in brackets.
+ \item[\joption{fnnumberformat=\{\jparam{template}\}}] Default: \verb|{(i)}|.
+ The format of the example number if \joption{fnexamplecounter=own} or \joption{fnexamplecounter=own-reset}
+ and example is in a footnote. For the template format, see \joption{numberformat}.
\end{description}
%
-If you want the postamble text be on a line of its own, simply add a line break (i.\,e., \verb|postamble={\\Text}|).
-
-If you need more space between the example number and the text, you can increase it by means of
-the length \jcsmacro{examplenumbersep} (which is preset to \texttt{0pt}). Doing \lstinline|\setlength\examplenumbersep{1em}|,
-for instance, will increase the space by 1\,em (negative values will decrease the space accordingly).
-
-If you need to change the indentation (left margin) of examples, you can do so by means of
-the length \jcsmacro{exampleind} (preset to \texttt{0pt}). Doing \lstinline|\setlength\exampleind{1em}|,
-for instance, will increase the indentation by 1\,em, negative values will decrease it accordingly.
+If you pass the options as optional argument to an environment, they will only apply to the current environment.
-Note that, as of version 1.1, \cvt\ checks if there is already an \jenv{example} environment defined
-(e.\,g., by the class). If so, \cvt\ does not
-define its own one. However, there is always the alias environment \jenv{covexample} which can be used in order to
-produce \texttt{covington's} example. If you use the package option \joption{force}, \cvt\ will override
-existing \jenv{example} environments. In any case, the package will issue a warning if \jenv{example} is already defined
-(this is the case, for instance, if you use \cvt\ with the \texttt{beamer} class).
-
-One way to number sub-examples is to use \jfenv{itemize} or \jfenv{enumerate}
-within an example, like this:
-\begin{lstlisting}
-\begin{example}
+If you want to make a global change, you can use the macro
\begin{itemize}
-\item[(a)] This is the first sentence.
-\item[(b)] This is the second sentence.
+ \item \jcsmacro{setexampleoptions\{\jparam{options}\}}
\end{itemize}
-\end{example}
-\end{lstlisting}
-This prints as:
-\begin{example}
-\begin{itemize}
-\item[(a)] This is the first sentence.
-\item[(b)] This is the second sentence.
-\end{itemize}
-\end{example}
-However, the \jenv{subexamples} environment, described in sec.~\ref{sec:subexs}, is usually more
-convenient for this task.
+and pass either of the above options to it (as usual separated by comma). This will apply to all subsequent examples
+(the \jenv{example} environment described here as well as \jenv{examples}, \jenv{subexamples} and glosses with the
+\joption{ex} option) until further global change and unless an option is altered locally via optional argument.
+
+Please refer to sec.~\ref{sec:exex} for exemplifications of the options.
-\subsection[The \texttt{examples} environment]{The \jenv{examples} environment}\label{sec:exs}
+\subsection[The \jenv{examples} environment]{The \jenv{examples} environment}\label{sec:exs}
To display a series of examples together, each with its own example number, use \jenv{examples}
-(or \jenv{covexamples}) instead of \jenv{example} or \jenv{covexample}.
+(or \jenv{covexamples}\footnote{%
+ As for \jenv{example}, \cvt\ checks if there is already an \jfenv{examples} environment defined,
+ and if this is the case, \cvt\ does not define its own one. The alias environment \jenv{covexamples}
+ is always available as a fallback. If you use the package option \joption{force}, \cvt\ will override
+ existing \jfenv{examples} environments. The package will issue a warning if \jenv{examples} is already defined
+ (this is the case, for instance, if you use \cvt\ with the \texttt{beamer} class), telling you
+ how the package has dealt with the situation.%
+}) instead of \jenv{example} or \jenv{covexample}.
There can be more than one example with this environment, and each of them has to be introduced
by \jfcsmacro{item}, like this:
\begin{lstlisting}
@@ -360,48 +396,71 @@ This prints as:
\item This is the second sentence.
\end{examples}
%
-To add additional text to specific items (analogous to the \joption{preamble} option of the \jenv{example} environment),
-you can use the \jcsmacro{expreamble} macro, like this:
+The \jenv{examples} environments accepts the same options than the \jenv{example} environment (please refer
+to sec.~\ref{sec:ex} for details).
+However, there is one notable exception: \joption{preamble} and \joption{postamble[*]} do not have any effect since,
+if you want to add preceding or trailing text, you will want to add this to specific items in the set.
+
+To this end, we provide specific macros, namely \jcsmacro{expreamble} and \jcsmacro{expostamble}, which can be placed
+where they should appear in the example, and which take the same markup than the texts passed via \joption{preamble}
+or \joption{postamble} option in the \jenv{example} environment.
+
+Hence, also here, the advantage over just adding text as is in the example is that an own, globally settable markup is used.
+This is particularly relevant if you globally set examples to be italicized via the \joption{fs} option (as we have done it
+in our examples in sec.~\ref{sec:exex}).
+
+Consider:
\begin{lstlisting}[moretexcs={expreamble}]
\begin{examples}
\item \expreamble{Here is Jakobson's famous poetic example:}
- I like Ike
+ I like Ike!
\item \expreamble{Here is the less poetic variant:}
- I am in favor of Mr. Eisenhover
+ I am in favor of Mr. Eisenhower.
\end{examples}
\end{lstlisting}
%
-which prints:
+This prints as follows:
\begin{examples}
\item \expreamble{Here is Jakobson's famous poetic example:}
- I like Ike
+ I like Ike!
\item \expreamble{Here is the less poetic variant:}
- I am in favor of Mr. Eisenhover
+ I am in favor of Mr. Eisenhower.
\end{examples}
%
-Again, the advantage over just adding a line manually in the example is that you can globally set the markup
-(see sec.~\ref{sec:custno}).
-
-Along the same line, trailing text (analogous to the \joption{postamble} option of the \jenv{example} environment)
-can be added to specific items via the \jcsmacro{expostamble} macro, like this:
+To see the advantage more clearly, let us locally set the markup of the example text:
+\begin{lstlisting}[moretexcs={expreamble}]
+\begin{examples}[fs={\itshape}]
+\item \expreamble{Here is Jakobson's famous poetic example:}
+ I like Ike!
+\item \expreamble{Here is the less poetic variant:}
+ I am in favor of Mr. Eisenhower.
+\end{examples}
+\end{lstlisting}
+%
+As you can see, the preamble text is untouched:
+\begin{examples}[fs={\itshape}]
+ \item \expreamble{Here is Jakobson's famous poetic example:}
+ I like Ike!
+ \item \expreamble{Here is the less poetic variant:}
+ I am in favor of Mr. Eisenhower.
+\end{examples}
+%
+Along the same line, consider:
\begin{lstlisting}[moretexcs={expostamble}]
-\begin{examples}
-\item I like Ike \expostamble{(Jakobson 1960: 357)}
-\item I am in favor of Mr. Eisenhover\expostamble{\footnote{He actually didn't.}}
+\begin{examples}[fs={\itshape}]
+\item I like Ike! \expostamble{(Jakobson 1960: 357)}
+\item I am in favor of Mr. Eisenhower.\expostamble{\footnote{He actually wasn't.}}
\end{examples}
\end{lstlisting}
%
which results in:
-\begin{examples}
- \item I like Ike \expostamble{(Jakobson 1960: 357)}
- \item I am in favor of Mr. Eisenhover\expostamble{\footnote{He actually didn't.}}
+\begin{examples}[fs={\itshape}]
+ \item I like Ike! \expostamble{(Jakobson 1960: 357)}
+ \item I am in favor of Mr. Eisenhower.\expostamble{\footnote{He actually wasn't.}}
\end{examples}
%
-The advantage over just adding text as is in the example is that this has its own, globally settable markup,
-which is particularly relevant if you globally set examples to be italicized (see sec.~\ref{sec:custno}).
-
Like in any other \LaTeX\ list, the numbering can be freely set via the optional argument of \jfcsmacro{item}.
-For a somewhat practical example, consider
+For a somewhat realistic example, observe how:
\begin{lstlisting}[moretexcs={covexnumber,exampleno}]
\begin{examples}
\item A proposition.
@@ -409,27 +468,38 @@ For a somewhat practical example, consider
\end{examples}
\end{lstlisting}
%
-which results in:
+results in:
\begin{examples}
\item A proposition.
\item[\covexnumber{\exampleno*'}] An alternative proposition.
\end{examples}
-%
-As for \jenv{example}, \cvt\ checks if there is already an \jenv{examples} environment defined,
-and if this is the case, \cvt\ does not define its own one. The alias environment \jenv{covexamples}
-is always available as a fallback. If you use the package option \joption{force}, \cvt\ will override
-existing \jenv{examples} environments. The package will issue a warning if \jenv{examples} is already defined
-(this is the case, for instance, if you use \cvt\ with the \texttt{beamer} class), telling you
-how it has dealt with the situation.
-Please refer to sec.~\ref{sec:ex} for ways to adjust the spacing of the environment.
-
-\subsection[The \texttt{subexamples} environment]{The \jenv{subexamples} environment}\label{sec:subexs}
+\subsection[The \jenv{subexamples} environment]{The \jenv{subexamples} environment}\label{sec:subexs}
Sometimes a set of (paradigmatic) sub-examples gets only one main example number with alphabetic sub-numbering,
-as in \pxref{sbex}. To achieve this most conveniently, \cvt\ provides the \jenv{subexamples} (or \jenv{covsubexamples})
-environment. The difference to \jenv{examples}\slash \jenv{covexamples} is the numbering:
+as in \pxref{sbex} below. An ad-hoc way to achieve this is to use \jfenv{itemize} or \jfenv{enumerate}
+within an example with customized items, like this:
+\begin{lstlisting}
+\begin{example}
+\begin{itemize}
+\item[(a)] This is the first sentence.
+\item[(b)] This is the second sentence.
+\end{itemize}
+\end{example}
+\end{lstlisting}
+This prints as:
+\begin{example}
+ \begin{itemize}
+ \item[(a)] This is the first sentence.
+ \item[(b)] This is the second sentence.
+ \end{itemize}
+\end{example}
+However, the \jenv{subexamples} (or \jenv{covsubexamples}\footnote{The fallback mechanism described in
+ footnote~\ref{fn:fallbacks} for \jfenv{example} apply here, too.%
+}) environment, described in this section, is usually more convenient for
+this task.
+As opposed to \jenv{examples}\slash \jenv{covexamples}, this environment sub-numbers its items. Thus
\begin{lstlisting}
\begin{subexamples}
\item This is the first sentence.
@@ -449,63 +519,59 @@ prints as:
\item This is the second sentence.
\end{subexamples}
%
-Again, \cvt\ checks if there is already an \jenv{subexamples} environment defined,
-and if this is the case, \cvt\ does not define its own one. The alias environment \jenv{covsubexamples}
-is always available as a fallback. If you use the package option \joption{force}, \cvt\ will override
-existing \jenv{subexamples} environments. The package will issue a warning if \jenv{subexamples} is already defined.
-
-\medskip
-\noindent The \jenv{subexamples} environment provides the following options:
+The \jenv{subexamples}/\jenv{covsubexamples} environment provides the same options than the \jenv{example}
+and \jenv{examples} environment (see sec.~\ref{sec:ex}) with the following deviations and additions:
\begin{description}
- \item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is inserted in the first line
- (after the main number and before the first sub-example, which then follows in a new line).
+ \item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text is inserted here on the first line
+ (after the main number and before the first sub-example, which then follows on a new line).
This might be useful, for instance, to give context information, to specify the language or the source
- in case of cited sub-examples. You can globally set the markup of this preamble text (see sec.~\ref{sec:custno}).
- \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended after all sub-examples (on a
- new line). This might be useful to add a reference or an explanation to the set.
- The advantage over just adding text manually in the example is that this uses its own markup
- (see sec.~\ref{sec:custno}).
+ in case of cited sub-examples.
+ \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text is appended here after all sub-examples (on a
+ new line). This might be useful to add a reference or an explanation to the whole set.
+ \item[\joption{addsubnumbersep=\{\jparam{length}\}}] Default: \verb|{0pt}|.
+ Increases or (with negative values) decreases the spacing between example subnumber and example text.
+ \item[\joption{subnumberformat=\{\jparam{template}\}}] Default: \verb|{(a)}|.
+ The format of the sub-example number. For the template format, consult the documentation of
+ \joption{numberformat} in sec.~\ref{sec:ex}.
\end{description}
%
-For instance,
-\begin{lstlisting}
-\begin{subexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}]
-\item This is the first sentence.
-\item This is the second sentence.
-\end{subexamples}
-\end{lstlisting}
-or, respectively:
-\begin{lstlisting}
-\begin{covsubexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}]
-\item This is the first sentence.
-\item This is the second sentence.
-\end{covsubexamples}
-\end{lstlisting}
-prints as:
-\begin{subexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}]
- \item This is the first sentence.
- \item This is the second sentence.
-\end{subexamples}
+Also note that, if you set options globally via \jcsmacro{setexampleoptions}, the following derivating options
+should be used to distinguish the \jenv{subexample} from the \jenv{example} case.
+\begin{description}
+ \item[\joption{fssubpreamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of subexample's preamble text and the \jcsmacro{subexpreamble}
+ macro described below.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fssubpostamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Tweaks the sub\-example's postamble text font settings and the \jcsmacro{subexpostamble}
+ macro described below.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+\end{description}
%
-To add additional text to specific subitems, you can use the \jcsmacro{subexpreamble} macro, which uses the
-same markup than the \joption{preamble} option, like this:
+For convenience, both options actually also work (as aliases) in optional arguments.
+
+To add additional text preceding or following specific subitems, you can principally use the \jcsmacro{expreamble} and
+\jcsmacro{expostamble} macros desribed in sec.~\ref{sec:exs}. To allow for separating the markup of such texts
+in subexample from the example case, we also provide specific macros, \jcsmacro{subexpreamble} and
+\jcsmacro{subexpostamble} which use their own font settings (and the same than the \joption{preamble} and
+\joption{postamble} options of this environment).
+
+For example:
\begin{lstlisting}[moretexcs={subexpreamble}]
-\begin{covsubexamples}[preamble={Here are two sentences}]
-\item This is the first sentence.
-\item \subexpreamble{Note particular this one}
- This is the second sentence.
+\begin{covsubexamples}[preamble={Here are two sentences:}]
+\item \subexpreamble{English:} This is the first sentence.
+\item \subexpreamble{German:} Das ist der zweite Satz.
\end{covsubexamples}
\end{lstlisting}
%
-which prints:
-\begin{covsubexamples}[preamble={Here are two sentences}]
- \item This is the first sentence.
- \item \subexpreamble{Note particular this one}
- This is the second sentence.
+\begin{covsubexamples}[preamble={Here are two sentences:}]
+ \item \subexpreamble{English:}
+ This is the first sentence.
+ \item \subexpreamble{German:}
+ Das ist der zweite Satz.
\end{covsubexamples}
%
-Along the same line, trailing text (analogous to the \joption{postamble} option)
-can be added to specific subitems via the \jcsmacro{subexpostamble} macro, like this:
+Analoguously, with:
\begin{lstlisting}[moretexcs={subexpostamble}]
\begin{subexamples}
\item This is the first sentence. \subexpostamble{(Miller 2022: 15)}
@@ -513,98 +579,157 @@ can be added to specific subitems via the \jcsmacro{subexpostamble} macro, like
\end{subexamples}
\end{lstlisting}
%
-which results in:
+you will get:
\begin{subexamples}
\item This is the first sentence. \subexpostamble{(Miller 2022: 15)}
\item This is the second sentence.\subexpostamble{\footnote{My own.}}
\end{subexamples}
%
-Again, the advantage over just adding text as is is that this has its own, globally settable markup,
-which is particularly relevant if you globally set examples to be italicized (see sec.~\ref{sec:custno}).
+More customization possibilities of examples and subexamples are elaborated in the following section.
-The distance between example number and subnumber (letter) can be changed via the length \jcsmacro{examplenumbersep}
-(which is preset to \texttt{0pt}). The distance between example subnumber and text can be changed via the length
-\jcsmacro{subexamplenumbersep} (preset to \texttt{0pt} as well). In both cases, a positive value will increase, a negative
-value will decrease the respective distance.
-Doing
-\begin{lstlisting}[moretexcs={setlength,examplenumbersep,subexamplenumbersep}]
-\setlength{\examplenumbersep}{-0.4em}
-\setlength{\subexamplenumbersep}{0.4em}
-\end{lstlisting}
-for instance, will come out like this:
+\subsection{Examples of examples}\label{sec:exex}
-\bgroup
-\setlength{\examplenumbersep}{-0.4em}
-\setlength{\subexamplenumbersep}{0.4em}
+As already noted, all example environments can be customized in many aspects via the example options.
+If passed as an optional argument to the respective environment, the change only applies to this very environment.
+If passed via \jcsmacro{setexampleoptions}, the change will apply to any subsequent \jenv{example}, \jenv{examples},
+or \jenv{subexamples} environment unless a local option overrides a setting.
-\begin{subexamples}
+For this section and the purpose of demonstration, we globally set the markup of example sentences to italics,
+as common in linguistics. As you now already know, this is very easy to do, via:
+\begin{lstlisting}[morekeywords=fs,moretexcs={setexampleoptions}]
+\setexampleoptions{fs=\itshape}
+\end{lstlisting}
+\setexampleoptions{fs=\itshape}
+%
+which applies from now on. If we now enter:
+\begin{lstlisting}
+\begin{example}[preamble={This example showcases the pre- and postamble options:},
+ postamble={(German)}]
+Das ist ein Satz.
+\end{example}
+\end{lstlisting}
+%
+We will get:
+\begin{example}[preamble={This example showcases the pre- and postamble options:},postamble={(German)}]
+ Das ist ein Satz.
+\end{example}
+%
+And with a similar subexample:
+\begin{lstlisting}
+\begin{subexamples}[preamble={Here are two sentences},
+ postamble={(Doe 1974: 12)}]
+\item This is the first sentence.
+\item This is the second sentence.
+\end{subexamples}
+\end{lstlisting}
+we get the following output:
+\begin{subexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}]
\item This is the first sentence.
\item This is the second sentence.
\end{subexamples}
%
-To change the indentation (left margin) of subexamples, adjust the length \jcsmacro{exampleind}
-(preset to \texttt{0pt}). Note that this also applies to the \jenv{examples} environment.
-\egroup
-
-
-\subsection{Customizing number display and example markup}\label{sec:custno}
-
-You can change the display of the example number by redefining (via \jfcsmacro{renewcommand*}) the macro
-\jcsmacro{covexnumber}, which has the following default definition:
-\begin{lstlisting}[moretexcs={covexnumber}]
-\newcommand*\covexnumber[1]{(#1)}
+In what follows, we demonstrate the adjustment of the spacing of examples.
+The space between the example number and the text (or the subnumber in case of subexamples)
+can be adjusted, as documented above, by means of the \joption{addnumbersep} example option.
+So, for instance,
+\begin{lstlisting}[moretexcs={addnumbersep}]
+\begin{example}[addnumbersep={2em}]
+Look, I am shifted right!
+\end{example}
\end{lstlisting}
+will come out like this:
+
+\begin{example}[addnumbersep={2em}]
+ Look, I am shifted right!
+\end{example}
%
-with the variable \texttt{\#1} representing the number.
-If you use \joption{ownfncounter}, example numbers in footnote use this macro as well. If you want
-a different display, you can redefine
-\begin{lstlisting}[moretexcs={covexnumberfn,covexnumber}]
-\newcommand*\covexnumberfn[1]{\covexnumber{#1}}
+The indentation (left margin) of examples and subexamples is controlled by the \joption{leftmargin}
+example option. Doing \joption{leftmargin=1em}, for instance, will increase the indentation by 1\,em,
+negative values will decrease it accordingly.
+For the latter, consider:
+\begin{lstlisting}[moretexcs={leftmargin}]
+\begin{example}[leftmargin={-2.6em}]
+This is a marginal case.
+\end{example}
\end{lstlisting}
+which will come out like this:
%
-In the same vein, you can customize the display of the subexample letter by redefining
-the macro \jcsmacro{covsubexnumber}, which has the following default definition:
-\begin{lstlisting}[moretexcs={covsubexnumber}]
-\newcommand*\covsubexnumber[1]{(#1)}
-\end{lstlisting}
+\begin{example}[leftmargin={-2.6em}]
+This is a marginal case.
+\end{example}
%
-To remove the parentheses from the subexample letter, for instance, to this:
-\begin{lstlisting}[moretexcs={covsubexnumber}]
-\renewcommand*\covsubexnumber[1]{#1}
+In case of \jenv{subexamples}, the distance between example subnumber and text can be changed
+via the \joption{addsubnumbersep} option.
+Again, a positive value will increase, a negative value will decrease the distance.
+Doing
+\begin{lstlisting}[moretexcs={addnumbersep,addsubnumbersep}]
+\begin{subexamples}[addnumbersep={-0.4em},addsubnumbersep={0.4em}]
+\item My numbers have been moved.
+\item Mine as well.
+\end{subexamples}
\end{lstlisting}
+for instance, will yield:
+
+\begin{subexamples}[addnumbersep={-0.4em},addsubnumbersep={0.4em}]
+ \item My numbers have been moved.
+ \item Mine as well.
+\end{subexamples}
%
-\noindent You can also customize the markup of the example sentences by redefining the macro
-\jcsmacro{covexamplefs} (which is empty by default). To have all example sentences italicized, for instance, do:
-\begin{lstlisting}[moretexcs={covexamplefs}]
-\renewcommand*{\covexamplefs}{\itshape}
+The example also demonstrates how, in subexamples, \joption{addnumbersep} alters (here: decreases) the spacing
+between main number and subnumber.
+
+Next, we showcase how to change the display of the example number or subnumber via the \joption{numberformat} and
+\joption{subnumberformat} options. As described in sec.~\ref{sec:ex}, these take a `mini template' as known from
+the \textsf{enumerate} package \cite{enumerate}. In these templates, the first occurrence of the characters \jparam{1},
+\jparam{i}, \jparam{I}, \jparam{a}, and \jparam{A} represents the numeric system where the respective character marks
+the first positive value. All the rest of the template (including following occurrences of the mentioned characters)
+is interpreted literally.
+For instance, \jparam{(1)} is an alphabetic number in parentheses, \jparam{a.} a lower alphabetic value followed by a dot,
+etc.
+
+So to equip the examples with a dot after the number, we use \joption{numberformat=\{(1.)\}}
+To remove the parentheses from the subexample letter, for instance, we can use \joption{subnumberformat=\{a\}}.
+The following example demonstrates both options:
+\begin{lstlisting}[moretexcs={numberformat,subnumberformat}]
+\begin{subexamples}[numberformat={(1.)}, subnumberformat={a}]
+\item This is a statement.
+\item This is an adjacent statement.
+\end{subexamples}
\end{lstlisting}
%
-Note that this does, deliberately, not include the numbers, since those are controlled by another font setting macro,
-\jcsmacro{covexamplenofs}, which defaults to \jfcsmacro{normalfont}. Of course you are free to redefine this as well,
-if you wish do to so.
-
-Furthermore, you can customize the markup of the example and sub-example preamble text (supplied via the \joption{preamble}
-option or the \jcsmacro{expreamble} or \jcsmacro{subexpreamble} macro) by redefining the macro
-\jcsmacro{expreamblefs} or \jcsmacro{subexpreamblefs}, which also both default to \jfcsmacro{normalfont}.
-To have them italicized, analogously do:
-\begin{lstlisting}[moretexcs={expreamblefs}]
-\renewcommand*{\expreamblefs}{\itshape}
-\end{lstlisting}
-or
-\begin{lstlisting}[moretexcs={subexpreamblefs}]
-\renewcommand*{\subexpreamblefs}{\itshape}
-\end{lstlisting}
+And we get what we want:
+\begin{subexamples}[numberformat={(1.)}, subnumberformat={a}]
+ \item This is a statement.
+ \item This is an adjacent statement.
+\end{subexamples}
%
-Likewise, you can customize the markup of the example and sub-example postamble text (supplied via the
-\joption{postamble[*]} option or the \jcsmacro{expostamble} or \jcsmacro{subexpostamble} macro) by redefining the macro
-\jcsmacro{expostamblefs} or \jcsmacro{subexpostamblefs}, which also both default to \jfcsmacro{normalfont}.
-
-The separate footnote example number with \joption{ownfncounter} uses lowercase Roman numbering by default.
-This can be changed by redefining
-\begin{lstlisting}[moretexcs={thecovfnex}]
-\renewcommand{\thecovfnex}{\roman{covfnex}}
-\end{lstlisting}
+Note that the \joption{numberformat} option by default also changes the numbers of examples in footnotes, even if
+\joption{fnexamplecounter=own} or \joption{fnexamplecounter=own-reset} is used. This does not apply to the counter format,
+however. So \joption{numberformat=\{[1.])\}} will also make the example numbers in footnote appear in brackets and with the
+dot, but it will still use the lower Roman numbering. Use \joption{fnnumberformat} to fully change the appearance.
+With the last examples, we return to example markup. Remember, we have globally set the markup of example sentences to italics
+at the beginning of this section. Now if we want to have it bold instead for one single occurence, we can reset it for the one
+case via the environment options (if we wanted to change it globally from now on, we would use \jcsmacro{setexampleoptions} once more).
+
+Observe how:
+\begin{lstlisting}[moretexcs={covsubexnumber}]
+\begin{example}[fs=\bfseries,preamble={This is the preamble},
+ postamble={(Postamble)}]
+This is a bold statement!
+\end{example}
+\end{lstlisting}
+%
+results in:
+\begin{example}[fs=\bfseries,preamble={This is the preamble},
+ postamble={(Postamble)}]
+ This is a bold statement!
+\end{example}
+%
+As outlined in sec.~\ref{sec:ex} and \ref{sec:subexs}, all elements of examples and subexamples
+(number, actual example text, pre- and postamble) can be marked up independently via \joption{fsno},
+\joption{fspreamble}, \joption{fspostamble}, etc. Hence, many useful (and also lots of nonsensical)
+example formats are easily achievable.
\subsection{Referring to examples}\label{sec:ref}
@@ -664,8 +789,8 @@ Note that:
line is in italics, subsequent lines are set upright, and the free translation in single
quotation marks (using the language-sensitive \textsf{csquotes} \cite{csquotes} macros if
this package is loaded). This can be customized, though, via the macro options or globally
- (for the latter, see sec.~\ref{sec:glossfc}).
- \item By default, page breaks might occur within glosses. In order to prevent it, the option
+ via the macro \jcsmacro{setglossoptions} which will be documented below.
+ \item By default, page breaks might occur within glosses. In order to prevent it, the package option
\joption{noglossbreaks} (see sec.~\ref{sec:intro}) will help in many cases.
If it doesn't, you can wrap the whole gloss into a minipage or parbox.
\item The words do not have to be typed lining up; \TeX\ counts and aligns them.
@@ -697,30 +822,52 @@ Note that:
\begin{description}
\item[\joption{ex=\jparam{true|false}}] Default: \emph{false}. Wraps the gloss in an example environment
- (i.\,e., it is numbered).
+ (i.\,e., it is numbered). In this case, any example settings done via \jcsmacro{setexampleoptions}
+ (sec.~\ref{sec:ex}) apply.
\item[\joption{tlr=\jparam{true|false}}] Default: \emph{false}. If set to true, the translation line (content
of the \jparam{free translation} argument) is set right to the gloss lines, rather than into a new line below.
Since the gloss itself is set in a box, this means the \jparam{free translation} will appear lined up with the
first line of the gloss. This can be useful when no translation, but an aligned number or something similar,
is to be inserted right to the gloss (please refer to sec.~\ref{sec:glossex} for an example).
- \item[\joption{fsi=\{\jparam{font settings}\}}] Adjusts the font settings of the first gloss line.
- Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
- \item[\joption{fsii=\{\jparam{font settings}\}}] Adjusts the font settings of the second gloss line.
- Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
- \item[\joption{fsiii=\{\jparam{font settings}\}}] Adjusts the font settings of the third gloss line.
- Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fsi=\{\jparam{font settings}\}}]. Default: \verb|{\normalfont\itshape}|.
+ Adjusts the font settings of the first gloss line.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fsii=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the second gloss line.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fsiii=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the third gloss line (in case of \jcsmacro{trigloss}).
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fstl=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the translation line.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{enquotetl=\jparam{true|false}}] Default: \emph{true}.
+ By default, the translation line is embraced in single quotation marks. Set this option to
+ \jparam{false} to omit this.
+
+ Note that for \joption{enquotetl=true}, \cvt\ checks at document begin whether the \textsf{csquotes}
+ \cite{csquotes} package is loaded. If so, it uses its language-sensitive \jcsmacro{enquote*} macro
+ for enquoting the translation.
+ If not, a fallback quotation (using English single quotation marks) is used. The usage of
+ \textsf{csquotes} is highly recommended!
\item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is inserted on an own line
before the interlinearized gloss. This might be useful, for instance, to give context information,
to specify the language or the source in case of cited glosses.
- The advantages over just adding a line manually above the gloss are that you can globally set the
- markup (see sec.~\ref{sec:glossfc}), and that such lines are kept on the same page than the gloss
- with the option \joption{noglossbreaks} (at least as long as preamble does not exceed one line).
+ The advantages over just adding a line manually above the gloss are that you can locally and globally
+ set the markup with the \joption{fspreamble} option, and that such lines are kept on the same page than
+ the gloss with the option \joption{noglossbreaks} (at least as long as preamble does not exceed one line).
Furthermore, this option is the only way to add such text when the \joption{ex} option is used.
\item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended to the translation line, but after
the closing quotation mark. This might be useful to add a footnote or some additional text to the translation
line, after the actual translation.
+ \item[\joption{fspreamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the preamble line.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fspostamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the postamble line.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
\end{description}
%
If given as optional arguments to a \jcsmacro{digloss} or \jcsmacro{trigloss} macro, the options will only apply to
@@ -771,12 +918,30 @@ The following is a complete list of all low-level glossing commands:
and a smarter way to insert a translation line. Other than \jcsmacro{glt}, it marks up
(by default: enquotes) the translation line. Also, it does not add an empty line if the
translation is empty. This command has been introduced in \cvt\ 2.0.
+ The markup can be customized by redefining the following macro:
+\begin{lstlisting}[moretexcs={glosslinetrans,covenquote,cov@fstl,ifcov@enquote@tl}]
+\newcommand*\glosslinetrans[1]{%
+ \bgroup\cov@fstl\ifcov@enquote@tl\covenquote{#1}\else#1\fi\egroup}
+\end{lstlisting}
+ Note that for \jcsmacro{covenquote}, as used in the default definition, \cvt\ checks at
+ document begin whether the \textsf{csquotes} \cite{csquotes} package is loaded. If so,
+ it uses its language-sensitive \jcsmacro{enquote*} macro for enquoting the translation.
+ If not, a fallback quotation (using English single quotation marks) is used. The usage of
+ \textsf{csquotes} is highly recommended!
+
+ The \jcsmacro{ifcov@enquote@tl} boolean checks for the \joption{enquotetl} option of the gloss
+ macro. The macro \jcsmacro{cov@fstl} holds the font settings as set via the \joption{fstl} gloss option.
+ These are both relevant also for low-level commands if you set the respective options via
+ \jcsmacro{setglossoptions}.
+
+ In general, please take care when redefining this macro that the functioning of some gloss environment
+ options relies on some of the macros contained in the default definition.
\item[\jcsmacro{glosspreamble\{\jparam{arbitrary text}\}}] lets you enter text that is printed immediately
before the interlinearized gloss (on a line of its own). This might be useful, for instance,
to give context information, to specify the language or the source in case of cited glosses.
The advantages over just adding a line manually above the gloss are that you can globally set the markup
- (see sec.~\ref{sec:glossfc}) and that such lines are kept on the same page than the gloss with the option
- \joption{noglossbreaks}. Note, however, that page breaks might occur if this text spans multiple lines.
+ and that such lines are kept on the same page than the gloss with the option \joption{noglossbreaks}.
+ Note, however, that page breaks might occur if this text spans multiple lines.
In this case, you can wrap the whole gloss into a minipage.
This command has been introduced in \cvt\ 2.1.
\item[\jcsmacro{glend}] ends the special \jfenv{flushleft}-like environment.
@@ -808,7 +973,7 @@ This is not so if you use \jcsmacro{glot}:
%
The advantage of \jcsmacro{glot} is that you can easily customize the translation markup globally.
Also, \jcsmacro{glot} uses the language-sensitive \textsf{csquotes} \cite{csquotes} macros if
-this package is loaded (see sec.~\ref{sec:glossfc}).
+this package is loaded (see sec.~\ref{sec:gmacros}).
Since \jcsmacro{gll} and \jcsmacro{glll} locally activate the end of line in glosses in order to
identify the different lines of the gloss (via category code change), they do not work inside macros
@@ -833,47 +998,10 @@ To sum up: With low-level commands, every glossed sentence begins with either \j
Layout is critical in the part preceding \jcsmacro{glt} or \jcsmacro{gln}, and fairly free afterward.
-\subsection{Customization}\label{sec:glossfc}
-
-The font settings of each gloss line can be customized globally by way of
-the global options macro \jcsmacro{setglossoptions} and the \joption{fsi},
-\joption{fsii} or \joption{fsiii} key, respectively (see sec.~\ref{sec:gmacros}).
-Alternatively, you can also redefine these macros:
-\begin{lstlisting}[moretexcs={glosslineone,glosslinetwo,glosslinethree}]
-\newcommand*\glosslineone{\normalfont\itshape}% font settings 1st gloss line
-\newcommand*\glosslinetwo{\normalfont\upshape}% font settings 2nd gloss line
-\newcommand*\glosslinethree{\normalfont\upshape}% font settings 3rd gloss line
-\end{lstlisting}
-%
-The markup of the translation line (if the \jcsmacro{digloss} or \jcsmacro{trigloss}
-macro or the \jcsmacro{glot} low-level command is used) can be customized by redefining
-the following macro.
-\begin{lstlisting}[moretexcs={glosslinetrans,covenquote}]
-\newcommand*\glosslinetrans[1]{\covenquote{#1}}
-\end{lstlisting}
-Note that for \jcsmacro{covenquote}, as used in the default definition, \cvt\ checks at
-document begin whether the \textsf{csquotes} \cite{csquotes} package is loaded. If so,
-it uses its language-sensitive \jcsmacro{enquote*} macro for enquoting the translation.
-If not, a fallback quotation (using English single quotation marks) is used. The usage of
-\textsf{csquotes} is highly recommended!
-
-The markup of the preamble line (which is not marked up at all by default) can be customized
-by redefining the macro:
-\begin{lstlisting}[moretexcs={glosslinepreamble}]
-\newcommand*\glosslinepreamble[1]{#1}
-\end{lstlisting}
-
-Analogously, the markup of the postamble text (which is not marked up at all by default either)
-can be customized by redefining the macro:
-\begin{lstlisting}[moretexcs={glosslinepostamble}]
-\newcommand*\glosslinepostamble[1]{#1}
-\end{lstlisting}
-
-
-\subsection{Examples}\label{sec:glossex}
+\subsection{Example glosses}\label{sec:glossex}
-This section gives some further examples. First, a sentence with three lines aligned,
-instead of just two:
+This section gives some further examples and showcases some options.
+First, a sentence with three lines aligned, instead of just two:
\trigloss[fsii={\normalfont\scshape}]
{Hoc est aliud exemplum}
{n.sg.nom 3sg n.sg.nom n.sg.nom}
@@ -881,7 +1009,8 @@ instead of just two:
{This is another example.}
In order to produce this, we use the \jcsmacro{trigloss} macro for a three-line gloss
and pass the \joption{fsii} option with the respective font switches in order to
-get small capitals in the second line:
+get small capitals in the second line (\jcsmacro{normalfont} is needed here to
+disable the italics set for the first line):
\begin{lstlisting}[moretexcs={trigloss}]
\trigloss[fsii={\normalfont\scshape}]
{Hoc est aliud exemplum}
@@ -956,7 +1085,6 @@ This has been input as follows:
{Do you have matches?}
\end{lstlisting}
-
\section{Phrase structure rules}
To print phrase structure rules such as \psr{S}{NP~VP} you can use \texttt{covington's} macro
@@ -1274,6 +1402,29 @@ it.
\section{Release history}
+\subsection*{2.10 (2023 June 2)}
+\begin{itemize}
+ \item Use \LaTeXe's own keyval mechanism rather than \textsf{xkeyval}.
+ \item Introduce a better interface to customize the appearance of examples. Now everything can
+ be easily adjusted globally and locally via key-val options. This entails the following changes:
+ \begin{itemize}
+ \item Allow to globally set example options via the new macro \jcsmacro{setexampleoptions}.
+ \item Add way to customize example and subexample number format (see sec.~\ref{sec:subexs}).
+ \item Add new example options: \joption{fs}, \joption{fsno}, \joption{fspreamble}, \joption{fspostamble},
+ \joption{leftmargin}, \joption{addnumbersep}, \joption{addsubnumbersep}, \joption{numberformat},
+ \joption{subnumberformat}, as well as \joption{fnnumberformat} (see sec.~\ref{sec:ex}).
+ \end{itemize}
+ \item Add new gloss options: \joption{fspreamble}, \joption{fspostamble}, \joption{fstl},
+ and \joption{enquotetl}. This allows for full customization of glosses via options,
+ both locally and globally (see sec.~\ref{sec:gloss}).
+ \item Package options now all have a key-value format as well.
+ \item Introduce new package choice-option \joption{fnexamplecounter} that
+ supersedes the two boolean, mutually exclusive options \joption{ownfncounter}
+ and \joption{ownfncounter*} (which are still supported for backwards
+ compatibility reasons).
+ \item Major documentation revisions.
+\end{itemize}
+
\subsection*{2.9 (2023 May 26)}
\begin{itemize}
\item Add \joption{postamble} and \joption{postamble*} options to \jenv{example} and \jenv{subexamples} environment
@@ -1296,7 +1447,7 @@ it.
\begin{itemize}
\item Add \joption{postamble} gloss macro option for arbitrary text that is appended to the free
translation line (after closing quotation marks). See sec.~\ref{sec:gmacros}.
-\item Add \jcsmacro{glosslinepostamble} command to markup this text. See sec.~\ref{sec:glossfc}.
+\item Add \jcsmacro{glosslinepostamble} command to markup this text.
\end{itemize}
\subsection*{2.6 (2021 May 19)}
@@ -1335,7 +1486,6 @@ it.
\item Add starred \jcsmacro{exampleno*} command that outputs the current example number value without stepping it.
See sec.~\ref{sec:exno}.
\item Add macros \jcsmacro{covexamplefs} and \jcsmacro{covexamplenofs} for global setting of example text markup.
- See sec.~\ref{sec:custno}.
\end{itemize}
\subsection*{2.1 (2019 May 12)}
@@ -1360,8 +1510,8 @@ it.
\begin{itemize}
\item Fix font markup of second gloss line (do not force rm).
- \item Add possibility to customize gloss line font setting. See sec.~\ref{sec:custno}.
- \item Add possibility to customize example number display. See sec.~\ref{sec:custno}.
+ \item Add possibility to customize gloss line font setting. See sec.~\ref{sec:ex}.
+ \item Add possibility to customize example number display. See sec.~\ref{sec:ex}.
\end{itemize}
\subsection*{1.7 (2018 September 8)}
@@ -1473,6 +1623,8 @@ it.
by morpheme glosses}. Revised version of February 2008. Department
of Linguistics, Max Plank Institute for Evolutionary Anthropology.
\url{http://www.eva.mpg.de/lingua/resources/glossing-rules.php}.
+ \bibitem{enumerate} Carlisle, David: \emph{The enumerate package}. July 23, 2015.
+ \url{https://www.ctan.org/pkg/enumerate}.
\bibitem{drs} Dimitriadis, Alexis: \emph{drs -- Typeset Discourse Representation Structures (DRS)}.
June 10, 2010. \url{https://ctan.org/pkg/drs}.
\bibitem{sdrt} Isambert, Paul: \emph{sdrt -- Macros for Segmented Discourse Representation Theory}.
diff --git a/macros/latex/contrib/movement-arrows/README.md b/macros/latex/contrib/movement-arrows/README.md
index af657e5518..968b959185 100644
--- a/macros/latex/contrib/movement-arrows/README.md
+++ b/macros/latex/contrib/movement-arrows/README.md
@@ -1,10 +1,12 @@
# `movement-arrows` package
+Version 2.0 2023-06-02
+
Copyright 2017-2023 by Alan Munn <amunn@msu.edu>
-This package supplies simple support for drawing movement arrows on example sentences. It automatically adjusts spacing between examples or gloss lines to make room for the arrows. Arrows can also be annotated with labels. The package uses TikZ as a base, and various properties of the arrows can be adjusted using TikZ styles.
+This package supplies simple support for drawing arrows between elements in text or math. Its origin comes from linguistics, where drawing arrows between words is often used as an indication that the word or phrase has moved, hence the package name. Because of this origin, the package is aware of the main linguistics packages for example sentences and can be used with those packages, but does not require you to use of any of them. Arrows can also be annotated with labels. The package uses TikZ as a base, and various properties of the arrows can be adjusted using TikZ styles.
-The package has been tested with the `gb4e`, `linguex`, and `ExPex` example packages.
+The package has been tested with the `gb4e`, `linguex`, `covington` and `ExPex` example packages.
This package may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3 of this license or
diff --git a/macros/latex/contrib/movement-arrows/movement-arrows.pdf b/macros/latex/contrib/movement-arrows/movement-arrows.pdf
index 08d4b50d2f..b7dac56780 100644
--- a/macros/latex/contrib/movement-arrows/movement-arrows.pdf
+++ b/macros/latex/contrib/movement-arrows/movement-arrows.pdf
Binary files differ
diff --git a/macros/latex/contrib/movement-arrows/movement-arrows.sty b/macros/latex/contrib/movement-arrows/movement-arrows.sty
index 48fe4b288e..61147a87b2 100644
--- a/macros/latex/contrib/movement-arrows/movement-arrows.sty
+++ b/macros/latex/contrib/movement-arrows/movement-arrows.sty
@@ -17,62 +17,106 @@
%%
% Version 1.0 2023-05-21 Initial release
% Version 1.0b 2023-05-22 Fixed documentation typo
+% Version 2.0 2023-06-01 added \arrowgloss to fix strut problem
+% made package more general, added \mvlink command, new styles
+% renamed arrow command to be \mvarrow
%
-\def\MVA@version{1.0b}
-\ProvidesPackage{movement-arrows}[2023/05/22 v \MVA@version]
+%
+%
+\def\MVA@version{2.0}
+\ProvidesPackage{movement-arrows}[2023/06/02 v \MVA@version]
\@ifpackageloaded{gb4e}{\noautomath}{}
\RequirePackage{tikz}
\usetikzlibrary{ext.paths.ortho}
\RequirePackage{etoolbox}
\RequirePackage{calc}
+\newif\ifMVA@mmode
\NewDocumentCommand{\mkword}{om}{%
+\ifmmode\MVA@mmodetrue\else\MVA@mmodefalse\fi
\IfNoValueTF{#1}
-{\tikz[remember picture, baseline=(#2.base)] \node[anchor=base,inner sep=0pt, outer sep=0pt] (#2) {#2};}
-{\tikz[remember picture, baseline=(#1.base)] \node[anchor=base,inner sep=0pt, outer sep=0pt] (#1) {#2};}
+{\tikz[remember picture, baseline=(#2.base)] \node[anchor=base,inner sep=0pt, outer sep=0pt] (#2) {\ifMVA@mmode\ensuremath{#2}\else#2\fi};}
+{\tikz[remember picture, baseline=(#1.base)] \node[anchor=base,inner sep=0pt, outer sep=0pt] (#1) {\ifMVA@mmode\ensuremath{#2}\else#2\fi};}
}
\tikzset{
- arrow/.style={->,shorten >=3pt,shorten <=3pt},
circ/.style = {
draw,circle,solid,
node contents=#1,
fill=white,
inner xsep=.2em,
inner ysep=0pt
-}
+},
+ link/.style={#1,shorten >=3pt,shorten <=3pt},
+ above/.style = {label=above:#1},
+ below/.style = {label=below:#1}
}
\newlength{\arrowheight}
+\newlength{\MVA@arrowstrutheight}
+\setlength{\MVA@arrowstrutheight}{3ex}
\setlength{\arrowheight}{2.5ex}
\newlength{\extraexheight}
-\setlength{\extraexheight}{1ex}
+\setlength{\extraexheight}{1.5ex}
+\newlength{\glarrowheight}
+\setlength{\glarrowheight}{\arrowheight+\extraexheight}
\newlength{\MVA@arrowht}
-\setlength{\MVA@arrowht}{\arrowheight}
+\newlength{\MVA@extraht}
+\setlength{\MVA@arrowht}{0ex}
+\setlength{\MVA@extraht}{0ex}
+\newcommand*\MVA@arrowstyle{->}
+\newcommand*\setarrowstyle[1]{\gdef\MVA@arrowstyle{#1}}
+\newif\ifMVA@arrowgloss
\newlength{\MVA@strutheight}
\newcommand*\MVA@arrowstrut{%
- \setlength{\MVA@strutheight}{\MVA@arrowht+\extraexheight}%
+ \setlength{\MVA@strutheight}{\MVA@arrowht+\MVA@extraht}%
{\vrule height 0pt depth \MVA@strutheight width 0pt}}
-\let\arrowstrut\MVA@arrowstrut
-\NewDocumentCommand{\arrow}{somm}{
-\IfBooleanTF{#1}
+\newcommand*\arrowgloss{\setlength{\MVA@arrowht}{\arrowheight}\setlength{\MVA@extraht}{\extraexheight}\global\MVA@arrowglosstrue}
+\newcommand*\arrowstrut{\vspace*{\MVA@arrowstrutheight}}
+
+\NewDocumentCommand{\mvarrow}{somm}{%
+\ifMVA@arrowgloss\else\arrowstrut\fi
+\IfBooleanTF{#1}%
{\setlength{\MVA@arrowht}{-\arrowheight}
+ \setlength{\MVA@extraht}{-\extraexheight}
\def\MVA@rightanchor{north}\let\MVA@leftanchor\MVA@rightanchor}
{\setlength{\MVA@arrowht}{\arrowheight}
+\setlength{\MVA@extraht}{\extraexheight}
\def\MVA@rightanchor{base}\let\MVA@leftanchor\MVA@rightanchor}
\IfNoValueTF{#2}
-{
+{%
\begin{tikzpicture}[remember picture,overlay]
-\draw[arrow] (#3.\MVA@rightanchor) r-du[du distance=\MVA@arrowht] (#4.\MVA@leftanchor);
+\draw[link=\MVA@arrowstyle] (#3.\MVA@rightanchor) r-du[du distance=\MVA@arrowht] (#4.\MVA@leftanchor);
\end{tikzpicture}
}
{\begin{tikzpicture}[remember picture,overlay]
-\draw[arrow] (#3.\MVA@rightanchor) r-du[du distance=\MVA@arrowht] node[#2] {} (#4.\MVA@leftanchor);
+\draw[link=\MVA@arrowstyle] (#3.\MVA@rightanchor) r-du[du distance=\MVA@arrowht] node[#2] {} (#4.\MVA@leftanchor);
\end{tikzpicture}}
-\MVA@arrowstrut
+\global\MVA@arrowglossfalse%
\setlength{\MVA@arrowht}{0ex}
+\setlength{\MVA@extraht}{0ex}
+}
+\NewDocumentCommand{\mvlink}{somm}{%
+\ifMVA@arrowgloss\else\arrowstrut\fi
+\IfBooleanTF{#1}%
+{\setlength{\MVA@arrowht}{-\arrowheight}
+ \setlength{\MVA@extraht}{-\extraexheight}
+\def\MVA@rightanchor{north}\let\MVA@leftanchor\MVA@rightanchor}
+{\setlength{\MVA@arrowht}{\arrowheight}
+\setlength{\MVA@extraht}{\extraexheight}
+\def\MVA@rightanchor{base}\let\MVA@leftanchor\MVA@rightanchor}
+\IfNoValueTF{#2}
+{%
+\begin{tikzpicture}[remember picture,overlay]
+\draw[link] (#3.\MVA@rightanchor) r-du[du distance=\MVA@arrowht] (#4.\MVA@leftanchor);
+\end{tikzpicture}
+}
+{\begin{tikzpicture}[remember picture,overlay]
+\draw[link] (#3.\MVA@rightanchor) r-du[du distance=\MVA@arrowht] node[#2] {} (#4.\MVA@leftanchor);
+\end{tikzpicture}}
+\global\MVA@arrowglossfalse%
+\setlength{\MVA@arrowht}{0ex}
+\setlength{\MVA@extraht}{0ex}
}
-
\AtBeginDocument{%
-\ifdefined\eachwordone\preto{\eachwordone}{\MVA@arrowstrut}\renewcommand\glt{\vskip -1.2\arrowheight}
-\let\trans=\glt
+\ifdefined\eachwordone\preto{\eachwordone}{\MVA@arrowstrut}
\fi}
diff --git a/macros/latex/contrib/movement-arrows/movement-arrows.tex b/macros/latex/contrib/movement-arrows/movement-arrows.tex
index 550bda4a2a..a88c773e32 100644
--- a/macros/latex/contrib/movement-arrows/movement-arrows.tex
+++ b/macros/latex/contrib/movement-arrows/movement-arrows.tex
@@ -1,7 +1,9 @@
+% !TEX TS-program = LuaLaTeXmk
+
\documentclass[11pt]{article}
\usepackage{calc}
\usepackage{fontspec}
-\usepackage[lmargin=.75in,rmargin=.75in,tmargin=1in,bmargin=1in]{geometry}
+\usepackage[margin=.75in]{geometry}
\usepackage{titling}
\usepackage{array, booktabs,tabularx}
\usepackage{enumitem}
@@ -19,7 +21,7 @@
\DefineShortVerb{\|}
\title{The \texttt{movement-arrows} package}
\author{Alan Munn\\amunn@msu.edu}
-\date{Version 1.0b\\May 22, 2023}
+\date{Version 2.0\\June 2, 2023}
\lstset{%
basicstyle=\ttfamily\small,
@@ -30,8 +32,7 @@
breakautoindent=true,
aboveskip=\baselineskip,
language=TeX,
- frame=single
- captionpos=t
+ frame=tl,
}
\newcommand*{\pkg}[1]{\texttt{#1}}
@@ -47,64 +48,81 @@
\maketitle
\thispagestyle{empty}
\begin{abstract}{\noindent
-The |movement-arrows| package supplies simple support for drawing movement arrows on example sentences. It automatically adjusts spacing between examples or gloss lines to make room for the arrows. Arrows can also be annotated with labels. The package uses TikZ as a base, and various properties of the arrows can be adjusted using TikZ styles. The package has been tested with the \pkg{gb4e}, \pkg{linguex}, and \pkg{ExPex} example packages.
-
-
+The |movement-arrows| package supplies simple support for drawing arrows between elements in text or math. Its origin comes from linguistics, where drawing arrows between words is often used as an indication that the word or phrase has moved, hence the package name. Because of this origin, the package is aware of the main linguistics packages for example sentences and can be used with those packages, but does not require you to use of any of them. Arrows can also be annotated with labels. The package uses TikZ as a base, and various properties of the arrows can be adjusted using TikZ styles. The package has been tested with the \pkg{gb4e}, \pkg{linguex}, \pkg{covington} and \pkg{ExPex} example packages.
}
\end{abstract}
+
+\section{Basic usage}
+The way the package works is that you mark words in text using the |\mkword| macro and then use the |\mvarrow| or |\mvlink| macro to connect the words. Here's a simple example:
+
+\begin{quote}
+\begin{lstlisting}
+\documentclass{article}
+\usepackage{movement-arrows}
+\mkword{Where} did this move from \mkword{t}?
+\mvarrow{t}{Where}
+\end{lstlisting}
+\mkword{Where} did this move from \mkword{t}?
+\mvarrow{t}{Where}
+\end{quote}
+
\section{Package commands}
\begin{table}[htpb]
\centering
-\begin{tabularx}{.9\textwidth}{t{l}X}
+\begin{tabularx}{\textwidth}{t{l}X}
\toprule
\bs mkword[<name>]\{<word>\} & marks a word or phrase for arrow placement; if \pkg{word} is a single word with no formatting, \pkg{name} will be set to \pkg{word}. If \pkg{word} is a phrase or contains formatting, a \pkg{name} must be given.\\
-\bs arrow[<options>]\{<start>\}\{<end>\} & add an arrow between start and end nodes defined with \pkg{\bs mkword}. \pkg{\bs arrow*} draws an arrow above the words.\\
-\bs arrowheight & length for the depth that the vertical line of the arrow drops\\
-\bs extraexheight & length to add more space after a line with an arrow\\
+\bs mvarrow[<options>]\{<start>\}\{<end>\} & add an arrow between start and end nodes defined with \pkg{\bs mkword}. \pkg{\bs mvarrow*} draws an arrow above the words.\\
+\bs mvlink[<options>]\{<start>\}\{<end>\} & add a link (no arrows) between start and end nodes. \pkg{\bs mvlink*} draws an link above the words. \\
+\bs setarrowstyle\{<style>\} & sets the arrow style; any regular TikZ arrow can be used.\\
+\bs arrowheight & length for the depth that the vertical line of the arrow drops/raises.\\
+\bs extraexheight & length to add more space after a line with an arrow.\\
+\bs glarrowheight & length = sum of previous two lenghts\\
+\bs arrowstrut & adds vertical space so that upwards links don't encroach on the previous line.\\
+\bs arrowgloss & tells the package that an arrow appears in a glossed example.\\
\bottomrule
\end{tabularx}
\caption{Package commands}
\end{table}
-\section{Basic usage}
-The way the package works is that you mark words in your example sentence using the |\mkword| macro and then use the |\arrow| macro to connect the words. So with the following code (using \pkg{gb4e} as our example package), we can get the result in (\ref{where}). Note that you must compile the document twice to place the arrow correctly, because the package uses the TikZ |[remember picture]| function.
+\section{More examples}
+The way the package works is that you mark words in your example sentence using the |\mkword| macro and then use the |\mvarrow| macro to connect the words. So with the following code (using \pkg{gb4e} as our example package), we can get the result in (\ref{where}). Note that you must compile the document twice to place the arrow correctly, because the package uses the TikZ |[remember picture]| function.
\begin{quote}
\begin{lstlisting}
\begin{exe}
\ex \mkword{Where} did this move from \mkword{t}?
-\arrow{t}{Where}
+\mvarrow{t}{Where}
\end{exe}
\end{lstlisting}
\end{quote}
\begin{exe}
\ex \mkword{Where} did this move from \mkword{t}?
-\arrow{t}{Where}
+\mvarrow{t}{Where}
\label{where}
\end{exe}
This is the simplest use of the |\mkword| macro: it automatically creates a node with the same name as the word. This only works, however, if the word is a single word with no other formatting.
For example, if instead of representing traces with \emph{t} we use copies or a subscripted trace, we need to explicitly state the node name in the optional argument of |\mkword|. Here’s a revised example:
-\clearpage
\begin{quote}
\begin{lstlisting}
\begin{exe}
\ex \mkword[Where]{Where\textsubscript{i}} did
this move from \mkword[t]{t\textsubscript{i}}?
-\arrow{t}{Where}
+\mvarrow{t}{Where}
\end{exe}
\end{lstlisting}
\end{quote}
\begin{exe}
\ex \mkword[Where]{Where\textsubscript{i}} did this move from \mkword[t]{t\textsubscript{i}}?
-\arrow{t}{Where}
+\mvarrow{t}{Where}
\label{where2}
\end{exe}
\subsection{Adding labels}
-The optional argument can be used to add a label to an arrow. There is one built-in label style called |circ|. Other styles can be created by the user if needed. The |circ| style is defined as follows:
+The optional argument can be used to add a label to an arrow. There are three built-in label styles: |circ| produces a circled label centred on the line itself. |above| and |below| place an uncircled label above or below the line respectively. Other styles can be created by the user if needed. The |circ| style is defined as follows:
\begin{quote}
\begin{lstlisting}
@@ -119,38 +137,45 @@ The optional argument can be used to add a label to an arrow. There is one buil
\end{lstlisting}
\end{quote}
-So to add a circled number “1” to the previous example we add |circ=1|:
+So to add a circled number “1” to the previous example we add |circ=1|. To add an uncircled label above the arrow we can use |above=1|.
\begin{quote}
\begin{lstlisting}
\begin{exe}
\ex \mkword[Where]{Where\textsubscript{i}} did
this move from \mkword[t]{t\textsubscript{i}}?
-\arrow[circ=1]{t}{Where}
+\mvarrow[circ=1]{t}{Where}
+\mvarrow*[above=1]{t}{Where}
\end{exe}
\end{lstlisting}
\end{quote}
\begin{exe}
+\arrowstrut
\ex \mkword[Where]{Where\textsubscript{i}} did
this move from \mkword[t]{t\textsubscript{i}}?
-\arrow[circ=1]{t}{Where}
+\mvarrow[circ=1]{t}{Where}
+\mvarrow*[above=1]{t}{Where}
+
\end{exe}
-\subsection{Glossed examples}
-The package automatically adjusts the vertical spacing between gloss elements and the first line to accommodate the arrows. Here’s a glossed example. In this example, because we want the arrow to point in the middle of \emph{een auto}, since it’s a phrase that has moved, we need to manually adjust the spacing between \emph{a} and \emph{car} in the gloss line. Alternatively we could just use either \emph{een} or \emph{auto} as the marked node and then no adjustment would be needed. This code also makes use of the |\extraexheight| length to increase the spacing after the second arrow in the example set.
-\clearpage
+
+\subsection{Glossed linguistic examples}
+Because of the way glossing macros work, arrows that are used in glossed examples using any of the standard linguistic glossing packages must be specially marked. We do this using the |\arrowgloss| command. This should appear before the glossed example that contains the arrow. Here’s a glossed example. In this example, because we want the arrow to point in the middle of \emph{een auto}, since it’s a phrase that has moved, we need to manually adjust the spacing between \emph{a} and \emph{car} in the gloss line. Alternatively we could just use either \emph{een} or \emph{auto} as the marked node and then no adjustment would be needed.
+
+For sample documents using each of the four linguistics example packages, please visit the \href{https://github.com/amunn/movement-arrows/}{GitHub repository}.
+
\begin{quote}
\begin{lstlisting}
\begin{exe}
\ex
\begin{xlist}
-\ex{\gll\ldots dat Jan \mkword[een]{een auto} gisteren \mkword{t} gekregen heeft.\\
+\ex{\arrowgloss
+\gll\ldots dat Jan \mkword[een]{een auto} gisteren \mkword{t} gekregen heeft.\\
\ldots that John {a \hspace*{1em} car} yesterday t gotten has \\
\ldots that John a car yesterday.}
-\arrow{t}{een}
-\addtolength{\extraexheight}{1ex}
+\mvarrow{t}{een}
\ex \mkword{Where} did this move from \mkword{t}?
-\arrow[circ=1]{t}{Where}
+\mvarrow[circ=1]{t}{Where}
\ex Another example.
\end{xlist}
\end{exe}
@@ -160,86 +185,143 @@ The package automatically adjusts the vertical spacing between gloss elements an
\begin{exe}
\ex
\begin{xlist}
-\ex{\gll\ldots dat Jan \mkword[een]{een auto} gisteren \mkword{t} gekregen heeft.\\
+\ex{\arrowgloss
+\gll\ldots dat Jan \mkword[een]{een auto} gisteren \mkword{t} gekregen heeft.\\
\ldots that John {a \hspace*{1em} car} yesterday t gotten has \\
\ldots that John a car yesterday.}
-\arrow{t}{een}
-\addtolength{\extraexheight}{1ex}
+\mvarrow{t}{een}
\ex \mkword{Where} did this move from \mkword{t}?
-\arrow[circ=1]{t}{Where}
+\mvarrow[circ=1]{t}{Where}
\ex Another example.
\end{xlist}
\end{exe}
+
\subsection{Adding colour or changing the line style}
-The package uses TikZ styles to style the arrow and the label. The label style |circ| can be modified by using adding parameters directly. The arrow style can be modified by using |\tikzset{arrow/.append style={...}|. Here is some examples of both usages.
+The package uses TikZ styles to style the arrow and the label. The label style |circ| can be modified by using adding parameters directly. The arrow style can be modified by using |\tikzset{link/.append style={...}|. Here is some examples of both usages.
\begin{quote}
\begin{lstlisting}
\begin{exe}
-\tikzset{arrow/.append style={{red,dashed,very thick}}}
+\tikzset{link/.append style={{red,dashed,very thick}}}
\ex \mkword[Where]{Where\textsubscript{i}} did
this move from \mkword[t]{t\textsubscript{i}}?
-\arrow[cyan,circ=1]{t}{Where}
+\mvarrow[cyan,circ=1]{t}{Where}
\end{exe}
\end{lstlisting}
\end{quote}
\begin{exe}
-\tikzset{arrow/.append style={{red,dashed,very thick}}}
+\tikzset{link/.append style={{red,dashed,very thick}}}
\ex \mkword[Where]{Where\textsubscript{i}} did
this move from \mkword[t]{t\textsubscript{i}}?
-\arrow[cyan,circ=1,thin]{t}{Where}
+\mvarrow[cyan,circ=1,thin]{t}{Where}
\end{exe}
+The arrow style itself can be changed using the |\setarrowstyle| command. The default arrow style is |->|; to use the |-latex| arrow style, you can use |\setarrowstyle{-latex}|. Any arrow style defined by TikZ is a useable style.
+
\subsection{Multiple arrows on one example}
If we want to have more than arrow on a single example, it may make sense to have them offset from one another. The position of the labels may also need to be manually adjusted. This is quite easy to do. The length of the vertical line in the arrow is set by the length |\arrowheight|. The position of the label can be moved by adding a |xshift| value. Here’s an example:
-\clearpage
+
\begin{quote}
\begin{lstlisting}
\begin{exe}
\ex \mkword{What} \mkword{has} \mkword[twh]{<what>} \mkword[thas]{<has>} moved?
-\arrow[circ=1,xshift=1em]{thas}{has}
+\mvarrow[circ=1,xshift=1em]{thas}{has}
\setlength{\arrowheight}{4.5ex}
-\arrow[circ=2]{twh}{What}
+\mvarrow[circ=2]{twh}{What}
\end{exe}
\end{lstlisting}
\end{quote}
\begin{exe}
\ex \mkword{What} \mkword{has} \mkword[twh]{<what>} \mkword[thas]{<has>} moved?
-\arrow[circ=1,xshift=1em]{thas}{has}
+\mvarrow[circ=1,xshift=1em]{thas}{has}
\setlength{\arrowheight}{4.5ex}
-\arrow[circ=2]{twh}{What}
+\mvarrow[circ=2]{twh}{What}
\end{exe}
For examples like this, some manual vertical spacing may be needed to prevent subsequent lines of text from overlapping the arrow.
\subsection{Arrows on top of words}
-The starred version of |\arrow|, |\arrow*| will draw the arrow above the words rather than the default position below the words. At the moment, no automatic spacing is done for arrows above, which means you will need to add vertical space yourself. I may consider adding automatic spacing here too, but at the moment this is not a priority, especially since at least in \pkg{gb4e} the |\sn| version of |\ex| will produce a blank line very simply. Here’s the previous example using a combination of over- and under-arrows:
+The starred version of |\mvarrow|, |\mvarrow*| will draw the arrow above the words rather than the default position below the words. Here’s the previous example using a combination of over- and under-arrows. The |\arrowstrut| command before the example add some vertical space so that the upwards arrow doesn't overlap the preceding text.
+
+\begin{quote}
+\begin{lstlisting}
+\begin{exe}
+\arrowstrut
+\ex \mkword{What} \mkword{has} \mkword[twh]{<what>} \mkword[thas]{<has>}
+moved?
+\mvarrow[circ=1]{thas}{has}
+\mvarrow*[circ=2]{twh}{What}
+\end{exe}
+\end{lstlisting}
+\end{quote}
+
+\begin{exe}
+\arrowstrut
+\ex \mkword{What} \mkword{has} \mkword[twh]{<what>} \mkword[thas]{<has>}
+moved? \mvarrow[circ=1]{thas}{has} \mvarrow*[circ=2]{twh}{What}
+\end{exe}
+\clearpage
+\subsection{Using with ExPex}
+The ExPex glossing macros work differently from \pkg{gb4e}, \pkg{linguex}, and \pkg{covington}, and so certain things need to be done slightly differently. Here's an example using ExPex:
+
+\begin{quote}
+\begin{lstlisting}
+\pex
+\a\arrowgloss
+\begingl[aboveglbskip=\glarrowheight]
+\gla \ldots dat Jan \mkword[een]{een auto} gisteren \mkword{t} gekregen heeft.//
+\glb \ldots that John {a\hspace*{1em} car} yesterday t gotten has//
+\glft \ldots that John got a car yesterday.
+\mvarrow[circ=1]{t}{een}//
+\endgl
+\end{lstlisting}
+\end{quote}
+
+There are two important things to note here. First, in the gloss that contains the arrow you need to set |aboveglbskip=\glarrowheight| to leave enough room for the arrow. Secondly, the |\mvarrow| command itself should appear \emph{inside} the |\glft| line rather than outside of that line, i.e., it should appear before the |//| delimiter of the line.
+\subsection{Using with \pkg{covington}}
+When using the package with the \pkg{covington} glossing macros, you need to make sure that the |\mvarrow| command is \emph{inside} the last line of gloss set:
+
+\begin{quote}
+\begin{lstlisting}
+\begin{subexamples}
+ \item\arrowgloss\digloss
+ {\ldots dat Jan \mkword[een]{een auto} gisteren \mkword{t} gekregen heeft.}
+ {\ldots that John {a \hspace*{1em} car} yesterday t gotten has}
+ {\ldots that John a car yesterday.\mvarrow{t}{een}}
+\end{subexamples}
+\end{lstlisting}
+\end{quote}
+
+\section{Links without arrows}
+All of the |\mvarrow| commands have an alternative version |\mvlink| which simply links the words with no arrows.
\begin{quote}
\begin{lstlisting}
\begin{exe}
-\sn
+\arrowstrut
\ex \mkword{What} \mkword{has} \mkword[twh]{<what>} \mkword[thas]{<has>}
moved?
-\arrow[circ=1]{thas}{has}
-\arrow*[circ=2]{twh}{What}
+\mvlink[circ=1]{thas}{has}
+\mvlink*[circ=2]{twh}{What}
\end{exe}
\end{lstlisting}
\end{quote}
\begin{exe}
-\sn
+\arrowstrut
\ex \mkword{What} \mkword{has} \mkword[twh]{<what>} \mkword[thas]{<has>}
-moved? \arrow[circ=1]{thas}{has} \arrow*[circ=2]{twh}{What}
+moved?
+\mvlink[circ=1]{thas}{has}
+\mvlink*[circ=2]{twh}{What}
\end{exe}
\section{Version history}
-The first version of this package was written in 2017, but never released publicly. The use of the \pkg{tikz-extra} package |paths.ortho| allowed for the current code to be massively simplified. Bug reports and feature requests are welcome at the \href{https://github.com/amunn/movement-arrows/issues}{GitHub bug tracker}.
+The first version of this package was written in 2017, but never released publicly. The use of the \pkg{tikz-extra} package |paths.ortho| allowed for the current code to be massively simplified and allowed version 1.0 to be released in May 2023, a little too fast. Version 2.0 changed the basic command name from |\arrow| to |\mvarrow| to avoid conflicts with other packages that define an |\arrow| command, and added the |\arrowgloss| and |\arrowstrut| macros for better spacing options. Bug reports and feature requests are welcome at the \href{https://github.com/amunn/movement-arrows/issues}{GitHub bug tracker}.
\section{Acknowledgements}
Thanks to the TeX Stackexchange community, from whom I have learned many things, especially about TikZ. The earliest version of the package used code created by user Jake in response to \href{https://tex.stackexchange.com/q/55068/}{a question} I asked. This has now be superseded by the |paths.ortho| methods, but the style described there is quite useful in and of itself. I’ve also benefitted from discussions and suggestions with user percusse.
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
index b5851c014e..8d0ef77e24 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
index 70cef5314f..31cdc19f5e 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
@@ -5,8 +5,8 @@
% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
\documentclass[a4paper,french,11pt]{article}
-\def\PLversion{2.6.6}
-\def\PLdate{28 mai 2023}
+\def\PLversion{2.6.7}
+\def\PLdate{2 juin 2023}
\usepackage{amsfonts}
\usepackage{ProfLycee}
\useproflyclib{piton,minted,pythontex}
@@ -118,6 +118,36 @@
}
}
+\tcbset{StyleCodeTex/.style={%
+ listing engine=listings,%
+ listing options={%
+ breaklines=true,%
+ breakatwhitespace=true,%
+ style=tcblatex,basicstyle=\footnotesize\ttfamily,%
+ tabsize=4,%
+ commentstyle={\itshape\color{gray}},
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={useproflyclib,includegraphics},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={ProfLycee,CodePythonLst,CodePythonLstAlt,CodePiton,PitonConsole,CodePythontex,CodePythontexAlt,ConsolePythontex,CodePythonMinted,CodePythonMintedAlt,PseudoCode,PseudoCodeAlt,TerminalWin,TerminalUnix,TerminalOSX,EnvArbreProbasTikz,EnvSudoMaths},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\ResolutionApprochee,\SolutionTVI,\CalculTermeRecurrence,\ToileRecurrence,\SolutionSeuil,\IntegraleApprochee,\GrilleTikz,\AxesTikz,\AxexTikz,\AxeyTikz,\FenetreTikz,\FenetreSimpleTikz,\DeclareFonctionTikz,\CourbeTikz,\OrigineTikz,\SplineTikz,\TangenteTikz,\MiniSchemaSignes,\MiniSchemaSignesTkzTab,\IntegraleApprocheeTikz,\CartoucheCapytale,\PaveTikz,\TetraedreTikz,\CercleTrigo,\AffPoint,\AffVecteur,\TrouveEqCartPlan,\TrouveEqParamDroite,\TrouveEqCartDroite,\TrouveNorme,\TrouveDistancePtPlan,\EquationReduite,\CalculsRegLin,\PointsRegLin,\NuagePointsTikz,\PointMoyenTikz,\BoiteMoustaches,\BoiteMoustachesAxe,\Histogramme,\CalcBinomP,\CalcBinomC,\BinomP,\BinomC,\CalcPoissP,\CalcPoissC,\PoissonP,\PoissonC,\CalcGeomP,\CalcGeomC,\GeomP,\GeomC,\CalcHypergeomP,\CalcHypergeomP,\HypergeomP,\HypergeomC,\CalcNormC,\NormaleC,\CalcExpoC,\ExpoC,\ArbreProbasTikz,\LoiNormaleGraphe,\LoiExpoGraphe,\NbAlea,\VarNbAlea,\TirageAleatoireEntiers,\Arrangement,\Combinaison,\ConversionDecBin,\ConversionBinHex,\ConversionVersDec,\ConversionBaseDix,\ConversionDepuisBaseDix,\PresentationPGCD,\EquationDiophantienne,\ConversionFraction,\SimplificationRacine,\EcritureEnsemble,\EcritureTrinome,\MesurePrincipale,\LigneTrigo,\SudoMaths
+ },%
+ keywordstyle={\color{green!75!black}},%
+ classoffset=3,%
+ alsoletter={-},%
+ morekeywords={minimum-decimal-digits,scale,nonamssymb,build,Precision,Intervalle,Variable,NomFct,NomSol,va,vb,Stretch,Balayage,Calculatrice,Majuscule,No,UNo,NomSuite,Simple,Exact,Conclusion,Sens,ResultatBrut,Methode,NbSubDiv,AffFormule,Expr,Signe,Variables,Affp,Affs,Epaisseur,Police,ElargirOx,ElargirOy,Labelx,Labely,AffLabel,PosLabelx,PosLabely,EchelleFleche,TypeFleche,PosGrad,HautGrad,AffGrad,AffOrigine,Annee,Trigo,Dfrac,Style,Coeffs,AffPoints,TaillePoints,xl,xr,Code,Racines,Largeur,Hauteur,Cadre,Fct,Nom,PosLabel,DecalLabel,TailleLabel,AffTermes,RemplirbOpacite,CouleurRemplissage,Lignes,Gobble,Alignement,Filigrane,BarreTitre,CouleurNombres,Centre,EspacementVertical,Label,Titre,Profondeur,Angle,Fuite,Sommets,Math,Aff,Plein,Cube,Alpha,Beta,Rayon,Marge,TailleValeurs,TailleAngles,CouleurFond,Decal,MoinsPi,AffAngles,AffTraits,AffValeurs,Equationcos,Equationsin,sin,cos,AffTraitsEq,CouleurSol,OptionCoeffs,SimplifCoeffs,Facteur,OptionCoeffs,Reel,Oppose,Rgras,SimplifCoeffs,VectDirecteur,NomCoeffa,NomCoeffb,NomCoeffr,NomCoeffrd,NomXmin,NomXmax,Ox,Oy,xg,yg,AffNom,Elevation,Moyenne,AffMoyenne,Pointilles,Valeurs,Elargir,Min,Max,DebutOx,FinOx,ListeCouleurs,ElargirX,ElargirY,LabelX,LabelY,GradX,GradY,AffEffectifs,PosEffectifs,Opacite,AffBornes,GrilleV,PoliceAxes,PoliceEffectifs,EpaisseurTraits,Unite,EspaceNiveau,EspaceFeuille,Type,PoliceProbas,InclineProbas,Fleche,StyleTrait,EpaisseurTrait,CouleurAire,CouleurCourbe,AfficheM,AfficheCadre,ValMin,ValMax,NbVal,Sep,Tri,Repetition,Notation,NotationAncien,Formule,AffBase,Details,BaseDep,Zeros,DecalH,DecalV,Noeud,Rect,CouleurRes,DecalRect,Rectangle,CouleurResultat,AfficheConclusion,AfficheDelimiteurs,Lettre,Inconnues,Entier,Cadres,PresPGCD,Mathpunct,Option,Alea,Anegatif,Crochets,Brut,Etapes,Epaisseurg,CouleurCase,CouleurTexte,NbSubCol,NbLig,NbCol,Legendes,PoliceLeg,ListeLegV,ListeLegH,DecalLegende,Couleur,Uno},%
+ keywordstyle={\color{orange!75!black}}
+ }
+ }
+}
+
\NewTCBListing{PresCodeTexPL}{ O{CadetBlue} m }{%
enhanced,width=0.93\linewidth,flush right,boxrule=0.75pt,colframe=#1!85!Black,%
sharp corners,top=0mm,bottom=0mm,left=0.4em,right=5mm,%
@@ -128,8 +158,9 @@
title={{\scriptsize\faCode} Code \LaTeX},
lefttitle=0.4em,
fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=darkgray!50!#1,%
- listing engine=minted,minted style=colorful,minted language=tex,
- minted options={tabsize=4,fontsize=\footnotesize,autogobble,breaklines=true},
+ StyleCodeTex,
+ %listing engine=minted,minted style=colorful,minted language=tex,
+ %minted options={tabsize=4,fontsize=\footnotesize,autogobble,breaklines=true},
#2,%
overlay={\draw[#1!85!black] ($(frame.north west)+(-0.035\linewidth,-0.025\linewidth)$) node[scale=1.66] {\faCode} ;}
}
@@ -144,8 +175,9 @@
title={{\scriptsize\faCogs} Code \LaTeX{} et sortie \LaTeX},
lefttitle=0.4em,
fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=darkgray!50!#1,%
- listing engine=minted,minted style=colorful,minted language=tex,
- minted options={tabsize=4,fontsize=\footnotesize,autogobble,breaklines=true},
+ StyleCodeTex,
+ %listing engine=minted,minted style=colorful,minted language=tex,
+ %minted options={tabsize=4,fontsize=\footnotesize,autogobble,breaklines=true},
#2,%
overlay={%
\draw[#1!85!black] ($(frame.north west)+(-0.035\linewidth,-0.025\linewidth)$) node[scale=1.66] {\faCode} ;
@@ -164,8 +196,9 @@
title={{\scriptsize\faFilePdf} Sortie \LaTeX},
lefttitle=0.4em,
fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=darkgray!50!#1,%
- listing engine=minted,minted style=colorful,minted language=tex,
- minted options={tabsize=4,fontsize=\footnotesize,autogobble,breaklines=true},
+ StyleCodeTex,
+% listing engine=minted,minted style=colorful,minted language=tex,
+% minted options={tabsize=4,fontsize=\footnotesize,autogobble,breaklines=true},
#2,%
overlay={\draw[#1!85!black] ($(frame.north west)+(-0.035\linewidth,-0.025\linewidth)$) node[scale=1.66] {\faFilePdf} ;}
}
@@ -289,7 +322,7 @@
}
\date{Version \PLversion{} -- \PLdate}
-\newcommand\Cle[1]{{\bfseries\sffamily\textlangle #1\textrangle}}
+\newcommand\Cle[1]{{\bfseries\sffamily\textlangle \textcolor{orange!75!black}{#1}\textrangle}}
\newcommand\deblst{{\tiny\faCode}~}
\begin{document}
@@ -316,18 +349,17 @@
{\deblst} présenter du code \textsf{python} ou \textsf{pseudocode}, une console d'exécution \textsf{Python} \\
{\deblst} tracer rapidement un pavé, un tétraèdre \\
{\deblst} simplifier des calculs sous forme fractionnaire, simplifier des racines \\
-{\deblst} effectuer des calculs avec des suites récurrentes \\
-{\deblst} créer la \textit{toile} pour une suite récurrente \\
+{\deblst} effectuer des calculs avec des suites récurrentes, créer la \textit{toile} pour une suite récurrente \\
{\deblst} afficher et utiliser un cercle trigo \\
{\deblst} afficher un petit schéma pour le signe d'une fonction affine ou d'un trinôme \\
{\deblst} travailler sur les statistiques à deux variables (algébriques et graphiques) \\
+{\deblst} tracer un histogramme, avec classes régulières ou non \\
{\deblst} convertir entre bin/dec/hex avec détails \\
{\deblst} présenter un calcul de PGCD \\
{\deblst} effectuer des calculs de probas (lois binomiale, exponentielle, de Poisson, normale) \\
{\deblst} créer des arbres de probas \og classiques \fg \\
-{\deblst} générer des listes d'entiers aléatoires (avec ou sans répétitions)\\
-{\deblst} déterminer la mesure principale d'un angle \\
-{\deblst} calculer les lignes trigonométriques d'angles \og classiques \fg{} \\
+{\deblst} générer des listes d'entiers aléatoires (avec ou sans répétitions) \\
+{\deblst} déterminer la mesure principale d'un angle, calculer les lignes trigonométriques d'angles \og classiques \fg{} \\
{\deblst} résoudre une équation diophantienne \og classique \fg{} \\
{\deblst} travailler avec un peu de géométrie analytique \\
{\deblst} \ldots}
@@ -340,6 +372,8 @@
\hfill{}\textsl{Merci aux membres du groupe \faFacebook{} du \og Coin \LaTeX{} \fg{} pour leur aide et leurs idées !}
+~
+
\vfill
\hrule
@@ -502,7 +536,7 @@ Pour cela, on pourra appeler \ctex{ProfLycee} avec l'option \Cle{nonamssymb} (id
\begin{PresCodeTexPL}{listing only}
\documentclass{article}
-\usepackage[noamssymb]{ProfLycee}
+\usepackage[nonamssymb]{ProfLycee}
\usepackage{fourier-otf}
\end{PresCodeTexPL}
@@ -712,6 +746,11 @@ Elles sont présentées de manière \textit{succincte}, mais elles sont présent
\TrouveDistancePtPlan(point)(vec normal du plan)(point du plan)
%Avec le point et le plan via vect normal + point
\TrouveDistancePtPlan(point)(équation cartésienne)
+
+%Avec le vecteur
+\TrouveNorme(vecteur)
+%Avec deux points
+\TrouveNorme(point 1)(point 2)
\end{PresCodeTexPL}
\begin{PresCodeTexPL}{listing only}
@@ -737,6 +776,9 @@ Elles sont présentées de manière \textit{succincte}, mais elles sont présent
%boîte à moustaches, dans un environnement tikz
\BoiteMoustaches[options]
\BoiteMoustachesAxe[options]
+
+%histogrammes
+\Histogramme(*)[options]{données}
\end{PresCodeTexPL}
\begin{PresCodeTexPL}{listing only}
@@ -886,7 +928,7 @@ $x_0 \approx \num[minimum-decimal-digits=2]{\masolutiona}$ arrondi à $10^{-2}$.
Quelques explications sur les \Cle{clés} et sur les arguments :
\begin{itemize}
- \item la clé \Cle{Précision} pour le nombre de chiffres après la virgule de la solution ; \hfill{}défaut \Cle{2}
+ \item la clé \Cle{Precision} pour le nombre de chiffres après la virgule de la solution ; \hfill{}défaut \Cle{2}
\item la clé (obligatoire !) \Cle{Intervalle} qui permet de préciser l'intervalle initial de recherche ;
\item la clé \Cle{Variable} qui permet de spécifier la variable de l'équation ;\hfill{}défaut \Cle{x}
\item l'argument \textit{obligatoire} est l'équation, sous la forme $f(\ldots)=k$ (ou $f(\ldots)$ pour $f(\ldots)=0$) ;
@@ -1461,7 +1503,7 @@ Ces commande permet de tracer les graduations des axes, avec des \Cle{clés} ide
\item \Cle{Epaisseur} qui est l'épaisseur des graduations ; \hfill~défaut \Cle{1pt}
\item \Cle{Police} qui est le style des labels des graduations ; \hfill~défaut \Cle{\textbackslash{}normalsize\textbackslash{}normalfont}
\item \Cle{PosGrad} qui est la position des graduations par rapport à l'axe ; \hfill~défaut \Cle{below} et \Cle{left}
- \item \Cle{HautGrad} qui est la position des graduations (sous la forme \Cle{lgt} ou \Cle{lgta/lgtb}) ;
+ \item \Cle{HautGrad} qui est la hauteur des graduations (sous la forme \Cle{lgt} ou \Cle{lgta/lgtb}) ;
\hfill~défaut \Cle{4pt}
\item le booléen \Cle{AffGrad} pour afficher les valeurs (formatés avec \ctex{num} donc dépendant de \ctex{sisetup}) des graduations ; \hfill~défaut \Cle{true}
@@ -3232,7 +3274,7 @@ Peu d'options pour ces commandes :
\begin{itemize}
\item le premier, \textit{optionnel}, est la \Cle{largeur} de la \ctex{tcbox} ;\hfill{}défaut \Cle{\textbackslash linewidth}
- \item le deuxième, \textit{obligatoire}, permet de spécifier le titre par la clé \Cle{titre}.\hfill{}défaut \Cle{Terminal Windows/UNiX/OSX}
+ \item le deuxième, \textit{obligatoire}, permet de spécifier le titre par la clé \Cle{Titre}.\hfill{}défaut \Cle{Terminal Windows/UNiX/OSX}
\item le troisième, \textit{optionnel}, concerne les \Cle{options} de la \ctex{tcbox} en \textit{langage tcolorbox}.\hfill{}défaut \Cle{vide}
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
@@ -5208,7 +5250,9 @@ Quelques \Cle{clés} sont disponibles pour cette commande :
\begin{itemize}
\item la clé \Cle{Couleur} qui est la couleur de la boîte ; \hfill~défaut \Cle{black}
- \item la clé \Cle{Elevation} qui est la position verticale (ordonnée des moustaches) de la boîte ; \hfill~défaut \Cle{1.5}
+ \item la clé \Cle{Elevation} qui est la position verticale (ordonnée des moustaches) de la boîte ;
+
+ \hfill~défaut \Cle{1.5}
\item la clé \Cle{Hauteur} qui est la hauteur de la boîte ; \hfill~défaut \Cle{1}
\item la clé \Cle{Moyenne} qui est la moyenne (optionnelle) de la série ;
\item la clé \Cle{Epaisseur} qui est l'épaisseur des traits de la boîte ; \hfill~défaut \Cle{thick}
@@ -5308,6 +5352,150 @@ Sachant que la hauteur par défaut est de 1, il est -- a priori -- intéressant
\newpage
+\section{Histogrammes}\label{histo}
+
+\subsection{Introduction}
+
+\begin{tipblock}
+\cmaj{2.6.7} L'idée est de proposer une commande pour tracer un histogramme à classes régulières ou non.
+
+\smallskip
+
+La commande, qui utilise \TikZ, est autonome (ceci étant dû à la gestion en interne des unités !), et ne permet pas de rajout une fois le graphique affiché.
+\end{tipblock}
+
+\begin{noteblock}
+La commande fonctionne avec des données classe/effectif, qui seront à traduire sous la forme \ctex{BorneInf/BorneSup/Effectif}.
+\end{noteblock}
+
+\begin{PresCodeTexPL}{listing only}
+\Histogramme(*)[options]{données}
+\end{PresCodeTexPL}
+
+\begin{PresCodePL}{}
+%classes régulières
+\Histogramme{7/9/130 9/11/175 11/13/182 13/15/95}
+\end{PresCodePL}
+
+\begin{PresCodePL}{}
+%classes non régulières
+\Histogramme*{0/20/15 20/50/34 50/60/8 60/85/10 90/100/13}
+\end{PresCodePL}
+
+\begin{cautionblock}
+Contrairement aux autres commandes graphiques, qui sont souvent à intégrer dans un environnement \TikZ, la commande \ctex{\textbackslash Histogramme} aura besoin de connaître les dimensions finales du graphique pour fonctionner !
+\end{cautionblock}
+
+\subsection{Clés et options}
+
+\begin{cautionblock}
+La version \textit{étoilée} permet de préciser que les classes ne sont pas d'amplitudes régulières.
+
+\medskip
+
+Le premier argument, optionnel et entre \ctex{[...]} propose les \Cle{clés} principales suivantes :
+
+\begin{itemize}
+ \item \Cle{DebutOx} : permet de préciser le début de l'axe horizontal (sinon c'est par défaut la borne inférieure de la première classe) ;
+
+ \hfill{}défaut : \Cle{vide}
+ \item \Cle{FinOx} : permet de préciser la fin de l'axe horizontal (sinon c'est par défaut la borne supérieure de la dernière classe) ;
+
+ \hfill{}défaut : \Cle{vide}
+ \item \Cle{Largeur} : largeur en cm du graphique créé (entre \Cle{DebutOx} et \Cle{FinOx}) ; \hfill{}défaut : \Cle{10}
+ \item \Cle{Hauteur} : hauteur en cm du graphique créé (par rapport à l'effectif maximal) ; \hfill{}défaut : \Cle{5}
+ \item \Cle{ListeCouleurs} : liste des couleurs des rectangles (unique ou sous la forme \ctex{\{CoulA,CoulB,...\}}) ;
+
+ \hfill{}défaut : \Cle{orange}
+ \item \Cle{ElargirX} et \Cle{ElargirY} : pour rajouter une petite longueur au bout des axes ; \hfill{}défaut : \Cle{5mm}
+ \item \Cle{LabelX} et \Cle{LabelY} : pour les labels des axes ; \hfill{}défaut : \Cle{vide}
+ \item \Cle{GradX} et \Cle{GradY} : pour les graduations et valeurs des axes (langage \ctex{tikz}) ; \hfill{}défaut : \Cle{vide}
+ \item \Cle{AffEffectifs} : booléen pour afficher les effectifs ; \hfill{}défaut : \Cle{true}
+ \item \Cle{PosEffectifs} : choix de la position des effectifs parmi \Cle{bas,milieu,haut,dessus} ;
+
+ \hfill{}défaut : \Cle{milieu}
+ \item \Cle{Remplir} : booléen pour remplir les rectangles ; \hfill{}défaut : \Cle{true}
+ \item \Cle{Opacite} : choix de l'opacité du remplissage ; \hfill{}défaut : \Cle{0.5}
+ \item \Cle{AffBornes} : booléen pour afficher les bornes des classes ; \hfill{}défaut : \Cle{false}
+ \item \Cle{GrilleV} : booléen pour afficher une grille verticale (pour les classes régulières, à la manière d'un tableur) ;
+
+ \hfill{}défaut : \Cle{true}
+ \item \Cle{PoliceAxes} : police pour les axes ; \hfill{}défaut : \Cle{\textbackslash normalsize\textbackslash normalfont}
+ \item \Cle{PoliceEffectifs} : police pour les effectifs ; \hfill{}défaut : \Cle{\textbackslash normalsize\textbackslash normalfont}
+ \item \Cle{EpaisseurTraits} : épaisseur des traits (langage \ctex{tikz}). \hfill{}défaut : \Cle{semithick}
+\end{itemize}
+
+Le second argument, obligatoire et entre \ctex{\{...\}} permet de préciser les données utilisées sous la forme \ctex{BorneInf/BorneSup/Effectif BorneInf/BorneSup/Effectif ...}.
+\end{cautionblock}
+
+\subsection{Exemple avec des classes régulières}
+
+\begin{tipblock}
+Avec la série suivante :
+
+\medskip
+
+\hfill
+\begin{tblr}{hlines,vlines,width=10cm,colspec={Q[l,m]*{4}{X[m,c]}}}
+ Classes & $[7\mathpunct{};9[$ & $[9\mathpunct{};11[$ & $[11\mathpunct{};13[$ & $[13\mathpunct{};15]$ \\
+ Effectifs & 130 & 175 & 182 & 95 \\
+\end{tblr}
+\hfill~
+\end{tipblock}
+
+\begin{PresCodePL}{}
+\Histogramme[%
+ ListeCouleurs={white},Opacite=1,%
+ GradX={7,8,...,15},LabelX={données},%
+ GradY={0,25,...,175},LabelY={effectifs},%
+ PoliceEffectifs=\small\sffamily,PosEffectifs=dessus]%
+ {7/9/130 9/11/175 11/13/182 13/15/95}
+\end{PresCodePL}
+
+\begin{PresCodePL}{}
+\Histogramme[%
+ Largeur=11,Hauteur=8,%
+ ListeCouleurs={yellow,blue,pink,red},%
+ DebutOx=5,FinOx=17,%
+ GradX={5,6,...,17},%
+ GradY={0,25,...,175},%
+ AffEffectifs=false]%
+ {7/9/130 9/11/175 11/13/182 13/15/95}
+\end{PresCodePL}
+
+\subsection{Exemple avec des classes non régulières}
+
+\begin{tipblock}
+Avec la série suivante :
+
+\medskip
+
+\hfill
+\begin{tblr}{hlines,vlines,width=14cm,colspec={Q[l,m]*{6}{X[m,c]}}}
+ Classes & $[0\mathpunct{};20[$ & $[20\mathpunct{};50[$ & $[50\mathpunct{};60[$ & $[60\mathpunct{};85[$ & $[85\mathpunct{};100]$ \\
+ Effectifs & 15 & 34 & 8 & 10 & 13 \\
+\end{tblr}
+\hfill~
+\end{tipblock}
+
+\begin{PresCodePL}{}
+\Histogramme*[%
+ ListeCouleurs={yellow,red,blue,green,purple},%
+ PosEffectifs=dessus,AffBornes]
+ {0/20/15 20/50/34 50/60/8 60/85/10 85/100/13}
+\end{PresCodePL}
+
+\begin{PresCodePL}{}
+\Histogramme*[%
+ Largeur=14,Hauteur=7,FinOx=110,%
+ ListeCouleurs={yellow,red,blue,green,purple},Opacite=0.25,%
+ GradX={0,10,...,110},%
+ PosEffectif=heut]
+ {0/20/15 20/50/34 50/60/8 60/85/10 85/100/13}
+\end{PresCodePL}
+
+\newpage
+
\phantom{t}\par\vfill\par
\begin{PART}
\begin{center}
@@ -6272,7 +6460,7 @@ Par divisions euclidiennes successives, \ConversionDepuisBaseDix[Rect=false]{54}
%conversion avec gestion du decalh pour le placement précis du rectangle
\ConversionDepuisBaseDix[Couleur=Goldenrod,DecalH=6pt/2pt]{1012}{16}
-%conversion avec nœud personnalisé et réutilisation
+%conversion avec noeud personnalisé et réutilisation
\ConversionDepuisBaseDix[Couleur=ForestGreen,CouleurRes,Noeud=TEST]{100}{9}.
\begin{tikzpicture}
\draw[overlay,ForestGreen,thick,->] (TEST2.south east) to[bend right] ++ (3cm,-1cm) node[right] {test } ;
@@ -7145,9 +7333,11 @@ La grille, créée en \TikZ, est portée par le rectangle de \og coins \fg{} $(0
\part{Historique}
+{\small \bverb|v 2.6.7|~:~~~~Histogramme à classes régulières ou non (page \pageref{histo}) + Correction de bugs mineurs
+
{\small \bverb|v 2.6.6|~:~~~~Style \textsf{mainlevee} en \TikZ{} désormais dans le package \textsf{tikz2d-fr}
-{\small \bverb|v 2.6.5|~:~~~~Ajout d'une option \Cle{noamssymb} pour éviter de charger \textsf{amssymb} (page \pageref{amssymb})
+{\small \bverb|v 2.6.5|~:~~~~Ajout d'une option \Cle{nonamssymb} pour éviter de charger \textsf{amssymb} (page \pageref{amssymb})
{\small \bverb| |~:~~~~Ajout d'une commande pour la distance entre deux points (page \pageref{normevect})}
diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
index 959754bc90..3e3d3cd558 100644
--- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty
+++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
@@ -3,7 +3,8 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2023/05/28 2.6.6 Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2023/06/02 2.6.7 Aide pour l'utilisation de LaTeX en lycee]
+% 2.6.7 Correction de bugs mineurs + Histogramme (classes régulières ou non)
% 2.6.6 Externalisation du style Tikz mainlevee (dans tikz2d-fr)
% 2.6.5 Ajout d'une option[noamssymb] pour éviter les clashs avec fourier (merci PfC) + Corections de bugs
% 2.6.4 Correction d'un dysfonctionnement avec les racines (oubli du \num) + Equation diophantienne ax+by=c + Eq cartésiennes (plan & droite) + Corrections de bugs mineurs
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-graphiques.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-graphiques.tex
index 0ddb801129..fbcc1910e1 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-graphiques.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-graphiques.tex
@@ -331,13 +331,13 @@
\def\axesenlargyD{\fpeval{\axeselargyD*(\ymax-\ymin)}}
%on affiche les deux axes
\draw[line width=\axeswidth,-{\axestypefleche[scale=\axesechellefleche]}] ({\xmin-\axexOx-\axesenlargxG},0) -- ({\xmax-\axexOx+\axesenlargxD},0) ;
- \draw[line width=\axeswidth,-{\axestypefleche[scale=\axesechellefleche]}] (0,{\ymin-\axeyOy-\axesenlargyG}) -- (0,{\ymax-\axeyOy++\axesenlargyD}) ;
+ \draw[line width=\axeswidth,-{\axestypefleche[scale=\axesechellefleche]}] (0,{\ymin-\axeyOy-\axesenlargyG}) -- (0,{\ymax-\axeyOy+\axesenlargyD}) ;
%les labels éventuels
\IfSubStr{\axesafflabel}{x}%
- {\draw ({\xmax-\axexOx},0) node[\axesposlabelx,font=\axesfont] {\axeslabelx} ;}
+ {\draw ({\xmax-\axexOx+\axesenlargxD},0) node[\axesposlabelx,font=\axesfont] {\axeslabelx} ;}
{}
\IfSubStr{\axesafflabel}{y}%
- {\draw (0,{\ymax-\axeyOy}) node[\axesposlabely,font=\axesfont] {\axeslabely} ;}
+ {\draw (0,{\ymax-\axeyOy+\axesenlargyD}) node[\axesposlabely,font=\axesfont] {\axeslabely} ;}
{}
}
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-stats.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-stats.tex
index cc57e1fbf9..519783285a 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-stats.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-stats.tex
@@ -8,6 +8,8 @@
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
+%2.6.7 Histogrammes
+
%%------RegressionLinéaire
%calcul des paramètres
\defKV[coeffreglin]{%
@@ -195,4 +197,256 @@
{}
}
+%%------HISTOGRAMME
+\defKV[histostats]{%
+ ListeCouleurs=\def\HistoCouleurs{#1},%
+ Largeur=\def\HistoLargeur{#1},%
+ Hauteur=\def\HistoHauteur{#1},%
+ GradX=\def\HistoGradX{#1},%
+ GradY=\def\HistoGradY{#1},%
+ PosEffectifs=\def\HistoPosEff{#1},%
+ LabelX=\def\HistoLabelx{#1},%
+ LabelY=\def\HistoLabely{#1},%
+ ElargirX=\def\HistoElargirx{#1},%
+ ElargirY=\def\HistoElargiry{#1},%
+ PoliceAxes=\def\HistoFonte{#1},%
+ PoliceEffectifs=\def\HistoFonteEff{#1},%
+ Opacite=\def\HistoOpac{#1},%
+ DebutOx=\def\HistoDebX{#1},%
+ FinOx=\def\HistoFinX{#1},%
+ EpaisseurTraits=\def\HistoEptraits{#1}
+}
+
+\setKVdefault[histostats]{%
+ ListeCouleurs=orange,%
+ Largeur=10,%
+ Hauteur=5,%
+ GradX={},%
+ GradY={},%
+ AffEffectifs=true,%
+ PosEffectifs=milieu,%
+ ElargirX=5mm,%
+ ElargirY=5mm,%
+ LabelX={},%
+ LabelY={},%
+ PoliceAxes=\normalsize\normalfont,%
+ PoliceEffectifs=\normalsize\normalfont,%
+ AffBornes=false,%
+ Remplir=true,%
+ Opacite=0.5,%
+ GrilleV=true,%
+ DebutOx={},%
+ FinOx={},%
+ EpaisseurTraits=semithick
+}
+
+\NewDocumentCommand\Histogramme{ s O{} m }{%
+ \useKVdefault[histostats]%
+ \setKV[histostats]{#2}%
+ \setsepchar[.]{ ./}%
+ \readlist*\LISTDONNEES{#3}%
+ \IfEq{\HistoDebX}{}%on stocke le début de l'axe Ox si besoin
+ {\itemtomacro\LISTDONNEES[1,1]{\HistoDebX}}{}%
+ \IfEq{\HistoFinX}{}%on stocke la fin de l'axe Ox si besoin
+ {\itemtomacro\LISTDONNEES[-1,2]{\HistoFinX}}{}%
+ \setsepchar{,}%
+ \readlist*\LISTCOUL{\HistoCouleurs}%
+ %distinction suivant largeur classes
+ \IfBooleanTF{#1}%étoilé := classe d'amplitudes différentes
+ {%
+
+ \xdef\ListeHauteurs{\fpeval{(\LISTDONNEES[1,3])/(\LISTDONNEES[1,2]-\LISTDONNEES[1,1])}}
+ \foreach \i in {2,...,\LISTDONNEESlen}
+ {%
+ \xdef\ListeHauteurs{\ListeHauteurs,\fpeval{(\LISTDONNEES[\i,3])/(\LISTDONNEES[\i,2]-\LISTDONNEES[\i,1])}}%
+ }%
+ \xdef\maxhauteurs{\xinteval{round(max(\ListeHauteurs),3)}}%
+ \xdef\HistoUniteY{\xinteval{round(\HistoHauteur/max(\ListeHauteurs),3)}}%
+ \xdef\HistoUniteX{\xinteval{round(\HistoLargeur/(\HistoFinX-\HistoDebX),3)}}%
+ %fenêtre graphique
+ \begin{tikzpicture}[x=\HistoUniteX cm,y=\HistoUniteY cm]
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ {%
+ \xintifboolexpr{\LISTCOULlen == 1}%
+ {\def\couleurhisto{\HistoCouleurs}}%
+ {\itemtomacro\LISTCOUL[\i]{\couleurhisto}}%
+ \ifboolKV[histostats]{AffBornes}%
+ {%
+ \draw[\HistoEptraits] ({\LISTDONNEES[\i,1]},3pt)--++(0,-6pt) node[below,font=\HistoFonte] {\LISTDONNEES[\i,1]} ;
+ \draw[\HistoEptraits] ({\LISTDONNEES[\i,2]},3pt)--++(0,-6pt) node[below,font=\HistoFonte] {\LISTDONNEES[\i,2]} ;
+ }%
+ {}%
+ \ifboolKV[histostats]{Remplir}%
+ {%
+ \draw[\HistoEptraits,fill=\couleurhisto,fill opacity=\HistoOpac] ({\LISTDONNEES[\i,1]},0) rectangle ({\LISTDONNEES[\i,2]},{(\LISTDONNEES[\i,3])/(\LISTDONNEES[\i,2]-\LISTDONNEES[\i,1])}) ;
+ }%
+ {%
+ \draw[\HistoEptraits] ({\LISTDONNEES[\i,1]},0) rectangle ({\LISTDONNEES[\i,2]},{(\LISTDONNEES[\i,3])/(\LISTDONNEES[\i,2]-\LISTDONNEES[\i,1])}) ;
+ }%
+ }%
+ \foreach \x in \HistoGradX
+ {%
+ \draw[\HistoEptraits] (\x,3pt)--++(0,-6pt) node[below,font=\HistoFonte] {\num{\x}} ;
+ }%
+ \ifboolKV[histostats]{AffEffectifs}
+ {%
+ \IfStrEq{\HistoPosEff}{milieu}%
+ {%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ \draw ({0.5*\LISTDONNEES[\i,1]+0.5*\LISTDONNEES[\i,2]},{0.5*(\LISTDONNEES[\i,3])/(\LISTDONNEES[\i,2]-\LISTDONNEES[\i,1])}) node[font=\HistoFonteEff] {\num{\LISTDONNEES[\i,3]}} ;
+ }%
+ {}%
+ \IfStrEq{\HistoPosEff}{bas}%
+ {%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ \draw ({0.5*\LISTDONNEES[\i,1]+0.5*\LISTDONNEES[\i,2]},{0}) node[above,font=\HistoFonteEff] {\num{\LISTDONNEES[\i,3]}} ;
+ }%
+ {}%
+ \IfStrEq{\HistoPosEff}{haut}%
+ {%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ \draw ({0.5*\LISTDONNEES[\i,1]+0.5*\LISTDONNEES[\i,2]},{(\LISTDONNEES[\i,3])/(\LISTDONNEES[\i,2]-\LISTDONNEES[\i,1])}) node[below,font=\HistoFonteEff] {\num{\LISTDONNEES[\i,3]}} ;
+ }%
+ {}%
+ \IfStrEq{\HistoPosEff}{dessus}%
+ {%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ \draw ({0.5*\LISTDONNEES[\i,1]+0.5*\LISTDONNEES[\i,2]},{(\LISTDONNEES[\i,3])/(\LISTDONNEES[\i,2]-\LISTDONNEES[\i,1])}) node[above,font=\HistoFonteEff] {\num{\LISTDONNEES[\i,3]}} ;
+ }%
+ {}%
+ }%
+ {}%
+ \draw[\HistoEptraits,->,>=latex] ({\HistoDebX},0) -- ({\HistoFinX},0) --++ ({\HistoElargirx},0) node[right,font=\HistoFonte] {\HistoLabelx} ;
+ \end{tikzpicture}%
+ }%
+ {%
+ \xdef\ListeHauteurs{\LISTDONNEES[1,3]}
+ \foreach \i in {2,...,\LISTDONNEESlen}
+ {%
+ \xdef\ListeHauteurs{\ListeHauteurs,\LISTDONNEES[\i,3]}%
+ }%
+ \xdef\maxhauteurs{\xinteval{round(max(\ListeHauteurs),3)}}%
+ \xdef\HistoUniteY{\xinteval{round(\HistoHauteur/max(\ListeHauteurs),3)}}%
+ \xdef\HistoUniteX{\xinteval{round(\HistoLargeur/(\HistoFinX-\HistoDebX),3)}}%
+ %fenêtre graphique
+ \begin{tikzpicture}[x=\HistoUniteX cm,y=\HistoUniteY cm]
+ \ifboolKV[histostats]{GrilleV}%
+ {%
+ \foreach \y in \HistoGradY
+ {%
+ \draw[line width=0.4pt,lightgray] ({\HistoDebX},\y) -- ({\HistoFinX},\y) --++ ({\HistoElargirx},0) ;
+ }%
+ }%
+ {}%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ {%
+ \xintifboolexpr{\LISTCOULlen == 1}%
+ {\def\couleurhisto{\HistoCouleurs}}%
+ {\itemtomacro\LISTCOUL[\i]{\couleurhisto}}%
+ \ifboolKV[histostats]{AffBornes}%
+ {%
+ \draw[\HistoEptraits] ({\LISTDONNEES[\i,1]},3pt)--++(0,-6pt) node[below,font=\HistoFonte] {\LISTDONNEES[\i,1]} ;
+ \draw[\HistoEptraits] ({\LISTDONNEES[\i,2]},3pt)--++(0,-6pt) node[below,font=\HistoFonte] {\LISTDONNEES[\i,2]} ;
+ }%
+ {}%
+ \ifboolKV[histostats]{Remplir}%
+ {%
+ \draw[\HistoEptraits,fill=\couleurhisto,fill opacity=\HistoOpac] ({\LISTDONNEES[\i,1]},0) rectangle ({\LISTDONNEES[\i,2]},{\LISTDONNEES[\i,3]}) ;
+ }%
+ {%
+ \draw[\HistoEptraits] ({\LISTDONNEES[\i,1]},0) rectangle ({\LISTDONNEES[\i,2]},{\LISTDONNEES[\i,3]}) ;
+ }%
+ }%
+ \foreach \x in \HistoGradX
+ {%
+ \draw[\HistoEptraits] (\x,3pt)--++(0,-6pt) node[below,font=\HistoFonte] {\num{\x}} ;
+ }%
+ \foreach \y in \HistoGradY
+ {%
+ \draw[\HistoEptraits] ($({\HistoDebX},\y)+(3pt,0)$) --++ (-6pt,0) node[left,font=\HistoFonte] {\num{\y}} ;
+ }%
+ \ifboolKV[histostats]{AffEffectifs}
+ {%
+ \IfStrEq{\HistoPosEff}{milieu}%
+ {%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ \draw ({0.5*\LISTDONNEES[\i,1]+0.5*\LISTDONNEES[\i,2]},{0.5*\LISTDONNEES[\i,3]}) node[font=\HistoFonteEff] {\num{\LISTDONNEES[\i,3]}} ;
+ }%
+ {}%
+ \IfStrEq{\HistoPosEff}{bas}%
+ {%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ \draw ({0.5*\LISTDONNEES[\i,1]+0.5*\LISTDONNEES[\i,2]},{0}) node[above,font=\HistoFonteEff] {\num{\LISTDONNEES[\i,3]}} ;
+ }%
+ {}%
+ \IfStrEq{\HistoPosEff}{haut}%
+ {%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ \draw ({0.5*\LISTDONNEES[\i,1]+0.5*\LISTDONNEES[\i,2]},{\LISTDONNEES[\i,3]}) node[below,font=\HistoFonteEff] {\num{\LISTDONNEES[\i,3]}} ;
+ }%
+ {}%
+ \IfStrEq{\HistoPosEff}{dessus}%
+ {%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ \draw ({0.5*\LISTDONNEES[\i,1]+0.5*\LISTDONNEES[\i,2]},{\LISTDONNEES[\i,3]}) node[above,font=\HistoFonteEff] {\num{\LISTDONNEES[\i,3]}} ;
+ }%
+ {}%
+ }%
+ {}%
+ \draw[\HistoEptraits,->,>=latex] ({\HistoDebX},0) -- ({\HistoFinX},0) --++ ({\HistoElargirx},0) node[right,font=\HistoFonte] {\HistoLabelx} ;
+ \draw[\HistoEptraits,->,>=latex] ({\HistoDebX},0) -- ({\HistoDebX},{\maxhauteurs}) --++ (0,{\HistoElargiry}) node[above,font=\HistoFonte] {\HistoLabely} ;
+ \end{tikzpicture}%
+ }%
+}
+
+\NewDocumentCommand\HistogrammeTikz{ O{} m }{%
+ \useKVdefault[histostats]%
+ \setKV[histostats]{#1}%
+ \setsepchar[.]{ ./}%
+ \readlist*\LISTDONNEES{#2}%
+ \setsepchar{,}%
+ \readlist*\LISTCOUL{\HistoCouleurs}%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ {%
+ \xintifboolexpr{\LISTCOULlen == 1}%
+ {\def\couleurhisto{\HistoCouleurs}}%
+ {\itemtomacro\LISTCOUL[\i]{\couleurhisto}}%
+ \ifboolKV[histostats]{Remplir}%
+ {%
+ \draw[line width=1pt,fill=\couleurhisto,fill opacity=\HistoOpac] ({\LISTDONNEES[\i,1]-\axexOx},0) rectangle ({\LISTDONNEES[\i,2]-\axexOx},{\LISTDONNEES[\i,3]}) ;
+ }%
+ {%
+ \draw[line width=1pt] ({\LISTDONNEES[\i,1]-\axexOx},0) rectangle ({\LISTDONNEES[\i,2]-\axexOx},{\LISTDONNEES[\i,3]}) ;
+ }%
+ }%
+ \ifboolKV[histostats]{AffEffectifs}
+ {%
+ \IfStrEq{\HistoPosEff}{milieu}%
+ {%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ \draw ({0.5*\LISTDONNEES[\i,1]+0.5*\LISTDONNEES[\i,2]-\axexOx},{0.5*\LISTDONNEES[\i,3]}) node[font=\HistoFonteEff] {\num{\LISTDONNEES[\i,3]}} ;
+ }%
+ {}%
+ \IfStrEq{\HistoPosEff}{bas}%
+ {%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ \draw ({0.5*\LISTDONNEES[\i,1]+0.5*\LISTDONNEES[\i,2]-\axexOx},{0}) node[above,font=\HistoFonteEff] {\num{\LISTDONNEES[\i,3]}} ;
+ }%
+ {}%
+ \IfStrEq{\HistoPosEff}{haut}%
+ {%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ \draw ({0.5*\LISTDONNEES[\i,1]+0.5*\LISTDONNEES[\i,2]-\axexOx},{\LISTDONNEES[\i,3]}) node[below,font=\HistoFonteEff] {\num{\LISTDONNEES[\i,3]}} ;
+ }%
+ {}%
+ \IfStrEq{\HistoPosEff}{dessus}%
+ {%
+ \foreach \i in {1,...,\LISTDONNEESlen}
+ \draw ({0.5*\LISTDONNEES[\i,1]+0.5*\LISTDONNEES[\i,2]-\axexOx},{\LISTDONNEES[\i,3]}) node[above,font=\HistoFonteEff] {\num{\LISTDONNEES[\i,3]}} ;
+ }%
+ {}%
+ }%
+ {}%
+}
+
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/revtex/doc/aip/aipguide4-2.pdf b/macros/latex/contrib/revtex/aip/aipguide4-2.pdf
index 6c2d31960f..6c2d31960f 100644
--- a/macros/latex/contrib/revtex/doc/aip/aipguide4-2.pdf
+++ b/macros/latex/contrib/revtex/aip/aipguide4-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/aip/aipguide4-2.tex b/macros/latex/contrib/revtex/aip/aipguide4-2.tex
index 039bfe0372..039bfe0372 100644
--- a/macros/latex/contrib/revtex/doc/aip/aipguide4-2.tex
+++ b/macros/latex/contrib/revtex/aip/aipguide4-2.tex
diff --git a/macros/latex/contrib/revtex/source/aip4-2.dtx b/macros/latex/contrib/revtex/aip4-2.dtx
index af7c9d8a67..af7c9d8a67 100644
--- a/macros/latex/contrib/revtex/source/aip4-2.dtx
+++ b/macros/latex/contrib/revtex/aip4-2.dtx
diff --git a/macros/latex/contrib/revtex/aip4-2.pdf b/macros/latex/contrib/revtex/aip4-2.pdf
new file mode 100644
index 0000000000..349d339f95
--- /dev/null
+++ b/macros/latex/contrib/revtex/aip4-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/aps/apsguide4-2.pdf b/macros/latex/contrib/revtex/aps/apsguide4-2.pdf
index 02819f0cec..02819f0cec 100644
--- a/macros/latex/contrib/revtex/doc/aps/apsguide4-2.pdf
+++ b/macros/latex/contrib/revtex/aps/apsguide4-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/aps/apsguide4-2.tex b/macros/latex/contrib/revtex/aps/apsguide4-2.tex
index f50d9a832e..f50d9a832e 100644
--- a/macros/latex/contrib/revtex/doc/aps/apsguide4-2.tex
+++ b/macros/latex/contrib/revtex/aps/apsguide4-2.tex
diff --git a/macros/latex/contrib/revtex/doc/auguide/auguide4-2.pdf b/macros/latex/contrib/revtex/auguide/auguide4-2.pdf
index aae56da335..aae56da335 100644
--- a/macros/latex/contrib/revtex/doc/auguide/auguide4-2.pdf
+++ b/macros/latex/contrib/revtex/auguide/auguide4-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/auguide/auguide4-2.tex b/macros/latex/contrib/revtex/auguide/auguide4-2.tex
index deeaf3aeb6..deeaf3aeb6 100644
--- a/macros/latex/contrib/revtex/doc/auguide/auguide4-2.tex
+++ b/macros/latex/contrib/revtex/auguide/auguide4-2.tex
diff --git a/macros/latex/contrib/revtex/doc/auguide/docs.sty b/macros/latex/contrib/revtex/auguide/docs.sty
index f401506cb6..f401506cb6 100644
--- a/macros/latex/contrib/revtex/doc/auguide/docs.sty
+++ b/macros/latex/contrib/revtex/auguide/docs.sty
diff --git a/macros/latex/contrib/revtex/doc/auguide/summary4-2.pdf b/macros/latex/contrib/revtex/auguide/summary4-2.pdf
index 4738c9f1ae..4738c9f1ae 100644
--- a/macros/latex/contrib/revtex/doc/auguide/summary4-2.pdf
+++ b/macros/latex/contrib/revtex/auguide/summary4-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/auguide/summary4-2.tex b/macros/latex/contrib/revtex/auguide/summary4-2.tex
index 7ba76a1622..7ba76a1622 100644
--- a/macros/latex/contrib/revtex/doc/auguide/summary4-2.tex
+++ b/macros/latex/contrib/revtex/auguide/summary4-2.tex
diff --git a/macros/latex/contrib/revtex/source/ltxdocext.dtx b/macros/latex/contrib/revtex/ltxdocext.dtx
index d3d8b772f5..d3d8b772f5 100644
--- a/macros/latex/contrib/revtex/source/ltxdocext.dtx
+++ b/macros/latex/contrib/revtex/ltxdocext.dtx
diff --git a/macros/latex/contrib/revtex/ltxdocext.pdf b/macros/latex/contrib/revtex/ltxdocext.pdf
new file mode 100644
index 0000000000..8f2b335a96
--- /dev/null
+++ b/macros/latex/contrib/revtex/ltxdocext.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/source/ltxfront.dtx b/macros/latex/contrib/revtex/ltxfront.dtx
index e1b3582184..e1b3582184 100644
--- a/macros/latex/contrib/revtex/source/ltxfront.dtx
+++ b/macros/latex/contrib/revtex/ltxfront.dtx
diff --git a/macros/latex/contrib/revtex/ltxfront.pdf b/macros/latex/contrib/revtex/ltxfront.pdf
new file mode 100644
index 0000000000..4fbd147ca1
--- /dev/null
+++ b/macros/latex/contrib/revtex/ltxfront.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/source/ltxgrid.dtx b/macros/latex/contrib/revtex/ltxgrid.dtx
index 1bd35cbd62..1bd35cbd62 100644
--- a/macros/latex/contrib/revtex/source/ltxgrid.dtx
+++ b/macros/latex/contrib/revtex/ltxgrid.dtx
diff --git a/macros/latex/contrib/revtex/ltxgrid.pdf b/macros/latex/contrib/revtex/ltxgrid.pdf
new file mode 100644
index 0000000000..c93e8f5fd6
--- /dev/null
+++ b/macros/latex/contrib/revtex/ltxgrid.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/source/ltxutil.dtx b/macros/latex/contrib/revtex/ltxutil.dtx
index 4689c417a1..4689c417a1 100644
--- a/macros/latex/contrib/revtex/source/ltxutil.dtx
+++ b/macros/latex/contrib/revtex/ltxutil.dtx
diff --git a/macros/latex/contrib/revtex/ltxutil.pdf b/macros/latex/contrib/revtex/ltxutil.pdf
new file mode 100644
index 0000000000..7f0dc8e767
--- /dev/null
+++ b/macros/latex/contrib/revtex/ltxutil.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/source/revtex-bst.dtx b/macros/latex/contrib/revtex/revtex-bst.dtx
index c486112370..c486112370 100644
--- a/macros/latex/contrib/revtex/source/revtex-bst.dtx
+++ b/macros/latex/contrib/revtex/revtex-bst.dtx
diff --git a/macros/latex/contrib/revtex/source/revtex4-2.dtx b/macros/latex/contrib/revtex/revtex4-2.dtx
index 243266a709..243266a709 100644
--- a/macros/latex/contrib/revtex/source/revtex4-2.dtx
+++ b/macros/latex/contrib/revtex/revtex4-2.dtx
diff --git a/macros/latex/contrib/revtex/revtex4-2.pdf b/macros/latex/contrib/revtex/revtex4-2.pdf
new file mode 100644
index 0000000000..7cbb3f401c
--- /dev/null
+++ b/macros/latex/contrib/revtex/revtex4-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.bib b/macros/latex/contrib/revtex/sample/aapm/aapmsamp.bib
index 31728856f2..31728856f2 100644
--- a/macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.bib
+++ b/macros/latex/contrib/revtex/sample/aapm/aapmsamp.bib
diff --git a/macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.pdf b/macros/latex/contrib/revtex/sample/aapm/aapmsamp.pdf
index b7c8908051..b7c8908051 100644
--- a/macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.pdf
+++ b/macros/latex/contrib/revtex/sample/aapm/aapmsamp.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.tex b/macros/latex/contrib/revtex/sample/aapm/aapmsamp.tex
index e1c5ff96d0..e1c5ff96d0 100644
--- a/macros/latex/contrib/revtex/doc/sample/aapm/aapmsamp.tex
+++ b/macros/latex/contrib/revtex/sample/aapm/aapmsamp.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/aapm/aapmtemplate.tex b/macros/latex/contrib/revtex/sample/aapm/aapmtemplate.tex
index 113bd825c3..113bd825c3 100644
--- a/macros/latex/contrib/revtex/doc/sample/aapm/aapmtemplate.tex
+++ b/macros/latex/contrib/revtex/sample/aapm/aapmtemplate.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/aapm/fig_1.eps b/macros/latex/contrib/revtex/sample/aapm/fig_1.eps
index 8bc5bc8a74..8bc5bc8a74 100644
--- a/macros/latex/contrib/revtex/doc/sample/aapm/fig_1.eps
+++ b/macros/latex/contrib/revtex/sample/aapm/fig_1.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aapm/fig_2.eps b/macros/latex/contrib/revtex/sample/aapm/fig_2.eps
index cda61493ce..cda61493ce 100644
--- a/macros/latex/contrib/revtex/doc/sample/aapm/fig_2.eps
+++ b/macros/latex/contrib/revtex/sample/aapm/fig_2.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aip/aipsamp.bib b/macros/latex/contrib/revtex/sample/aip/aipsamp.bib
index 458a4b7a19..458a4b7a19 100644
--- a/macros/latex/contrib/revtex/doc/sample/aip/aipsamp.bib
+++ b/macros/latex/contrib/revtex/sample/aip/aipsamp.bib
diff --git a/macros/latex/contrib/revtex/doc/sample/aip/aipsamp.pdf b/macros/latex/contrib/revtex/sample/aip/aipsamp.pdf
index 185f5c7fa1..185f5c7fa1 100644
--- a/macros/latex/contrib/revtex/doc/sample/aip/aipsamp.pdf
+++ b/macros/latex/contrib/revtex/sample/aip/aipsamp.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/sample/aip/aipsamp.tex b/macros/latex/contrib/revtex/sample/aip/aipsamp.tex
index c2416f9dae..c2416f9dae 100644
--- a/macros/latex/contrib/revtex/doc/sample/aip/aipsamp.tex
+++ b/macros/latex/contrib/revtex/sample/aip/aipsamp.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/aip/aiptemplate.tex b/macros/latex/contrib/revtex/sample/aip/aiptemplate.tex
index c1d22b5863..c1d22b5863 100644
--- a/macros/latex/contrib/revtex/doc/sample/aip/aiptemplate.tex
+++ b/macros/latex/contrib/revtex/sample/aip/aiptemplate.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/aip/fig_1.eps b/macros/latex/contrib/revtex/sample/aip/fig_1.eps
index 8bc5bc8a74..8bc5bc8a74 100644
--- a/macros/latex/contrib/revtex/doc/sample/aip/fig_1.eps
+++ b/macros/latex/contrib/revtex/sample/aip/fig_1.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aip/fig_2.eps b/macros/latex/contrib/revtex/sample/aip/fig_2.eps
index cda61493ce..cda61493ce 100644
--- a/macros/latex/contrib/revtex/doc/sample/aip/fig_2.eps
+++ b/macros/latex/contrib/revtex/sample/aip/fig_2.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/apssamp.bib b/macros/latex/contrib/revtex/sample/aps/apssamp.bib
index ff2eace3e8..ff2eace3e8 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/apssamp.bib
+++ b/macros/latex/contrib/revtex/sample/aps/apssamp.bib
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/apssamp.pdf b/macros/latex/contrib/revtex/sample/aps/apssamp.pdf
index 3e11f390bc..3e11f390bc 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/apssamp.pdf
+++ b/macros/latex/contrib/revtex/sample/aps/apssamp.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/apssamp.tex b/macros/latex/contrib/revtex/sample/aps/apssamp.tex
index ae2eb529ff..ae2eb529ff 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/apssamp.tex
+++ b/macros/latex/contrib/revtex/sample/aps/apssamp.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/apstemplate.tex b/macros/latex/contrib/revtex/sample/aps/apstemplate.tex
index 84d3435306..84d3435306 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/apstemplate.tex
+++ b/macros/latex/contrib/revtex/sample/aps/apstemplate.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/fig_1.eps b/macros/latex/contrib/revtex/sample/aps/fig_1.eps
index 2cd607454d..2cd607454d 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/fig_1.eps
+++ b/macros/latex/contrib/revtex/sample/aps/fig_1.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/fig_2.eps b/macros/latex/contrib/revtex/sample/aps/fig_2.eps
index eb637e2429..eb637e2429 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/fig_2.eps
+++ b/macros/latex/contrib/revtex/sample/aps/fig_2.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/vid_1a.eps b/macros/latex/contrib/revtex/sample/aps/vid_1a.eps
index 2388bd4104..2388bd4104 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/vid_1a.eps
+++ b/macros/latex/contrib/revtex/sample/aps/vid_1a.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/aps/vid_1b.eps b/macros/latex/contrib/revtex/sample/aps/vid_1b.eps
index a64a6dc4f0..a64a6dc4f0 100644
--- a/macros/latex/contrib/revtex/doc/sample/aps/vid_1b.eps
+++ b/macros/latex/contrib/revtex/sample/aps/vid_1b.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/sor/fig_1.eps b/macros/latex/contrib/revtex/sample/sor/fig_1.eps
index 8bc5bc8a74..8bc5bc8a74 100644
--- a/macros/latex/contrib/revtex/doc/sample/sor/fig_1.eps
+++ b/macros/latex/contrib/revtex/sample/sor/fig_1.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/sor/fig_2.eps b/macros/latex/contrib/revtex/sample/sor/fig_2.eps
index cda61493ce..cda61493ce 100644
--- a/macros/latex/contrib/revtex/doc/sample/sor/fig_2.eps
+++ b/macros/latex/contrib/revtex/sample/sor/fig_2.eps
diff --git a/macros/latex/contrib/revtex/doc/sample/sor/sorsamp.bib b/macros/latex/contrib/revtex/sample/sor/sorsamp.bib
index 458a4b7a19..458a4b7a19 100644
--- a/macros/latex/contrib/revtex/doc/sample/sor/sorsamp.bib
+++ b/macros/latex/contrib/revtex/sample/sor/sorsamp.bib
diff --git a/macros/latex/contrib/revtex/doc/sample/sor/sorsamp.pdf b/macros/latex/contrib/revtex/sample/sor/sorsamp.pdf
index 9df32f8ec1..9df32f8ec1 100644
--- a/macros/latex/contrib/revtex/doc/sample/sor/sorsamp.pdf
+++ b/macros/latex/contrib/revtex/sample/sor/sorsamp.pdf
Binary files differ
diff --git a/macros/latex/contrib/revtex/doc/sample/sor/sorsamp.tex b/macros/latex/contrib/revtex/sample/sor/sorsamp.tex
index e44460ee81..e44460ee81 100644
--- a/macros/latex/contrib/revtex/doc/sample/sor/sorsamp.tex
+++ b/macros/latex/contrib/revtex/sample/sor/sorsamp.tex
diff --git a/macros/latex/contrib/revtex/doc/sample/sor/sortemplate.tex b/macros/latex/contrib/revtex/sample/sor/sortemplate.tex
index 8bacf8024b..8bacf8024b 100644
--- a/macros/latex/contrib/revtex/doc/sample/sor/sortemplate.tex
+++ b/macros/latex/contrib/revtex/sample/sor/sortemplate.tex