我将化学结构写成表格。请帮我理解一下,如何减少表格中行和列之间的距离?这是沸石的结构,我想让它在垂直轴和水平轴上看起来更紧凑。
\begin{table}[h]
\begin{tabular}{ccccccccccccccccccccccccccc}
\multicolumn{3}{c}{} & & & & \multicolumn{3}{c}{$\rm NH_4^+$} & & & & \multicolumn{3}{c}{} & & & & \multicolumn{3}{c}{$\rm NH_4^+$} & & & & \multicolumn{3}{c}{} \\
& O & & & & & & O & & & & & & O & & & & & & O & & & & & & O & \\
& & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \\
& & & & Si & & & & & & Al & & & & & & Si & & & & & & Al & & & & \\
& & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \\
& O & & & & & \multicolumn{3}{c}{OO} & & & & \multicolumn{3}{c}{OO} & & & & \multicolumn{3}{c}{OO} & & & & & O & \\
& & & & & & & & & & & & & & & & & & & & & & & & & &
\end{tabular}
\end{table}
答案1
请这样做不是使用表格绘制化学结构。有前面提到的chemfig
包和一些可用于绘制化学结构和方案的替代方案,请参阅你能用 LaTeX 制作化学结构图吗?以及标记的帖子化学无花果。
此外,无需使用tikzpicture
来定位化合物。通过传递 TikZ 设置draw=none? to a bond's TikZ-Option (
[,,,,] ) and
chemfig 强大的方案机制,使用隐形键要容易得多。
这里的基本分子可以通过创建O-Si-O-Al-O-Si-O
链轻松绘制:
\chemfig{
O-[:-30]
Si-[:30]
O-[:-30]
Al-[:30]
O-[:-30]
Si-[:30]
O-[:-30]
Al-[:30]
O
}
可以将电荷置于Al
原子上方\chemabove
:
\chemfig{
O-[:-30]
Si-[:30]
O-[:-30]
\chemabove{Al}{-}-[:30]
O-[:-30]
Si-[:30]
O-[:-30]
\chemabove{Al}{-}-[:30]
O
}
现在我们可以使用语法将侧链添加到缺失的O
s中:chemfig
(...)
\chemfig{
O-[:-30]
Si(-[:-120]O)(-[:-60]O)-[:30]
O-[:-30]
\chemabove{Al}{-}(-[:-120]O)(-[:-60]O)-[:30]
O-[:-30]
Si(-[:-120]O)(-[:-60]O)-[:30]
O-[:-30]
\chemabove{Al}{-}(-[:-120]O)(-[:-60]O)-[:30]
O
}
最后但同样重要的是,让我们从Al
s 到铵离子绘制不可见的键:
\chemfig{
O-[:-30]
Si(-[:-120]O)(-[:-60]O)-[:30]
O-[:-30]
\chemabove{Al}{-}(-[:-120]O)(-[:-60]O)(-[2,,,,draw=none]NH_4^+)-[:30]
O-[:-30]
Si(-[:-120]O)(-[:-60]O)-[:30]
O-[:-30]
\chemabove{Al}{-}(-[:-120]O)(-[:-60]O)(-[2,,,,draw=none]NH_4^+)-[:30]
O
}
完整方案如下@EvgenyChem 的回答然后最好使用
\schemestart
<compound>
\arrow
<compound>
\schemestop
在这种情况下,垂直排列似乎更有意义,因此我们选择方案的默认角度,-90
并使用可选参数\schemestart[-90]
。以下是一个可能的完整方案的示例:
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\begin{figure}
\centering
\small
\schemestart[-90]
\chemfig{
O-[:-30]
Si(-[:-120]O)(-[:-60]O)-[:30]
O-[:-30]
\chemabove{Al}{-}(-[:-120]O)(-[:-60]O)(-[2,,,,draw=none]NH_4^+)-[:30]
O-[:-30]
Si(-[:-120]O)(-[:-60]O)-[:30]
O-[:-30]
\chemabove{Al}{-}(-[:-120]O)(-[:-60]O)(-[2,,,,draw=none]NH_4^+)-[:30]
O
}
\arrow
\chemfig{
O-[:-30]
Si(-[:-120]O)(-[:-60]O)-[:30]
O-[:-30]
\chemabove{Al}{-}(-[:-120]O)(-[:-60]O)(-[2,,,,draw=none]H^+)-[:30]
O-[:-30]
Si(-[:-120]O)(-[:-60]O)-[:30]
O-[:-30]
\chemabove{Al}{-}(-[:-120]O)(-[:-60]O)(-[2,,,,draw=none]H^+)-[:30]
O
}
\arrow
\chemfig{
O-[:-30]
Si(-[:-120]O)(-[:-60]O)-[:30]
O(-[2]H)-[:-30,,,,draw=none]
Al(-[:-120]O)(-[:-60]O)-[:30]
O-[:-30]
Si(-[:-120]O)(-[:-60]O)-[:30]
O(-[2]H)-[:-30,,,,draw=none]
Al(-[:-120]O)(-[:-60]O)-[:30]
O
}
\arrow
\chemfig{
O-[:-30]
Si(-[:-120]O)(-[:-60]O)-[:30]
O-[:-30]
\chemabove{Al}{-}(-[:-120]O)(-[:-60]O)-[:30]
O-[:-30]
\chemabove{Si}{+}(-[:-120]O)(-[:-60]O)-[:30,,,,draw=none]
-[:-30,,,,draw=none]
Al(-[:-120]O)(-[:-60]O)-[:30]
O
}
\schemestop
\caption{Caltination of zeolites} \label{fig:Caltination}
\end{figure}
\end{document}
答案2
我建议使用chemfig
而不是试图用表格来完成你的任务。它将为你提供所需的结构,而且学习起来也不太难。
\documentclass{article}
\usepackage[paperwidth=300pt, paperheight=150pt]{geometry} % for this example only
\usepackage{chemfig}
\begin{document}
\begin{tikzpicture}
\node at (-1.4,-1.5) (nh1) {%
\chemfig{NH_4^+}};
\node at (1.6,-1.5) (nh2) {%
\chemfig{NH_4^+}};
\node at (0,-3) (zeolite) {%
\chemfig{%
Si((-[:135]O)(-[:225]O)(-[:300]O)(-[:45]O(-[:315]Al((-[:135]O)(-[:240]O)(-[:300]O)(-[:45]O(-[:315]Si((-[:135]O)(-[:240]O)(-[:300]O)(-[:45]O(-[:315]Al((-[:135]O)(-[:240]O)(-[:315]O)(-[:45]O)))))))))))
}};
\end{tikzpicture}
\end{document}
这是结果。您可以指定键角等。
答案3
\arraystretch
一种可能的方法是重新定义环境\tabcolsep
内的命令table
。
\tabcolsep
c
在本例中, 控制列类型说明符 ( ) 之前和之后的间距。\arraystretch
控制行之间的间距。
您应该使用适合您需要的值。我的值只是初步猜测,以表明它有效。
\documentclass{scrartcl}
\usepackage{MnSymbol}
\begin{document}
\begin{table}[h]
\renewcommand{\arraystretch}{0.6}
\renewcommand{\tabcolsep}{1pt}
\begin{tabular}{ccccccccccccccccccccccccccc}
\multicolumn{3}{c}{} & & & & \multicolumn{3}{c}{$\rm NH_4^+$} & & & & \multicolumn{3}{c}{} & & & & \multicolumn{3}{c}{$\rm NH_4^+$} & & & & \multicolumn{3}{c}{} \\
& O & & & & & & O & & & & & & O & & & & & & O & & & & & & O & \\
& & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \\
& & & & Si & & & & & & Al & & & & & & Si & & & & & & Al & & & & \\
& & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \\
& O & & & & & \multicolumn{3}{c}{OO} & & & & \multicolumn{3}{c}{OO} & & & & \multicolumn{3}{c}{OO} & & & & & O & \\
& & & & & & & & & & & & & & & & & & & & & & & & & &
\end{tabular}
\end{table}
\begin{table}[h]
\begin{tabular}{ccccccccccccccccccccccccccc}
\multicolumn{3}{c}{} & & & & \multicolumn{3}{c}{$\rm NH_4^+$} & & & & \multicolumn{3}{c}{} & & & & \multicolumn{3}{c}{$\rm NH_4^+$} & & & & \multicolumn{3}{c}{} \\
& O & & & & & & O & & & & & & O & & & & & & O & & & & & & O & \\
& & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \\
& & & & Si & & & & & & Al & & & & & & Si & & & & & & Al & & & & \\
& & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \multicolumn{2}{c}{$\diagup$} & & \multicolumn{2}{c}{$\diagdown$} & & \\
& O & & & & & \multicolumn{3}{c}{OO} & & & & \multicolumn{3}{c}{OO} & & & & \multicolumn{3}{c}{OO} & & & & & O & \\
& & & & & & & & & & & & & & & & & & & & & & & & & &
\end{tabular}
\end{table}
\end{document}
答案4
如何将这两条线与左边缘对齐?我想将第二行向左移动。
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\begin{figure}[!h]
%\begin{center}
\small % шрифт
\schemestart
\noindent
\chemfig{%
Si((-[:135]O)(-[:240]O)(-[:300]O)(-[:45]O(-[:90,1,1,,draw=none]{NH_4^+})(-[:315]\chemabove{Al}{\scriptstyle{-}}((-[:240]O)(-[:300]O)(-[:45]O(-[:315]Si((-[:240]O)(-[:300]O)(-[:45]O(-[:90,1,1,,draw=none]{NH_4^+})(-[:315]\chemabove{Al}{\scriptstyle{-}}((-[:240]O)(-[:300]O)(-[:45]O)))))))))))
}
\arrow{->[][][-15pt]}[,0.8]
\chemfig{%
Si((-[:135]O)(-[:240]O)(-[:300]O)(-[:45]O(-[:90,1,1,,draw=none]{H^+})(-[:315]\chemabove{Al}{\scriptstyle{-}}((-[:240]O)(-[:300]O)(-[:45]O(-[:315]Si((-[:240]O)(-[:300]O)(-[:45]O(-[:90,1,1,,draw=none]{H^+})(-[:315]\chemabove{Al}{\scriptstyle{-}}((-[:240]O)(-[:300]O)(-[:45]O)))))))))))
}
\arrow{->[][][-15pt]}[,0.8]
\schemestop
\vspace{\baselineskip}
\schemestart
\noindent
\arrow{->[][][-15pt]}[,0.8]
\chemfig{%
Si((-[:135]O)(-[:240]O)(-[:300]O)(-[:45]O(-[:90]H)(-[:315,,,,draw=none]Al((-[:240]O)(-[:300]O)(-[:45]O(-[:315]Si((-[:240]O)(-[:300]O)(-[:45]O(-[:90]H)(-[:315,,,,draw=none]Al((-[:240]O)(-[:300]O)(-[:45]O)))))))))))
}
\arrow{->[][][-15pt]}[,0.8]
\chemfig{%
Si((-[:135]O)(-[:240]O)(-[:300]O)(-[:45]O(-[:90,1,1,,draw=none]\phantom{H})(-[:315]\chemabove{Al}{\scriptstyle{-}}((-[:240]O)(-[:300]O)(-[:45]O(-[:315]\chemabove{Si}{\scriptstyle{+}}((-[:240]O)(-[:300]O)(-[:45,,,,draw=none]{}(-[:315,,,,draw=none]Al((-[:240]O)(-[:300]O)(-[:45]O)))))))))))
}
\schemestop
\caption{Text} \label{fig:Caltination}
%\end{center}
\end{figure}
\normalsize