CTeX-org / zhlipsum

Chinese dummy text
LaTeX Project Public License v1.3c
17 stars 4 forks source link

在 quote/quotation 环境中段落缩进消失 #5

Closed stone-zeng closed 4 years ago

stone-zeng commented 4 years ago
\documentclass{ctexart}
\usepackage{zhlipsum}
\def\text{%
  两个黄鹂鸣翠柳,一行白鹭上青天。
  窗含西岭千秋雪,门泊东吴万里船。}
\edef\text{\text\text\text}
\begin{document}
\begin{quote}
  \text
  \zhlipsum[1]
\end{quote}
\begin{quotation}
  \text
  \zhlipsum[1]
\end{quotation}
\end{document}
qinglee commented 4 years ago

问题出现在

https://github.com/stone-zeng/zhlipsum/blob/ad3d939fad4f81931ab8dd9b4a860a5f08bfd267/source/zhlipsum.dtx#L907-L912

这里\@@_par:保存的是 \par 的原始定义。但在 LaTeX 的 list 类环境(\@trivlist)中,\par都是被重新定义过的,用于实现特殊的段落形状。

所以解决方法是

\cs_new_protected:Npn \@@_par: { \par }