diff options
author | Karl Berry <karl@freefriends.org> | 2020-12-03 21:57:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-12-03 21:57:41 +0000 |
commit | ba5ae3bc7f23dfe6145a8761e79600435a2c6ca6 (patch) | |
tree | 358bcd6fc37bd303bb36cde3341f3dc7ba588a80 /Master/texmf-dist/source/generic | |
parent | 1aea9817e4e434c4b8b4569abaa6b216ee2695f3 (diff) |
schemata (3dec20)
git-svn-id: svn://tug.org/texlive/trunk@57057 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic')
-rw-r--r-- | Master/texmf-dist/source/generic/schemata/Makefile | 31 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/schemata/schemata.dtx | 482 |
2 files changed, 345 insertions, 168 deletions
diff --git a/Master/texmf-dist/source/generic/schemata/Makefile b/Master/texmf-dist/source/generic/schemata/Makefile index c72cdb6cbd1..cf31a104579 100644 --- a/Master/texmf-dist/source/generic/schemata/Makefile +++ b/Master/texmf-dist/source/generic/schemata/Makefile @@ -34,17 +34,15 @@ release: $(NAME).pdf # # The testing target also compiles the examples file. testing: $(NAME).pdf schematest.pdf - # # This is the recipe for schematest.pdf. It will work also for dvi output. -schematest.pdf : schematest.tex +schematest.pdf : schematest.tex $(TESTENGINE) --interaction=nonstopmode schematest > /dev/null if [ -f schematest.dvi ]; then dvipdf schematest; fi if [ -f schematest.out.ps ]; then rm schematest.out.ps; fi - # # This is the recipe for the package docs. It will work also for dvi output. -$(NAME).pdf : $(NAME).dtx +$(NAME).pdf : $(NAME).dtx schemata.sty schemata.ins $(ENGINE) -shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null $(ENGINE) --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi @@ -53,6 +51,24 @@ $(NAME).pdf : $(NAME).dtx $(ENGINE) --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null if [ -f $(NAME).dvi ]; then dvipdf $(NAME); fi # +# These are the recipes for all the files that need to be extracted +# from the dtx file. Any one of them simply extracts the following: +# README.md, schemata.ins, schemata.sty, schematest.tex +# +# Once any one of these recipes is run, the rest will be satisfied. +# But they need to be there for dependencies to work best. +README.md : $(NAME).dtx + pdftex $(NAME).dtx + +schemata.ins : $(NAME).dtx + pdftex $(NAME).dtx + +schemata.sty : $(NAME).dtx + pdftex $(NAME).dtx + +schematest.tex : $(NAME).dtx + pdftex $(NAME).dtx +# # Using this recipe deletes the auxiliary and log files clean: rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out,toc} @@ -62,6 +78,7 @@ clean: distclean: clean rm -f $(NAME).{dvi,pdf,sty,synctex.gz,"synctex(busy)"} README.md rm -f schematest.{dvi,pdf,synctex.gz,"synctex(busy)",tex} + rm -f schemata-eps-converted-to.pdf # # Using this recipe deletes files for testong testclean: @@ -72,7 +89,7 @@ testclean: inst: release mkdir -p $(UTREE)/{tex,source,doc}/generic/$(NAME) cp $(NAME).dtx $(UTREE)/source/generic/$(NAME) - cp $(NAME).png $(UTREE)/source/generic/$(NAME) + cp $(NAME).eps $(UTREE)/source/generic/$(NAME) cp Makefile $(UTREE)/source/generic/$(NAME) cp $(NAME).sty $(UTREE)/tex/generic/$(NAME) cp $(NAME).pdf $(UTREE)/doc/generic/$(NAME) @@ -83,7 +100,7 @@ inst: release install: release sudo mkdir -p $(LOCAL)/{tex,source,doc}/generic/$(NAME) sudo cp $(NAME).dtx $(LOCAL)/source/generic/$(NAME) - sudo cp $(NAME).png $(LOCAL)/source/generic/$(NAME) + sudo cp $(NAME).eps $(LOCAL)/source/generic/$(NAME) sudo cp Makefile $(LOCAL)/source/generic/$(NAME) sudo cp $(NAME).sty $(LOCAL)/tex/generic/$(NAME) sudo cp $(NAME).pdf $(LOCAL)/doc/generic/$(NAME) @@ -94,5 +111,5 @@ install: release zip: release ln -sf . $(NAME) zip -Drq $(PWD)/$(NAME)-$(VERS).zip \ -$(NAME)/{README.md,schematest.tex,Makefile,$(NAME).{pdf,dtx,png}} +$(NAME)/{README.md,Makefile,$(NAME).{pdf,dtx,eps}} rm $(NAME) diff --git a/Master/texmf-dist/source/generic/schemata/schemata.dtx b/Master/texmf-dist/source/generic/schemata/schemata.dtx index 133998ebf6a..49a9aabc5f8 100644 --- a/Master/texmf-dist/source/generic/schemata/schemata.dtx +++ b/Master/texmf-dist/source/generic/schemata/schemata.dtx @@ -30,10 +30,10 @@ The schemata package helps the creation of topical outlines that illustrate the |`schemata.dtx` |commented style file; source file | |`Makefile` |For use with GNU make; with source file| |`schemata.ins` |installation driver (generated file) | -|`schemata.pdf` |Documentation (generated file) | -|`README.md` |This file (generated file) | -|`schematest.tex`|Test file for Plain TeX or Eplain | -|`schemata.png` |Image file used for the manual | +|`schemata.pdf` |Documentation (generated file) | +|`README.md` |This file (generated file) | +|`schematest.tex`|Test file (generated file) | +|`schemata.eps` |Image file used for the manual | # Obtaining the Package @@ -51,54 +51,59 @@ The schemata package helps the creation of topical outlines that illustrate the This method requires GNU `make` on a POSIX-compliant environment, such as GNU/Linux, various BSD flavors, perhaps MacOS (e.g., with various porting systems), and even Cygwin on Windows. -0. A quick install in one's home directory using some of the included files from the `zip` archive just requires the following steps: + * Building and testing with `xelatex` and `lualatex` requires one to have the font `GFSDidot.otf` in a system or user font path. The GFS fonts are available in most Linux distributions and may be downloaded from the [Greek Font Society](https://www.greekfontsociety-gfs.gr/). - tex schemata.dtx - make inst + * The package can be built and used with `dvilualatex` only when one can use modern testing packages (but `dvipdf` fails). The test file fails with `dvilualatex`, but it works with `dviluatex`. -Otherwise we use the LaTeX installation on the host machine to build the package. When using `make`, any `dvi` files that are created will also be converted to `pdf` format. + * We now use an Encapsulated PostScript graphics file instead of a Portable Network Graphics file to permit all LaTeX variants to build the package. -1. Type `make distclean release` to generate the release files using `pdflatex`. +We use the LaTeX installation on the host machine to build the package. When using `make`, any `dvi` files that are created will also be converted to `pdf` format. -3. To use another TeX engine, type one of the following: - make ENGINE=latex +1. Type `make` to generate the release files using `pdflatex`. + +2. To use another LaTeX engine, type one of the following: + + make ENGINE=xelatex make ENGINE=lualatex make ENGINE=dvilualatex - make ENGINE=xelatex + make ENGINE=latex -4. Type `make inst` to install the files in the user's personal TDS-compliant directory tree. +3. Type `make inst` to install the files in the user's personal TDS-compliant directory tree. -5. Type `sudo make install` to install the files in the system-wide, local TDS-compliant directory tree. +4. Type `sudo make install` to install the files in the system-wide, local TDS-compliant directory tree. ## Manual Compilation Otherwise, the following steps are used for manual installation. See the general information at the [TeX FAQ](https://www.texfaq.org/FAQ-installthings). -0. To use some of the included files from the `zip` archive and only extract files from the `dtx` file, just do the following step and proceed to installation: - - tex schemata.dtx - 1. To build the package on the host system, generate the installation files and a copy of the documentation without the table of contents and cross-references. We use `pdflatex` by default: pdflatex --shell-escape --recorder --interaction=batchmode schemata.dtx -2. Generate the TOC and cross-references for the documentation: +2. This will generate the following files: + + schemata.ins (complete) + schemata.pdf (incomplete; do steps 3 through 5) + README.md (complete) + schematest.tex (complete) + +3. Generate the TOC and cross-references for the documentation: pdflatex --recorder --interaction=nonstopmode schemata.dtx -3. Generate the index files using `makeindex`: +4. Generate the index files using `makeindex`: makeindex -q -s gglo.ist -o schemata.gls schemata.glo makeindex -q -s gind.ist -o schemata.ind schemata.idx -4. Integrate the glossary (changes) and index into the documentation. The second run updates the TOC: +5. Integrate the glossary (changes) and index into the documentation. The second run updates the TOC: pdflatex --recorder --interaction=nonstopmode schemata.dtx pdflatex --recorder --interaction=nonstopmode schemata.dtx -One can substitute, e.g., `latex`, `xelatex`, `lualatex`, and `dvilualatex` for `pdflatex`, but the documentation may look different in some cases. +One can substitute, e.g., `xelatex`, `lualatex`, `dvilualatex`, and `latex`, for `pdflatex`, but the documentation may look different in some cases. -## File Installation +## Manual File Installation Different TeX distributions have somewhat different ways to store TDS-compliant configuration and package data. See, for example, [MikTeX](https://miktex.org/kb/texmf-roots) and the [TeX FAQ](https://www.texfaq.org/FAQ-privinst). Two approaches below conform generally to a Unix-based system: @@ -108,7 +113,7 @@ Different TeX distributions have somewhat different ways to store TDS-compliant |Path |Description | |------------------------------------|--------------------------------------------| -|`$TEXMFHOME/source/generic/schemata`|`ins` and `dtx` files, Makefile, `png` file | +|`$TEXMFHOME/source/generic/schemata`|`ins` and `dtx` files, Makefile, `eps` file | |`$TEXMFHOME/tex/generic/schemata` |`sty` file | |`$TEXMFHOME/doc/generic/schemata` |`pdf` file, `README.md`, `schematest.tex` | @@ -120,7 +125,7 @@ On older TeX distributions, run `mktexlsr` on $TEXMFHOME to complete the install |Path |Description | |-------------------------------------|--------------------------------------------| -|`$TEXMFLOCAL/source/generic/schemata`|`ins` and `dtx` files, Makefile, `png` file | +|`$TEXMFLOCAL/source/generic/schemata`|`ins` and `dtx` files, Makefile, `eps` file | |`$TEXMFLOCAL/tex/generic/schemata` |`sty` file | |`$TEXMFLOCAL/doc/generic/schemata` |`pdf` file, `README.md`, `schematest.tex` | @@ -134,36 +139,57 @@ Run `mktexlsr` with the appropriate permissions on `$TEXMFLOCAL` to complete the 2. If one has access to GNU `make`, use either `Makefile` in the directory where one unpacked the `zip` file or copy `Makefile` from either `src/generic/schemata` or `doc/generic/schemata` in whatever TDS-compliant tree it exists. -When using `make`, any `dvi` files that are created will also be converted to `pdf` format. + When using `make`, any `dvi` files that are created will also be converted to `pdf` format. + +3. To compile the test file using `make` and `pdftex`, simply type: -3. To compile the test file using `make` and `pdftex`, simply type `make testing`. + make testing -4. For multi-format testing using `make` in addition to that above, one can do the following: +4. For multi-format testing using `make` in addition to that above, one can do the following. The comments should not be typed; they tell one what to expect: + Comment: Shows transliterated Latin for Greek + --------------------------------------------- make testing TESTENGINE=tex - make testing TESTENGINE=eplain - make testing TESTENGINE=lollipop make testing TESTENGINE=luatex make testing TESTENGINE=dviluatex make testing TESTENGINE=xetex - make testing TESTENGINE=pdflatex + --------------------------------------------- + make testing TESTENGINE=eplain + --------------------------------------------- + make testing TESTENGINE=lollipop + --------------------------------------------- + Comment: Shows Greek text via babel + --------------------------------------------- make testing TESTENGINE=latex + make testing TESTENGINE=pdflatex + --------------------------------------------- + Comment: Shows Greek text via polyglossia + --------------------------------------------- make testing TESTENGINE=lualatex - make testing TESTENGINE=dvilualatex make testing TESTENGINE=xelatex -5. If one does not have `make`, one can use any one of the following commands: +5. If one does not have `make`, one can use any one of the following commands. The comments should not be typed; they tell one what to expect: - pdftex --interaction=nonstopmode schematest + Comment: Shows transliterated Latin for Greek + --------------------------------------------- tex --interaction=nonstopmode schematest - eplain --interaction=nonstopmode schematest - lollipop --interaction=nonstopmode schematest + pdftex --interaction=nonstopmode schematest luatex --interaction=nonstopmode schematest dviluatex --interaction=nonstopmode schematest xetex --interaction=nonstopmode schematest + --------------------------------------------- + eplain --interaction=nonstopmode schematest + --------------------------------------------- + lollipop --interaction=nonstopmode schematest + --------------------------------------------- + Comment: Shows Greek text via babel + --------------------------------------------- + latex --interaction=nonstopmode schematest pdflatex --interaction=nonstopmode schematest + --------------------------------------------- + Comment: Shows Greek text via polyglossia + --------------------------------------------- lualatex --interaction=nonstopmode schematest - dvilualatex --interaction=nonstopmode schematest xelatex --interaction=nonstopmode schematest The manual is also a test suite. @@ -246,22 +272,80 @@ and version 1.3 or later is part of all distributions of LaTeX version %<*driver> \ProvidesFile{schemata.dtx} %</driver> -%<package>{\expandafter}\expandafter\ifx \csname schemataLaTeX\endcsname\relax +% +%<package>\expandafter\ifx \csname schemataLaTeX\endcsname\relax %<package> \def\schemataLaTeX{LaTeX2e}\fi %<package>\ifx\fmtname\schemataLaTeX %<package>\expandafter\NeedsTeXFormat\expandafter{\schemataLaTeX}[2005/12/01] %<package>\ProvidesPackage{schemata} %<*package> - [2020/11/23 1.2 generic package to aid construction of topical categories] + [2020/12/02 1.3 generic package to aid construction of topical categories] %</package> +%<package>\else +%<package>\catcode`@=11\relax %<package>\fi % %<*driver> \documentclass[11pt]{ltxdoc} -\usepackage[T1]{fontenc} -\usepackage[polutonikogreek,american]{babel} -\newcommand{\gk}[1]{\foreignlanguage{polutonikogreek}{#1}} -\usepackage{lmodern} +%^^A Below we check if our TL distribution has the iftex package and load it. +\IfFileExists{iftex.sty}{\usepackage{iftex}}{} + +%^^A Only versions of iftex since 2019 have the macro \RequireTUTeX. +%^^A If the package is not loaded or if it is not new, +%^^A we load the older, transitional packages. +\unless\ifdefined\RequireTUTeX + \usepackage{ifxetex} + \usepackage{ifluatex} + \usepackage{ifpdf} +\fi + +%^^A We include packages depending on the LaTeX engine, mode, +%^^A and version of TeX being used. +\ifxetex %^^A \ifpdf will not be true, but a pdf results. + \usepackage{fontspec} + \usepackage{polyglossia} + \setdefaultlanguage{american} + \setotherlanguage[variant=ancient]{greek} + \newfontfamily\greekfont{GFSDidot.otf} +\else + \ifluatex + \ifpdf %^^A pdf mode + \usepackage{fontspec} + \usepackage{polyglossia} + \setdefaultlanguage{american} + \setotherlanguage[variant=ancient]{greek} + \newfontfamily\greekfont{GFSDidot.otf} + \else %^^A dvi mode + \IfFileExists{utf8-2018.def}{}{\usepackage[utf8]{inputenc}} + \usepackage[T1]{fontenc} + \usepackage{lmodern} + \usepackage[polutonikogreek,american]{babel} + \fi + \else %^^A These packages work for both pdf and dvi. + \IfFileExists{utf8-2018.def}{}{\usepackage[utf8]{inputenc}} + \usepackage[T1]{fontenc} + \usepackage{lmodern} + \usepackage[polutonikogreek,american]{babel} + \fi +\fi + +\usepackage{microtype} + +\newcommand{\gk}[2]{% + \ifxetex + \textgreek{#1}% + \else + \ifluatex + \ifpdf + \textgreek{#1}% + \else + \foreignlanguage{polutonikogreek}{#2}% + \fi + \else + \foreignlanguage{polutonikogreek}{#2}% + \fi + \fi +} \usepackage[textwidth=140mm,textheight=237mm,right=25mm,nohead]{geometry} \usepackage{graphicx} %^^A Dangerous bend ahead... @@ -270,7 +354,7 @@ and version 1.3 or later is part of all distributions of LaTeX version \usepackage{mflogo} \usepackage[toc]{multitoc} \usepackage{paracol} -\usepackage{\jobname}[2020/11/23] +\usepackage{\jobname}[2020/12/02] \usepackage{verbatim} \usepackage[numbered]{hypdoc} @@ -313,7 +397,7 @@ and version 1.3 or later is part of all distributions of LaTeX version %</driver> % \fi % -% \CheckSum{594} +% \CheckSum{596} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -338,7 +422,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % \changes{0.8}{2016/01/25}{Rewrote manual} % \changes{1.0}{2020/03/13}{Ensure better multi-format operation} % \changes{1.1}{2020/03/14}{Fix issue with \texttt{dtx} guards} -% \changes{1.2}{2020/11/11}{Updates to \texttt{Readme.md}, \texttt{Makefile}, \texttt{schematest.tex}, combine \texttt{Readme.md} and \texttt{schematest.tex} files in \texttt{dtx}} +% \changes{1.2}{2020/11/23}{Updates to \texttt{Readme.md}, \texttt{Makefile}, \texttt{schematest.tex}, combine \texttt{Readme.md} and \texttt{schematest.tex} files in \texttt{dtx}} % % \GetFileInfo{\jobname.dtx} % \DoNotIndex{\bgroup, \csname, \DeclareOption, \def, \dimen, \egroup, \else, \endcsname, \endinput, \ExecuteOptions, \expandafter, \fi, \futurelet, \gdef, \hbox, \hfil, \if, \ifcsname, \ifdim, \ifmmode, \ifx, \ignorespaces, \index, \let, \newbox, \newcommand, \newdimen, \newif, \next, \PackageWarning, \ProcessOptions, \relax, \RequirePackage, \setbox, \space, \vbox, \vcenter, \vfil, \vskip} @@ -359,7 +443,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % % \section{Introduction} % -% This package uses boxes and math mode to typeset \emph{schemata} (plural of \gk{t'o sq~hma} or \emph{schema}, meaning \emph{form}, \emph{shape}, \emph{appearance}, etc.). One sees them in academic literature from at least the seventeenth through the nineteenth centuries.\footnote{Books that use this package include: Löhe, \textit{The Pastor} [\textit{Der evangelische Geistliche}] (St.~Louis, 2015) and Schaum and Coll\-ver, \textit{Breath of God, Yet Work of Man} (St.~Louis, 2019).} +% This package uses boxes and math mode to typeset \emph{schemata} (plural of \gk{τό σχῆμα}{t'o sq~hma} or \emph{schema}, meaning \emph{form}, \emph{shape}, \emph{appearance}, etc.). One sees them in academic literature from at least the seventeenth through the nineteenth centuries.\footnote{Books that use this package include: Löhe, \textit{The Pastor} [\textit{Der evangelische Geistliche}] (St.~Louis, 2015) and Schaum and Coll\-ver, \textit{Breath of God, Yet Work of Man} (St.~Louis, 2019).} % % Packages like \emph{TikZ}, \textsf{PSTricks}, \MP, or other solutions have advantages over this one, especially for those seeking a top-to-bottom diagram.\footnote{For example: \textsc{H.~Dembowski}, \emph{Einf{\"u}hrung in die Christologie} (Darmstadt, 1993), 146.} % Yet these packages may present challenges if one has to implement both open \emph{and} closed braces in a schema, which math mode allows. @@ -369,7 +453,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % % \subsection[Loading and Options]{Package Loading and Options} % -% The \textsf{schemata} package is a minimal ``wrapper'' for math mode. It can be used with \LaTeX{} or with several generic formats, such as \PlainTeX{} and Eplain, even Lollipop, but not \textsc{Con\TeX t}:\footnote{It appears that \textsc{Con\TeX t} does not like nesting math-mode expressions within boxes in the manner used by this package. Barring a rewrite of \textsf{schemata}, that is the \emph{status controversiae}.} +% The \textsf{schemata} package is a minimal ``wrapper'' for math mode. It can be used with \LaTeX{} or with ``generic'' formats, including \PlainTeX, Eplain, and Lollipop.\footnote{\textsc{Con\TeX t} does not like the way that \textsf{schemata} nests math-mode expressions within boxes.} % \begin{quote} % \fbox{\begin{tabular}{ll} % {\Large\strut}For \LaTeX{} invoke: & \cmd{\usepackage}\oarg{options}\texttt{\{schemata\}}\\ @@ -378,12 +462,12 @@ and version 1.3 or later is part of all distributions of LaTeX version % \end{quote}\smallskip % % \DescribeMacro{\schemataLaTeX} -% Normally, \textsf{schemata} uses generic \TeX{} macros if the format is not \LaTeXe. When using a \LaTeX-like format with a different name than \texttt{LaTeX2e}, one theoretically could insert the following before |\usepackage{schemata}|: +% Normally, \textsf{schemata} uses generic \TeX{} macros if the format is not \LaTeXe. When using a \LaTeX-like format with a different name than \texttt{LaTeX2e}, one could insert the following before |\usepackage{schemata}|: % \begin{quote} % |\edef\schemataLaTeX{\fmtname}| % \end{quote} % -% Yet\Warn{} this is usually unneeded. We want \cmd{\schemataLaTeX} to be undefined before \texttt{schemata.sty} is loaded to get the default value \texttt{LaTeX2e}. We recommend not using this macro unless you know what you are doing.\medskip +% Yet\Warn{} this is usually unneeded. Normally we want \cmd{\schemataLaTeX} to be undefined before \texttt{schemata.sty} is loaded to get the default value \texttt{LaTeX2e}. We recommend not using this macro unless you know what you are doing.\medskip % % \LaTeX\Info{options} users can choose one among four package options: \texttt{braces}, \texttt{brackets}, \texttt{parens}, and \texttt{groups}. These set the defaults for the delimiters. If no options are chosen, the default is \texttt{braces}. % @@ -982,7 +1066,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % % Armed with this information, we sally forth to reproduce the following schema found on page 13 of Martin Chemnitz, \textit{Loci Theologici} (Frankfurt, 1653).\footnote{This image was created from a photograph taken by the author. It is the victim of a few cage transforms, despeckling, color selection and fill, color equalization, cleanup, scaling, and reduction to a two-color indexed palette.}\bigskip % -% \noindent\includegraphics[width=\textwidth]{schemata.png}\bigskip +% \noindent\includegraphics[width=\textwidth]{schemata.eps}\bigskip % % \begin{itemize} % \item As you see, the braces were composed of various type sorts, mainly smaller rules and assorted curly and bendy bits. @@ -1762,7 +1846,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % \smallskip % \schema % { -% \schemabox{\gk{logik~hs}, ut} +% \schemabox{\gk{λογικῆς}{logik~hs}, ut} % } % { % \schemabox{Angelorum.} \smallskip \schemabox{Hominum: Ad\ae{},\\ Ev\ae{} \& procreatorum\\ exipsis.\strut} @@ -1949,7 +2033,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % \NudgeSB\schemabox{Patre,\\ Filio,\\ Spiritui Sancto} % } % { -% \schemabox{\gk{<omoous'iois}\\ \& co\ae{}ternis} +% \schemabox{\gk{ὀμοουσίοις}{<omoous'iois}\\ \& co\ae{}ternis} % } % } % } @@ -1985,7 +2069,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % } % \end{displaymath}\egroup\smallskip % -% This listing of the previous example illustrates how one handles closed schemata. The macro \cmd{\gk} uses \textsf{babel} to create Greek text. +% This listing of the example above illustrates closed schemata. The macro \cmd{\gk} uses either \textsf{polyglossia} or \textsf{babel}. We cannot show Unicode Greek text in the verbatim environment; we substitute \texttt{xxxxx} for \gk{ὀμοουσίοις}{<omoous'iois}. % % \begin{quote}\small\StartNum % \begin{verbatim} @@ -2002,7 +2086,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % { % \Schema[close]{0ex}{3.4ex} % {\NudgeSB\schemabox{Patre,\\ Filio,\\ Spiritui Sancto}} -% {\schemabox{\gk{<omoous'iois}\\ \& co\ae{}ternis}} +% {\schemabox{\gk{xxxxx}{<omoous'iois}\\ \& co\ae{}ternis}} % } % } % \medskip @@ -2113,41 +2197,56 @@ and version 1.3 or later is part of all distributions of LaTeX version % \section{Implementation} % \small % -% Shorter macros are written in both \LaTeX{} and generic \TeX. Longer macros implement a platform-specific front end and a common back end. The macros default to \LaTeXe{} format. If the format test fails, then generic macros are selected.\medskip +% Shorter macros are written in both \LaTeX\ and generic \TeX. Longer macros implement both a \LaTeX\ and a generic front end with a common back end. +% +% If the format is ``LaTeX2e'' then the macros use the \LaTeXe{} front end. Otherwise they use generic \TeX, meaning \PlainTeX, eplain, and Lollipop\,---\,maybe others too, but they are not supported. +% +%In order to support such a diversity of formats and \TeX\ engines, we must avoid newer primitives like \cmd{\unless} and \texttt{\textbackslash ifdefined}. Thus, we must revert to the ``old'' way of testing whether or not a macro is defined. +% +% \begin{macro}{\schemataLaTeX} +% \changes{1.0}{2020/03/13}{Added format-specific features} +% \changes{1.3}{2020/03/13}{Fix format detection bug} +% Below we manually duplicate with verbatim material what we put early in the \texttt{dtx} file for the versioning information to work. The \cmd{\schemataLaTeX} macro normally is undefined until it is assigned the value of \texttt{LaTeX2e}, to be compared with \cmd{\fmtname}. If we are not using \LaTeXe, we do the equivalent of \cmd{\makeatletter} in either \PlainTeX\ or eplain.\medskip % % \bgroup\footnotesize\obeylines -% \leavevmode\llap{\scriptsize 1\ \ }\verb+%<package>{\expandafter}\expandafter\ifx \csname schemataLaTeX\endcsname\relax+ -% \leavevmode\llap{\scriptsize 2\ \ }\verb+%<package> \def\schemataLaTeX{LaTeX2e}\fi+ -% \leavevmode\llap{\scriptsize 3\ \ }\verb+%<package>\ifx\fmtname\schemataLaTeX+ -% \leavevmode\llap{\scriptsize 4\ \ }\verb+%<package>\expandafter\NeedsTeXFormat\expandafter{\schemataLaTeX}[2005/12/01]+ -% \leavevmode\llap{\scriptsize 5\ \ }\verb+%<package>\ProvidesPackage{schemata}+ -% \verb+%<*package>+ -% \leavevmode\llap{\scriptsize 6\ \ }\verb+ [2020/11/11 1.2 generic package to aid construction of topical categories]+ -% \verb+%</package>+ -% \leavevmode\llap{\scriptsize 7\ \ }\verb+%<package>\fi+ +% \leavevmode\llap{\hbox to 1em{\hfill\scriptsize 1}\ \ }\verb+%<package>\expandafter\ifx \csname schemataLaTeX\endcsname\relax+ +% \leavevmode\llap{\hbox to 1em{\hfill\scriptsize 2}\ \ }\verb+%<package> \def\schemataLaTeX{LaTeX2e}\fi+ +% \leavevmode\llap{\hbox to 1em{\hfill\scriptsize 3}\ \ }\verb+%<package>\ifx\fmtname\schemataLaTeX+ +% \leavevmode\llap{\hbox to 1em{\hfill\scriptsize 4}\ \ }\verb+%<package>\expandafter\NeedsTeXFormat\expandafter{\schemataLaTeX}[2005/12/01]+ +% \leavevmode\llap{\hbox to 1em{\hfill\scriptsize 5}\ \ }\verb+%<package>\ProvidesPackage{schemata}+ +% \leavevmode\llap{\hbox to 1em{\hfill\scriptsize 6}\ \ }\verb+%<*package>+ +% \leavevmode\llap{\hbox to 1em{\hfill\scriptsize 7}\ \ }\verb+ [2020/12/02 1.3 generic package to aid construction of topical categories]+ +% \leavevmode\llap{\hbox to 1em{\hfill\scriptsize 8}\ \ }\verb+%</package>+ +% \leavevmode\llap{\hbox to 1em{\hfill\scriptsize 9}\ \ }\verb+%<package>\else+ +% \leavevmode\llap{\hbox to 1em{\hfill\scriptsize 10}\ \ }\verb+%<package>\catcode`@=11\relax+ +% \leavevmode\llap{\hbox to 1em{\hfill\scriptsize 11}\ \ }\verb+%<package>\fi+ % \egroup -% \makeatletter\advance\c@CodelineNo by 7\makeatother +% \end{macro} +% \makeatletter\advance\c@CodelineNo by 11\makeatother % % \subsection{Internal Variables} % -% \changes{1.0}{2020/03/13}{current format handling} -% If we are not using \LaTeXe, we do the equivalent of \cmd{\makeatletter}. +% \begin{macro}{\@schemata@LaTeX} +% \changes{1.3}{2020/12/02}{Added} +% We declare the internal macro \cmd{\@schemata@LaTeX} to be the value of \cmd{\schemataLaTeX} to safeguard package operation. From this point onward we can display or query \cmd{\schemataLaTeX} for user-side tests without affecting package internals. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX\else - \catcode`@=11\relax -\fi +\edef\@schemata@LaTeX{\schemataLaTeX} % \end{macrocode} -% +% \end{macro} +% % \changes{0.8}{2016/01/25}{Rename box/dimen registers} % \changes{1.0}{2020/03/13}{Rename box/dimen registers} -%Two box registers and two dimen registers are used to analyze the left-hand and right-hand vertical sizes of the boxes in a schema. To make it less likely for these internal variables to be redefined, they are now more ``unique.'' +%Two box registers and two dimen registers are used to analyze the left-hand and right-hand vertical sizes of the boxes in a schema. Three more dimen registers are for scratchwork. % % \begin{macrocode} -\newbox\@schemata@rhs -\newbox\@schemata@lhs -\newdimen\@schemata@rheight -\newdimen\@schemata@lheight +\newbox\@schemata@rhs% +\newbox\@schemata@lhs% +\newdimen\@schemata@rheight% +\newdimen\@schemata@lheight% +\newdimen\@schemata@one% +\newdimen\@schemata@two% +\newdimen\@schemata@three% % \end{macrocode} % % \changes{0.6}{2013/03/10}{Added UC/LC tweaks.} @@ -2155,15 +2254,16 @@ and version 1.3 or later is part of all distributions of LaTeX version % Two Boolean flags affect the height of a \cmd{\schemabox}, respectively setting and toggling that height for lowercase and uppercase content in order to add or remove space for boxes with only lowercase text. % % \begin{macrocode} -\newif\if@schemata@LCBox -\newif\if@schemata@SWBox +\newif\if@schemata@LCBox% +\newif\if@schemata@SWBox% % \end{macrocode} % % This Boolean flag determines if a kern should be added to the end of each line in a \cmd{\schemabox} (helps with closed braces). % % \begin{macrocode} -\newif\if@schemata@NudgeBox +\newif\if@schemata@NudgeBox% % \end{macrocode} +% \newpage % % \subsection{Package Options} % @@ -2172,16 +2272,20 @@ and version 1.3 or later is part of all distributions of LaTeX version % We set braces to be the default set of delimiters. Apart from \LaTeXe{} we ignore the options. Three options are implemented, namely, \texttt{braces} (the default), \texttt{brackets}, and \texttt{parens}. Since the options are used infrequently, we naively process them in whatever order we get, each overwriting the last. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \DeclareOption{braces}% - {\let\@schemata@LD\lbrace \let\@schemata@RD\rbrace} + {\let\@schemata@LD\lbrace% + \let\@schemata@RD\rbrace} \DeclareOption{brackets}% - {\let\@schemata@LD\lbrack \let\@schemata@RD\rbrack} + {\let\@schemata@LD\lbrack% + \let\@schemata@RD\rbrack} \DeclareOption{parens}% - {\let\@schemata@LD( \let\@schemata@RD)} + {\let\@schemata@LD(% + \let\@schemata@RD)} \DeclareOption{groups}% - {\let\@schemata@LD\lgroup \let\@schemata@RD\rgroup} - \ExecuteOptions{braces} + {\let\@schemata@LD\lgroup% + \let\@schemata@RD\rgroup} + \ExecuteOptions{braces}% \ProcessOptions\relax \else \let\@schemata@LD\lbrace% @@ -2197,12 +2301,14 @@ and version 1.3 or later is part of all distributions of LaTeX version % Set the delimiters to be braces. This is local to a scope, including within a schema. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\DoBraces}% - {\let\@schemata@LD\lbrace \let\@schemata@RD\rbrace} + {\let\@schemata@LD\lbrace% + \let\@schemata@RD\rbrace} \else \def\DoBraces% - {\let\@schemata@LD\lbrace \let\@schemata@RD\rbrace} + {\let\@schemata@LD\lbrace% + \let\@schemata@RD\rbrace} \fi % \end{macrocode} % \end{macro} @@ -2213,12 +2319,14 @@ and version 1.3 or later is part of all distributions of LaTeX version % Set the delimiters to be brackets. This is local, as above. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\DoBrackets}% - {\let\@schemata@LD\lbrack \let\@schemata@RD\rbrack} + {\let\@schemata@LD\lbrack% + \let\@schemata@RD\rbrack} \else \def\DoBrackets% - {\let\@schemata@LD\lbrack \let\@schemata@RD\rbrack} + {\let\@schemata@LD\lbrack% + \let\@schemata@RD\rbrack} \fi % \end{macrocode} % \end{macro} @@ -2229,12 +2337,14 @@ and version 1.3 or later is part of all distributions of LaTeX version % Set the delimiters to be parentheses. This is local, as above. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\DoParens}% - {\let\@schemata@LD( \let\@schemata@RD)} + {\let\@schemata@LD(% + \let\@schemata@RD)} \else \def\DoParens% - {\let\@schemata@LD( \let\@schemata@RD)} + {\let\@schemata@LD(% + \let\@schemata@RD)} \fi % \end{macrocode} % \end{macro} @@ -2244,12 +2354,14 @@ and version 1.3 or later is part of all distributions of LaTeX version % Set the delimiters to be parentheses. This is local, as above. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\DoGroups}% - {\let\@schemata@LD\lgroup \let\@schemata@RD\rgroup} + {\let\@schemata@LD\lgroup% + \let\@schemata@RD\rgroup} \else \def\DoGroups% - {\let\@schemata@LD\lgroup \let\@schemata@RD\rgroup} + {\let\@schemata@LD\lgroup% + \let\@schemata@RD\rgroup} \fi % \end{macrocode} % \end{macro} @@ -2260,14 +2372,13 @@ and version 1.3 or later is part of all distributions of LaTeX version % Prevent \cmd{\schemabox} from adding a \cmd{\strut} in the first line. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\LCschema}{\@schemata@LCBoxtrue} \else \def\LCschema{\@schemata@LCBoxtrue} \fi % \end{macrocode} % \end{macro} -% \newpage % % \begin{macro}{\UCschema} % \changes{0.6}{2013/03/10}{Added macro} @@ -2275,7 +2386,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % Permit \cmd{\schemabox} to add a \cmd{\strut} in the first line (default). % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\UCschema}{\@schemata@LCBoxfalse} \else \def\UCschema{\@schemata@LCBoxfalse} @@ -2289,7 +2400,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % Flip the UC/LC settings for one \cmd{\schemabox}, which will reset this value on exit. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\SwitchSB}{\@schemata@SWBoxtrue}% \else \def\SwitchSB{\@schemata@SWBoxtrue} @@ -2303,7 +2414,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % Add a kern to the end of each line in one \cmd{\schemabox}. This will be reset on exit from that \cmd{\schemabox}. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\NudgeSB}{\@schemata@NudgeBoxtrue} \else \def\NudgeSB{\@schemata@NudgeBoxtrue} @@ -2316,23 +2427,24 @@ and version 1.3 or later is part of all distributions of LaTeX version % Define the \texttt{\textbackslash kern} to be added to the end of each line in one \cmd{\schemabox}. The default is \texttt{0.2em}, equal to the horizontal corrective. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand{\SBNudgeFactor}{\kern0.2em} \else \def\SBNudgeFactor{\kern0.2em} \fi % \end{macrocode} % \end{macro} +% \newpage % % \begin{macro}{\schemabox} % \changes{0.6}{2013/03/10}{Added lowercase tweaks} % \changes{0.8}{2016/01/25}{Added nudge feature; fix errors when not in internal vertical mode} % \changes{1.0}{2020/03/13}{Create front- and back-end; ensure short} -% \changes{1.2}{2020/11/11}{Fix namespace} +% \changes{1.2}{2020/11/23}{Fix namespace} % If in internal vertical mode, restricted horizontal mode, or math mode, wrap a stack of \cmd{\hbox}es in a \cmd{\vbox}, then put that inside an \cmd{\hbox}. The first argument sets an optional width for those \cmd{\hbox}es. Normally insert a \cmd{\strut} in the first \cmd{\hbox}. The second argument contains the rows of horizontal material, where |\\| is redefined to end one \cmd{\hbox} and begin another. When in any other mode mode, just display the second argument as text. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\schemabox}[2][0pt]{\@schemata@schemabox[#1]{#2}} \else \def\schemabox{\futurelet\@schemata@testchar\@schemata@schemab@x} @@ -2379,10 +2491,11 @@ and version 1.3 or later is part of all distributions of LaTeX version } % \end{macrocode} % \end{macro} +% \newpage % % \begin{macro}{\schema} % \changes{1.0}{2020/03/13}{create front- and back-end; ensure long} -% \changes{1.2}{2020/11/11}{Fix namespace} +% \changes{1.2}{2020/11/23}{Fix namespace} % This ``simple'' schema vertically centers two boxes of internal vertical material and puts a ``simple'' brace between the boxes based on the height of the box and the options passed to the schema. % % There is something of a ``magic'' value for adjusting the height used for the larger side of a \cmd{\schema}, namely \texttt{1.44265ex}. By using this adjustment, which is slightly larger than $\sqrt{2}$ times the ex-height of the font, the results look more aesthetically pleasing in terms of centering and size of the braces. @@ -2390,7 +2503,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % By default, a schema has a box to the left, an open delimiter, and a box to the right. If any optional argument other than \texttt{open} is used, the schema prints a box to the left, a close brace, and a box to the right. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand{\schema}[3][open]{% \@schemata@schema[#1]{#2}{#3}} \else @@ -2428,14 +2541,15 @@ and version 1.3 or later is part of all distributions of LaTeX version } % \end{macrocode} % \end{macro} +% \newpage % % \begin{macro}{\Schema} % \changes{1.0}{2020/03/13}{create front- and back-end; ensure long} -% \changes{1.2}{2020/11/11}{Fix namespace} +% \changes{1.2}{2020/11/23}{Fix namespace} % This is the general-purpose form of schemata. The arguments include whether it is an open or closed schema, the vertical adjustment of the left-hand side and delimiter over against the right-hand side, the size of the brace, and the contents of the left and right-hand sizes. It works about the same as above, but requires manual adjustment of the braces. Again we see the ``magic'' height adjustment value of \texttt{1.44265ex}. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand{\Schema}[5][open]{% \@schemata@Schema[#1]{#2}{#3}{#4}{#5}} \else @@ -2454,18 +2568,17 @@ and version 1.3 or later is part of all distributions of LaTeX version \long\def\@schemata@Schema[#1]#2#3#4#5{% \def\@schemata@option{#1}% \def\@schemata@open{open}% - \dimen0=#2% + \@schemata@one=#2% \ifx\@schemata@option\@schemata@open - \hbox{$\vcenter{\vskip1.44265\dimen0#4}% + \hbox{$\vcenter{\vskip1.44265\@schemata@one#4}% \@schemata@biglbrace{#2}{#3}\vcenter{#5}$}% \else - \hbox{$\vcenter{\vskip1.44265\dimen0#4}\kern-0.2em% + \hbox{$\vcenter{\vskip1.44265\@schemata@one#4}\kern-0.2em% \@schemata@bigrbrace{#2}{#3}\vcenter{#5}$}% \fi } % \end{macrocode} % \end{macro} -% \newpage % % \begin{macro}{\@schemata@lbrace} % \changes{0.8}{2016/01/25}{Renamed} @@ -2473,7 +2586,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % Draw an on-center delimiter to the left of a simple box. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\@schemata@lbrace}[1]{% \ifmmode \left.\vcenter{\vbox to #1{\vfil}}\right\@schemata@LD% @@ -2488,6 +2601,7 @@ and version 1.3 or later is part of all distributions of LaTeX version \fi % \end{macrocode} % \end{macro} +% \newpage % % \begin{macro}{\@schemata@rbrace} % \changes{0.8}{2016/01/25}{Renamed} @@ -2495,7 +2609,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % Draw an on-center delimiter to the right of a simple box. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\@schemata@rbrace}[1]{% \ifmmode \left\@schemata@RD\vcenter{\vbox to #1{\vfil}}\right.% @@ -2517,7 +2631,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % Draw a vertically-adjustable delimiter to the left of a complex assortment of boxes. Again we see the ``magic'' height adjustment value of \texttt{1.44265ex}, but both positive and negative. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\@schemata@biglbrace}[2]{% \@schemata@@biglbrace{#1}{#2}} \else @@ -2525,24 +2639,26 @@ and version 1.3 or later is part of all distributions of LaTeX version \@schemata@@biglbrace{#1}{#2}} \fi \def\@schemata@@biglbrace#1#2{% - \dimen0=#1% - \dimen2=#2% - \dimen4=-\dimen2% - \ifdim\dimen4>\dimen2\dimen2=\dimen4\fi - \ifdim\dimen0<0pt + \@schemata@one=#1% + \@schemata@two=#2% + \@schemata@three=-\@schemata@two% + \ifdim\@schemata@three>\@schemata@two% + \@schemata@two=\@schemata@three\fi + \ifdim\@schemata@one<0pt \ifmmode\vcenter{\hbox{$\left.% - \vbox to 1.44265\dimen2{\vfil}% + \vbox to 1.44265\@schemata@two{\vfil}% \right\@schemata@LD% - \atop\vbox to -1.44265\dimen0{\vfil}$}}\fi + \atop\vbox to -1.44265\@schemata@one{\vfil}$}}\fi \else - \ifmmode\vcenter{\hbox{$\vbox to 1.44265\dimen0{\vfil}% + \ifmmode\vcenter{\hbox{$\vbox to 1.44265\@schemata@one{\vfil}% \atop\left.% - \vbox to 1.44265\dimen2{\vfil}% + \vbox to 1.44265\@schemata@two{\vfil}% \right\@schemata@LD$}}\fi \fi } % \end{macrocode} % \end{macro} +% \newpage % % \begin{macro}{\@schemata@bigrbrace} % \changes{0.8}{2016/01/25}{Renamed; Use absolute value of brace size} @@ -2550,7 +2666,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % Draw a vertically-adjustable delimiter to the right of a complex assortment of boxes. Again we see the ``magic'' height adjustment value of \texttt{1.44265ex}, but both positive and negative. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX +\ifx\fmtname\@schemata@LaTeX \newcommand*{\@schemata@bigrbrace}[2]{% \@schemata@@bigrbrace{#1}{#2}% } @@ -2560,19 +2676,20 @@ and version 1.3 or later is part of all distributions of LaTeX version } \fi \def\@schemata@@bigrbrace#1#2{% - \dimen0=#1% - \dimen2=#2% - \dimen4=-\dimen2% - \ifdim\dimen4>\dimen2\dimen2=\dimen4\fi - \ifdim\dimen0<0pt + \@schemata@one=#1% + \@schemata@two=#2% + \@schemata@three=-\@schemata@two% + \ifdim\@schemata@three>\@schemata@two% + \@schemata@two=\@schemata@three\fi + \ifdim\@schemata@one<0pt \ifmmode\vcenter{\hbox{$\left.% - \vbox to 1.44265\dimen2{\vfil}% + \vbox to 1.44265\@schemata@two{\vfil}% \right\@schemata@RD% - \atop\vbox to -1.44265\dimen0{\vfil}$}}\fi + \atop\vbox to -1.44265\@schemata@one{\vfil}$}}\fi \else - \ifmmode\vcenter{\hbox{$\vbox to 1.44265\dimen0{\vfil}% + \ifmmode\vcenter{\hbox{$\vbox to 1.44265\@schemata@one{\vfil}% \atop\left.% - \vbox to 1.44265\dimen2{\vfil}% + \vbox to 1.44265\@schemata@two{\vfil}% \right\@schemata@RD$}}\fi \fi } @@ -2582,7 +2699,7 @@ and version 1.3 or later is part of all distributions of LaTeX version % If we are not using \LaTeXe, we do the equivalent of \cmd{\makeatother}. % % \begin{macrocode} -\ifx\fmtname\schemataLaTeX\else +\ifx\fmtname\@schemata@LaTeX\else \catcode`@=12\relax \fi % \end{macrocode} @@ -2596,32 +2713,70 @@ and version 1.3 or later is part of all distributions of LaTeX version \def\nameoflatex{LaTeX2e} \def\nameoflollipop{Lollipop} % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % See README.md for compiling this document. % \ifx\fmtname\nameoflatex \documentclass[10pt]{article} - \usepackage[T1]{fontenc} - \usepackage[polutonikogreek,american]{babel} - \newcommand{\gk}[1]{\foreignlanguage{polutonikogreek}{#1}} - \usepackage{schemata} + \expandafter\ifx \csname Umathchar\endcsname\relax + \usepackage[T1]{fontenc} + \usepackage[polutonikogreek,american]{babel} + \else + \usepackage{fontspec} + \usepackage{polyglossia} + \setdefaultlanguage{american} + \setotherlanguage[variant=ancient]{greek} + \newfontfamily\greekfont{GFSDidot.otf} + \fi +% +% Using the default option is a secondary test for mode detection. +% + \usepackage[braces]{schemata}[2020/12/02] \begin{document} \else \ifx\fmtname\nameoflollipop \input schemata.sty \font\scshape=cmcsc10 \def\textsc#1{\bgroup\scshape #1\egroup} - \def\gk#1{\bgroup\it #1\egroup} \Start \else \input schemata.sty \font\scshape=cmcsc10 \def\textsc#1{\bgroup\scshape #1\egroup} - \def\gk#1{\bgroup\it #1\egroup} \fi \fi +% +% Handle various ways of dealing with Greek. +% +\def\gk#1#2#3{% +% Only show Greek text when using LaTeX2e + \ifx\fmtname\nameoflatex + \expandafter\ifx \csname Umathchar\endcsname\relax +% pdflatex / latex + \foreignlanguage{polutonikogreek}{#2}% + \else +% xelatex / lualatex + \textgreek{#1}% + \fi +% All other formats + \else +% Show transliterated equivalents for Greek + \bgroup\it #3\egroup% + \fi +} Format: \fmtname\par - +Test value: \schemataLaTeX\par +\catcode`@=11\relax +Internal test value: \@schemata@LaTeX\par +\catcode`@=12\relax\par + +Due to restrictions for dealing with so many formats,\par +Greek character text will appear with:\par +\ \kern 1em pdflatex / latex (babel)\par +\ \kern 1em xelatex / lualatex (polyglossia)\par +All other formats will have transliterated text instead of Greek.\par +\vfil $$ \Schema{-1ex}{8.7ex} { @@ -2659,7 +2814,11 @@ $$ } } $$ +\vfil +\eject +\hbox{\ } +\vfil $$ \Schema{-25ex}{20.6ex} { @@ -2749,15 +2908,12 @@ $$ } } $$ - +\vfil \eject \bgroup - -\ifx\fmtname\nameofeplain -\verbatim \DoParens |endverbatim -\fi -\DoParens% +{\tt\char`\\ DoParens}\DoParens +\hbox{\ } \vfil $$ \Schema{-26ex}{21.5ex} @@ -2806,7 +2962,7 @@ $$ \smallskip \schema { - \schemabox{\ifx\fmtname\nameoflatex\gk{logik~hs}\else\gk{logik\=es}\fi, ut} + \schemabox{\gk{λογικῆς}{logik~hs}{logik\=es}, ut} } { \schemabox{Angelorum.} \smallskip \schemabox{Hominum: Ad\ae{},\\ Ev\ae{} \& procreatorum\\ exipsis.} @@ -2869,14 +3025,10 @@ $$ } $$ \vfil - \eject -\ifx\fmtname\nameofeplain -\verbatim \DoGroups |endverbatim -\fi -\DoGroups - +{\tt\char`\\ DoGroups}\DoGroups +\hbox{\ } \vfil $$ \Schema{-26.5ex}{21ex} @@ -2925,7 +3077,7 @@ $$ \smallskip \schema { - \schemabox{\ifx\fmtname\nameoflatex\gk{logik~hs}\else\gk{logik\=es}\fi, ut} + \schemabox{\gk{λογικῆς}{logik~hs}{logik\=es}, ut} } { \schemabox{Angelorum.} \smallskip \schemabox{Hominum: Ad\ae{},\\ Ev\ae{} \& procreatorum\\ exipsis.\strut} @@ -2989,9 +3141,10 @@ $$ $$ \vfil \egroup - \eject +\hbox{\ } +\vfil $$ \Schema{-1.4ex}{10ex} { @@ -3015,7 +3168,7 @@ $$ \NudgeSB\schemabox{Patre,\\ Filio,\\ Spiritui Sancto} } { - \schemabox{\ifx\fmtname\nameoflatex\gk{<omoous'iois}\else\gk{homoousiois}\fi\\ \& co\ae{}ternis} + \schemabox{\gk{ὁμοουσίοις}{<omoous'iois}{homoousiois}\\ \& co\ae{}ternis} } } } @@ -3051,7 +3204,11 @@ $$ } $$ -\vfill +\vfil +\eject + +\hbox{\ } +\vfil % Use here in Plain TeX. \newbox\mybox $$ @@ -3087,6 +3244,9 @@ $$ 2. Specialized Works}} } $$ +\vfil +\eject + \ifx\fmtname\nameoflatex \end{document} \else |