texlive[56441] Master/texmf-dist: textpos (26sep20)

commits+karl at tug.org commits+karl at tug.org
Sat Sep 26 23:41:39 CEST 2020


Revision: 56441
          http://tug.org/svn/texlive?view=revision&revision=56441
Author:   karl
Date:     2020-09-26 23:41:39 +0200 (Sat, 26 Sep 2020)
Log Message:
-----------
textpos (26sep20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/textpos/README
    trunk/Master/texmf-dist/doc/latex/textpos/examples/t1.tex
    trunk/Master/texmf-dist/doc/latex/textpos/niepraschk-eso-pic.pdf
    trunk/Master/texmf-dist/doc/latex/textpos/textpos-example.tex
    trunk/Master/texmf-dist/doc/latex/textpos/textpos.html
    trunk/Master/texmf-dist/doc/latex/textpos/textpos.pdf
    trunk/Master/texmf-dist/source/latex/textpos/textpos.drv
    trunk/Master/texmf-dist/source/latex/textpos/textpos.dtx
    trunk/Master/texmf-dist/tex/latex/textpos/textpos.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/textpos/VERSION-1.10
    trunk/Master/texmf-dist/doc/latex/textpos/examples/t11.tex

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/textpos/VERSION-1.9.1

Modified: trunk/Master/texmf-dist/doc/latex/textpos/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/textpos/README	2020-09-26 21:40:58 UTC (rev 56440)
+++ trunk/Master/texmf-dist/doc/latex/textpos/README	2020-09-26 21:41:39 UTC (rev 56441)
@@ -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,28 +14,26 @@
 placed.  The environment is accompanied by various configuration
 commands.
 
+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).
+
 For the change history, see textpos.html.
 
-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.
 
-
 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.
 
@@ -43,6 +40,7 @@
 
 
 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

Added: trunk/Master/texmf-dist/doc/latex/textpos/VERSION-1.10
===================================================================
--- trunk/Master/texmf-dist/doc/latex/textpos/VERSION-1.10	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/textpos/VERSION-1.10	2020-09-26 21:41:39 UTC (rev 56441)
@@ -0,0 +1 @@
+textpos-1.10, released 2020 September 26


Property changes on: trunk/Master/texmf-dist/doc/latex/textpos/VERSION-1.10
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/latex/textpos/VERSION-1.9.1
===================================================================
--- trunk/Master/texmf-dist/doc/latex/textpos/VERSION-1.9.1	2020-09-26 21:40:58 UTC (rev 56440)
+++ trunk/Master/texmf-dist/doc/latex/textpos/VERSION-1.9.1	2020-09-26 21:41:39 UTC (rev 56441)
@@ -1 +0,0 @@
-textpos-1.9.1, released 2019 April 15

Modified: trunk/Master/texmf-dist/doc/latex/textpos/examples/t1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/textpos/examples/t1.tex	2020-09-26 21:40:58 UTC (rev 56440)
+++ trunk/Master/texmf-dist/doc/latex/textpos/examples/t1.tex	2020-09-26 21:41:39 UTC (rev 56441)
@@ -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}

Added: trunk/Master/texmf-dist/doc/latex/textpos/examples/t11.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/textpos/examples/t11.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/textpos/examples/t11.tex	2020-09-26 21:41:39 UTC (rev 56441)
@@ -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}


