什么是在前两列中创建垂直空间?

什么是在前两列中创建垂直空间?

我正在使用 vwcol 包,我知道它在处理非纯文本时会出现问题。我能做些什么来修复垂直间距吗?

示例照片

\begin{vwcol}[widths={0.35,0.35,0.3}]
    \renewcommand{\arraystretch}{1.0}

    From rectangular to spherical:

    $$\begin{bmatrix}
        A_{r} \\ A_{\theta} \\ A_{\phi}
    \end{bmatrix}
    \!=\!
    \begin{bmatrix}
        \sin\theta \cos\phi & \sin\theta \sin\phi & \cos\theta \\
        \cos\theta \cos\phi & \cos\theta \sin\phi & -\sin\theta \\
        -\sin\phi           & \cos\phi            & 0
    \end{bmatrix}
    \!\begin{bmatrix}
        A_{x} \\ A_{y} \\ A_{z}
    \end{bmatrix}$$

    From spherical to rectangular:

    $$\begin{bmatrix}
        A_{x} \\A_{y} \\ A_{z}
    \end{bmatrix}
    \!=\!
    \begin{bmatrix}
        \sin\theta \cos\phi & \cos\theta \cos\phi & -\sin\phi \\
        \sin\theta \sin\phi & \cos\theta \sin\phi & \cos\phi \\
        \cos\theta          & -\sin\theta         & 0
    \end{bmatrix}
    \!\begin{bmatrix}
        A_{r} \\ A_{\theta} \\ A_{\phi}
    \end{bmatrix}$$

    From cylindrical to spherical:

    $\begin{bmatrix}
        A_{r} \\ A_{\theta} \\ A_{\phi}
    \end{bmatrix}
    \!=\!
    \begin{bmatrix}
        \sin\theta & 0 & \cos\theta \\ 
        \cos\theta & 0 & -\sin\theta \\ 
        0          & 1 & 0
    \end{bmatrix}
    \!\begin{bmatrix}
        A_{\rho} \\ A_{\phi} \\ A_{z}
    \end{bmatrix}$

\end{vwcol}

答案1

我认为这个包没有迫切的必要性vwcol。但是,我认为有必要使用它\footnotesize(字体大小线性减少 20%),以使三个表达式适合文本块。

在此处输入图片描述

\documentclass{article}
\usepackage[letterpaper,margin=1in]{geometry}
\usepackage{amsmath} % for 'bmatrix' env.
\usepackage{newpxtext,newpxmath} % optional

\begin{document}

\begingroup % localize scope of next 3 instructions

\setlength\arraycolsep{3pt} % default: 5pt
\setlength\tabcolsep{0pt}   % default: 6pt
\footnotesize

\noindent
\begin{tabular}{c}
From rectangular to spherical\\[2ex]
$ \begin{bmatrix}
  A_{r} \\ A_{\theta} \\ A_{\phi}
  \end{bmatrix}
  {=}
  \begin{bmatrix}
  \sin\theta \cos\phi & \sin\theta \sin\phi & \cos\theta \\
  \cos\theta \cos\phi & \cos\theta \sin\phi & -\sin\theta \\
  -\sin\phi & \cos\phi & 0
  \end{bmatrix}\!
  \begin{bmatrix}
  A_{x} \\ A_{y} \\ A_{z} 
  \end{bmatrix}$
\end{tabular}% 
\hfill
\begin{tabular}{c}
From spherical to rectangular\\[2ex]
$ \begin{bmatrix}
  A_{x} \\A_{y} \\ A_{z}
  \end{bmatrix}
  {=}
  \begin{bmatrix}
  \sin\theta \cos\phi & \cos\theta \cos\phi & -\sin\phi \\
  \sin\theta \sin\phi & \cos\theta \sin\phi & \cos\phi \\
  \cos\theta & -\sin\theta & 0
  \end{bmatrix}\!
  \begin{bmatrix}
  A_{r} \\ A_{\theta} \\ A_{\phi}
  \end{bmatrix}$
\end{tabular}%
\hfill
\begin{tabular}{c}
From cylindrical to spherical\\[2ex]
$ \begin{bmatrix}
  A_{r} \\ A_{\theta} \\ A_{\phi}
  \end{bmatrix}
  {=}
  \begin{bmatrix}
  \sin\theta & 0 & \cos\theta \\ 
  \cos\theta & 0 & -\sin\theta \\ 
  0 & 1 & 0
  \end{bmatrix}\!
  \begin{bmatrix}
  A_{\rho} \\ A_{\phi} \\ A_{z}
  \end{bmatrix}$
