# Typesetting pullbacks - tweaking underset

From time to time I want typeset a × symbol underset with f,g. The output command \underset{f,g}{\times} is a little clumsy for me.

How can I typeset something which looks more like the expression on the right below?

The stackengine package allows stacks to be highly customized. Here, I set in the preamble 3 things:

1. stacks are processed in math mode

2. the width of the understacked material will not affect the spacing of the "anchor" (in this case, \times)

3. the gap between the anchor and the stacked material will be 0pt

Because the stack is a wrapper around its content, the \times loses its \mathbin characteristic relative to the As. That seemed to be what the OP desired; however, it can always be added back manually around the stack.

The MWE:

\documentclass{article}
\usepackage{stackengine}
\stackMath
\renewcommand\useanchorwidth{T}
\setstackgap{S}{0pt}
\begin{document}
$A\stackunder{\times}{\scriptscriptstyle f\cdot g} A$
\end{document}


Of course, this can all be wrapped up into a macro. Here, I show it with the \mathbin nature of \times restored. I call the macro \quork{}{}.

\documentclass{article}
\usepackage{stackengine}
\stackMath
\renewcommand\useanchorwidth{T}
\setstackgap{S}{0pt}
\newcommand\quork[2]{\mathbin{\stackunder{#1}{\scriptscriptstyle #2}}}
\begin{document}
$A\quork{\times}{f\cdot g} A$
\end{document}


• Sorry, I hadn't read the details, just the image, and it struck me. I'll remove my useless comment. – Bernard May 16 '17 at 10:35
• @Bernard It was a good comment; I edited further to make use of it. – Steven B. Segletes May 16 '17 at 10:35

Here is a version based on the idea of https://tex.stackexchange.com/a/169603/15925:

\documentclass{article}

\usepackage{mathtools}

\newcommand*{\sunderbin}[3][0pt]{%
\mathbin{\renewcommand*{\arraystretch}{0}%
\begin{array}[t]{@{}c@{}}%

\end{document}


• The kerning or lack of it between the f and the comma doesn't help with the optical illusion. – Chris H May 16 '17 at 11:24
• @Chris H: You're right, but that can't be automated. I've added some negative kerning in the argument to compensate. – Bernard May 16 '17 at 11:38