使用时tcblisting
我发现\parskip
似乎被忽略了。
\documentclass{article}
\parskip\baselineskip
\usepackage{tcolorbox}
\tcbuselibrary{listings}
\begin{document}
\begin{tcblisting}{%listing engine=minted, %listing only,
verbatim ignore indention at end}
\begin{tabular}{rl}
1 & First point \\
2 & Another point \\
\end{tabular}
Look at the previous 2 points.
\end{tcblisting}
\begin{tabular}{rl}
1 & First point \\
2 & Another point \\
\end{tabular}
Look at the previous 2 points.
\end{document}
有没有办法将 parskip 添加到 tcblisting?
答案1
您可以像这样更改 tcolorbox 的 parskip:
\documentclass{article}
\parskip\baselineskip
\usepackage{tcolorbox}
\tcbuselibrary{listings}
\begin{document}
\begin{tcblisting}{%listing engine=minted, %listing only,
verbatim ignore indention at end,before lower={\parskip\baselineskip}}
\begin{tabular}{rl}
1 & First point \\
2 & Another point \\
\end{tabular}
Look at the previous 2 points.
\end{tcblisting}
\begin{tabular}{rl}
1 & First point \\
2 & Another point \\
\end{tabular}
Look at the previous 2 points.
\end{document}