From c871073e4f4ba0d87362a24f70ceb0e71974187d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 16 Aug 2023 19:41:08 +0000 Subject: expex-glossonly (16aug23) git-svn-id: svn://tug.org/texlive/trunk@67944 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/expex-glossonly/README.md | 25 ++++++ .../doc/latex/expex-glossonly/expex-glossonly.pdf | Bin 0 -> 123056 bytes .../doc/latex/expex-glossonly/expex-glossonly.tex | 100 +++++++++++++++++++++ .../latex/expex-glossonly/testfiles/gb4e-expex.pdf | Bin 0 -> 14835 bytes .../latex/expex-glossonly/testfiles/gb4e-expex.tex | 48 ++++++++++ .../expex-glossonly/testfiles/linguex-expex.pdf | Bin 0 -> 15454 bytes .../expex-glossonly/testfiles/linguex-expex.tex | 33 +++++++ .../tex/latex/expex-glossonly/expex-glossonly.sty | 97 ++++++++++++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/collection-humanities.tlpsrc | 1 + Master/tlpkg/tlpsrc/expex-glossonly.tlpsrc | 0 11 files changed, 305 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/expex-glossonly/README.md create mode 100644 Master/texmf-dist/doc/latex/expex-glossonly/expex-glossonly.pdf create mode 100644 Master/texmf-dist/doc/latex/expex-glossonly/expex-glossonly.tex create mode 100644 Master/texmf-dist/doc/latex/expex-glossonly/testfiles/gb4e-expex.pdf create mode 100644 Master/texmf-dist/doc/latex/expex-glossonly/testfiles/gb4e-expex.tex create mode 100644 Master/texmf-dist/doc/latex/expex-glossonly/testfiles/linguex-expex.pdf create mode 100644 Master/texmf-dist/doc/latex/expex-glossonly/testfiles/linguex-expex.tex create mode 100644 Master/texmf-dist/tex/latex/expex-glossonly/expex-glossonly.sty create mode 100644 Master/tlpkg/tlpsrc/expex-glossonly.tlpsrc diff --git a/Master/texmf-dist/doc/latex/expex-glossonly/README.md b/Master/texmf-dist/doc/latex/expex-glossonly/README.md new file mode 100644 index 00000000000..1029552acfd --- /dev/null +++ b/Master/texmf-dist/doc/latex/expex-glossonly/README.md @@ -0,0 +1,25 @@ +# The `expex-glossonly` package + +`expex-glossonly` is a package which allows `gb4e` and `linguex` users to use the glossing macros +of the ExPex package, while still using the standard example and subexample numbering macros of +those respective packages. + +Copyright 2016-2023 by Alan Munn + +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 any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2005/12/01 or later. + +This package has the LPPL maintenance status `maintained'. + +The Current Maintainer of this package is Alan Munn. + +This package consists of the file `expex-glossonly.sty` and documentation files +`expex-glossonly.tex` and `expex-glossonly.pdf` plus two test files: `gb4e-expex.tex` and `linguex-expex.tex` + +This package is currently experimental. Use at your own risk. + diff --git a/Master/texmf-dist/doc/latex/expex-glossonly/expex-glossonly.pdf b/Master/texmf-dist/doc/latex/expex-glossonly/expex-glossonly.pdf new file mode 100644 index 00000000000..df43f4d18f0 Binary files /dev/null and b/Master/texmf-dist/doc/latex/expex-glossonly/expex-glossonly.pdf differ diff --git a/Master/texmf-dist/doc/latex/expex-glossonly/expex-glossonly.tex b/Master/texmf-dist/doc/latex/expex-glossonly/expex-glossonly.tex new file mode 100644 index 00000000000..5fc2a2e9d79 --- /dev/null +++ b/Master/texmf-dist/doc/latex/expex-glossonly/expex-glossonly.tex @@ -0,0 +1,100 @@ +% !TEX TS-program = pdflatexmk +\def\EPGLversion{0.6} +\def\EPGLdate{August 15, 2023} +\documentclass[11pt]{article} +\title{\textbf{The \textsf{expex-glossonly} package}} +\author{\textbf{Alan Munn}\\Department of Linguistics and Languages\\Michigan State University\\\texttt{\href{mailto:amunn@msu.edu}{amunn@msu.edu}}} +\date{Version \EPGLversion\\\EPGLdate} +\usepackage[T1]{fontenc} +\usepackage[margin=1in,includefoot]{geometry} +\usepackage{titling} +\usepackage[utf8]{inputenc} +\usepackage{array, booktabs, multicol, fancyhdr, xspace,tabularx} +\usepackage{enumitem} +\usepackage{fancyvrb,listings,url} +\usepackage[sf,compact]{titlesec} +\usepackage[]{he-she} +\usepackage{gb4e} +\usepackage[colorlinks=true]{hyperref} +\noautomath + + +\DefineShortVerb{\|} +\newcommand*\bs{\textbackslash} + +\IfFileExists{luximono.sty}% +{% + \usepackage[scaled]{luximono}% +} +{% + \IfFileExists{beramono.sty}% + {% + \usepackage[scaled]{beramono}% + }{} +} + + +\lstset{% + basicstyle=\ttfamily\small, + commentstyle=\itshape\ttfamily\small, + showspaces=false, + showstringspaces=false, + breaklines=true, + breakautoindent=true, + breakindent=1em, + xrightmargin=2.5em, + captionpos=t, + language=TeX, +} + +\newcommand*{\pkg}[1]{\texttt{#1}\xspace} +\setitemize[1]{label={}} +\setitemize[2]{label={}} +\setdescription{font={\normalfont}} +\setlength{\droptitle}{-1in} + +\lhead{} +\chead{} +\rhead{} +\lfoot{\emph{}} +\cfoot{\thepage} +\rfoot{} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} +\pagestyle{fancy} + + +\begin{document} +\maketitle +\thispagestyle{empty} +\renewcommand{\abstractname}{\sffamily Abstract} +\abstract{\noindent\begin{quote}This is an experimental package which is designed to let \pkg{gb4e} and \pkg{linguex} package users use the advanced glossing capabilities of the very powerful ExPex package.\end{quote}} +\section{Introduction} +The ExPex package by John Frampton provides very fine-grained control over glossing and example formatting, including unlimited gloss lines and various ways of formatting multiline glosses. By contrast the \pkg{cgloss4e} glossing macros provided with both \pkg{gb4e} and \pkg{linguex}, although very capable at basic glossing, lack the degree of customization that is sometimes needed for more complex glossing. + +On the other hand, for those users who have heavily invested in using either \pkg{gb4e} or \pkg{linguex}, shifting to ExPex can be quite daunting and burdensome, especially since the basic syntax of the examples is quite different. + +This package is an attempt to have the best of both worlds: it allows \pkg{gb4e} and \pkg{linguex} users to keep using those packages for basic example numbering and formatting, but also allows them to use the glossing macros that ExPex provides. + +\section{Package usage} +Usage of the package is simple: simply load it, and then load your favourite example numbering package. The \pkg{expex-glossonly} package must be loaded first. + +\begin{multicols}{2} +\begin{lstlisting} +\usepackage{expex-glossonly} +\usepackage{gb4e} +\end{lstlisting} +\begin{lstlisting} +\usepackage{expex-glossonly} +\usepackage{linguex} +\end{lstlisting} +\end{multicols} + + + +The package checks for which example numbering package you have loaded (either \pkg{gb4e} or \pkg{linguex}) and then patches the main glossing macro in ExPex to adjust to the horizontal spacing parameters of the particular example package you loaded. + +It does nothing explicitly to disable incompatible commands from ExPex (specifically any commands that would introduce a numbered or lettered example, such as |\ex|, |\pex|, |\a|, etc.) so you should not use them. Some, such as |\ex| are redefined by \pkg{gb4e} and therefore the ExPex version of it will fail to work. For this reason, you need to make sure to load the \pkg{expex-glossonly} package \emph{before} you load \pkg{gb4e} or \pkg{linguex} +\section{Bugs} +This is \emph{experimental} and has not been extensively tested. Use at your own risk. You're welcome to contact me with problems as they arise, however. +\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/expex-glossonly/testfiles/gb4e-expex.pdf b/Master/texmf-dist/doc/latex/expex-glossonly/testfiles/gb4e-expex.pdf new file mode 100644 index 00000000000..40b160303e0 Binary files /dev/null and b/Master/texmf-dist/doc/latex/expex-glossonly/testfiles/gb4e-expex.pdf differ diff --git a/Master/texmf-dist/doc/latex/expex-glossonly/testfiles/gb4e-expex.tex b/Master/texmf-dist/doc/latex/expex-glossonly/testfiles/gb4e-expex.tex new file mode 100644 index 00000000000..8cdeed2f5d9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/expex-glossonly/testfiles/gb4e-expex.tex @@ -0,0 +1,48 @@ +\documentclass[12pt,letterpaper]{article} + +\usepackage{expex-glossonly} +\usepackage{amssymb} +\usepackage{gb4e} +%\usepackage{cgloss} + + +\lingset{everygla={\leftmargin=2in}, belowglpreambleskip=-0.5ex, aboveglftskip=-0.5ex} % gloss formatting + + +\begin{document} + +\begin{exe} +\ex[*]{ This is a regular example.} +\ex[*]{\label{foo} + \begingl + \glpreamble This is a preamble sentence.// + \gla\rightcomment{\small\checkmark X}J\'anos h\'aza// + \glb\rightcomment{\small\checkmark X}John house.his// + \glft `John's house'// + \endgl +} +\ex This is another example. +\end{exe} +\begin{exe} +\ex\label{bar} +\begin{xlist} +\ex \begingl + \gla\rightcomment{\small\checkmark X}J\'anos h\'aza// + \glb\rightcomment{\small\checkmark X}John house.his// + \glft `John's house'// + \endgl +\ex \begingl + \gla\rightcomment{\small\checkmark X}J\'anos h\'aza// + \glb\rightcomment{\small\checkmark X}John house.his// + \glft `John's house'// + \endgl +\end{xlist} +\ex +\begin{xlist} +\ex An example\setcounter{xnumi}{0} +\ex Another example. +\end{xlist} +\end{exe} + + +\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/expex-glossonly/testfiles/linguex-expex.pdf b/Master/texmf-dist/doc/latex/expex-glossonly/testfiles/linguex-expex.pdf new file mode 100644 index 00000000000..b52da13d572 Binary files /dev/null and b/Master/texmf-dist/doc/latex/expex-glossonly/testfiles/linguex-expex.pdf differ diff --git a/Master/texmf-dist/doc/latex/expex-glossonly/testfiles/linguex-expex.tex b/Master/texmf-dist/doc/latex/expex-glossonly/testfiles/linguex-expex.tex new file mode 100644 index 00000000000..368a35f8f1a --- /dev/null +++ b/Master/texmf-dist/doc/latex/expex-glossonly/testfiles/linguex-expex.tex @@ -0,0 +1,33 @@ +\documentclass[12pt,letterpaper]{article} + +\usepackage{expex-glossonly} +\usepackage{amssymb} +\usepackage{linguex} +\usepackage{cgloss} + +\lingset{everygla={\leftmargin=2in}, belowglpreambleskip=-0.5ex, aboveglftskip=-0.5ex} % gloss formatting +\makeatletter + +\begin{document} + +\ex. \ag. The boy didn't kiss the girl \\ +D boy AUX.NEG kiss D girl \\ \hfill {\small\checkmark X} +\trans `The boy did not kiss the girl'. \hfill {\small\checkmark X} + +\ex. +\a. + \begingl + \gla\rightcomment{\small\checkmark X}J\'anos h\'aza// + \glb\rightcomment{\small\checkmark X}John house.his// + \glft `John's house'// + \endgl +\b. This is another example. + +\ex.\begingl + \gla\rightcomment{\small\checkmark X}J\'anos h\'aza// + \glb\rightcomment{\small\checkmark X}John house.his// + \glft `John's house'// + \endgl + + +\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/expex-glossonly/expex-glossonly.sty b/Master/texmf-dist/tex/latex/expex-glossonly/expex-glossonly.sty new file mode 100644 index 00000000000..b33b6b41c06 --- /dev/null +++ b/Master/texmf-dist/tex/latex/expex-glossonly/expex-glossonly.sty @@ -0,0 +1,97 @@ +\def\EPGL@version{0.6} +\def\EPGL@date{2023/08/15} +% expex-glossonly is a package which allows gb4e and linguex users to use the glossing macros +% of the ExPex package, while still using the standard example and subexample numbering macros of +% those respective packages. +% +% Copyright 2016 by Alan Munn +% +% 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 any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This package has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this package is Alan Munn. +% +% This package consists of the file expex-glossonly.sty and documentation files +% expex-glossonly.tex and expex-glossonly.pdf plus two test files: gb4e-expex.tex and linguex-expex.tex +% +% This package is currently experimental. Use at your own risk. +% +\ProvidesPackage{expex-glossonly}[\EPGL@date\ Compatibility package for using ExPex glosses with gb4e and linguex v. \EPGL@version ] +\DeclareOption*{\PackageWarning{expex-glossonly}{Unknown option `\CurrentOption`}} +\ProcessOptions +\RequirePackage{calc} +\RequirePackage{expex} +% First define a command to patch the ExPex main gloss command +% Need to find out if other gloss commands need to be patched. +\def\EPGL@patchexpexgloss{% + \let\xe\relax + \let\pex\relax +\def\gl@wrap@below@begin@a{% + \bgroup + \parindent0pt + \ep@setglstrut + \ifdim\ling@glwidth=0pt + \ifling@glbreaking + \bgroup + \else + \vtop\bgroup + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + %\leftskip=0pt + \EPGL@setglossmargin % this is the changed line + \fi + \else + \vtop\bgroup + \hsize=\ling@glwidth + \leftskip=0pt + \fi + \leavevmode + \bgroup + \parindent=0pt + \@glpreamblefalse + \@glftfalse + \let\mainlist=\empty + \let\itemtypelist=\empty + \let\aboveskiplist=\empty + \let\strutlist=\empty + \let\everylist=\empty + \let\colorlist=\empty +}} +% First check to see whether we are loaded first +% Since there is some overlap in commands, gb4e and linguex must be loaded second +\@ifpackageloaded{linguex}{\PackageError{expex-glossonly}{Please load expex-glossonly BEFORE linguex}{Please load expex-glossonly BEFORE linguex}}{} +\@ifpackageloaded{gb4e}{\PackageError{expex-glossonly}{Please load expex-glossonly BEFORE gb4e}{Please load expex-glossonly BEFORE gb4e}}{} +% Now only patch the command if the packages have been loaded +% This means that the package will do no harm if loaded by itself +\AtBeginDocument{% +\@ifpackageloaded{linguex}{ + \def\EPGL@setglossmargin{% + \ifnum\theExDepth=1% + \setlength{\leftskip}{\Exindent+\Exlabelsep+\Exlabelwidth+.5em} + \else + \setlength{\leftskip}{\Exindent+\Exlabelsep+\Exlabelwidth+\SubExleftmargin+.5em} + \fi} + \EPGL@patchexpexgloss + \PackageInfo{expex-glossonly}{Patching ExPex for use with linguex} + \typeout{Patching ExPex for use with linguex} +} +{\@ifpackageloaded{gb4e}{ + \def\EPGL@setglossmargin{% + \ifnum\@xnumdepth=1% + \setlength{\leftskip}{\leftmargin+\widthof{\@exwidth}+1em} + \else + \setlength{\leftskip}{\leftmargin+\labelwidth+\labelsep+1.5em} + \fi} + \EPGL@patchexpexgloss + \PackageInfo{expex-glossonly}{Patching ExPex for use with gb4e} + \typeout{Patching ExPex for use with gb4e} +}{}} +} +\endinput \ No newline at end of file diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 7e139e3aca5..25b1d0b6db4 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -318,7 +318,7 @@ my @TLP_working = qw( examdesign example examplep examz exceltex excludeonly exercise exercisebank exercisepoints exercises exesheet exframe exp-testopt - expdlist expex expex-acro expkv-bundle export + expdlist expex expex-acro expex-glossonly expkv-bundle export expose-expl3-dunkerque-2019 expressg exsheets exsol extarrows exteps extpfeil extract extsizes diff --git a/Master/tlpkg/tlpsrc/collection-humanities.tlpsrc b/Master/tlpkg/tlpsrc/collection-humanities.tlpsrc index f3f40e2ce88..04cb5909696 100644 --- a/Master/tlpkg/tlpsrc/collection-humanities.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-humanities.tlpsrc @@ -18,6 +18,7 @@ depend edfnotes depend eledform depend eledmac depend expex +depend expex-glossonly depend gb4e depend gmverse depend jura diff --git a/Master/tlpkg/tlpsrc/expex-glossonly.tlpsrc b/Master/tlpkg/tlpsrc/expex-glossonly.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3