Property changes on: trunk/Master/texmf-dist/doc/latex/textpos/examples/t11.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/textpos/niepraschk-eso-pic.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/textpos/textpos-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/textpos/textpos-example.tex	2020-09-26 21:40:58 UTC (rev 56440)
+++ trunk/Master/texmf-dist/doc/latex/textpos/textpos-example.tex	2020-09-26 21:41:39 UTC (rev 56441)
@@ -7,7 +7,7 @@
 %% textpos.dtx  (with options: `example')
 %% Textpos: absolute positioning of text on the page
 %%%% 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
@@ -19,17 +19,17 @@
 %%
 %% 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 at astro.gla.ac.uk.
+%% Author: Norman Gray, gray at 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
 %%
 \documentclass{article}
 

Modified: trunk/Master/texmf-dist/doc/latex/textpos/textpos.html
===================================================================
--- trunk/Master/texmf-dist/doc/latex/textpos/textpos.html	2020-09-26 21:40:58 UTC (rev 56440)
+++ trunk/Master/texmf-dist/doc/latex/textpos/textpos.html	2020-09-26 21:41:39 UTC (rev 56441)
@@ -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,15 +48,16 @@
 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,9 +80,42 @@
 <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
 default reference position away from <code>[0,0]</code>.</li>
 <li>Added the <em>experimental</em>
@@ -246,8 +279,8 @@
 
 
 <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>

Modified: trunk/Master/texmf-dist/doc/latex/textpos/textpos.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/textpos/textpos.drv
===================================================================
--- trunk/Master/texmf-dist/source/latex/textpos/textpos.drv	2020-09-26 21:40:58 UTC (rev 56440)
+++ trunk/Master/texmf-dist/source/latex/textpos/textpos.drv	2020-09-26 21:41:39 UTC (rev 56441)
@@ -7,7 +7,7 @@
 %% textpos.dtx  (with options: `driver')
 %% Textpos: absolute positioning of text on the page
 %%%% 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
@@ -19,36 +19,37 @@
 %%
 %% 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 at astro.gla.ac.uk.
+%% Author: Norman Gray, gray at 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
 %%
 \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 at math@alphabet\ttfamily\mathtt
     \fontfamily\ttdefault
     \fontsize{9}{\f at baselineskip}\selectfont}
 \makeatother
+\def\LaTeXiie{\LaTeX$2\epsilon$}
 \def\activemeta#1>{\meta{#1}}
 {\catcode`\<=\active
  \gdef\cmd{\begingroup

Modified: trunk/Master/texmf-dist/source/latex/textpos/textpos.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/textpos/textpos.dtx	2020-09-26 21:40:58 UTC (rev 56440)
+++ trunk/Master/texmf-dist/source/latex/textpos/textpos.dtx	2020-09-26 21:41:39 UTC (rev 56441)
@@ -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 at astro.gla.ac.uk.
+%% Author: Norman Gray, gray at 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 at math@alphabet\ttfamily\mathtt
     \fontfamily\ttdefault
     \fontsize{9}{\f at 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 @@
 % 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 @@
 % 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 @@
 % \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 @@
 % \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 @@
 % 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 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 @@
 % 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 @@
 %
 % 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,9 +791,42 @@
 % \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
 % default reference position away from |[0,0]|.
 % \item Added the \emph{experimental}
@@ -958,6 +1025,9 @@
 % 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 @@
 \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 at Liii
+\@ifl at t@r\fmtversion{2020/10/01}\TP at Liiitrue\TP at Liiifalse
+\PackageInfo{textpos}{choosing support for \ifTP at 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 at abspos
-  \RequirePackage{everyshi}
+\ifTP at Liii
+  % avoid everyshi package
+\else
+  \ifTP at abspos
+    \RequirePackage{everyshi}
+  \fi
 \fi
 \RequirePackage{keyval}
 %    \end{macrocode}
@@ -1151,9 +1241,15 @@
 % When the package is invoked in `absolute' mode, the contents of
 % |\TP at textbox| are not shipped out immediately, but instead put into the box
 % |\TP at 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 at vmode
+%    \end{macrocode}
+%
 % Define the holdbox only in the `absolute positioning' mode.
 %    \begin{macrocode}
 \ifTP at abspos
@@ -1166,9 +1262,8 @@
 % 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 at displayholdbox\ifvoid\TP at holdbox \else \hbox{}\fi\fi}
 \fi
@@ -1274,6 +1369,39 @@
 \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 at 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 @@
 %    \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 at textblock}{\expandafter\TP at textblock\expandafter[\TP at referenceposition]}%] bracematch
+  \TP at 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 @@
 % \changes{1.2a}{2002/04/28}{Added textblock* env}
 %    \begin{macrocode}
 \def\TP at 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
+  \setlength{\@tempdima}{#1}%
+  \TP at begintextblock
+}
+\expandafter\let\csname textblock*\endcsname\TP at textblockstar
+%    \end{macrocode}
+% \end{macro}
+% Common code for |textblock| and |textblock*|.
+%    \begin{macrocode}
+\def\TP at begintextblock{%
+  \ifvmode
+    \TP at 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 at vmodefalse
+      \@bsphack
+      \unskip
+    \fi
   \fi
   \@ifnextchar[{\TP at textblock}{\expandafter\TP at textblock\expandafter[\TP at referenceposition]}%] bracematch
 }
-\expandafter\let\csname textblock*\endcsname\TP at textblockstar
 %    \end{macrocode}
-% \end{macro}
 %
 % \begin{macro}{\TP at textblock}
 % Command |\TP at textblock| saves all its arguments in a token list, for
@@ -1522,7 +1650,7 @@
         \hskip\TP at absmargin\vbox\bgroup
           \textwidth\hsize \columnwidth\hsize \linewidth\hsize
     \fi
-  }
+}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1546,12 +1674,6 @@
 % |\TP at endtextblock| with the arguments we saved in the token register
 % in |\TP at tbargs|.
 %
-% To manipulate the spacing around textblocks, we want to save the
-% |\prevdepth| quantity in |\TP at prevdepth|.
-%    \begin{macrocode}
-\newdimen\TP at prevdepth
-%    \end{macrocode}
-%
 % Now we can handle the end of the textblock.  When |\TP at margin| is
 % non-zero, include a final skip which is the size of the absolute
 % value of this margin.
@@ -1572,26 +1694,11 @@
     \egroup % end of \TP at 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 at 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 at prevdepth}
-%    \begin{macrocode}
-  \TP at prevdepth=\prevdepth
-  \prevdepth=-1000pt  % = \nointerlineskip
-%    \end{macrocode}
 % Finally, call |\TP at endtextblock| to do the work of putting the text
 % on the page, directly or indirectly.
 %    \begin{macrocode}
   \expandafter\TP at endtextblock\the\TP at tbargs
-  }
+}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1625,8 +1732,8 @@
     \@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 @@
 % \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 @@
 % 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 at prevdepth
+    \ifTP at 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 at 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 at abspos
+  \ifTP at Liii
+    \ifTP at overlay
+      \AddToHook{shipout/foreground}{%
+        \ifTP at displayholdbox\put(\strip at pt\dimexpr1in,-\strip at pt\dimexpr1in){\box\TP at holdbox}\fi}
+    \else
+      \AddToHook{shipout/background}{%
+         \ifTP at displayholdbox\put(\strip at pt\dimexpr1in,-\strip at pt\dimexpr1in){\box\TP at 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 at 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 @@
 % If |\ifTP at 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 at abspos
-  \ifTP at overlay
-    \EveryShipout{\ifTP at displayholdbox
-      \global\setbox\@cclv\vbox{%
-        \vbox to 0pt{\ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi \vss}%
-        \unvbox\TP at holdbox      % TP at holdbox is now void
-      }%
-    \fi}%
   \else
-    \EveryShipout{\ifTP at displayholdbox
-      \global\setbox\@cclv\vbox{%
-        \unvbox\TP at holdbox
-        \ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi
-      }%
-    \fi}%
+    \ifTP at overlay
+      \EveryShipout{\ifTP at displayholdbox
+        \global\setbox\@cclv\vbox{%
+          \vbox to 0pt{\ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi \vss}%
+          \unvbox\TP at holdbox      % TP at holdbox is now void
+        }%
+      \fi}%
+    \else
+      \EveryShipout{\ifTP at displayholdbox
+        \global\setbox\@cclv\vbox{%
+          \unvbox\TP at holdbox
+          \ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi
+        }%
+      \fi}%
+    \fi
   \fi
   \textblockorigin{0pt}{0pt}%
 \fi

Modified: trunk/Master/texmf-dist/tex/latex/textpos/textpos.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/textpos/textpos.sty	2020-09-26 21:40:58 UTC (rev 56440)
+++ trunk/Master/texmf-dist/tex/latex/textpos/textpos.sty	2020-09-26 21:41:39 UTC (rev 56441)
@@ -7,7 +7,7 @@
 %% textpos.dtx  (with options: `package')
 %% Textpos: absolute positioning of text on the page
 %%%% 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
@@ -19,21 +19,21 @@
 %%
 %% 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 at astro.gla.ac.uk.
+%% Author: Norman Gray, gray at 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
 %%
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{textpos}[2019/04/15 v1.9.1]
-\typeout{Package: textpos 2019/04/15 1.9.1, absolute positioning of text on the page}
+\ProvidesPackage{textpos}[2020/09/26 v1.10]
+\typeout{Package: textpos 2020/09/26 1.10, absolute positioning of text on the page}
  
 \newif\ifTPshowboxes
 \TPshowboxesfalse
@@ -56,8 +56,15 @@
   \TP at displayholdboxtrue
 \DeclareOption{discardcontent}{\TP at displayholdboxfalse}
 \ProcessOptions
-\ifTP at abspos
-  \RequirePackage{everyshi}
+\newif\ifTP at Liii
+\@ifl at t@r\fmtversion{2020/10/01}\TP at Liiitrue\TP at Liiifalse
+\PackageInfo{textpos}{choosing support for \ifTP at Liii LaTeX3\else LaTeX2e\fi}
+\ifTP at Liii
+  % avoid everyshi package
+\else
+  \ifTP at abspos
+    \RequirePackage{everyshi}
+  \fi
 \fi
 \RequirePackage{keyval}
 \define at key{tp}{absolute}{\csname TP at abspos#1\endcsname}
@@ -80,6 +87,7 @@
     {You can't use \protect\marginpar\space within a textblock}
     {You're using textpos because you _don't_ want things to float around, yes?}}
 \newbox\TP at textbox
+\newif\ifTP at vmode
 \ifTP at abspos
   \newbox\TP at holdbox            % starts off void
   \AtEndDocument{\ifTP at displayholdbox\ifvoid\TP at holdbox \else \hbox{}\fi\fi}
@@ -133,6 +141,29 @@
 \newdimen\TPboxrulesize
 \setlength{\TPboxrulesize}{0.4pt}
 \def\showtextsize{\normalsize}
+\def\TPShowGrid{\@ifstar{\@tempswatrue\@TPShowGrid}{\@tempswafalse\@TPShowGrid}}
+\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 at 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}}
 \ifTP at abspos
   \newdimen\TP at ox
   \newdimen\TP at oy
