Forums: 公開討議/質問 (Thread #36820)

ltjsarticle+listingsのtitle指定 (2015-05-26 00:07 by Nymphium #76223)

クラスをltjsarticleにしてlistingsパッケージを用い、\lstlistingsなどのオプションに`title=...`を渡すと"! Missing number, treated as zero. "が出てコンパイルエラーとなりました。
この問題について、TeX Live 2014に入っているltjsarticle.clsの1139行目、1141行目の`#1\hskip1\zw ...`を#1{}\hskip1\zw ...`とするとコンパイルが通り、想定通りの表示が得られました。
バグ報告はどこにすれば分からなかったので、とりあえずここに書いておきました。
また、バグではなく私の不手際等だったら、最適解などを教えていただけると幸いです。

Reply to #76223×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

Re: ltjsarticle+listingsのtitle指定 (2015-05-26 05:07 by h7k #76224)

[メッセージ #76223 への返信]
> クラスをltjsarticleにしてlistingsパッケージを用い、\lstlistingsなどのオプションに`title=...`を渡すと"! Missing number, treated as zero. "が出てコンパイルエラーとなりました。
TeX フォーラム中の
「listingsパッケージのtitleオプションについて」
http://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=1543
と同じ原因のようです.後で直しますが,とりあえずは
{{{
\makeatletter
\def\lst@title@dropdelim\hskip1\zw{}
\makeatother
}}}
(上記スレッド中の前田さんの回答を ltjsarticle にあうようにしたものです)
をプリアンブルに記述すれば良さそうです.
Reply to #76223

Reply to #76224×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

Re: ltjsarticle+listingsのtitle指定 (2015-05-26 11:16 by Nymphium #76227)

ありがとうございます。
Reply to #76224

Reply to #76227×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login