2

I have to show some long vector transformation such as this one --- see image below. You begin with the vector on the left and a transformation takes it to the vector on the right. (See image below.)

This presentation easily gives me underfull problems. Can you suggest some way of displaying such vector sequences better? The vector notation is not required. You can think of these numbers as lists.

I wouldn't like to use patterns and the power of ``...'' because I think the exposition won't be as clear as if the reader sees the whole thing straightforwardly.

\documentclass[a4paper]{article}
\usepackage{amsmath}
\begin{document}

$$\begin{bmatrix}0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
  0,1767\\0,1767\end{bmatrix}
\to 
\begin{bmatrix}
-0,1546\\-0,1546\\0,1988\\0,1988\\
 0,1988\\-0,1546\\-0,1546\\-0,1546\\0,1988\\
 0,1988\\0,1988\\-0,1546\\-0,1546\\-0,1546\\0,1988\\
 0,1988\\0,1988\\-0,1546\\-0,1546\\-0,1546\\0,1988\\
 0,1988\\0,1988\\-0,1546\\-0,1546\\-0,15467\\0,1988\\
 0,1988\\0,1988\\-0,1546\\-0,1546\\-0,1546\end{bmatrix}$$ 

\end{document}

Check how vertical it gets and how much space is wasted. If no better idea comes up, I'll probably try something like this.