@@ -189,32 +220,30 @@
 \def\TPReferencePosition#1{\def\TP at referenceposition{#1}}
 \def\textblock#1{%
   \@tempdima=#1\TPHorizModule
-  \ifvmode\else
+  \TP at begintextblock
+}
+\def\TP at textblockstar#1{%
+  \setlength{\@tempdima}{#1}%
+  \TP at begintextblock
+}
+\expandafter\let\csname textblock*\endcsname\TP at textblockstar
+\def\TP at begintextblock{%
+  \ifvmode
+    \TP at 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 (when it triggers a\MessageBreak
-         new paragraph).  You cannot use it in maths mode.}
+         vertical mode or horizontal mode.  You cannot use it in maths mode.}
     \else % in horizontal mode
-      \par % force us back into vertical mode
+      \TP at vmodefalse
+      \@bsphack
+      \unskip
     \fi
   \fi
   \@ifnextchar[{\TP at textblock}{\expandafter\TP at textblock\expandafter[\TP at referenceposition]}%] bracematch
 }
-\def\TP at 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 at textblock}{\expandafter\TP at textblock\expandafter[\TP at referenceposition]}%] bracematch
-}
-\expandafter\let\csname textblock*\endcsname\TP at textblockstar
 \newtoks\TP at tbargs
 \def\TP at textblock[#1,#2](#3,#4){%
   \TP at tbargs={{#1}{#2}{#3}{#4}}%
@@ -242,10 +271,9 @@
         \hskip\TP at absmargin\vbox\bgroup
           \textwidth\hsize \columnwidth\hsize \linewidth\hsize
     \fi
-  }
+}
 \def\endtextblock{\global\@tempswatrue\TP at commonendtextblock}
 \@namedef{endtextblock*}{\global\@tempswafalse\TP at commonendtextblock}
-\newdimen\TP at prevdepth
 \def\TP at commonendtextblock{%
     \ifdim\TP at margin = 0pt
       \relax
@@ -260,17 +288,15 @@
         {\color{\TP at rulecolour}\hrule depth 0pt height \TPboxrulesize}%
     \fi
     \egroup % end of \TP at textbox
-  \TP at prevdepth=\prevdepth
-  \prevdepth=-1000pt  % = \nointerlineskip
   \expandafter\TP at endtextblock\the\TP at tbargs
-  }
+}
 \def\TP at endtextblock#1#2#3#4{%
   \if at tempswa % modular/unstarred endtextblock
     \@tempdima=#3\TPHorizModule
     \@tempdimb=#4\TPVertModule
   \else % absolute/starred endtextblock
