可以將 \figure 與 grid-system 套件一起使用嗎?

可以將 \figure 與 grid-system 套件一起使用嗎?

使用網格系統套件http://www.ctan.org/tex-archive/macros/latex/contrib/grid-system

關於它的文檔很少。當我嘗試\figure在儲存格中新增 a 時,出現 Latex 錯誤。

\documentclass[12pt,notitlepage]{article}%
\usepackage{float}
\usepackage{grid-system}
\begin{document}

\begin{Row}%
\begin{Cell}{2} 
      test
\end{Cell}
\begin{Cell}{1}

\begin{figure}
    test
\end{figure}

\end{Cell}
\end{Row}

\end{document}

現在,當我在 Windows (Miktex 2.9) 上使用 texstudio 編譯它時,出現錯誤:

數學圖形

當我使用 texlive 2013 在 Linux 上編譯時,我得到:

數學圖形

答案1

浮動環境(例如figure和 )table必須允許在文件中自由漫遊 - 當您嘗試將它們限制在諸如minipagevboxparbox以及在您的情況下的框中時Cell,您一定會收到錯誤。

的內部工作原理floats和控制其放置的演算法的詳細資訊在如何影響 LaTeX 中圖形和表格等浮動環境的位置?,這是關於該主題的權威且全面的指南之一。

要繼續處理當前文檔,您只需獲取環境內容figure並將它們放入Cell;如果您需要字幕,那麼您可以captionof使用caption包裹。

相關內容