\end{tabular}

\endgroup

\end{document}

答案2

您没有说明页面的几何形状:该输入对于常规文本宽度来说肯定太宽了。

最简单的方法是使用tabular这三个对象,因此它们可以根据可用的文本宽度以不同的方式放置。

非常广泛,需要\footnotesize

\documentclass[a4paper]{article}
\usepackage[left=1cm,right=1.5cm]{geometry}
\usepackage{amsmath}

\begin{document}

\begin{center}
\footnotesize
\begin{tabular}{@{}l@{}}
From rectangular to spherical: \\[1ex]
$\!
 \begin{bmatrix}
   A_{r} \\ A_{\theta} \\ A_{\phi}
 \end{bmatrix}
 =
 \begin{bmatrix}
   \sin\theta \cos\phi & \sin\theta \sin\phi & \cos\theta \\
   \cos\theta \cos\phi & \cos\theta \sin\phi & -\sin\theta \\
   -\sin\phi           & \cos\phi            & 0
 \end{bmatrix}
 \begin{bmatrix}
   A_{x} \\ A_{y} \\ A_{z}
 \end{bmatrix}
$
\end{tabular}\hfill
\begin{tabular}{@{}l@{}}
From spherical to rectangular: \\[1ex]
$\!
 \begin{bmatrix}
   A_{x} \\A_{y} \\ A_{z}
 \end{bmatrix}
 =
 \begin{bmatrix}
   \sin\theta \cos\phi & \cos\theta \cos\phi & -\sin\phi \\
   \sin\theta \sin\phi & \cos\theta \sin\phi & \cos\phi \\
   \cos\theta          & -\sin\theta         & 0
 \end{bmatrix}
 \begin{bmatrix}
   A_{r} \\ A_{\theta} \\ A_{\phi}
 \end{bmatrix}
$
\end{tabular}\hfill
\begin{tabular}{@{}l@{}}
From cylindrical to spherical: \\[1ex]
$\!
 \begin{bmatrix}
   A_{r} \\ A_{\theta} \\ A_{\phi}
 \end{bmatrix}
 =
 \begin{bmatrix}
   \sin\theta & 0 & \cos\theta \\ 
   \cos\theta & 0 & -\sin\theta \\ 
   0          & 1 & 0
 \end{bmatrix}
 \begin{bmatrix}
   A_{\rho} \\ A_{\phi} \\ A_{z}
 \end{bmatrix}
$
\end{tabular}

\end{center}

\end{document}

在此处输入图片描述

比标准宽一点,\small足够了

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

\begin{document}

\begin{center}
\small
\begin{tabular}{@{}l@{}}
From rectangular to spherical: \\[1ex]
$\!
 \begin{bmatrix}
   A_{r} \\ A_{\theta} \\ A_{\phi}
 \end{bmatrix}
 =
 \begin{bmatrix}
   \sin\theta \cos\phi & \sin\theta \sin\phi & \cos\theta \\
   \cos\theta \cos\phi & \cos\theta \sin\phi & -\sin\theta \\
   -\sin\phi           & \cos\phi            & 0
 \end{bmatrix}
 \begin{bmatrix}
   A_{x} \\ A_{y} \\ A_{z}
 \end{bmatrix}
$
\end{tabular}\hfill
\begin{tabular}{@{}l@{}}
From spherical to rectangular: \\[1ex]
$\!
 \begin{bmatrix}
   A_{x} \\A_{y} \\ A_{z}
 \end{bmatrix}
 =
 \begin{bmatrix}
   \sin\theta \cos\phi & \cos\theta \cos\phi & -\sin\phi \\
   \sin\theta \sin\phi & \cos\theta \sin\phi & \cos\phi \\
   \cos\theta          & -\sin\theta         & 0
 \end{bmatrix}
 \begin{bmatrix}
   A_{r} \\ A_{\theta} \\ A_{\phi}
 \end{bmatrix}
$
\end{tabular}

\bigskip

\begin{tabular}{@{}l@{}}
From cylindrical to spherical: \\[1ex]
$\!
 \begin{bmatrix}
   A_{r} \\ A_{\theta} \\ A_{\phi}
 \end{bmatrix}
 =
 \begin{bmatrix}
   \sin\theta & 0 & \cos\theta \\ 
   \cos\theta & 0 & -\sin\theta \\ 
   0          & 1 & 0
 \end{bmatrix}
 \begin{bmatrix}
   A_{\rho} \\ A_{\phi} \\ A_{z}
 \end{bmatrix}
$
\end{tabular}

\end{center}

\end{document}

在此处输入图片描述

相关内容