abenori / jlreq

Other
125 stars 18 forks source link

`\endnote` のバグ? `\obeylines` の有効無効が切り替わったときの不具合 #130

Closed lemniscati closed 9 months ago

lemniscati commented 9 months ago

状況

\obeylines が有効な状態で \endnote を使用し,\obeylines が無効な状態で \theendnotes が実行されると,endnote 内で改行による改段落以後インデントされない.

再現方法

Cygwin + Tex Live 2023 を使用しました.

This is LuaHBTeX, Version 1.16.0 (TeX Live 2023/Cygwin)
LaTeX2e <2022-11-01> patch level 1
 L3 programming layer <2023-02-22>
Document Class: jlreq 2023/03/05 jlreq

下記のファイルを lualatex で処理します. 二番目の endnote で改段落以降インデントされません.

\documentclass{jlreq}
\begin{document}

\section{テスト}

\begingroup\obeylines%
テスト(obeylines が有効なときに endnoteを使う)\endnote{obeylinesが有効なときに,改段落parを含む endnote をいれる.%
\par%
ココ.改段落を含む endnote をいれる.%
\par%
ココ.あいう.}
\endgroup

\begingroup\obeylines%
テスト(obeylines が有効なときに endnoteを使う)\endnote{obeylinesが有効なときに,改段落(改行)を含む endnote をいれる.
ココ.改段落を含む endnote をいれる.
ココ.あいう.}
\endgroup

obeylines が無効な状態で theendnotes を使う.

\theendnotes

↑二番目の endnote で改段落以降インデントされない.

\section{テスト}

\begingroup\obeylines%
テスト(obeylines が有効なときに endnoteを使う)\endnote{obeylinesが有効なときに,改段落parを含む endnote をいれる.%
\par%
ココ.改段落を含む endnote をいれる.%
\par%
ココ.あいう.}
\endgroup

\begingroup\obeylines%
テスト(obeylines が有効なときに endnoteを使う)\endnote{obeylinesが有効なときに,改段落(改行)を含む endnote をいれる.
ココ.改段落を含む endnote をいれる.
ココ.あいう.}
\endgroup

obeylines を有効にして theendnotes を使う.

\begingroup\obeylines%
\theendnotes
\endgroup

\end{document}

当座の回避方法

二番目の section でのように,\obeylines を有効にした状態で \theendnotes を使う.

lemniscati commented 9 months ago

https://okumuralab.org/tex/mod/forum/discuss.php?d=3669#p22875 どうやら,LaTeX 側の問題のようなので,この issue はいったん閉じます.