1

I'm looking to do something like this:

enter image description here

with the underbracket operator, where the label text is inline with the bracket. Is there an easier way rather than fiddling with that operator?

2

You could use tikzmark for this:

\documentclass{article} 
\usepackage{tikz} 
\usetikzlibrary{tikzmark}

\begin{document}

\huge
\tikzmark{firststart}john\tikzmark{firstend}.\tikzmark{laststart}doe\tikzmark{lastend}@\tikzmark{domainstart}example.com\tikzmark{domainend}

\begin{tikzpicture}[overlay, remember picture,marking/.style={font=\scriptsize\scshape,fill=white,inner sep=1pt}]
  \foreach \part in {first,last,domain}
  \draw ([yshift=-5pt]pic cs:\part start) -- ++(0,-5pt) -- node[marking,midway]{\part} ([yshift=-10pt]pic cs:\part end) -- ++(0,5pt);
\end{tikzpicture}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.