0

How to typeset the following set?

enter image description here

2
  • Your question leaves all the effort to our community, even typing the essentials of a TeX document such as \documentclass{}...\begin{document} etc. As it is, most of our users will be very reluctant to touch your question, and you are left to the mercy of our procrastination team who are very few in number and very picky about selecting questions. You can improve your question by adding a minimal working example (MWE) that more users can copy/paste onto their systems to work on. If no hero takes the challenge we might have to close your question. May 16, 2020 at 13:09
  • As stated by Alessandro Cuttin, your question under its current form will receive little attention. Have a look at the tikzmark package to solve your issue as e.g tex.stackexchange.com/questions/461217/…
    – BambOo
    May 16, 2020 at 15:54

3 Answers 3

2

You can define

\catcode`@=11
\def\underarrow#1{\mathop{\vtop{\m@th\ialign{##\crcr
$\hfil\displaystyle{#1}\hfil$\crcr
\noalign{\kern3pt\nointerlineskip}
\hfil$\uparrow$\hfil\crcr\noalign{\kern3pt}}}}\limits}
\catcode`@=12

And then write, for example,

$(0,\dots,0,\underarrow{1}_{\hbox to0pt{\hss $(m+1)$-th\hss}},0,\dots,0)$

Result:

enter image description here


As a general strategy to solve such situations, I advise to find a definition of an existing macro that does a similar thing and adjust it to fit your needs. In this case, I used the plainTeX macro \underbrace, which is defined as follows

\def\underbrace#1{\mathop{\vtop{\m@th\ialign{##\crcr
$\hfil\displaystyle{#1}\hfil$
\crcr\noalign{\kern3pt\nointerlineskip}
\upbracefill\crcr\noalign{\kern3pt}}}}\limits}
2
  • Extra clap for your advice. Thank you. May 16, 2020 at 11:38
  • Maybe you may want to delete the second \noalign{\kern3pt} as now the label is probably to far away from the arrow. Another remark: you can replace \m@th by \mathsurround=0pt and then you do not need to change the category of @, i.e. you may delete the first and the last line beginning with \catcode...
    – Daniel
    May 16, 2020 at 13:08
4

May I suggest a tikz version inspired by this post you may have seen.

\documentclass[a4paper]{article}

\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tikzmark}

\begin{document}

$\{(0,\ldots ,0,{\tikzmarknode{11}{1}},0,\ldots ,0),    (0,\ldots ,0,0,{\tikzmarknode{21}{1}},0,\ldots ,0),\ldots ,(0,\ldots ,0,{\tikzmarknode{31}{1}})\}$

\begin{tikzpicture}[overlay,remember picture]
    { \draw[<-,>=latex] (11) -- ++ (0,-.5) node[below] (l1) {${\scriptstyle (m+1)\text{-th}}$};}
    { \draw[<-,>=latex] (21) -- ++ (0,-.5) node[below] (l2) {${\scriptstyle (m+2)\text{-th}}$};}
    { \draw[<-,>=latex] (31) -- ++ (0,-.5) node[below] (l3) {${\scriptstyle n\text{-th}}$};}
\end{tikzpicture}

\end{document}

Which gives: rendered equation

3

Let's make the subscripts as less intrusive as possible:

\documentclass{article}
\usepackage{mathtools}

\newcommand{\annoteentry}[2]{%
  \begingroup
  \renewcommand{\arraystretch}{0}%
  \begin{array}[t]{@{}c@{}}
    #1 \\\noalign{\vspace{2pt}}
    \hidewidth\scriptstyle\uparrow\hidewidth\hspace*{0pt}\\\noalign{\vspace{1pt}}
    \hidewidth\scriptstyle\mathstrut#2\hidewidth\hspace*{0pt}
  \end{array}%
  \endgroup
}

\begin{document}

\[
\bigl\{
  (0,\dots,0,
   \annoteentry{1}{(m+1)\text{-th}},
   0,\dots,0),
  (0,\dots,0,0,
   \annoteentry{1}{(m+2)\text{-th}},
   0,\dots,0),
  (0,\dots,0,
   \annoteentry{1}{n\text{-th}})
\bigr\}
\]

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .