TransWikia.com

How do I write a vertically-stacked definition of a sequence?

TeX - LaTeX Asked on January 29, 2021

I’m trying to reproduce this notation in LaTex but to no avail.

enter image description here

This means $e_j$ has the value of $0$ in all other coordinates except for the j-th one.

I can only do the part without $(j)$: $e_{j} :=(0, ldots, 0,1,0, ldots, 0) in K^{m}$

Please shed me some light! Thank you so much!

6 Answers

For example:

documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{stackengine}
% these are from https://www.tug.org/TUGboat/tb22-4/tb72perlS.pdf    
defclap#1{hbox to 0pt{hss#1hss}}
begin{document}
$(0,dots,0,ensurestackMath{stackunder{1}{clap{$(i)$}}},0,dots,0)$
end{document}

enter image description here

(The clap is a bit harsh; see the linked article for a better way)

Answered by Rmano on January 29, 2021

Here is an example:

documentclass{article}
usepackage{amsmath}
begin{document}
$E_j := underset{(j)}{(0,dots,0,1,0,dots,0)}$
end{document}


EDIT:

For asymmetric case:

e_j := (0,dots,underset{(j-1)}{0},underset{(j)}{1},0,dots,0)

enter image description here

Answered by Andrey L. on January 29, 2021

Here's a solution which employs the amssymb and mathtools packages.

enter image description here

If you would like to push the (j) term a bit lower than in the picture shown above, simply change {1} to {1mathstrut}.

documentclass{article}
usepackage{mathtools,amssymb}
begin{document}
Let $minmathbb{N}^{times}$. For $j=1,dots,m$ define
[
e_j := (0,dots,0,underset{mathclap{(j)}}{1},0,dots,0) in K^m
]
end{document}

Answered by Mico on January 29, 2021

I propose two variants, with mathtools and old-arrows:

documentclass{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{mathtools}
usepackage{old-arrows} %

begin{document}

$e_j = (0,dots,0,underset{mathclap{(j)}strut}{1},0,dots,0)$

$e_j = (0,dots,0,underset{substack{uparrow j}strut}{1},0,dots,0)$

end{document} 

enter image description here

Answered by Bernard on January 29, 2021

My proposal, as alternative to the best answers, is the use the package blkarray. enter image description here

documentclass[12pt]{article}
usepackage{mathtools,blkarray}
begin{document}
[
begin{blockarray}{ccccccccc}
begin{block}{c(ccccccc)c}
e_{j} coloneqq mkern-5mu& 0, &  ldots, & 0, & 1, & 0, & ldots, & 0 & mkern-5mu in K^{m}
end{block}
& &  &  & (j)
end{blockarray}
]
end{document}

Answered by Sebastiano on January 29, 2021

Using, appropriately the package nicematrix using the due spacings (mkern), you can obtain a similar result.

enter image description here

documentclass{article}
usepackage{amssymb}
usepackage{nicematrix}
begin{document}
Let $minmathbb{N}^{times}$. For $j=1,ldots,m,$ define

$e_jmathrel{mathop:}=mkern-7mu begin{pNiceArray}{ccccccc}[last-row,first-col,last-col]
& 0, &mkern-10muldots, &mkern-10mu 0, &mkern-15mu 1, &mkern-15mu 0, & mkern-15muldots,&mkern-15mu 0 & 
&  &  & & mkern-20mu overset{(j)}{}  & & & 
end{pNiceArray}mkern-7mu in K^{m}$
end{document}

Answered by Sebastiano on January 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP