LoginSignup
4
4

More than 5 years have passed since last update.

org-modeでmulticolumnな表を扱う

Posted at

org-modeでLaTeX出力するための文書を書くとき、\multicolumnを使用する表が必要な時がある。org-modeには一部のセルをつなげた表を書くことが(おそらく)できないので、そういう時は諦めが肝心。org文書にLaTeXを埋め込んでしまうのが手っ取り早い。

#+begin_latex
  \begin{table}[b]
    \caption{caption} \label{label}
    \begin{center}
      \begin{tabular}{|l|cc|cc|}
        \hline
        & \multicolumn{2}{|c|}{multi1} & \multicolumn{2}{|c|}{multi2} \\
        &  1-1  &  1-2  &  2-1  &  2-2  \\
        \hline
        a  &     1  &      2  &    3  &      4  \\
        b  &     5  &      6  &    7  &      8  \\
        \hline
      \end{tabular}
    \end{center}
  \end{table}
#+end_latex    

このように、#+begin_latex と #+end_latex で挟むことで LaTeX 記述を埋め込める。後はその間にカーソルを合わせて C-c ' を入力して、latex-mode で内容を編集しよう。

4
4
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4