lstlistingでlanguageオプションを指定すると日本語でエラーになる

Re: lstlistingでlanguageオプションを指定すると日本語でエラーになる

- 光田 エディー の投稿
返信数: 0
和田さま

サンプルコードまで作って試していただき、ありがとうございます。
和田さんのサンプルコードを実行しましたら、私の環境でもうまく行きました。

いろいろ調べましたら、\lstsetでオプションを設定しているところで、
commentstyle={\smallitshape}
がどうやらエラーの原因になっているらしく、それをコメントアウトしたら、
languageの設定がうまく行くようになりました。

\lstset{
basicstyle={\ttfamily},
identifierstyle={\small},
% commentstyle={\smallitshape},
keywordstyle={\small\bfseries},
ndkeywordstyle={\small},
stringstyle={\small\ttfamily},
frame={tb},
breaklines=true,
upquote=true,
columns=[l]{fullflexible},
numbers=none, %% left
xrightmargin=0ex,
xleftmargin=3ex,
numberstyle={\scriptsize},
stepnumber=1,
numbersep=1ex,
lineskip=-0.5ex
}

どうもありがとうございました。