-    \setlength{\@tempdima}{#3}
-    \setlength{\@tempdimb}{#4}
+    \setlength{\@tempdima}{#3}%
+    \setlength{\@tempdimb}{#4}%
   \fi
   \ifdim\TP at margin < 0pt
     \advance\@tempdima \TP at margin
@@ -346,25 +372,42 @@
       \box0
     }%
   \else
-    \box0
-    \prevdepth=\TP at prevdepth
+    \ifTP at vmode
+      \@tempdima=\prevdepth
+      \prevdepth=-1000pt  % = \nointerlineskip, supressing interline glue
+      \box0               % zero height+depth
+      \prevdepth=\@tempdima
+    \else
+      \vadjust{\box0}%
+      \@esphack
+    \fi
   \fi
-  }%
+}
 \ifTP at abspos
-  \ifTP at overlay
-    \EveryShipout{\ifTP at displayholdbox
-      \global\setbox\@cclv\vbox{%
-        \vbox to 0pt{\ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi \vss}%
-        \unvbox\TP at holdbox      % TP at holdbox is now void
-      }%
-    \fi}%
+  \ifTP at Liii
+    \ifTP at overlay
+      \AddToHook{shipout/foreground}{%
+        \ifTP at displayholdbox\put(\strip at pt\dimexpr1in,-\strip at pt\dimexpr1in){\box\TP at holdbox}\fi}
+    \else
+      \AddToHook{shipout/background}{%
+         \ifTP at displayholdbox\put(\strip at pt\dimexpr1in,-\strip at pt\dimexpr1in){\box\TP at holdbox}\fi}
+    \fi
   \else
-    \EveryShipout{\ifTP at displayholdbox
-      \global\setbox\@cclv\vbox{%
-        \unvbox\TP at holdbox
-        \ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi
-      }%
-    \fi}%
+    \ifTP at overlay
+      \EveryShipout{\ifTP at displayholdbox
+        \global\setbox\@cclv\vbox{%
+          \vbox to 0pt{\ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi \vss}%
+          \unvbox\TP at holdbox      % TP at holdbox is now void
+        }%
+      \fi}%
+    \else
+      \EveryShipout{\ifTP at displayholdbox
+        \global\setbox\@cclv\vbox{%
+          \unvbox\TP at holdbox
+          \ifvbox\@cclv \unvbox\@cclv \else \box\@cclv \fi
+        }%
+      \fi}%
+    \fi
   \fi
   \textblockorigin{0pt}{0pt}%
 \fi



More information about the tex-live-commits mailing list.