
Markdown コード内で tcolorboxes を使用するために、Markdown のプリアンブルで次のコードを使用しています。
header-includes:
- |
```{=latex}
\usepackage{tcolorbox}
\newtcolorbox{norm-box}{colback=gray!5!white,arc=0pt,outer arc=0pt,colframe=gray!60!black}
\newtcolorbox{info-box}{colback=cyan!5!white,arc=0pt,outer arc=0pt,colframe=cyan!60!black}
\newtcolorbox{warn-box}{colback=orange!5!white,arc=0pt,outer arc=0pt,colframe=orange!80!black}
\newtcolorbox{error-box}{colback=red!5!white,arc=0pt,outer arc=0pt,colframe=red!75!black}
\newtcolorbox{attn-box}{colback=green!5!white,arc=0pt,outer arc=0pt,colframe=green!75!black}
pandoc-latex-environment:
tcolorbox: [box]
norm-box: [norm]
info-box: [info]
warn-box: [warn]
error-box: [error]
attn-box: [attn]
...
次に、Markdown テキストで次のコードを使用して、ヘッダーといくつかの箇条書きリストを含むライトボックスを生成します。
::: info
**Objectives:**
- test
- test
- test
- test
:::
Pandoc を実行して Markdown ファイルから PDF を生成しようとすると、次のエラー メッセージが表示されます。
Error running filter pandoc-latex-environment:
Error in $.blocks[1].c[1][14].c: cannot unpack array of length 3 into a tuple of length 2
最後の箇条書きの項目を削除すれば、問題なくコンパイルされます。
::: info
**Objectives:**
- test
- test
- test
test
:::
これはバグのように思えます。tcolorbox 内で箇条書きリストを作成する他の方法はありますか?
注: Markdown 内の tcolorbox のすべてを LaTeX に移動すると、問題なく動作します。
\begin{tcolorbox}[colback=cyan!5!white,arc=0pt,outer arc=0pt,colframe=cyan!60!black,title=\textbf{Objectives}]
\begin{itemize}
\item test
\item test
\item test
\item test
\end{itemize}
\end{tcolorbox}
しかし、これらのドキュメントは多くの教育を受けていない LaTeX ユーザーによって使用されるため、できるだけシンプルにする必要があります。ありがとうございます。