one workaround is to provide a virtual character that has the same extension recipe but no height so the extension is always taken (not sure if my lua vf coding is good enough for present company but it works on my one test file:-)

\nopagenumbers
\tracingonline1
\showboxdepth100
\showboxbreadth=100


\directlua{
callback.register('define_font',
function (name,size)
       if name == 'cmex10' then
       local f = font.read_tfm('cmex10',size)
       f.name="cmex10"
       f.type="virtual"
          print("\string\n adding " .. \string#f.characters + 1)
          local n = \string#f.characters+1
          f.characters[n]={}
          f.characters[n].height=0
          f.characters[n].depth=0
          f.characters[n].extensible = {
            rep=119
           }
          return f
       else
          return font.read_tfm(name,size)
       end
   end
)
}


\font\tenex=cmex10

\textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex

$\Arrowvert \Big\Arrowvert \Bigg\Arrowvert \big\Arrowvert \bigg\Arrowvert \showlists $


\def\Arrowvert{\delimiter"26B380}%

$\Arrowvert \Big\Arrowvert \Bigg\Arrowvert \big\Arrowvert \bigg\Arrowvert \showlists $

\end

On Sat, 11 Jan 2025 at 11:42, David Carlisle <d.p.carlisle@gmail.com> wrote:
Hans, unfortunately that does not work: it just makes \Arrowvert act like \| (\Vert).

The TeXBook explicitly documents why these have "arrow" in their name, they are the vertical bits of the vertical arrows, without the arrow heads, and it also documents that they are wider than the regular delimiter.

TeXBook says:

The control sequences ^|\arrowvert|, ^|\Arrowvert|, and ^|\bracevert| produce
delimiters made from the repeatable parts of the vertical arrows, double
vertical arrows, and large braces, respectively, without the arrowheads
or the curly parts of the braces. They produce results similar to
^|\vert| or ^|\Vert|, but they are surrounded by more white space and
they have a different weight.

Compare the two versions above the vrule using pdftex with this modified version of your example.

\nopagenumbers

$\| \Big\| \Bigg\| \big\| \bigg\|$

$\Arrowvert \Big\Arrowvert \Bigg\Arrowvert \big\Arrowvert \bigg\Arrowvert$

\hrule


\delcode`\| = "26B30D

$\| \Big\| \Bigg\| \big\| \bigg\|$

\def\arrowvert{\delimiter"26B30C }
\def\Arrowvert{\delimiter"26B30D }

$\Arrowvert \Big\Arrowvert \Bigg\Arrowvert \big\Arrowvert \bigg\Arrowvert$

$ \mathchar"30C  \mathchar"30D \mathchar"33C \mathchar"33D $

\end


when the delimiter goes to the extension font the requested size is already larger than the glyph in the specified slot so classic tex uses the repetition formula which unusually only has the repeater and doesn't use the specified slot at all, but luatex is using the specified brace part which (I think) is wrong but haven't traced down a clear tfm specification to be certain.

David


On Sat, 11 Jan 2025 at 11:18, Hans Hagen <j.hagen@xs4all.nl> wrote:
On 1/10/2025 9:54 PM, David Carlisle wrote:
> There are some images of the output and discussion of the \showlists
> trace in the stackexchange post at
>
> https://tex.stackexchange.com/a/734734/1090 <https://
> tex.stackexchange.com/a/734734/1090>
>
> but this plain luatex file
>
> \tracingonline1
> \showboxdepth10
>
> \immediate\write500{\meaning\Arrowvert}
>
> $\Arrowvert + \Big\Arrowvert\showlists $
>
> \expandafter\show\the\textfont3
>
>
> \bye
>
>
> produces the expected || character with pdftex but a { character with
> luatex even though both claim to be using the same extension font (cmex10)

How about fixing the definition of these seemingly never used arrois
that are not arrows.

\nopagenumbers

\delcode`\| = "26B30D

$\| \Big\| \Bigg\| \big\| \bigg\|$

\def\arrowvert{\delimiter"26B30C }
\def\Arrowvert{\delimiter"26B30D }

$\Arrowvert \Big\Arrowvert \Bigg\Arrowvert \big\Arrowvert \bigg\Arrowvert$

$ \mathchar"30C  \mathchar"30D \mathchar"33C \mathchar"33D $

\end

I wonder if it is a bug in plain or just an assumption about what sits
where in a font buit not something to loose sleep over. One can of
course wonder what makes a arrowvert without arrow heads different from

\def\Vert{\delimiter"26B30D }
\def\vert{\delimiter"26A30C }

but I guess the same can be said for many math unicode symbols.

May I'm wrong and indeed a middle piece brace is intended.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
dev-luatex mailing list -- dev-luatex@ntg.nl
To unsubscribe send an email to dev-luatex-leave@ntg.nl