我已经创建了latex宏来排版吉他和弦图(使用图片环境)。现在,我想让不同的图表出现在好看的网格中,当排版彼此相邻时,如图所示:
图片. (在图片上:标有“第一”错误的图表布局,当等号图排在一行时标记为“第二”正确布局)
我正在使用\hspace在图之间跳过一些,否则它们就太近了。正如在第二种情况下所看到的,当latex排列图片时,每一行中都有相同数量的图片,这是可行的。然而,如果最后一行中的图片较少,它们就会“移”到右边。我不想要这个。
我猜是因为latex使第一行图之间的空间稍微长了一点,这样行才能完全符合页面的宽度。我如何告诉latex不要调整\hspace创建的空间的大小?或者还有别的办法吗?
我想我不能用表格,因为我不知道有多少张图表可以放进一行.
这是当前的代码状态:
\newcommand{\spaceForChord}{1.7cm}
\newcommnad{\chordChart}[1]{%
%calculate dimensions xdim and ydim according to settings
\begin{picture}(xdim, ydim){%
%draw the diagram inside defined area
}%
\hspace*{\spaceForChord}%
\hspace*{-\xdim}%
}%
%end preambule and begin document
\begin{document}
First:\\*
\\*
\chordChart{...some arguments to change diagram look...}
\chordChart{...some arguments to change diagram look...}
\chordChart{...some arguments to change diagram look...}
\chordChart{...some arguments to change diagram look...}
\chordChart{...some arguments to change diagram look...}
%...above line is repeated 12 more times to produce result shown at the picture
\end{document}谢谢你的帮助。
发布于 2010-04-08 22:19:29
很可能,因为我不能轻松地重新创建您的情况:围绕您的flushleft包装一个\chordCart环境会有什么帮助吗?
也就是说,
First:\\*
\begin{flushleft}
\chordChart{...some arguments to change diagram look...}
...
\end{flushleft}
Second:\\*如果你的假设是正确的,而且LaTeX确实试图扩展空间来证明线条是对的,那么上面的假设应该通过关闭右边的理由来解决你的问题。
https://stackoverflow.com/questions/2603180
复制相似问题