summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/realscripts/README.md77
-rw-r--r--macros/latex/contrib/realscripts/realscripts.dtx419
-rw-r--r--macros/latex/contrib/realscripts/realscripts.ins58
-rw-r--r--macros/latex/contrib/realscripts/realscripts.pdfbin106569 -> 0 bytes
-rw-r--r--macros/latex/contrib/textpos/README26
-rw-r--r--macros/latex/contrib/textpos/VERSION-1.101
-rw-r--r--macros/latex/contrib/textpos/VERSION-1.9.11
-rw-r--r--macros/latex/contrib/textpos/examples/t1.tex24
-rw-r--r--macros/latex/contrib/textpos/examples/t11.tex90
-rw-r--r--macros/latex/contrib/textpos/niepraschk-eso-pic.pdfbin37258 -> 37246 bytes
-rw-r--r--macros/latex/contrib/textpos/textpos.dtx353
-rw-r--r--macros/latex/contrib/textpos/textpos.html81
-rw-r--r--macros/latex/contrib/textpos/textpos.pdfbin262834 -> 278433 bytes
-rw-r--r--macros/latex/contrib/xltxtra/README.md64
-rw-r--r--macros/latex/contrib/xltxtra/xltxtra.dtx534
-rw-r--r--macros/latex/contrib/xltxtra/xltxtra.ins34
-rw-r--r--macros/latex/contrib/xltxtra/xltxtra.pdfbin101885 -> 0 bytes
17 files changed, 420 insertions, 1342 deletions
diff --git a/macros/latex/contrib/realscripts/README.md b/macros/latex/contrib/realscripts/README.md
deleted file mode 100644
index a98194ad9a..0000000000
--- a/macros/latex/contrib/realscripts/README.md
+++ /dev/null
@@ -1,77 +0,0 @@
-The REALSCRIPTS package
-=======================
-
-Small package to replace `\textsuperscript` & `\textsubscript`
-by equivalent commands that use OpenType font features
-to access the appropriate glyphs if possible.
-
-Provides `\textsubsuperscript` (and `\textsupersubscript`) for
-setting subscripts and superscripts on top of each other.
-
-Also patches LaTeX's default footnote command to use this
-new `\textsuperscript` for footnote symbols.
-
-Requires fontspec running on either XeLaTeX or LuaLaTeX.
-
-For more information see the documentation realscripts.pdf.
-
-Change History
---------------
-
-v0.3d 2016/02/13
-
- * Fix somewhat important typo in the documentation.
- * Minor other updates to the docs.
- * Fix old expl3 syntax change.
-
-v0.3c 2013/03/18
-
- * Fix completely broken `\textsupersubscript`.
- * Allow `\textsubsuperscript` at the start of a paragraph (!).
- * Sync with expl3 updates.
-
-v0.3b 2013/02/27
-
- * Remove internal definition of two functions that have since been defined
- in expl3 (`\dim_min:nn` and `\dim_max:nn`).
-
-v0.3 2010/09/30
-
- * New commands `\textsubsuperscript` and `\textsupersubscript` added.
- * Fix an "infinite loop" bug added in the last version, triggered
- when loading the `xltxtra` package with the `[no-sscript]` option.
-
-
-v0.2 2010/09/20
-
- * Add feature to specify the font of the patched footnotemark.
- This behaves well with KOMA-Script's `\setkomafont`, as well.
-
-v0.1
-
- * First release
- * Extracted from the xltxtra package
-
-Maintenance
------------
-
-The release version of this package is available from CTAN:
-
-* <http://ctan.org/pkg/realscripts>
-
-Development and historical versions are available from GitHub:
-
-* <http://github.com/wspr/realscripts/>
-
-Please report bugs and feature suggestions to the issue tracker:
-
-* <http://github.com/wspr/realscripts/issues>
-
-Licence
--------
-
-The realscripts package is released under the
-[LaTeX Project Public License](http://www.latex-project.org/lppl/)
-version 1.3c or greater. The current maintainer is Will Robertson.
-
-Copyright 2010 Will Robertson
diff --git a/macros/latex/contrib/realscripts/realscripts.dtx b/macros/latex/contrib/realscripts/realscripts.dtx
deleted file mode 100644
index e59103e55a..0000000000
--- a/macros/latex/contrib/realscripts/realscripts.dtx
+++ /dev/null
@@ -1,419 +0,0 @@
-% \iffalse
-%
-%<*internal>
-\begingroup
-%</internal>
-%<*batchfile>
-\input docstrip.tex
-\keepsilent
-\preamble
- _____________________________
- The REALSCRIPTS package
- (C) 2010--2016 Will Robertson
- License information appended
-
-\endpreamble
-\postamble
-
-Copyright (C) 2010--2016 by Will Robertson <will.robertson@latex-project.org>
-
-Distributable under the LaTeX Project Public License,
-version 1.3c or higher (your choice). The latest version of
-this license is at: http://www.latex-project.org/lppl.txt
-
-This work is "maintained" (as per LPPL maintenance status)
-by Will Robertson.
-
-This work consists of the file realscripts.dtx
- and the derived files realscripts.sty,
- realscripts.ins, and
- realscripts.pdf.
-
-\endpostamble
-\askforoverwritefalse
-\generate{\file{realscripts.sty}{\from{realscripts.dtx}{package}}}
-%</batchfile>
-%<batchfile>\endbatchfile
-%<*internal>
-\generate{\file{realscripts.ins}{\from{realscripts.dtx}{batchfile}}}
-\def\tmpa{plain}
-\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
-\endgroup
-%</internal>
-%
-% \begin{macrocode}
-%<*driver>
-\ProvidesFile{realscripts.dtx}
-%</driver>
-%<package>\ProvidesPackage{realscripts}
-%<*package>
- [2016/02/13 v0.3d Access OpenType subscripts and superscripts]
-%</package>
-% \end{macrocode}
-%
-%<*driver>
-\documentclass{ltxdoc}
-\usepackage{color,graphicx,metalogo,hologo,fontspec,realscripts}
-\linespread{1.05} % A bit more space between lines
-\frenchspacing % Remove extra space after punctuation
-\definecolor{niceblue}{rgb}{0.1,0.2,1}
-\def\theCodelineNo{\textcolor{niceblue}{\sffamily\tiny\arabic{CodelineNo}}}
-\newcommand*\pkg[1]{\texttt{#1}}
-\begin{document}
- \DocInput{\jobname.dtx}
-\end{document}
-%</driver>
-%
-% \fi
-%
-% \errorcontextlines=999
-% \makeatletter
-%
-% \GetFileInfo{\jobname.sty}
-%
-% \title{The \pkg{\jobname} package}
-% \author{Will Robertson}
-% \date{\filedate \qquad \fileversion}
-%
-% \maketitle
-%
-% \section{Introduction}
-%
-% OpenType fonts provide the possiblity of using specially-drawn glyphs for
-% subscript and superscript text. \LaTeX\ by default simply uses a smaller
-% font size, which is acceptable if the font has optical sizes. Most fonts
-% don't, however.
-%
-% If you are using the \pkg{fontspec} package\footnote{The \pkg{fontspec} package requires \XeLaTeX\ or \hologo{LuaLaTeX}.} to select OpenType fonts
-% (or other sorts of fonts with the necessary font features), then loading
-% this package will redefine the \cmd\textsuperscript\ and
-% \cmd\textsubscript\ commands that take advantage of the OpenType font
-% features.
-%
-% The \cs{textsubsuperscript}\marg{sub}\marg{super} command is
-% defined for typesetting superscripts above subscripts using the same
-% approach. For symmetry, \cs{textsupersubscript}\marg{super}\marg{sub}
-% is also provided. Options are available to specify the alignment of the sub- and super-scripts; see below.
-%
-% \section{Technical details}
-%
-% The old commands are defined in starred form (e.g., \cs{textsubscript*}) for cases where the new commands are not appropriate.
-% The functionality of the starred and non-starred commands can
-% also be accessed using the macros
-% \cmd\realsubscript,
-% \cmd\realsuperscript,
-% \cmd\fakesubscript, and
-% \cmd\fakesuperscript, in case another package (or you)
-% redefine the original \cmd\text\dots\ commands.
-%
-% This package will also patch the default \LaTeX\ footnote mechanism to
-% use \cs{textsuperscript} automatically. You may change the font used
-% to typeset the footnote numbers (by default it is the \cs{normalfont})
-% by redefining \cs{footnotemarkfont}; e.g.:
-% {\par\qquad\verb|\renewcommand\footnotemarkfont|\marg{font switch}\par}
-% \noindent and users of \pkg{KOMA-Script} may use instead
-% {\par\qquad\verb|\setkomafont{footnotelabel}|\marg{font switch}\par}
-% \noindent where \meta{font switch} is a command such as \cs{sffamily} or a \pkg{fontspec} font defined with \cs{newfontfamily}.
-%
-% Beware of other packages, however, that change the footnote mechanism. (Usually by redefining \cs{@makefnmark}.) I can often work around or work with such packages so \pkg{realscripts} cooperates gracefully with them; please report any conflicts to me.
-%
-% \section{Examples}
-%
-% Here is an example using the `{\fontspec{Skia} Skia}' font of Mac\,OS\,X: (surrounded by `A' and `Z' for visual context)
-%
-% \begin{quotation}\color{niceblue}
-% \fontspec{Skia}
-% |\textsuperscript{…} | A \textsuperscript{abcdefghijklmnopqrstuvwxyz1234567890} Z\par
-% |\textsubscript{…} | A \textsubscript{abcdefghijklmnopqrstuvwxyz1234567890} Z
-% \end{quotation}
-% The original definitions are available in starred verions of the commands:
-% (compare this example to that above to see why using these features is often desirable)
-% \begin{quotation}\color{niceblue}
-% \fontspec{Skia}
-% |\textsuperscript*{…} | A \textsuperscript*{abcdefghijklmnopqrstuvwxyz1234567890} Z\par
-% |\textsubscript*{…} | A \textsubscript*{abcdefghijklmnopqrstuvwxyz1234567890} Z
-% \end{quotation}
-% When the font features are not available the commands will fall back on the standard technique of scaling down the text font:
-% (this is Mac\,OS\,X's `{\fontspec{Didot} Didot}')
-% \begin{quotation}\color{niceblue}
-% \fontspec{Didot}
-% |\textsuperscript{…} | A \textsuperscript{abcdefghijklmnopqrstuvwxyz1234567890} Z\par
-% |\textsubscript{…} | A \textsubscript{abcdefghijklmnopqrstuvwxyz1234567890} Z
-% \end{quotation}
-% But beware fonts that contain the necessary font features but lack the full repertoire of glyphs: (this is `{\fontspec{Adobe Jenson Pro}Adobe Jenson Pro}')
-% \begin{quotation}\color{niceblue}
-% \fontspec{Adobe Jenson Pro}
-% |\textsuperscript{…} | A {\textsuperscript{abcdefghijklmnopqrstuvwxyz1234567890}} Z\par
-% |\textsubscript{…} | A {\textsubscript{abcdefghijklmnopqrstuvwxyz1234567890}} Z
-% \end{quotation}
-% Finally, the `combined' commands. Note the dimension available
-% to add some extra space between the sub- and super-scripts, and
-% the optional argument for specifying alignment.
-% \begin{quotation}\color{niceblue}
-% \fontspec{Skia}
-% |\textsubsuperscript{…}{…} |
-% A {\textsubsuperscript{123456}{789}} Z\par\smallskip
-% |\setlength\subsupersep{2pt} | \subsupersep=2pt
-% A {\textsubsuperscript{123456}{789}} Z\par\smallskip
-% |\textsubsuperscript[c]{…}{…} |
-% A {\textsubsuperscript[c]{123}{456789}} Z\par\smallskip
-% |\textsubsuperscript[r]{…}{…} |
-% A {\textsubsuperscript[r]{123456}{789}} Z\par\smallskip
-% \end{quotation}
-%
-% \newpage
-% \part{Implementation of \textsf{\jobname}}
-%\iffalse
-%<*package>
-%\fi
-% This is the package implementation.
-% If you're only interested in the footnote redefinition,
-% skip ahead to Section~\ref{sec:fn} on page~\pageref{sec:fn}.
-%
-% \begin{macrocode}
-\RequirePackage{fontspec}
-\ExplSyntaxOn
-% \end{macrocode}
-%
-% \begin{macro}{\fakesubscript}
-% \begin{macro}{\fakesuperscript}
-% The old (`fake') methods.
-% Because \cs{textsubscript} is not defined in \LaTeXe,
-% we either define it from scratch along with \cs{textsuperscript}
-% (for consistency).
-% \begin{macrocode}
-\DeclareDocumentCommand \fakesubscript {m} {
- \@textsubscript{\selectfont#1}
-}
-\DeclareDocumentCommand \fakesuperscript {m} {
- \@textsuperscript{\selectfont#1}
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\textsubscript}
-% \begin{macro}{\textsubscript*}
-% \begin{macro}{\textsuperscript}
-% \begin{macro}{\textsuperscript*}
-% These commands are either defined to create fake or real sub-/super-scripts if they are starred or not, respectively.
-% \begin{macrocode}
-\RenewDocumentCommand \textsubscript {s} {
- \IfBooleanTF #1 \fakesubscript \realsubscript
-}
-\RenewDocumentCommand \textsuperscript {s} {
- \IfBooleanTF #1 \fakesuperscript \realsuperscript
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\realsubscript}
-% The new subscript command to use rich font features if possible.
-% \begin{macrocode}
-\DeclareDocumentCommand \realsubscript {m} {
- \fontspec_if_fontspec_font:TF {
-% \end{macrocode}
-% For OpenType fonts, the subscript feature (|subs|) is used, but if that doesn't
-% exist then the scientific inferior feature (|sinf|) is used on the assumption
-% that something's better than nothing.
-% \begin{macrocode}
- \fontspec_if_opentype:TF
- { \fontspec_if_feature:nTF {+subs}
- { {\addfontfeature{VerticalPosition=Inferior}#1} }
- { \fontspec_if_feature:nTF {+sinf}
- { {\addfontfeature{VerticalPosition=ScientificInferior}#1} }
- { \fakesubscript{#1} }
- }
- }
-% \end{macrocode}
-% ATSUI fonts:
-% \begin{macrocode}
- { \fontspec_if_aat_feature:nnTF {10} {2}
- { {\addfontfeature{VerticalPosition=Inferior}#1} }
- { \fakesubscript{#1} }
- }
- }
-% \end{macrocode}
-% Non-fontspec fonts:
-% \begin{macrocode}
- { \fakesubscript{#1} }
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\realsuperscript}
-% The new superscript command to use rich font features if possible.
-% \begin{macrocode}
-\DeclareDocumentCommand \realsuperscript {m} {
- \fontspec_if_fontspec_font:TF
- {
-% \end{macrocode}
-% OpenType fonts:
-% \begin{macrocode}
- \fontspec_if_opentype:TF
- { \fontspec_if_feature:nTF {+sups}
- { {\addfontfeature{VerticalPosition=Superior}#1} }
- { \fakesuperscript{#1} }
- }
-% \end{macrocode}
-% ATSUI fonts:
-% \begin{macrocode}
- { \fontspec_if_aat_feature:nnTF {10} {1}
- { {\addfontfeature{VerticalPosition=Superior}#1} }
- { \fakesuperscript{#1} }
- }
- }
-% \end{macrocode}
-% Non-fontspec fonts:
-% \begin{macrocode}
- { \fakesuperscript{#1} }
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \section{Patching footnotes}
-% \label{sec:fn}
-%
-% \begin{macro}{\@makefnmark}
-% This is the command used to typeset the `footnote mark'.
-% Feel free to redefine it as necessary for your own purposes.
-% \begin{macrocode}
-\cs_set:Npn \@makefnmark {
- \mbox{\footnotemarkfont\textsuperscript{\@thefnmark}}
-}
-% \end{macrocode}
-% We define a \cs{footnotemarkfont} that is used to style
-% the number used for the footnote, which by default is
-% simply \cs{normalfont} (following \LaTeXe's default).
-% If \pkg{KOMA-Script} is
-% being used, we use their hook for the footnotemark font instead.
-% \begin{macrocode}
-\cs_if_exist:NTF \ftntm@font
-{
- \cs_new:Npn \footnotemarkfont {\ftntm@font}
-}
-{
- \cs_new:Npn \footnotemarkfont {\normalfont}
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \section{sub+super}
-%
-% \begin{macro}{\textsubsuperscript}
-% \begin{macro}{\textsupersubscript}
-% Although the implementation below would be fine outside of this package too,
-% no point writing yet another small package.
-% \begin{macrocode}
-\DeclareDocumentCommand \textsubsuperscript {s O{l} mm} {
- \leavevmode
- \group_begin:
- \IfBooleanTF #1
- {
- \hbox_set:Nn \l_tmpa_box {\textsubscript*{#3}}
- \hbox_set:Nn \l_tmpb_box {\textsuperscript*{#4}}
- }
- {
- \hbox_set:Nn \l_tmpa_box {\textsubscript{#3}}
- \hbox_set:Nn \l_tmpb_box {\textsuperscript{#4}}
- }
- \hbox_set:Nn \l_tmpa_box
- { \box_move_down:nn \subsupersep {\box_use:N \l_tmpa_box} }
- \hbox_set:Nn \l_tmpb_box
- { \box_move_up:nn \subsupersep {\box_use:N \l_tmpb_box} }
- \str_case:nnF {#2}
- {
- {l}{\use_i:nnn}
- {c}{\use_ii:nnn}
- {r}{\use_iii:nnn}
- }
- {
- \PackageWarning{realscripts}{
- Unknown~alignment~option~`#2'. \MessageBreak
- One~ of~ `l',~ `c',~ `r',~ only
- }
- \use_i:nnn
- }
-% \end{macrocode}
-% Left aligned:
-% \begin{macrocode}
- {
- \hbox_overlap_right:n { \box_use:N \l_tmpa_box }
- \hbox_overlap_right:n { \box_use:N \l_tmpb_box }
- \skip_horizontal:n {
- \dim_max:nn {\box_wd:N \l_tmpa_box} {\box_wd:N \l_tmpb_box}
- }
- }
-% \end{macrocode}
-% Center aligned: (for completeness)
-% \begin{macrocode}
- {
- \dim_compare:nTF { \box_wd:N \l_tmpa_box > \box_wd:N \l_tmpb_box }
- {
- \skip_horizontal:n {
- 0.5\box_wd:N \l_tmpa_box-0.5\box_wd:N \l_tmpb_box
- }
- \box_use:N \l_tmpb_box
- \skip_horizontal:n {
- -0.5\box_wd:N \l_tmpa_box-0.5\box_wd:N \l_tmpb_box
- }
- \box_use:N \l_tmpa_box
- }
- {
- \skip_horizontal:n {
- 0.5\box_wd:N \l_tmpb_box-0.5\box_wd:N \l_tmpa_box
- }
- \box_use:N \l_tmpa_box
- \skip_horizontal:n {
- -0.5\box_wd:N \l_tmpb_box-0.5\box_wd:N \l_tmpa_box
- }
- \box_use:N \l_tmpb_box
- }
- }
-% \end{macrocode}
-% Right aligned:
-% \begin{macrocode}
- {
- \skip_horizontal:n {
- \dim_max:nn {\box_wd:N \l_tmpa_box} {\box_wd:N \l_tmpb_box}
- }
- \hbox_overlap_left:n { \box_use:N \l_tmpa_box }
- \hbox_overlap_left:n { \box_use:N \l_tmpb_box }
- }
- \group_end:
-}
-\DeclareDocumentCommand \textsupersubscript {s O{l} mm} {
- \IfBooleanTF #1
- { \textsubsuperscript * [#2] {#4} {#3} }
- { \textsubsuperscript [#2] {#4} {#3} }
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\dim_new:N \subsupersep
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% Fin.
-%
-%\iffalse
-%</package>
-%\fi
-%
-% \Finale
-%
-% \typeout{*************************************************************}
-% \typeout{*}
-% \typeout{* To finish the installation you have to move the following}
-% \typeout{* file into a directory searched by XeTeX:}
-% \typeout{*}
-% \typeout{* \space\space\space realscripts.sty}
-% \typeout{*}
-% \typeout{*************************************************************}
-%
-\endinput
-
diff --git a/macros/latex/contrib/realscripts/realscripts.ins b/macros/latex/contrib/realscripts/realscripts.ins
deleted file mode 100644
index c68d0669cd..0000000000
--- a/macros/latex/contrib/realscripts/realscripts.ins
+++ /dev/null
@@ -1,58 +0,0 @@
-%%
-%% This is file `realscripts.ins',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% realscripts.dtx (with options: `batchfile')
-%% _____________________________
-%% The REALSCRIPTS package
-%% (C) 2010--2016 Will Robertson
-%% License information appended
-%%
-\input docstrip.tex
-\keepsilent
-\preamble
- _____________________________
- The REALSCRIPTS package
- (C) 2010--2016 Will Robertson
- License information appended
-
-\endpreamble
-\postamble
-
-Copyright (C) 2010--2016 by Will Robertson <will.robertson@latex-project.org>
-
-Distributable under the LaTeX Project Public License,
-version 1.3c or higher (your choice). The latest version of
-this license is at: http://www.latex-project.org/lppl.txt
-
-This work is "maintained" (as per LPPL maintenance status)
-by Will Robertson.
-
-This work consists of the file realscripts.dtx
- and the derived files realscripts.sty,
- realscripts.ins, and
- realscripts.pdf.
-
-\endpostamble
-\askforoverwritefalse
-\generate{\file{realscripts.sty}{\from{realscripts.dtx}{package}}}
-\endbatchfile
-%%
-%% Copyright (C) 2010--2016 by Will Robertson <will.robertson@latex-project.org>
-%%
-%% Distributable under the LaTeX Project Public License,
-%% version 1.3c or higher (your choice). The latest version of
-%% this license is at: http://www.latex-project.org/lppl.txt
-%%
-%% This work is "maintained" (as per LPPL maintenance status)
-%% by Will Robertson.
-%%
-%% This work consists of the file realscripts.dtx
-%% and the derived files realscripts.sty,
-%% realscripts.ins, and
-%% realscripts.pdf.
-%%
-%%
-%% End of file `realscripts.ins'.
diff --git a/macros/latex/contrib/realscripts/realscripts.pdf b/macros/latex/contrib/realscripts/realscripts.pdf
deleted file mode 100644
index dc2e2e8dc7..0000000000
--- a/macros/latex/contrib/realscripts/realscripts.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/textpos/README b/macros/latex/contrib/textpos/README
index 47e5085aad..c5a09cef8a 100644
--- a/macros/latex/contrib/textpos/README
+++ b/macros/latex/contrib/textpos/README
@@ -1,8 +1,7 @@
-
Textpos: absolute positioning of text on the LaTeX page
--------------------------------------------------------
+=======================================================
-Version 1.9.1, 2019 April 15
+Version 1.10, 2020 September 26
This package facilitates placing boxes at absolute positions on the
LaTeX page. There are several reasons why this might be useful, but
@@ -15,34 +14,33 @@ to be placed on the page, and which specifies where it is to be
placed. The environment is accompanied by various configuration
commands.
-For the change history, see textpos.html.
+Textpos has a canonical home page at <http://purl.org/nxg/dist/textpos>.
+The CTAN URL for Textpos is <https://ctan.org/pkg/textpos>.
+The source is hosted at [code.nxg.name](https://code.nxg.name/nxg/tex/textpos).
-The canonical CTAN URL for Textpos is <https://ctan.org/pkg/textpos>.
-Textpos has a home page at <http://purl.org/nxg/dist/textpos>.
-The source is hosted at bitbucket: <https://bitbucket.org/nxg/textpos>,
-and there is an issues list there, for bug reports.
+For the change history, see textpos.html.
Installation
------------
-Download or find the file textpos.sty. Install textpos.sty somewhere
-LaTeX will find it (see <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=inst-wlcf>).
+Download or find the file `textpos.sty`. Install `textpos.sty` somewhere
+LaTeX will find it (see [the TeX FAQ](http://www.tex.ac.uk/cgi-bin/texfaq2html?label=inst-wlcf)).
This package requires the services of Martin Schroeder's package
-everyshi. You will need to download this package from CTAN first. See
-<https://www.ctan.org/pkg/everyshi>.
+[everyshi][everyshi]. You will need to download this package from CTAN first.
Licence
-------
-This software is copyright, 1999-2019, Norman Gray.
+This software is copyright, 1999-2020, Norman Gray.
It is released under the terms of the [LaTeX Project Public License][lppl],
which is included in the file LICENCE.
Norman Gray
-http://nxg.me.uk
+<https://nxg.me.uk>
[lppl]: http://www.latex-project.org/lppl.txt
+[everyshi]: https://www.ctan.org/pkg/everyshi
diff --git a/macros/latex/contrib/textpos/VERSION-1.10 b/macros/latex/contrib/textpos/VERSION-1.10
new file mode 100644
index 0000000000..8414910cfa
--- /dev/null
+++ b/macros/latex/contrib/textpos/VERSION-1.10
@@ -0,0 +1 @@
+textpos-1.10, released 2020 September 26
diff --git a/macros/latex/contrib/textpos/VERSION-1.9.1 b/macros/latex/contrib/textpos/VERSION-1.9.1
deleted file mode 100644
index 8c18834dd5..0000000000
--- a/macros/latex/contrib/textpos/VERSION-1.9.1
+++ /dev/null
@@ -1 +0,0 @@
-textpos-1.9.1, released 2019 April 15
diff --git a/macros/latex/contrib/textpos/examples/t1.tex b/macros/latex/contrib/textpos/examples/t1.tex
index 8cb8bfc45f..9ec75f092d 100644
--- a/macros/latex/contrib/textpos/examples/t1.tex
+++ b/macros/latex/contrib/textpos/examples/t1.tex
@@ -14,16 +14,7 @@
\begin{document}
-\begin{textblock}{4}(0,0)
- % make a grid on the page
- \lineskip=0pt % abut boxes directly
- \setbox1=\hbox to \TPHorizModule{\hfill \vrule height \TPVertModule}
- \setbox0=\vbox to \TPVertModule{\noindent\copy1\copy1 \copy1 \vss\hrule}
- \copy0
- \copy0
- \copy0
- \copy0
-\end{textblock}
+\TPShowGrid{4}{4}
\begin{textblock}{3}(0,0)
\{3\}(0,0)
@@ -38,6 +29,19 @@
\{3\}[0.5,0.5](3,3)
\end{textblock}
+\begin{textblock}{1}[0,0](4,2)
+[0,0]
+\end{textblock}
+\begin{textblock}{1}[0,1](4,2)
+[0,1]
+\end{textblock}
+\begin{textblock}{1}[1,0](4,2)
+[1,0]
+\end{textblock}
+\begin{textblock}{1}[1,1](4,2)
+\hfill [1,1] % push this to the right of the box
+\end{textblock}
+
\begin{textblock}{2.5}(3,3)
\{2.5\}(3,3)
\end{textblock}
diff --git a/macros/latex/contrib/textpos/examples/t11.tex b/macros/latex/contrib/textpos/examples/t11.tex
new file mode 100644
index 0000000000..e07c3572b0
--- /dev/null
+++ b/macros/latex/contrib/textpos/examples/t11.tex
@@ -0,0 +1,90 @@
+%%% Testing: textblock in horizontal mode
+%
+% In textpos up to 1.9.1, a textblock in horizontal mode, with the
+% [absolute] option, worked, in the sense of not failing, but produced
+% ugly spacing, because in generating a `\par` it messed up
+% inter-paragraph spacing. This had the result that the text either
+% side of the textblock appeared as separate paragraphs with no space
+% between them. The appearance in [relative] mode was OK, but with
+% the `\par` visible. This isn't a _bug_, since the documentation
+% didn't say anything other than that a `\par` is inserted at this
+% point, but it's not pretty.
+
+\documentclass{article}
+
+\parindent=0pt
+\baselineskip=12pt
+
+\usepackage[absolute]{textpos}
+\usepackage{color}
+
+\definecolor{Blue}{rgb}{0.9,0.9,1.0}
+\definecolor{Red}{rgb}{1.0,0.5,0.5}
+\textblockcolour{Blue}
+
+% Make the textblock contents, and size, stand out
+\def\content#1{\noindent
+ \textcolor{Red}{\hbox to 1em{%
+ \vrule height 9pt depth 3pt width 2pt %12 pt total
+ \hss
+ \vrule width 2pt }\relax
+ #1}}
+
+\begin{document}
+
+\TPoptions{absolute=false}
+
+Line 1. Line 1a. % no descenders on this line
+% The sentence space between these should be the same as between these
+% and 1bis
+\begin{textblock}{5}(0,0)
+\content{Relative, hmode}
+\end{textblock}
+Line \smash{1bis, preceded by sentence space}. % \smash, to ensure line has zero depth
+
+Line 2 should be the usual baseline from 1.
+
+\vskip 1cm
+
+Line 3.
+
+\begin{textblock}{5}(0,0)
+\content{Relative, vmode}
+\end{textblock}
+
+Line 4.
+
+Line 5 should be separated from line 4 by the same baseline as 4 from~3.
+
+Line 6. Line 6a.
+\begin{textblock*}{10cm}(0mm,0mm)
+\content{Relative, hmode, star.}
+\end{textblock*}
+Line \smash{6bis, preceded by sentence space.}
+
+Line 7. With second sentence.
+
+\begin{textblock*}{10cm}(0mm,0mm)
+\content{Relative, vmode, star.}
+\end{textblock*}
+
+Line 8 should be separated from 7 by the usual baseline.
+
+\newpage
+\TPoptions{absolute=true}
+
+Line 9. Line 9a.
+\begin{textblock}{5}(0,0)
+\content{Absolute 1}
+\end{textblock}
+Line 9bis, preceded by sentence space. % the smash doesn't matter in absolute mode
+
+Line 10.
+
+\begin{textblock*}{5cm}(0mm,10mm)
+\content{Absolute 2}
+\end{textblock*}
+
+Line 11 should be separated from 10 by the usual baseline.
+
+\end{document}
diff --git a/macros/latex/contrib/textpos/niepraschk-eso-pic.pdf b/macros/latex/contrib/textpos/niepraschk-eso-pic.pdf
index 791fa57b84..64b976a71d 100644
--- a/macros/latex/contrib/textpos/niepraschk-eso-pic.pdf
+++ b/macros/latex/contrib/textpos/niepraschk-eso-pic.pdf
Binary files differ
diff --git a/macros/latex/contrib/textpos/textpos.dtx b/macros/latex/contrib/textpos/textpos.dtx
index 7be0700389..7b43236da4 100644
--- a/macros/latex/contrib/textpos/textpos.dtx
+++ b/macros/latex/contrib/textpos/textpos.dtx
@@ -3,7 +3,7 @@
% anywhere on the LaTeX page. It's useful for posters.
%
%%%% File: textpos.dtx
-%%%% Copyright 1999-2019, Norman Gray
+%%%% Copyright 1999-2020, Norman Gray
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -15,41 +15,42 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Norman Gray <http://nxg.me.uk>
+%% The Current Maintainer of this work is Norman Gray <https://nxg.me.uk>
%%
%% This work consists of the files textpos.dtx and textpos.ins,
%% and the derived file textpos.sty.
%%
-%% Author: Norman Gray, norman@astro.gla.ac.uk.
+%% Author: Norman Gray, gray@nxg.name
%% Department of Physics and Astronomy, University of Glasgow, UK
%%
%% See the file LICENCE for a copy of the LPPL.
%%
-%% Mercurial ident: 09ee0efc21ac (1.9.1+0), 2019-04-15 22:14 +0100
+%% Mercurial ident: c834991c867a (1.10+1), 2020-09-26 17:44 +0100
%%
%<+package>\NeedsTeXFormat{LaTeX2e}
-%<+package>\ProvidesPackage{textpos}[2019/04/15 v1.9.1]
-%<+package>\typeout{Package: textpos 2019/04/15 1.9.1, absolute positioning of text on the page}
+%<+package>\ProvidesPackage{textpos}[2020/09/26 v1.10]
+%<+package>\typeout{Package: textpos 2020/09/26 1.10, absolute positioning of text on the page}
%
%<*driver>
\documentclass{ltxdoc}
\title{Textpos: absolute positioning of text on the page}
-\author{Norman Gray\\(\texttt{http://nxg.me.uk})}
-\date{Version 1.9.1, 2019 April 15\footnote{Mercurial ident: 09ee0efc21ac (1.9.1+0), 2019-04-15 22:14 +0100.
-This software is copyright, 1999-2019 Norman Gray.
+\author{Norman Gray\\(\texttt{https://nxg.me.uk})}
+\date{Version 1.10, 2020 September 26\footnote{Mercurial ident: c834991c867a (1.10+1), 2020-09-26 17:44 +0100.
+This software is copyright, 1999-2020 Norman Gray.
It is released under the terms of the LaTeX Project Public License,
either version 1.3 of this licence or (at your option) any later version.
The latest version of this license is at \texttt{http://www.latex-project.org/lppl.txt}.}}
\newcommand\Lopt[1]{\textsf {\small [#1]}}
\newcommand\file[1]{\texttt {#1}}
-\newcommand\Lcount[1]{\textsl {\small#1}}
+\newcommand\Lcount[1]{\textsl{\small#1}}
\newcommand\Lenv[1]{\texttt{\{#1\}}}
-\newcommand\pstyle[1]{\textsl {#1}}
+\newcommand\pstyle[1]{\textsf{#1}}
\makeatletter % make the ttfamily font less overbearingly large
\renewcommand\ttfamily{\not@math@alphabet\ttfamily\mathtt
\fontfamily\ttdefault
\fontsize{9}{\f@baselineskip}\selectfont}
\makeatother
+\def\LaTeXiie{\LaTeX$2\epsilon$}
% Make command strings easier to write
\def\activemeta#1>{\meta{#1}}
{\catcode`\<=\active
@@ -114,15 +115,17 @@ The latest version of this license is at \texttt{http://www.latex-project.org/lp
% section headings, citations, graphics inclusion, and so on. Please
% let me know if you experience problems in this respect.
%
-% This package requires the services of Martin Schr\"oder's package
-% \texttt{everyshi}. If this is not already part of your \TeX{}
+% \emph{If it is running in \LaTeXiie} (as opposed to the newer \LaTeX3),
+% this package requires the services of Martin Schr\"oder's package \pstyle{everyshi}.
+% If this is not already part of your \TeX{}
% installation, you will need to download this package from CTAN. See
% \url{https://www.ctan.org/pkg/everyshi}.
%
% The canonical CTAN URL for Textpos is \url{https://ctan.org/pkg/textpos}.
% Textpos has a home page at \url{http://purl.org/nxg/dist/textpos}.
-% The source is held at bitbucket: \url{https://bitbucket.org/nxg/textpos},
-% and there is an issues list there, for bug reports. Code
+% The source is held at \url{https://code.nxg.name/nxg/tex/textpos}.
+% \iffalse and there is an issues list there, for bug reports.\fi
+% Code
% contributions or fixes are welcome, but note that I feel that
% Textpos is pretty mature now, and I'm reluctant to extend its
% functionality beyond its natural boundaries, so it would be wise to
@@ -219,13 +222,21 @@ The latest version of this license is at \texttt{http://www.latex-project.org/lp
% was changed, and specified, in that version.
%
% The \Lenv{textblock} environment will most often be used in
-% vertical mode. If it is called in horizontal (ie, paragraph) mode,
-% however, it will silently create a paragraph break by inserting a
-% |\par| command before the environment; it remains in vertical mode
-% after the environment is finished. It should have no further
-% effects on spacing, and if you find that it does, that's a bug. If
-% you try to use the environment when in maths mode, the package
-% objects (as it should!).
+% vertical mode. It can also be called in horizontal (ie, paragraph)
+% mode. In each case, it should be invisible, in the sense of having
+% no effect on the spacing of the paragraph text.\footnote{Note:
+% \emph{this is a change} in version
+% 1.10. Before then the behaviour of the package in horizontal
+% mode was deliberately somewhat underspecified (with an intended
+% implication of `don't do this'), and the package, for want of anything
+% more imaginative to do, simply threw in a paragraph break. As a
+% result of user feedback, from version 1.10 it seemed reasonable to try
+% a little harder to be invisible in the horizontal case.}
+% If called in horizontal mode (in \TeX\ terms), the relative-mode
+% `anchor point' is just below the box containing the current line (it
+% uses |\vadjust|, if that helps).
+% If you try to use the environment when in maths mode, the package
+% objects.
%
% \subsection{Package options}
% \label{packopts}
@@ -234,7 +245,14 @@ The latest version of this license is at \texttt{http://www.latex-project.org/lp
% \begin{description}
% \item[\Lopt{showboxes}]When you are laying things out, it can be
% useful to have the boxes drawn in for you. This option draws a box
-% fitting closely round the set text.
+% fitting closely round the contents of each \Lenv{textblock} environment.
+% Note that this option is
+% intended to help locate boxes on the page when composing a document,
+% and the boxes are not intended to be decorative. However the
+% \Lenv{textblock} environment is compatible with (for example) the
+% \pstyle{tcolorbox} package, in the sense that you can
+% include a \Lenv{tcolorbox} environment within a \Lenv{textblock}
+% environment, with the expected effect\footnote{See also \url{https://tex.stackexchange.com/questions/34088/}.}.
% \item[\Lopt{noshowtext}]This suppresses the display of the text in
% each block (so it's not really usable without the \Lopt{showboxes}
% option). The resulting box will be the correct size, but empty,
@@ -290,7 +308,8 @@ The latest version of this license is at \texttt{http://www.latex-project.org/lp
% \subsubsection{Setting up a positioning grid}
%
% \DescribeMacro{\TPGrid}
-% You will often wish to set up a grid on your page. Rather than
+% The dimensions |\TPHorizModule| and |\TPVertModule| implicitly
+% create a positioning grid on the page. Rather than
% calculate and specify the two modules explicitly, you can set up the
% grid with a command
% \cmd|\TPGrid{<nhoriz>}{<nvert>}|, which sets
@@ -317,6 +336,16 @@ The latest version of this license is at \texttt{http://www.latex-project.org/lp
% leaving 40mm of a border on the right and left sides, and a 20mm
% border top and bottom.
%
+% \DescribeMacro{\TPShowGrid}
+% Note that this sets up a notional layout grid for the page or, put
+% another way, it sets the module units with respect to which the
+% |(<hpos>,<vpos>)| coordinates are interpreted, but it
+% does not actually draw a grid on the page. To display the grid, use
+% the |\TPShowGrid{<nhoriz>}{<nvert>}| macro. This has a starred
+% variant, which additionally shows the coordinates at each grid
+% point. You should do this near the beginning of your file.
+% For an alternative approach, see Sect.~\ref{s:interactions}.
+%
% \subsubsection{Box margin}
%
% \DescribeMacro{\TPMargin}
@@ -445,6 +474,9 @@ The latest version of this license is at \texttt{http://www.latex-project.org/lp
% the width and location arguments to the (unstarred) \Lenv{textblock}
% environment.
%
+% With the unstarred \Lenv{textblock} environment, however, you will generally be able to
+% use the |\fpeval| command of the `xfp' package.\footnote{https://ctan.org/pkg/xfp}
+%
% \subsection{Package parameters}
% \begin{raggedright}
% \begin{description}
@@ -454,7 +486,8 @@ The latest version of this license is at \texttt{http://www.latex-project.org/lp
% size parameters of the \Lenv{textblock} environment. Set it using
% the command \cmd|\setlength{\TPHorizModule}{<dimen>}| (or indeed
% |\addtolength|).
-% The default is one sixteenth of the paper width.
+% The default is one sixteenth of the paper width
+% (ie, as if set up with |\TPGrid{16}{16}|).
% \item[\texttt{\bslash TPVertModule}]
% \DescribeMacro{\TPVertModule}
% The length unit which is used for the vertical positioning and
@@ -719,10 +752,11 @@ The latest version of this license is at \texttt{http://www.latex-project.org/lp
%
% Gabriel Zachmann suggested having Textpos put a grid on the
% page\marginpar{page grid}, so
-% that it is easier to work out \Lenv{textblock} coordinates. I may
-% yet do this, but it may not be necessary, since Rolf Niepraschk's
-% \texttt{eso-pic} package can help you create this grid yourself.
-% There is a vivid example of using Textpos along with Rolf's
+% that it is easier to work out \Lenv{textblock} coordinates. I have
+% (finally, in 1.10) followed this suggestion, in the |\TPShowGrid| macro, but
+% another approach to doing this, which may have further useful
+% flexibility, is to use Rolf Niepraschk's
+% \texttt{eso-pic} package. There is a vivid example of using Textpos along with Rolf's
% \texttt{eso-pic} package and the \texttt{calc} package on the
% Textpos web pages, at
% \url{http://purl.org/nxg/dist/textpos}, and an example of how to
@@ -757,7 +791,40 @@ The latest version of this license is at \texttt{http://www.latex-project.org/lp
% \section{History}
% \iffalse @RELEASENOTES@ \fi
% \begin{description}
-% \item[\textbf{1.9.1, 2019 April 15}]\relax
+% \item[\textbf{1.10, 2020 September 26}]\relax
+%
+% \begin{itemize}
+% \item Use the \emph{ltshipout} package to place boxes in absolute mode.
+% Therefore the package should now be compatible with LaTeX3.
+% Many thanks to Ulrike Fischer for guidance on the changes which were required here.
+% \item The code has moved from bitbucket.org to
+% code.nxg.name\footnote{\url{https://code.nxg.name/nxg/tex/textpos/}},
+% since bitbucket have closed down support for Mercurial. The
+% outstanding issues have been preserved, but have not (yet) been
+% migrated to a new system, so may become inaccessible.
+% \end{itemize}
+%
+%
+% \item[1.10b1, 2020 January 26]\relax
+%
+% \begin{itemize}
+% \item Add the |\TPShowGrid| macro.
+% \item Become invisible in horizontal mode.
+% \emph{Note: this is a change in behaviour:}
+% Before this the behaviour of the package in horizontal
+% mode was deliberately somewhat underspecified (with an intended
+% implication of ‘don't do this’), and the package, for want of anything
+% more imaginative to do, simply threw in a paragraph break, which
+% produced ugly spacing in some circumstances. As a result of
+% user
+% feedback\footnote{\url{https://tex.stackexchange.com/questions/525453/}}, from version 1.10 it seemed reasonable to try a little
+% harder to be invisible in the horizontal case
+% (see issue 16\footnote{\url{https://bitbucket.org/nxg/textpos/issues/16/}}).
+% \item Various documentation improvements.
+% \end{itemize}
+%
+%
+% \item[1.9.1, 2019 April 15]\relax
%
% \begin{itemize}
% \item Added the |\TPReferencePosition| command, to change the
@@ -958,6 +1025,9 @@ The latest version of this license is at \texttt{http://www.latex-project.org/lp
% The text includes footnoted thanks to various people who have made
% (sometimes very detailed) suggestions for functionality.
%
+% Ulrike Fischer provided detailed guidance on the changes required to
+% make \pstyle{textpos} compatible with \LaTeX3.
+%
% Thanks are additionally due, for general bugreports and other suggestions, to
% Jozef Bednarcik,
% Richard G Daniel,
@@ -1084,13 +1154,33 @@ located at that point, rather than the top-left corner.
\ProcessOptions
% \end{macrocode}
%
+% \subsection{\LaTeX3/\LaTeXiie\ compatibility}
+%
+% This code aims to be compatible with both \LaTeXiie\ and \LaTeX3. This
+% means that it must use the \pstyle{everyshi} package in the \LaTeXiie\
+% case, and can use the corresponding built-in \LaTeX3 mechanism otherwise.
+% For documentation on the latter, see the `ltshipout' package documentation.
+%
+% There are a couple of places in where we must switch behaviour.
+% Conditionalise them with a single switch.
+% \begin{macrocode}
+\newif\ifTP@Liii
+\@ifl@t@r\fmtversion{2020/10/01}\TP@Liiitrue\TP@Liiifalse
+\PackageInfo{textpos}{choosing support for \ifTP@Liii LaTeX3\else LaTeX2e\fi}
+% \end{macrocode}
+%
% \subsection{Required Packages}
%
-% To manipulate |\box255|, this package needs the package
-% \texttt{everyshi}, which provides the command |\EveryShipout|.
+% To manipulate |\box255| when using \LaTeXiie,
+% this package needs the package
+% \pstyle{everyshi}, which provides the command |\EveryShipout|.
% \begin{macrocode}
-\ifTP@abspos
- \RequirePackage{everyshi}
+\ifTP@Liii
+ % avoid everyshi package
+\else
+ \ifTP@abspos
+ \RequirePackage{everyshi}
+ \fi
\fi
\RequirePackage{keyval}
% \end{macrocode}
@@ -1151,9 +1241,15 @@ located at that point, rather than the top-left corner.
% When the package is invoked in `absolute' mode, the contents of
% |\TP@textbox| are not shipped out immediately, but instead put into the box
% |\TP@holdbox|, which holds the boxes until the page as a whole is
-% shipped out (these additions contributed by Olaf Maibaum).
+% shipped out.\footnote{These additions contributed by Olaf Maibaum}
% \changes{v1.1}{1999/02/22}{Introduce holdbox, and absolute/relative modes}
%
+% Add a flag which is used to recall the vertical/horizontal mode in
+% which the textblock is prepared.
+% \begin{macrocode}
+\newif\ifTP@vmode
+% \end{macrocode}
+%
% Define the holdbox only in the `absolute positioning' mode.
% \begin{macrocode}
\ifTP@abspos
@@ -1166,9 +1262,8 @@ located at that point, rather than the top-left corner.
% non-empty; the page is no longer empty, so the output routine must
% be called at some point. The alternative is to add such an hbox at
% the end of every textblock, when in absolute mode. That solves
-% this problem, but introduces others by interfering with vertical spacing.
-% (thanks to Bjoern Pedersen for diagnosing this in an old version
-% of textpos).
+% this problem, but introduces others by interfering with vertical
+% spacing.\footnote{Thanks to Bjoern Pedersen for diagnosing this in an old version of textpos}
% \begin{macrocode}
\AtEndDocument{\ifTP@displayholdbox\ifvoid\TP@holdbox \else \hbox{}\fi\fi}
\fi
@@ -1274,6 +1369,39 @@ located at that point, rather than the top-left corner.
\def\showtextsize{\normalsize}
% \end{macrocode}
%
+% In order to make it easy to visualise the grid, the
+% |\TPShowGrid| macro displays it on the page. There's a starred
+% version, which shows the coordinates, and an unstarred version,
+% which doesn't.
+% \begin{macrocode}
+\def\TPShowGrid{\@ifstar{\@tempswatrue\@TPShowGrid}{\@tempswafalse\@TPShowGrid}}
+% \end{macrocode}
+% And the implementation
+% \begin{macrocode}
+\def\@TPShowGrid#1#2{
+ \begin{textblock}{#1}(0,0)
+ \lineskip=0pt % abut boxes directly
+ \setbox0=\hbox{(0)}%
+ \@tempdima=\TPVertModule
+ \advance\@tempdima -1.1\ht0
+ \@tempcnta=0
+ \hrule
+ \loop
+ \vbox to \TPVertModule{\noindent
+ \@tempcntb=0
+ \vrule
+ \loop
+ \hbox to \TPHorizModule{%
+ \if@tempswa\raise\@tempdima\hbox{(\the\@tempcntb,\the\@tempcnta)}\fi
+ \hfil \vrule height \TPVertModule}%
+ \advance\@tempcntb 1
+ \ifnum\@tempcntb<#1 \repeat
+ \vss \hrule}
+ \advance\@tempcnta 1
+ \ifnum\@tempcnta<#2 \repeat
+ \end{textblock}}
+% \end{macrocode}
+%
% \begin{macro}{\textblockorigin}
% If we're producing a single page of text, it can be convenient to
% set an origin. This command may only be used in absolute mode.
@@ -1412,22 +1540,10 @@ located at that point, rather than the top-left corner.
% \begin{macrocode}
\def\textblock#1{%
\@tempdima=#1\TPHorizModule
- \ifvmode\else
- \ifmmode
- \PackageError{textpos}
- {You cannot use textblock in maths mode}
- {You may use the textblock environment only in \MessageBreak
- vertical mode or horizontal mode (when it triggers a\MessageBreak
- new paragraph). You cannot use it in maths mode.}
- \else % in horizontal mode
- \par % force us back into vertical mode
- \fi
- \fi
- \@ifnextchar[{\TP@textblock}{\expandafter\TP@textblock\expandafter[\TP@referenceposition]}%] bracematch
+ \TP@begintextblock
}
% \end{macrocode}
% \end{macro}
-%
% \begin{macro}{\textblock*}
% |\begin{textblock*}| is a variant of |\begin{textblock}| which takes
% absolute values for its arguments. It uses |\setlength| throughout,
@@ -1435,20 +1551,32 @@ located at that point, rather than the top-left corner.
% \changes{1.2a}{2002/04/28}{Added textblock* env}
% \begin{macrocode}
\def\TP@textblockstar#1{%
- \setlength{\@tempdima}{#1}
- \ifvmode\else
- \PackageWarning{textpos}{environment textblock* not in vertical mode.
- \MessageBreak
- Environment textblock* should not have any text\MessageBreak
- or printable material appearing before it.\MessageBreak
- Alignment may work out wrongly.}%
- \par % force us back into vertical mode
- \fi
- \@ifnextchar[{\TP@textblock}{\expandafter\TP@textblock\expandafter[\TP@referenceposition]}%] bracematch
+ \setlength{\@tempdima}{#1}%
+ \TP@begintextblock
}
\expandafter\let\csname textblock*\endcsname\TP@textblockstar
% \end{macrocode}
% \end{macro}
+% Common code for |textblock| and |textblock*|.
+% \begin{macrocode}
+\def\TP@begintextblock{%
+ \ifvmode
+ \TP@vmodetrue
+ \else
+ \ifmmode
+ \PackageError{textpos}
+ {You cannot use textblock in maths mode}
+ {You may use the textblock environment only in \MessageBreak
+ vertical mode or horizontal mode. You cannot use it in maths mode.}
+ \else % in horizontal mode
+ \TP@vmodefalse
+ \@bsphack
+ \unskip
+ \fi
+ \fi
+ \@ifnextchar[{\TP@textblock}{\expandafter\TP@textblock\expandafter[\TP@referenceposition]}%] bracematch
+}
+% \end{macrocode}
%
% \begin{macro}{\TP@textblock}
% Command |\TP@textblock| saves all its arguments in a token list, for
@@ -1522,7 +1650,7 @@ located at that point, rather than the top-left corner.
\hskip\TP@absmargin\vbox\bgroup
\textwidth\hsize \columnwidth\hsize \linewidth\hsize
\fi
- }
+}
% \end{macrocode}
% \end{macro}
%
@@ -1546,12 +1674,6 @@ located at that point, rather than the top-left corner.
% |\TP@endtextblock| with the arguments we saved in the token register
% in |\TP@tbargs|.
%
-% To manipulate the spacing around textblocks, we want to save the
-% |\prevdepth| quantity in |\TP@prevdepth|.
-% \begin{macrocode}
-\newdimen\TP@prevdepth
-% \end{macrocode}
-%
% Now we can handle the end of the textblock. When |\TP@margin| is
% non-zero, include a final skip which is the size of the absolute
% value of this margin.
@@ -1572,26 +1694,11 @@ located at that point, rather than the top-left corner.
\egroup % end of \TP@textbox
% \end{macrocode}
%
-% Control vertical spacing: we need to avoid causing the
-% insertion of more space in the case where this \texttt{textblock} is
-% between paragraphs of text. Save the |\prevdepth|, then set it to
-% $-1000pt$, suppressing interline glue; then add the zero-size vbox;
-% then restore |\prevdepth| to what it was before. See the discussion
-% of interline glue (ie, |\baselineskip| and |\prevdepth|) in
-% Chapter~12 (p.~80) of the \TeX book (thanks to Peter M\"unster
-% \texttt{<peter@univ-rennes1.fr>} for spotting that I'd got this
-% wrong in the previous version).
-% \changes{v1.1e}{2001/04/29}{Replace randomly-placed nointerline skip with prevdepth acrobatics, to avoid spacing misfeatures}
-% \changes{v1.4}{2003/09/05}{Improve prevdepth calculations, adding TP@prevdepth}
-% \begin{macrocode}
- \TP@prevdepth=\prevdepth
- \prevdepth=-1000pt % = \nointerlineskip
-% \end{macrocode}
% Finally, call |\TP@endtextblock| to do the work of putting the text
% on the page, directly or indirectly.
% \begin{macrocode}
\expandafter\TP@endtextblock\the\TP@tbargs
- }
+}
% \end{macrocode}
% \end{macro}
%
@@ -1625,8 +1732,8 @@ located at that point, rather than the top-left corner.
\@tempdima=#3\TPHorizModule
\@tempdimb=#4\TPVertModule
\else % absolute/starred endtextblock
- \setlength{\@tempdima}{#3}
- \setlength{\@tempdimb}{#4}
+ \setlength{\@tempdima}{#3}%
+ \setlength{\@tempdimb}{#4}%
\fi
% \end{macrocode}
% Next, we adjust them so that the position |(#1,#2)| is at this
@@ -1727,7 +1834,9 @@ located at that point, rather than the top-left corner.
% \subsection{Sending the boxes to the output}
%
% Now switch behaviour depending on whether or not we're in the
-% absolute-position mode. If we are, then add the newly-constructed
+% absolute-position mode.
+%
+% If we are in absolute position mode, then add the newly-constructed
% box 0 to (the end of) the holdbox. The order matters in some
% (many?, all?) circumstances, since this way means that later
% textblock environments go `on top of' earlier ones, which is
@@ -1750,18 +1859,47 @@ located at that point, rather than the top-left corner.
% all offset from the same point, and (b) that we are invisible with
% respect to any |\parskip| or |\baselineskip| calculations that were
% relevant at the time we started the textblock.
+% See the discussion of interline glue
+% (ie, |\baselineskip| and |\prevdepth|)
+% in Chapter~12 (p.~80) of the \TeX book.
% \begin{macrocode}
\else
- \box0
- \prevdepth=\TP@prevdepth
+ \ifTP@vmode
+ \@tempdima=\prevdepth
+ \prevdepth=-1000pt % = \nointerlineskip, supressing interline glue
+ \box0 % zero height+depth
+ \prevdepth=\@tempdima
+ \else
+ \vadjust{\box0}%
+ \@esphack
+ \fi
\fi
- }%
+}
% \end{macrocode}
% \end{macro}
%
-% Finally, and only if we are in the absolute-position mode, set up
-% the output routine with |\EveryShipout|, and set the textblockorigin
-% to the (default) upper-left corner of the paper. Respect the
+% Finally, and only if we are in the absolute-position mode,
+% set the textblockorigin to the (default) upper-left corner of the paper,
+% and organise the shipout mechanism to place the |\TP@holdbox| in a suitable place.
+%
+% There are two cases here, one when we are using \LaTeX3, and one
+% with \LaTeXiie.
+%
+% First, the \LaTeX3 case: use the `ltshipout' mechanism..
+% \begin{macrocode}
+\ifTP@abspos
+ \ifTP@Liii
+ \ifTP@overlay
+ \AddToHook{shipout/foreground}{%
+ \ifTP@displayholdbox\put(\strip@pt\dimexpr1in,-\strip@pt\dimexpr1in){\box\TP@holdbox}\fi}
+ \else
+ \AddToHook{shipout/background}{%
+ \ifTP@displayholdbox\put(\strip@pt\dimexpr1in,-\strip@pt\dimexpr1in){\box\TP@holdbox}\fi}
+ \fi
+% \end{macrocode}
+%
+% Second, the \LaTeXiie\ case: use the macros provided by the \pstyle{everyshi} package.
+% We set up the output routine with |\EveryShipout|, and . Respect the
% \Lopt{overlay} option by putting the |\TP@holdbox| contents
% \emph{after} the |\@cclv| contents, putting the latter into a size-0
% box (could this cause a problem with spacing? I don't think so, at
@@ -1774,21 +1912,22 @@ located at that point, rather than the top-left corner.
% If |\ifTP@displayholdbox| is false, then both of these should be no-ops.
% \changes{v1.2b}{2002/07/01}{Defend against box 255 not being a vbox}
% \begin{macrocode}
-\ifTP@abspos
- \ifTP@overlay
- \EveryShipout{\ifTP@displayholdbox
- \global\setbox\@cclv\vbox{%
- \vbox to 0pt{\ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi \vss}%
- \unvbox\TP@holdbox % TP@holdbox is now void
- }%
- \fi}%
\else
- \EveryShipout{\ifTP@displayholdbox
- \global\setbox\@cclv\vbox{%
- \unvbox\TP@holdbox
- \ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi
- }%
- \fi}%
+ \ifTP@overlay
+ \EveryShipout{\ifTP@displayholdbox
+ \global\setbox\@cclv\vbox{%
+ \vbox to 0pt{\ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi \vss}%
+ \unvbox\TP@holdbox % TP@holdbox is now void
+ }%
+ \fi}%
+ \else
+ \EveryShipout{\ifTP@displayholdbox
+ \global\setbox\@cclv\vbox{%
+ \unvbox\TP@holdbox
+ \ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi
+ }%
+ \fi}%
+ \fi
\fi
\textblockorigin{0pt}{0pt}%
\fi
diff --git a/macros/latex/contrib/textpos/textpos.html b/macros/latex/contrib/textpos/textpos.html
index eec9629d6b..9688d6417e 100644
--- a/macros/latex/contrib/textpos/textpos.html
+++ b/macros/latex/contrib/textpos/textpos.html
@@ -1,26 +1,25 @@
-<?xml version="1.0"?>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head profile="http://dublincore.org/documents/dcq-html/">
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:dcterms="http://purl.org/dc/terms/">
+<head>
<title>Textpos</title>
-<meta name="DC.subject" content="latex, textpos, absolute positioning"/>
-<meta name="DC.title" content="Textpos"/>
-<meta name="DC.date" content="2019-04-15"/>
-<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"/>
-<link href="https://nxg.me.uk/norman" rev="author"/>
-<link type="text/css" rel="stylesheet" href="style.css"/>
+<meta property="dcterms:subject" content="latex, textpos, absolute positioning"/>
+
+<meta property="dcterms:date" content="2020-09-26"/>
+<link href="https://nxg.me.uk/norman" rev="author" rel="dcterms:creator"/>
+
</head>
<body>
-<h1>Textpos</h1>
+<h1 property="dcterms:title">Textpos</h1>
<div class="abstract">
-<p>Lay out text and graphics at arbitrary positions on the LaTeX page.</p>
+<p property="dcterms:description">Lay out text and graphics at arbitrary positions on the LaTeX page.</p>
-<p>
-<span class="distpage">The textpos home page is at
-<a href="http://purl.org/nxg/dist/textpos"><code>http://purl.org/nxg/dist/textpos</code></a>;</span>
+<p class="distpage">The textpos home page is at
+<a href="http://purl.org/nxg/dist/textpos"><code>https://purl.org/nxg/dist/textpos</code></a>;
please quote this URL rather than the URL it resolves to.</p>
-<p>Version 1.9.1, 2019 April 15.</p>
+<p>Version 1.10, 2020 September 26.</p>
</div>
<p>This package facilitates placing boxes at absolute positions on the
@@ -49,14 +48,15 @@ of using Textpos along with his <code>eso-pic</code> package,
and the <code>calc</code> package, to produce a grid which can help lay out
material on the page.</p>
-<p>The source is held at
-<a href="https://bitbucket.org/nxg/textpos">bitbucket</a>,
-and there is an issues list there, for bug reports.</p>
+<p class="distpage">The source is held
+<a href="https://code.nxg.name/nxg/tex/textpos">online</a></p>
+
+
-<div class="distpage">
- <h2>Installation and further information</h2>
-</div>
+
+
+<h2 class="distpage">Installation and further information</h2>
<ol>
@@ -80,7 +80,40 @@ documentation.</li>
<h2>History</h2>
<dl>
-<dt><strong>1.9.1, 2019 April 15</strong></dt>
+<dt><strong>1.10, 2020 September 26</strong></dt>
+<dd>
+<ul>
+<li>Use the <em>ltshipout</em> package to place boxes in absolute mode.
+Therefore the package should now be compatible with LaTeX3.
+Many thanks to Ulrike Fischer for guidance on the changes which were required here.</li>
+<li>The code has moved from bitbucket.org to
+<a href="https://code.nxg.name/nxg/tex/textpos/">code.nxg.name</a>,
+since bitbucket have closed down support for Mercurial. The
+outstanding issues have been preserved, but have not (yet) been
+migrated to a new system, so may become inaccessible.</li>
+</ul>
+</dd>
+
+<dt>1.10b1, 2020 January 26</dt>
+<dd>
+<ul>
+<li>Add the <code>\TPShowGrid</code> macro.</li>
+<li>Become invisible in horizontal mode.
+<em>Note: this is a change in behaviour:</em>
+Before this the behaviour of the package in horizontal
+mode was deliberately somewhat underspecified (with an intended
+implication of ‘don't do this’), and the package, for want of anything
+more imaginative to do, simply threw in a paragraph break, which
+produced ugly spacing in some circumstances. As a result of
+<a href="https://tex.stackexchange.com/questions/525453/">user
+feedback</a>, from version 1.10 it seemed reasonable to try a little
+harder to be invisible in the horizontal case
+(see <a href="https://bitbucket.org/nxg/textpos/issues/16/">issue 16</a>).</li>
+<li>Various documentation improvements.</li>
+</ul>
+</dd>
+
+<dt>1.9.1, 2019 April 15</dt>
<dd>
<ul>
<li>Added the <code>\TPReferencePosition</code> command, to change the
@@ -246,8 +279,8 @@ make textpos compatible with the <code>calc</code> package</dd>
<div class="signature">
-<a href="http://nxg.me.uk">Norman Gray</a><br/>
-2019 April 15
+<a href="https://nxg.me.uk">Norman Gray</a><br/>
+2020 September 26
</div>
</body>
diff --git a/macros/latex/contrib/textpos/textpos.pdf b/macros/latex/contrib/textpos/textpos.pdf
index 88e65fbcea..ea21daab34 100644
--- a/macros/latex/contrib/textpos/textpos.pdf
+++ b/macros/latex/contrib/textpos/textpos.pdf
Binary files differ
diff --git a/macros/latex/contrib/xltxtra/README.md b/macros/latex/contrib/xltxtra/README.md
deleted file mode 100644
index 41dc9204b3..0000000000
--- a/macros/latex/contrib/xltxtra/README.md
+++ /dev/null
@@ -1,64 +0,0 @@
-
-THE XLTXTRA PACKAGE 2018/12/31 v0.7
-===================================
-
-This package was previously used to provide a number of small
-features that are useful for XeLaTeX. As of fontspec v2, many
-of these have now been incorporated into that package. More
-recently, other updates to LaTeX2e itself have eliminated some
-of the workarounds previously included in this package.
-
-This package therefore no longer does as much as it used to,
-but is still provided for backwards compatibility. A summary:
-
-- Loads fontspec.
-
-- Loads Andrew Moschou's metalogo package for customised
- `\XeTeX` and `\XeLaTeX` logos.
-
-- Loads the realscripts package to obtain OpenType-feature
- subscript and superscript glyphs in `\textsuperscript` etc.,
- including in footnotes.
-
-- `\showhyphens` is redefined so it now works.
-
-- Defines the dubiously useful commands:
- - `\vfrac` - for vulgar fractions using OpenType features
- - `\namedglyph` - to access font glyphs by name
-
-For more information see the documentation xltxtra.pdf.
-
-
-Change History
---------------
-
-v0.7:
- - Change internals for `expl3` update.
- - Remove deprecated internal command `\TeX@logo@spacing`.
- - (No user-level changes.)
-
-v0.6:
- - Replace definition of `\showhyphens` with one that properly
- replicates the plain TeX definition in behaviour.
-
-v0.5e:
- - Remove the code for subscripts/superscripts and load the
- realscripts package instead.
- - (No user-level changes.)
-
-v0.5d:
- - Remove those parts that have been taken into fontspec v2.0.
- - (No user-level changes.)
-
-v0.5c:
- - Update internals for fontspec v2.0.
- - (No user-level changes.)
-
-v0.5b:
- - Bug fix for `\LaTeX` when `[no-logos]` is used.
- Thanks to Enrico Gregorio for finding this.
-
-______________
-Will Robertson
-2006-2016
-Released under the LaTeX Project Public License
diff --git a/macros/latex/contrib/xltxtra/xltxtra.dtx b/macros/latex/contrib/xltxtra/xltxtra.dtx
deleted file mode 100644
index efcb4e7b7a..0000000000
--- a/macros/latex/contrib/xltxtra/xltxtra.dtx
+++ /dev/null
@@ -1,534 +0,0 @@
-% \iffalse
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% THE XLTXTRA PACKAGE
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%
-%% Copyright (C) 2006-2018 by Will Robertson <wspr81@gmail.com>
-%%
-%% Distributable under the LaTeX Project Public License,
-%% version 1.3c or higher (your choice). The latest version of
-%% this license is at: http://www.latex-project.org/lppl.txt
-%%
-%% This work is "maintained" (as per LPPL maintenance status)
-%% by Will Robertson.
-%%
-%% This work consists of the files xltxtra.dtx and xltxtra.ins,
-%% and the derived files xltxtra.sty and xltxtra.pdf.
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%<*driver>
-\documentclass{ltxdoc}
-
-\makeatletter
-
-\def\@dotsep{1000}
-\setcounter{tocdepth}{2}
-
-\setcounter{IndexColumns}{2}
-\renewenvironment{theglossary}
- {\small\list{}{}
- \item\relax
- \glossary@prologue\GlossaryParms
- \let\item\@idxitem \ignorespaces
- \def\pfill{\hspace*{\fill}}}
- {\endlist}
-
-\usepackage{array,booktabs,calc,color,enumitem,fancyvrb,graphicx,ifthen,longtable,refstyle,varioref,xltxtra}
-\usepackage[rm]{titlesec}
-\setmainfont{texgyrepagella}[
- Extension = .otf ,
- UprightFont = *-regular ,
- ItalicFont = *-italic ,
- BoldFont = *-bold ,
- BoldItalicFont = *-bolditalic ,
-]
-\setsansfont{texgyreheros}[
- Scale=MatchLowercase ,
- Extension = .otf ,
- UprightFont = *-regular ,
- ItalicFont = *-italic ,
- BoldFont = *-bold ,
- BoldItalicFont = *-bolditalic ,
-]
-\setmonofont{lmmono10}[
- Extension = .otf ,
- UprightFont = *-regular ,
- ItalicFont = *-italic ,
-]
-
-\linespread{1.05} % A bit more space between lines
-\frenchspacing % Remove space after punctuation
-
-\setlogokern{Xe}{-0.061em}
-\setlogokern{eL}{-0.057em}
-\setlogokern{La}{-0.28em}
-\setlogokern{aT}{-0.10em}
-\setlogokern{Te}{-0.0575em}
-\setlogokern{eX}{-0.072em}
-\setlogokern{eT}{-0.056em}
-\setlogokern{X2}{0.1667em}
-\setlogodrop{0.153em}
-\setLaTeXa{\scshape a}
-\setLaTeXee{\mbox{\fontspec{Times}\itshape ε}}
-\def\eTeX{{\fontspec{Times}\textit{ε}{}}-\TeX} % The eTeX logo is not (yet) covered by metalogo
-
-\definecolor{niceblue}{rgb}{0.2,0.4,0.6}
-\def\theCodelineNo{\textcolor{niceblue}{\sffamily\tiny\arabic{CodelineNo}}}
-
-\newenvironment{example}
- {\VerbatimEnvironment
- \begin{trivlist}\item[]
- \begin{minipage}{\linewidth}
- \par\noindent\hrulefill\par
- \begin{VerbatimOut}[gobble=4]{\examplefilename}}
- {\end{VerbatimOut}\relax
- \begingroup
- \color{niceblue}
- \typesetexample
- \endgroup\par\noindent\hrulefill\par
- \end{minipage}\end{trivlist}}
-
-\let\examplesize\normalsize
-\let\auxwidth\relax
-
-\newlength\examplewidth\newlength\verbatimwidth
-\newlength\exoutdent \newlength\exverbgap
-\setlength\exverbgap{0em}
-\setlength\exoutdent{-0\textwidth}
-\newsavebox\verbatimbox
-\edef\examplefilename{xltxtra.example}
-
-\newcommand\typesetexample{\relax
- \begin{lrbox}{\verbatimbox}\relax
- \BVerbatimInput[fontsize=\small]{\examplefilename}\relax
- \end{lrbox}
- \begin{list}{}{\setlength\itemindent{0pt}
- \setlength\leftmargin\exoutdent
- \setlength\rightmargin{0pt}}\item
- \ifx\auxwidth\relax
- \setlength\verbatimwidth{\wd\verbatimbox}\relax
- \else
- \setlength\verbatimwidth{\auxwidth}\relax
- \fi
- \begin{minipage}[c]{\textwidth-\exoutdent-\verbatimwidth-\exverbgap}
- \catcode`\%=14\centering\examplesize\input\examplefilename\relax
- \end{minipage}\hfill
- \begin{minipage}[c]{\verbatimwidth}
- \usebox\verbatimbox
- \end{minipage}
- \end{list}
- \global\let\examplesize\normalsize}
-
-\newcommand*\setexsize[1]{\let\examplesize#1}
-\newcommand*\setverbwidth[1]{\def\auxwidth{#1}}
-
-\newcommand*\name[1]{{#1}}
-\newcommand*\pkg[1]{\texttt{#1}}
-\newcommand*\pkgopt[1]{\texttt{[#1]} package option}
-
-\newcommand*\acro[1]{\textsc{\MakeLowercase{#1}}}
-
-\newcommand*\note[1]{\unskip\footnote{#1}}
-
-\let\latin\textit
-\def\eg{\latin{e.g.}}
-\def\Eg{\latin{E.g.}}
-\def\ie{\latin{i.e.}}
-\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}}
-
-\newcounter{argument}
-\g@addto@macro\endmacro{\setcounter{argument}{0}}
-\newcommand*\darg[1]{%
- \stepcounter{argument}%
- \noindent{\ttfamily\#\theargument}:~#1\par\nobreak}
-\newcommand*\doarg[1]{%
- \stepcounter{argument}%
- \noindent{\ttfamily\makebox[0pt][r]{[}\#\theargument]}:~#1\par\nobreak}
-
-\newcommand\unichar[2]{\textsc{\MakeLowercase{u+#1: #2}}}
-
-\makeatother
-
-\EnableCrossrefs
-\CodelineIndex
-\begin{document}
- \DocInput{xltxtra.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \errorcontextlines=999
-% \makeatletter
-%
-% \GetFileInfo{xltxtra.sty}
-%
-% \title{The \pkg{xltxtra} package}
-% \author{Will Robertson}
-% \date{\filedate \qquad \fileversion}
-%
-% \maketitle
-%
-% \tableofcontents
-%
-% \section{Introduction}
-%
-% This document describes the \pkg{xltxtra} package.
-% It implements some odds-and-ends features when using the \XeLaTeX\ format.
-%
-% \subsection{Usage}
-% Easy: |\usepackage{xltxtra}|. This package automatically loads the following packages: \pkg{fontspec}, \pkg{realscripts}, \pkg{metalogo}.
-%
-% There are some package options to disable various functionality that could clash with other things:
-% \begin{description}[font=\ttfamily]
-% \item[no-sscript] Swaps the definitions of \cmd\textsubscript\ and \cmd\textsuperscript\ with their respective starred versions, as described in \secref{sscript}.
-% \item[no-logos] Disables the redefinition of \cmd\TeX, etc. described in \secref{logos}, but \emph{does} still define the \cmd\XeTeX\ and \cmd\XeLaTeX\ logo commands.
-% \end{description}
-%
-% \section{Features}
-%
-% \subsection{\cmd\textsuperscript\ and \cmd\textsubscript}
-% \seclabel{sscript}
-%
-% This functionality is achieved through loading the \pkg{realscripts}
-% package.
-%
-% These two macros have been redefined to take advantage, if possible, of actual superior or inferior glyphs in the main document font. This is very important for high-quality typesetting — compare this first example to the third; yes, they are the same font.
-% \begin{quotation}\color{niceblue}
-% \fontspec{Skia}
-% |\textsuperscript | \textsuperscript{abcdefghijklmnopqrstuvwxyz1234567890}\par
-% |\textsubscript | \textsubscript{abcdefghijklmnopqrstuvwxyz1234567890}
-% \end{quotation}
-% But will fall back on `faked' ones if they don't exist:
-% (this is {\fontspec{Didot} Didot})
-% \begin{quotation}\color{niceblue}
-% \fontspec{Didot}
-% |\textsuperscript | \textsuperscript{abcdefghijklmnopqrstuvwxyz1234567890}\par
-% |\textsubscript | \textsubscript{abcdefghijklmnopqrstuvwxyz1234567890}
-% \end{quotation}
-% The original definitions are available in starred verions of the commands:
-% \begin{quotation}\color{niceblue}
-% \fontspec{Skia}
-% |\textsuperscript* | \textsuperscript*{abcdefghijklmnopqrstuvwxyz1234567890}\par
-% |\textsubscript* | \textsubscript*{abcdefghijklmnopqrstuvwxyz1234567890}
-% \end{quotation}
-%
-% The \pkgopt{no-sscript} will swap the definitions of the starred and non-starred versions of the commands described above if the new definitions are undesirable.
-%
-% The macros
-% \cmd\realsubscript,
-% \cmd\realsuperscript,
-% \cmd\fakesubscript, and
-% \cmd\fakesuperscript\
-% may be used to access the `new' and `old' functionalities regardless of the \pkgopt{no-sscript}.
-%
-%
-%
-%
-% \subsection{Logos}
-% \seclabel{logos}
-%
-% This part of the package essentially exists to define the \cmd\XeTeX\ and \cmd\XeLaTeX\ logos,
-% which need to be tuned according to the font that is used. Originally I had some hard-coded
-% definitions in here, but Andrew Moschou’s |metalogo| package now provides a much more
-% flexible and useful interface to a variety of \TeX-related logos.
-%
-% Here are some examples. The default:
-% \begingroup
-% \setlogokern{Xe}{default}
-% \setlogokern{eL}{default}
-% \setlogokern{La}{default}
-% \setlogokern{aT}{default}
-% \setlogokern{Te}{default}
-% \setlogokern{eX}{default}
-% \setlogokern{eT}{default}
-% \setlogokern{X2}{default}
-% \setlogodrop{default}
-% \setLaTeXa{default}
-% \setLaTeXee{default}
-% \begin{example}
-% \TeX\ \XeTeX\ \LaTeX\ \XeLaTeX
-% \end{example}
-% \noindent Notice that it's a bit tight when not using Computer Modern, for which the logos were designed:
-% \begin{example}
-% \usefont{OT1}{cmr}{m}{n}
-% \TeX\ \XeTeX\ \LaTeX\ \XeLaTeX
-% \end{example}
-% \endgroup
-%
-% These logos, ideally, should be hand-tuned for each font that they're used in. Please refer to the |metalogo| documentation for more information.
-%
-% The \pkgopt{no-logos} will not redefine \cmd\TeX\ or \cmd\LaTeX\ but will still define \cmd\XeTeX\ and \cmd\XeLaTeX.
-%
-%
-% \subsection{Vulgar fractions}
-% The \cmd\vfrac\ command for setting `vulgar' fractions based on AAT or OpenType font features. Not really recommended for many purposes, depending on your text, but it's a good example of how to program such things using \pkg{fontspec}.
-% \begin{example}
-% \fontspec{LibreCaslonText-Regular.otf}
-% \vfrac{123}{456}
-% \end{example}
-% \noindent (This can also be achieved in regular \LaTeX\ with either the \pkg{nicefrac} or \pkg{xfrac} package.)
-%
-% Only use it when you know it will work; no warnings are given if the font doesn't support the necessary features.
-%
-% \subsection{Named glyphs}
-% Along the way somewhere, \XeTeX\ added support for selecting glyphs from a TrueType-based OpenType font based on their internal glyph name. Jonathan Kew posted the following definition as a nice interface to it.
-% \begin{example}
-% \fontspec{charis}
-% \namedglyph{yen}
-% \namedglyph{smile}
-% \end{example}
-%
-% \subsection{The \cmd\showhyphens\ command}
-% The default definition doesn't work in \XeTeX.
-% A new version, written by Enrico Gregorio, is included in this package that \emph{does} work; note that the syntax now matches plain \TeX's original rather than the comma-list approach taken by an earlier version of this package.
-% \showhyphens{discomedusoid discommodiousness}
-%
-% \newpage
-% \part{The \textsf{xltxtra} package}
-%\iffalse
-%<*package>
-%\fi
-% This is the package implementation.
-%
-% \begin{macrocode}
-\ProvidesPackage{xltxtra}
- [2018/12/31 v0.7 Improvements for the "XeLaTeX" format]
-% \end{macrocode}
-%
-% \paragraph{Not for Lua\TeX}
-% \begin{macrocode}
-\RequirePackage{ifluatex}
-\ifluatex
- \PackageWarningNoLine {xltxtra} {^^J
- XLTXTRA IS TO BE USED ONLY UNDER XETEX.
- LOAD FONTSPEC DIRECTLY, INSTEAD.^^J
- ABORTING LOADING%
- }
- \RequirePackage{fontspec}
- \expandafter \endinput
-\fi
-% \end{macrocode}
-%
-% \paragraph{Required packages}
-% \begin{macrocode}
-\RequirePackage{ifxetex}
-\RequireXeTeX
-\RequirePackage{fontspec}
-\RequirePackage{realscripts}
-% \end{macrocode}
-%
-% \paragraph{Option processing}
-% \begin{macrocode}
-\newif\if@xxt@nosscript@
-\newif\if@xxt@nologos@
-\DeclareOption{no-sscript}{\@xxt@nosscript@true}
-\DeclareOption{no-logos}{\@xxt@nologos@true}
-\ProcessOptions*
-% \end{macrocode}
-%
-%
-% \section{Logos}
-% \DescribeMacro{\XeTeX}
-% \DescribeMacro{\XeLaTeX}
-% The \TeX-related logos people insist upon using need to be tuned
-% on a per-font basis. This package calls upon Andrew Moschou's package
-% |metalogo| for this purpose. To tune the logos to each font,
-% use the commands \cmd\setlogokern, \cmd\setlogodrop, etc.\ Refer to
-% |mathspec|’s documentation for further details.
-%
-% \begin{example}
-% \setlogokern{Xe}{-0.061em}
-% \setlogokern{eL}{-0.057em}
-% \setlogokern{La}{-0.265em}
-% \setlogokern{aT}{-0.0585em}
-% \setlogokern{Te}{-0.0575em}
-% \setlogokern{eX}{-0.072em}
-% \setlogokern{eT}{-0.056em}
-% \setlogokern{X2}{0.1667em}
-% \setlogodrop{0.153em}
-% \setLaTeXa{\scshape a}
-% \setLaTeXee{\mbox{\fontspec{Times}\itshape ε}}
-% \TeX\ \XeTeX\ \LaTeX\ \XeLaTeX\ \LaTeXe
-% \end{example}
-%
-% \begin{macrocode}
-\RequirePackage{metalogo}
-% \end{macrocode}
-%
-% The \pkgopt{no-logos} might be in effect, in which case \cmd\TeX, \cmd\LaTeX\ and
-% \cmd\LaTeXe\ should keep their original definitions (which were saved by |metalogo|).
-%
-% \begin{macrocode}
-\if@xxt@nologos@
- \let\TeX\original@TeX
- \let\LaTeX\original@LaTeX
- \let\LaTeXe\original@LaTeXe
-\fi
-% \end{macrocode}
-%
-%
-%
-% \section{Subscript and superscript}
-%
-% \begin{macro}{\textsubscript}
-% \begin{macro}{\textsubscript*}
-% \begin{macro}{\textsuperscript}
-% \begin{macro}{\textsuperscript*}
-% These commands are either defined to create fake or real sub-/super-scripts if they are starred or not, respectively. This swaps if the \pkgopt{no-sscript} is in effect.
-% Text subscripts:
-% \begin{macrocode}
-\if@xxt@nosscript@
- \DeclareRobustCommand*\textsubscript{%
- \@ifstar{\realsubscript}{\fakesubscript}}
- \DeclareRobustCommand*\textsuperscript{%
- \@ifstar{\realsuperscript}{\fakesuperscript}}
-\fi
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \section{Assorted commands}
-%
-% \begin{macro}{\vfrac}
-% \darg{Numerator}
-% \darg{Denominator}
-% No error checking is done to ensure that the font actually has the neceessary features.
-% Requires the \pkg{xunicode} package for \cmd\textfractionsolidus.
-% \begin{macrocode}
-\ExplSyntaxOn
-\newcommand*\vfrac[2]{
- \fontspec_if_fontspec_font:TF
- {
- \fontspec_if_opentype:TF
- {
- {\addfontfeature{VerticalPosition=Numerator}#1}
- \textfractionsolidus
- {\addfontfeature{VerticalPosition=Denominator}#2}
- }
- {
- {\addfontfeature{VerticalPosition=Superior}#1}
- \textfractionsolidus
- {\addfontfeature{VerticalPosition=Inferior}#2}
- }
- }
- {
- \PackageError {xltxtra}
- { \string\vfrac\space~can~only~be~used~with~fontspec~fonts }
- { Nothing~more~to~tell. }
- }
-}
-\ExplSyntaxOff
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\namedglyph}
-% \darg{Name of the font glyph to be typeset}
-% \begin{macrocode}
-\newcommand\namedglyph[1]{%
- \@tempcnta=\XeTeXglyphindex "#1"\relax
- \ifnum\@tempcnta>0
- \XeTeXglyph\@tempcnta
- \else
- \xxt@namedglyph@fallback{#1}%
- \fi}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\xxt@namedglyph@fallback}
-% Redefine this macro to change how glyph names that aren't found get typeset.
-% \begin{macrocode}
-\newcommand\xxt@namedglyph@fallback[1]{[#1]}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\showhyphens}
-% Courtesy egreg.
-% \begin{macrocode}
-\ExplSyntaxOn
-\seq_new:N \l__xetex_showhyphens_seq
-\box_new:N \l__xetex_show_hyphens_wrapping_box
-\box_new:N \l__xetex_show_hyphens_temp_box
-\box_new:N \l__xetex_show_hyphens_final_box
-\box_new:N \g__xetex_show_hyphens_word_box
-
-\cs_new_protected:Npn \xetex_show_hyphens:n #1
- {
- \box_clear:N \l__xetex_show_hyphens_final_box
- % split the input into items
- \seq_set_split:Nnn \l__xetex_showhyphens_seq { ~ } { #1 }
- % hyphenate all items
- \seq_map_function:NN \l__xetex_showhyphens_seq \xetex_hyphenate_word:n
- % set a box to the maximum dimension to force a Underfull \hbox warning
- \hbox_set_to_wd:Nnn \l__xetex_show_hyphens_final_box { \c_max_dim }
- {
- \hbox_unpack_clear:N \l__xetex_show_hyphens_final_box
- }
- }
-
-\cs_new_protected:Npn \xetex_hyphenate_word:n #1
- {
- \vbox_set:Nn \l__xetex_show_hyphens_wrapping_box
- {% build a paragraph with the word with a very narrow line width
- \dim_set:Nn \hsize { 1sp }
- % disregard spurious messages
- \hbadness = 10000\relax
- \dim_set:Nn \hfuzz { \c_max_dim }
- % clear possible values of \everypar and other parameters
- \everypar={}
- \skip_set:Nn \leftskip { 0pt }
- \skip_set_eq:NN \rightskip \leftskip
- % skip the first step
- \pretolerance = -1\relax
- % avoid the indentation and add a skip to allow hyphenation
- \noindent
- \skip_horizontal:n { 0pt }
- #1
- \par
- \hbox_gset:Nn \g__xetex_show_hyphens_word_box {}
- % start a recursion to dismantle the paragraph just built
- \xetex_show_hyphens_split:
- % the result is put into \g__xetex_show_hyphens_word_box
- }
- % add the box to the final container
- \hbox_set:Nn \l__xetex_show_hyphens_final_box
- {
- \hbox_unpack_clear:N \l__xetex_show_hyphens_final_box
- \hbox_unpack_clear:N \g__xetex_show_hyphens_word_box
- }
- }
-
-\cs_new_protected:Npn \xetex_show_hyphens_split:
- {
- \unskip % remove the interline glue
- \unpenalty % remove possible penalties
- % get the last line
- \box_set_to_last:N \l__xetex_show_hyphens_temp_box
- \box_if_empty:NF \l__xetex_show_hyphens_temp_box
- {% if there is a last line unpack it into a container
- \hbox_gset:Nn \g__xetex_show_hyphens_word_box
- {% the order is last to first
- \hbox_unpack_clear:N \l__xetex_show_hyphens_temp_box
- \unskip\unskip % remove spaces
- \hbox_unpack_clear:N \g__xetex_show_hyphens_word_box
- }
- % restart the recursion
- \xetex_show_hyphens_split:
- }
- }
-
-\cs_set_eq:NN \showhyphens \xetex_show_hyphens:n
-\ExplSyntaxOff
-% \end{macrocode}
-% \end{macro}
-%
-%\iffalse
-%</package>
-%\fi
-%
-% \Finale
-%
-\endinput
-
diff --git a/macros/latex/contrib/xltxtra/xltxtra.ins b/macros/latex/contrib/xltxtra/xltxtra.ins
deleted file mode 100644
index f3cf3dc8a9..0000000000
--- a/macros/latex/contrib/xltxtra/xltxtra.ins
+++ /dev/null
@@ -1,34 +0,0 @@
-
-\input docstrip.tex
-\keepsilent
-\preamble
- ____________________________
- The XLTXTRA package
- (C) 2006-2017 Will Robertson
- License information appended
-
-\endpreamble
-\postamble
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-THE XLTXTRA PACKAGE
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Copyright (C) 2006-2018 by Will Robertson <wspr81@gmail.com>
-
-Distributable under the LaTeX Project Public License,
-version 1.3c or higher (your choice). The latest version of
-this license is at: http://www.latex-project.org/lppl.txt
-
-This work is "maintained" (as per LPPL maintenance status)
-by Will Robertson.
-
-This work consists of the files xltxtra.dtx and xltxtra.ins,
- and the derived files xltxtra.sty and xltxtra.pdf.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\endpostamble
-\askforoverwritefalse
-\generate{\file{xltxtra.sty}{\from{xltxtra.dtx}{package}}}
-\endbatchfile
diff --git a/macros/latex/contrib/xltxtra/xltxtra.pdf b/macros/latex/contrib/xltxtra/xltxtra.pdf
deleted file mode 100644
index 954083b948..0000000000
--- a/macros/latex/contrib/xltxtra/xltxtra.pdf
+++ /dev/null
Binary files differ