チケット #44626

\lstMakeShortInline fails with some characters when luatex-ja and microtype are involved

登録: 2022-05-19 16:08 最終更新: 2022-05-23 04:43

報告者:
担当者:
チケットの種類:
状況:
オープン [担当者決定済み]
コンポーネント:
(未割り当て)
マイルストーン:
(未割り当て)
優先度:
5 - 中
重要度:
5 - 中
解決法:
なし
ファイル:
1

詳細

The following MCE example:

  1. \documentclass{article}
  2. \usepackage{listings}
  3. \usepackage{luatexja-fontspec}
  4. \usepackage{microtype}
  5. \lstMakeShortInline!
  6. \begin{document}
  7. Foo
  8. !\foo!
  9. \fontspec{Latin Modern Roman}\char"03A9
  10. \end{document}

compiled with lualatex, works like a charm. But, if the ! character is replaced by e.g. ÷, it doesn't work anymore. Depending where the instruction \lstMakeShortInline÷ is, either !\foo! or \fontspec{Latin Modern Roman}\char"03A9 causes the failure.

As advised at https://tex.stackexchange.com/q/644665/18401 by Ulrike Fischer, I report here.

チケットの履歴 (6 件中 3 件表示)

2022-05-19 16:08 更新者: dbitouze
  • 新しいチケット "\lstMakeShortInline fails with some characters when luatex-ja and microtype are involved" が作成されました
2022-05-19 22:29 更新者: h7k
  • 担当者(未割り当て) から h7k に更新されました
2022-05-22 02:28 更新者: schlcht
コメント

This can be broken down into two separate issues: the one is that the current version of microtype isn't aware of \lstMakeShortInline, which will result in the infinite loop in connection with luatexja. This has now been fixed in the dev version: https://github.com/schlcht/microtype/commit/c0f401d5c206e352fb6b7d191b0728ad00275013

A second issue is with luatexja only, if \lstMakeShortInline is issued before loading the package:

  1. \documentclass{article}
  2. \usepackage{listings}
  3. \lstMakeShortInline÷
  4. \usepackage{luatexja-fontspec}
  5. \begin{document}
  6. Foo
  7. ÷\foo÷
  8. Foo
  9. \end{document}

which will result in a Runaway argument error.

2022-05-22 14:45 更新者: h7k
コメント

Thanks for the report, and sorry for the late reply.

I think that commit c2d8b32b will solve the issue. (The new version of lltjp-listings.sty is attached below.)

(編集済, 2022-05-22 14:45 更新者: h7k)
2022-05-23 04:43 更新者: dbitouze
コメント

Répondre à h7k

Thanks for the report, and sorry for the late reply.

You're welcome, and no worry about the late reply!

I think that commit c2d8b32b will solve the issue.

Many thanks!

(The new version of lltjp-listings.sty is attached below.)

AFAICS, replacing the current /usr/local/texlive/2021/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty by the one you attached still raises the same error.

添付ファイルリスト

編集

ログインしていません。ログインしていない状態では、コメントに記載者の記録が残りません。 » ログインする