我有一个矩阵,其上方有两个过度支撑,但它们并不位于其正上方,支撑和矩阵之间有相当大的空间,我不明白为什么会发生这种情况。
documentclass[a4paper,12pt,times,numbered,print,index]{article}
\RequirePackage[left=37mm,right=30mm,top=35mm,bottom=30mm]{geometry}
\RequirePackage{libertine}
\RequirePackage[small,bf,labelsep=space,
tableposition=top]{caption}
\usepackage{multirow}
\usepackage{subfig,amsfonts,amsmath,amssymb,braket}
\usepackage{algorithm}% http://ctan.org/pkg/algorithms
\usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx
\newcolumntype{C}[1]{>{\centering\arraybackslash$}p{#1}<{$}}
\begin{document}
\begin{figure}
\centering
\[
\begin{array}{@{}r@{}}
\overbrace{\begin{array}{@{}*{5}{C{1.5em}}@{}}
&&&&&&
\end{array}}^{\text{$m$ terms}}
\overbrace{\begin{array}{@{}*{5}{C{1.5em}}@{}}
&&&&&&
\end{array}}^{\text{$m$ terms}} \hspace*{10pt}\\[-.5\normalbaselineskip]
\Rightarrow:
\hspace*{-\nulldelimiterspace}
\left[\begin{array}{@{}*{10}{C{1.5em}}@{}}
1 & 1 & 0 & \cdots & \cdots & 0 & 0 & 0 & \cdots & 0 \\
0 & 0 & 0 & \cdots & \cdots & 1 & -1 & 0 & \cdots & 0 \\
0 & 0 & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & 0 \\
0 & 0 & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & 0 \\
\end{array}\right]
\end{array}
\]
\end{figure}
\end{document}
我怎样才能像通常情况一样将这些括号直接放在矩阵上?
答案1
请在发布前测试代码,您的代码有多个错误
! LaTeX Error: Illegal character in array arg.
! Extra alignment tab has been changed to \cr.
! Too many }'s.
! LaTeX Error: \begin{document} ended by \end{figure}.
因此,我不得不猜测这些问题的解决方法,以猜测您实际面临的问题,即您已将括号放在“白色”数组上,但即使单元格是空的,这样的数组也会占用一整行。
我想你想要更多类似的东西
\documentclass[a4paper,12pt,times,numbered,print,index]{article}
\RequirePackage[left=37mm,right=30mm,top=35mm,bottom=30mm]{geometry}
\RequirePackage{libertine}
\RequirePackage[small,bf,labelsep=space,
tableposition=top]{caption}
\usepackage{multirow}
\usepackage{subfig,amsfonts,amsmath,amssymb,braket}
\usepackage{algorithm}% http://ctan.org/pkg/algorithms
\usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx
\begin{document}
\[
\Rightarrow:
\hspace*{-\nulldelimiterspace}
\left[\begin{array}{@{}*{10}{c}@{}}
\noalign{\vspace{-20pt}}
\multicolumn{5}{c}{}&
\multicolumn{2}{c}{\text{\scriptsize$m$-terms}}&
\multicolumn{3}{c}{\text{\scriptsize$n$-terms}}\\[-7pt]
\multicolumn{5}{c}{}&
\multicolumn{2}{c}{$\downbracefill$}&
\multicolumn{3}{c}{$\downbracefill$}\\[-3pt]
1 & 1 & 0 & \cdots & \cdots & 0 & 0 & 0 & \cdots & 0 \\
0 & 0 & 0 & \cdots & \cdots & 1 & -1 & 0 & \cdots & 0 \\
0 & 0 & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & 0 \\
0 & 0 & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & 0 \\
\end{array}\right]
\]
%\end{figure}
\end{document}