I am hoping to render something similar to a ket (from the braket package), but where each line is 'doubled'.
For example, something similar to this:
I would like it to...
- stretch vertically to contain the contents, like
\ket{x}does - have subscripts placed below it in the same location that
\ket{x}_nprescribes.
Here are some insufficient attempts (both using commands from the braket package):
\ket{\ket{x}}. It looks like this:Blegh!
\| x \rangle!\rangle. It looks like the first image in this post, but it doesn't scale vertically, and it doesn't place subscripts in the right location.E.g.
\| \frac{x}{y} \rangle\!\ranglelooks likeand
\| x \rangle!\rangle_ylooks like\ket{\!\ket{x}\hspace{-2.7pt}}. This renders okay, but the spacing between the lines varies with the height of the contents.
How can I achieve something visually similar to \|x\rangle!\rangle but which correctly stretches vertically to contain its contents, and which places subscripts at the same vertical position as \ket{x}? This will be used exclusively in math environments.







\!appears as only!; and in two images, only one\rangleappears. I hesitate to make these changes since you are more familiar with what you want to see. – barbara beeton Dec 17 '21 at 14:39braketpackage. The author's address shown in the documentation is still valid, even if the package is old. If you write to him, you can say I suggested it, and point to this question. – barbara beeton Dec 17 '21 at 15:07ket. I think the text makes this clear – Anti Earth Dec 21 '21 at 01:56\| x \rangle!\rangle_ywould produce the output shown. With no backslash preceding the exclamation mark, the!should appear in the output. That is what I am trying to point out. (I'm ignoring that only one\rangleappears.) I don't question that the output isn't what you want. – barbara beeton Dec 21 '21 at 05:12