My attempt at showing the transformation

  • 1
    Please do not misinterpret this comment, but I am really wondering: who will, in the year 2019, really read these numbers? Wouldn't it be better to just describe what these vectors are good for and provide the numbers/lists in some downloadable format somewhere such that anybody who wants to play with them can get them? – user121799 Feb 9 '19 at 23:54
  • 1
    You could break the vector into blocks and display the blocks using align with lots of &s. – John Kormylo Feb 9 '19 at 23:56
  • 2
    Well, you can certainly typeset whatever you like. Frankly, all information I can see is that there are two vectors of equal dimensions, one of which is filled by 1/(4*sqrt(2)) and the other one by two different numbers, X and Y, that come in a pattern 3 times X followed by 3 times Y followed by three times X and so on, and there is one place where there is an additional digit. Just for the records, I would illustrate this differently. But this is just a comment, and not an instruction or something like this. – user121799 Feb 10 '19 at 0:12
  • 1
    Whatever else you end up doing, I suggest you load the icomma package, so that the spacing around the , (comma) characters is appropriate for their use as decimal markers. (By default, TeX's math mode inserts some space after the commas.) – Mico Feb 10 '19 at 0:49
  • 1
    \documentclass[fleqn]{article} \usepackage{amsmath} \begin{document} When dealing with positions on a higher--dimensional lattice, some use exponents to denote the repeating entries of the lattice vectors, so \[ (0^3\,1^2\,0^2\,1)~\equiv~(0,0,0,1,1,0,0,1)\;.\] In this notation, your equation may be condensed to \[ \bigl(z^{32}\bigr)~\to~\bigl(x^2\,(y^3\,x^3)^5\bigr)\;,\quad \text{where}~z=\frac{1}{4\sqrt{2}}\;,~x=-0{,}1546\;,~~y=0{,}1988\;.\] \end{document} is my suggestion. – user121799 Feb 10 '19 at 3:44
3

You could split in half:

\documentclass[a4paper]{article}
\usepackage{amsmath}

\usepackage{lipsum} % for context

\makeatletter
\newenvironment{topmatrix}{\left\lceil\env@matrix}{\endmatrix\right\rceil}
\newenvironment{botmatrix}{\left\lfloor\env@matrix}{\endmatrix\right\rfloor}
\makeatother

\begin{document}

\lipsum*[1][1-3]
\[
\begin{topmatrix}
0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
\end{topmatrix}
\to
\begin{topmatrix}
-0,1546\\-0,1546\\ 0,1988\\ 0,1988\\ 0,1988\\-0,1546\\-0,1546\\-0,1546\\
 0,1988\\ 0,1988\\ 0,1988\\-0,1546\\-0,1546\\-0,1546\\ 0,1988\\ 0,1988\\
\end{topmatrix}
\qquad\qquad
\begin{botmatrix}
0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
\end{botmatrix}
\to
\begin{botmatrix}
 0,1988\\-0,1546\\-0,1546\\-0,1546\\ 0,1988\\ 0,1988\\ 0,1988\\-0,1546\\
-0,1546\\-0,15467\\0,1988\\ 0,1988\\ 0,1988\\-0,1546\\-0,1546\\-0,1546\\
\end{botmatrix}
\]
\lipsum[2]

\end{document}

enter image description here

| improve this answer | |
  • Thank you! This is probably the nicest solution I could get given my circumstances. – Joep Awinita Feb 10 '19 at 21:32
  • 1
    @JoepAwinita With a midmatrix using \left| and \right| you could also split into three. – egreg Feb 10 '19 at 21:42
  • I see. I get the idea. Very nice solution indeed. Very grateful for the idea. (I'm also seeing the \makeatletter for the first time. Cool stuff.) – Joep Awinita Feb 10 '19 at 21:44
3

You could use wrapfig.

\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{wrapfig}
\usepackage{lipsum}
\begin{document}

\begin{wrapfigure}{r}{4cm}\begin{minipage}{4cm}
\[
\begin{bmatrix}0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\0,1767\\
  0,1767\\0,1767\end{bmatrix}
\to 
\begin{bmatrix}
-0,1546\\-0,1546\\0,1988\\0,1988\\
 0,1988\\-0,1546\\-0,1546\\-0,1546\\0,1988\\
 0,1988\\0,1988\\-0,1546\\-0,1546\\-0,1546\\0,1988\\
 0,1988\\0,1988\\-0,1546\\-0,1546\\-0,1546\\0,1988\\
 0,1988\\0,1988\\-0,1546\\-0,1546\\-0,15467\\0,1988\\
 0,1988\\0,1988\\-0,1546\\-0,1546\\-0,1546\end{bmatrix}
\]
\end{minipage}\end{wrapfigure}
\sloppy
\lipsum[1-4]
\end{document}

With flalign* I could squeeze in 3 blocks, but they were too close together to be easily distinguished.

\documentclass[a4paper]{article}
\usepackage{amsmath}
\begin{document}

\begin{align*}
\begin{bmatrix}
0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767
\end{bmatrix}
&\to 
\begin{bmatrix}
-0,1546\\-0,1546\\0,1988\\0,1988\\
 0,1988\\-0,1546\\-0,1546\\-0,1546\\
0,1988\\0,1988\\0,1988\\-0,1546\\
-0,1546\\-0,1546\\0,1988\\0,1988
\end{bmatrix}
&
\begin{bmatrix}
0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767\\
0,1767\\0,1767\\0,1767\\0,1767
\end{bmatrix}
&\to 
\begin{bmatrix}
0,1988\\-0,1546\\-0,1546\\-0,1546\\
0,1988\\0,1988\\0,1988\\-0,1546\\
-0,1546\\-0,15467\\0,1988\\ 0,1988\\
0,1988\\-0,1546\\-0,1546\\-0,1546
\end{bmatrix}
\end{align*}
\end{document}
| improve this answer | |
  • That's pretty neat, but I think your first idea might work better due to my context here. Nearby pages contain a lot of equations and wrapping equation-text on the left of these numbers will probably be a bit confusing. I'll try this one too, but I believe I'll stick to your first idea. – Joep Awinita Feb 10 '19 at 0:10
  • 1
    After ;your comment I decided to add that one as well. (It was more work.) – John Kormylo Feb 10 '19 at 0:38
2

You mentioned that (a) the numbers don't have to be typeset as column vectors and (b) you wish to save some space; I assume you wish to typeset several numbers per line. You could place the numbers in minipage environments, choosing the widths so that 3, 4, 5, or even 6 numbers could be typeset in each row. (The following example typesets 4 numbers per line.)

enter image description here

\documentclass[a4paper]{article}
\usepackage{icomma} % treat "," as decimal marker (no extra space)
\newlength\lena
\newlength\lenb
\begin{document}

\settowidth\lena{$0,0000$ }
\settowidth\lenb{$-0,0000$ }

\begin{center}
\begin{minipage}{4\lena}
\raggedright
$0,1767$ $0,1767$ $0,1767$ $0,1767$
$0,1767$ $0,1767$ $0,1767$ $0,1767$
$0,1767$ $0,1767$ $0,1767$ $0,1767$ 
$0,1767$ $0,1767$ $0,1767$ $0,1767$ 
$0,1767$ $0,1767$ $0,1767$ $0,1767$ 
$0,1767$ $0,1767$ $0,1767$ $0,1767$ 
$0,1767$ $0,1767$ $0,1767$ $0,1767$ 
$0,1767$ $0,1767$ $0,1767$ $0,1767$
\end{minipage}
\qquad$\to$\qquad
\begin{minipage}{4\lenb}
\raggedright
$-0,1546$ $-0,1546$ $0,1988$ $0,1988$ 
 $0,1988$ $-0,1546$ $-0,1546$ $-0,1546$ 
 $0,1988$ $0,1988$ $0,1988$ $-0,1546$ 
$-0,1546$ $-0,1546$ $0,1988$ $0,1988$ 
$0,1988$ $-0,1546$ $-0,1546$ $-0,1546$ 
$0,1988$ $0,1988$ $0,1988$ $-0,1546$ 
$-0,1546$ $-0,1546$ $0,1988$ $0,1988$ 
$0,1988$ $-0,1546$ $-0,1546$ $-0,1546$
\end{minipage}
\end{center}
\end{document}
| improve this answer | |

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.